模型压缩作为缓解机器学习模型计算与内存需求的手段已得到广泛应用。每种压缩技术都利用独特特性来减小神经网络的规模。尽管直觉上组合不同技术可能提升压缩效果,但我们发现它们的组合顺序会显著影响性能。为确定神经网络压缩的最优序列,我们提出“压缩顺序(Order of Compression)”——一种以最高效顺序应用多种压缩技术的系统性最优序列。我们首先构建任意两种压缩方法之间顺序的基础,随后证明在任意两种压缩之间插入额外压缩不会破坏这两种压缩方法的原有顺序。基于该基础,通过拓扑排序得到最优顺序。在不同数据集的图像回归与分类网络上验证表明,我们提出的压缩顺序在ResNet34上可将计算成本最高降低859倍,与基线模型相比精度损失可忽略不计(CIFAR10上为-0.09%)。我们相信这种对压缩顺序简单却有效的探索将为模型压缩实践提供启发。
英文摘要:
Model compression has gained significant popularity as a means to alleviate the computational and memory demands of machine learning models. Each compression technique leverages unique features to reduce the size of neural networks. Although intuitively combining different techniques may enhance compression effectiveness, we find that the order in which they are combined significantly influences performance. To identify the optimal sequence for compressing neural networks, we propose the Order of Compression, a systematic and optimal sequence to apply multiple compression techniques in the most effective order. We start by building the foundations of the orders between any two compression approaches and then demonstrate inserting additional compression between any two compressions will not break the order of the two compression approaches. Based on the foundations, an optimal order is obtained with topological sorting. Validated on image-based regression and classification networks across different datasets, our proposed Order of Compression significantly reduces computational costs by up to 859 times on ResNet34, with negligible accuracy loss (-0.09% for CIFAR10) compared to the baseline model. We believe our simple yet effective exploration of the order of compression will shed light on the practice of model compression.