Skip to main content
QUICK REVIEW

[论文解读] Layer-adaptive sparsity for the Magnitude-based Pruning

Jaeho Lee, Sejun Park|arXiv (Cornell University)|Oct 15, 2020
Advanced Neural Network Applications参考文献 45被引用 69
一句话总结

LAMP 引入了一种按层自适应的基于幅度的剪枝分数,通过按层感知的失真量在全局范围内剪除权重,实现在多样的网络结构和数据集上不需超参数调优就达到更好的稀疏性-精度权衡。

ABSTRACT

Recent discoveries on neural network pruning reveal that, with a carefully chosen layerwise sparsity, a simple magnitude-based pruning achieves state-of-the-art tradeoff between sparsity and performance. However, without a clear consensus on "how to choose," the layerwise sparsities are mostly selected algorithm-by-algorithm, often resorting to handcrafted heuristics or an extensive hyperparameter search. To fill this gap, we propose a novel importance score for global pruning, coined layer-adaptive magnitude-based pruning (LAMP) score; the score is a rescaled version of weight magnitude that incorporates the model-level $\ell_2$ distortion incurred by pruning, and does not require any hyperparameter tuning or heavy computation. Under various image classification setups, LAMP consistently outperforms popular existing schemes for layerwise sparsity selection. Furthermore, we observe that LAMP continues to outperform baselines even in weight-rewinding setups, while the connectivity-oriented layerwise sparsity (the strongest baseline overall) performs worse than a simple global magnitude-based pruning in this case. Code: https://github.com/jaeho-lee/layer-adaptive-sparsity

研究动机与目标

  • 为基于幅度的剪枝提供一个无手动调参的逐层稀疏性方案作为参考。
  • 从模型层面的失真最小化视角推导出一个实用的剪枝分数。
  • 提出 LAMP,一个在剪枝下能保持模型输出完整性的超参数自由分数。
  • 在多种架构和数据集上验证 LAMP,在有无权重回 rewind 的情况下均可使用。
  • 分析 LAMP 派生的稀疏性模式与手工启发式和先前基线的比较。

提出的方法

  • 将 LAMP 分数定义为 score(u;W) = (W[u])^2 / sum_{v>=u} (W[v])^2,针对按幅度在每一层中排序的权重。
  • 通过选择最小的 LAMP 分数来满足全局稀疏性约束,实施全局剪枝,这等价于自动选择逐层稀疏性的基于幅度的剪枝。
  • 从输出失真角度为 LAMP 做出理论支撑,证明逐层 MP 解决了一个放宽的 Frobenius 失真最小化问题,导致一个贪心、以失真为目标的剪枝过程。
  • 证明 LAMP 可以以极低的开销进行计算,只需要层级的平方权重累加和作为分母。
  • 显示 LAMP 是超参数自由且不依赖于模型特定知识的,但在很大程度上近似了模型层面的失真。
  • 使用多种 CNN 架构(VGG-16、ResNet-18/34、DenseNet-121、EfficientNet-B0)在 CIFAR-10/100、SVHN 和受限的 ImageNet 数据集上进行评估。

实验结果

研究问题

  • RQ1一个按层自适应、无超参数的剪枝分数是否能在幅度基剪枝的层级稀疏性选择方案中表现更优?
  • RQ2LAMP 分数在多样化架构和数据集下是否能有效近似模型层面的输出失真?
  • RQ3与其他基线相比,LAMP 如何与权重回 rewind 和一次性剪枝相互作用?
  • RQ4LAMP 在各层产生的稀疏模式是什么,与保持第一层与最后一层较为稠密等手工启发式或先前假设相比如何?

主要发现

  • LAMP 在 CIFAR-10 的 VGG-16、ResNet-18/34、DenseNet-121、EfficientNet-B0 上的稀疏-精度权衡方面始终优于基线层级稀疏性方案。
  • 在 CIFAR-10 上,LAMP 在仅有 1.44% 的权重存活时达到 88.1% 的测试准确率,胜过达到 77.8% 的 Erdős-Rényi 核。
  • 在所报道的实验中,LAMP 也在 SVHN、CIFAR-100 和受限 ImageNet 上优于基线,Erdős-Rényi 核在某些情形下仍具竞争力。
  • 在一次性剪枝和权重回 rewind 下,LAMP 表现稳定出色,而 Erdős-Rényi 对回 rewind 可能较敏感。
  • 在 SNIP 设置下,LAMP 的性能达到接近 Global SNIP,表明对标准 MP 情形之外的鲁棒性。
  • LAMP 诱导的逐层稀疏性倾向于保持首层和末层相对更密集,并在高稀疏度下促使各层非零权重分布更为均匀。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。