[论文解读] Compressing Neural Networks: Towards Determining the Optimal Layer-wise Decomposition
本文提出 ALDS,一种新颖的全局压缩框架,通过利用基于 Eckart–Young–Mirsky 定理的逐层误差界,自动确定深度神经网络中各层的最优压缩比。通过在多个子空间中基于 SVD 的低秩分解,ALDS 在最小化各层间最大误差方面进行优化,使 ResNet18(ImageNet)的参数压缩率最高达到 60%,显著优于现有低秩方法。
We present a novel global compression framework for deep neural networks that automatically analyzes each layer to identify the optimal per-layer compression ratio, while simultaneously achieving the desired overall compression. Our algorithm hinges on the idea of compressing each convolutional (or fully-connected) layer by slicing its channels into multiple groups and decomposing each group via low-rank decomposition. At the core of our algorithm is the derivation of layer-wise error bounds from the Eckart Young Mirsky theorem. We then leverage these bounds to frame the compression problem as an optimization problem where we wish to minimize the maximum compression error across layers and propose an efficient algorithm towards a solution. Our experiments indicate that our method outperforms existing low-rank compression approaches across a wide range of networks and data sets. We believe that our results open up new avenues for future research into the global performance-size trade-offs of modern neural networks. Our code is available at https://github.com/lucaslie/torchprune.
研究动机与目标
- 解决低秩神经网络压缩中跨层压缩与精度平衡的全局挑战。
- 开发一种联合优化局部层分解与全局压缩比的框架,以实现最小预测误差。
- 基于 Eckart–Young–Mirsky 定理,推导出逐层低秩分解的理论误差界。
- 实现无需依赖启发式或固定比例策略的自动、高效逐层压缩比选择。
- 探索多子空间与聚类技术对压缩性能与效率的影响。
提出的方法
- 该方法使用基于 SVD 的低秩分解,通过将通道分组到子空间中,对每个卷积层或全连接层进行压缩。
- 提出一种逐层分解策略,允许每层具有可变数量的子空间($k^\ell$)和秩($j^\ell$),以优化压缩与误差之间的权衡。
- 利用 Eckart–Young–Mirsky 定理的谱范数推导误差界,以量化每层的最大相对误差。
- 将压缩问题建模为最小化所有层间最大误差的优化任务,从而实现高效的全局搜索。
- 采用迭代算法,在全局误差约束下联合优化每层的分解参数(子空间数量与秩)。
- 该方法支持仅压缩与一次性微调两种设置,消融实验验证了各组件的贡献。
实验结果
研究问题
- RQ1在神经网络中,使所有层间最大误差最小化的最优逐层压缩比是什么?
- RQ2允许每层具有可变数量的子空间,如何影响低秩压缩中的性能-大小权衡?
- RQ3基于误差的压缩比分配能否在保持模型精度方面优于固定比例启发式方法?
- RQ4不同的子空间聚类技术(如通道切片与投影聚类)对压缩效率与精度有何影响?
- RQ5将搜索空间扩展至标准 SVD 分解之外,能带来多大的性能提升?
主要发现
- ALDS 在 ResNet18(ImageNet)上实现了高达 60% 的参数压缩率,是基线方法的三倍,且精度损失极小。
- 消融实验表明,每层采用可变 $k^\ell$ 显著优于固定 $k^\ell$,证明了自适应分解的重要性。
- 基于误差的秩分配(ALDS-Error)在所有测试设置中均优于恒定压缩比启发式方法(ALDS-Simple)。
- 与通道切片相比,使用投影聚类(Messi)仅带来微小性能提升,但计算开销显著增加,因此通道切片在效率方面更具优势。
- ALDS+ 扩展了局部搜索空间,包含多种分解方案,在 CIFAR10 与 ImageNet 基准上均实现了显著的性能提升。
- 该框架实现了高效、自动且理论依据充分的压缩,无需专用硬件或软件支持。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。