Skip to main content
QUICK REVIEW

[论文解读] Advancing Model Pruning via Bi-level Optimization

Yihua Zhang, Yuguang Yao|arXiv (Cornell University)|Oct 8, 2022
Advanced Neural Network ApplicationsComputer Science被引用 18
一句话总结

本文提出BiP,一种基于双层优化(BLO)的模型剪枝方法,将剪枝问题形式化为技术上合理的BLO问题,从而实现类似一阶优化的高效训练动态。BiP在准确率上达到或超过迭代剪枝(IMP)的水平,同时速度提升2–7倍,在5个模型和4个数据集上均展现出更高的准确率和稀疏性可扩展性,优于一次性剪枝方法。

ABSTRACT

The deployment constraints in practical applications necessitate the pruning of large-scale deep learning models, i.e., promoting their weight sparsity. As illustrated by the Lottery Ticket Hypothesis (LTH), pruning also has the potential of improving their generalization ability. At the core of LTH, iterative magnitude pruning (IMP) is the predominant pruning method to successfully find 'winning tickets'. Yet, the computation cost of IMP grows prohibitively as the targeted pruning ratio increases. To reduce the computation overhead, various efficient 'one-shot' pruning methods have been developed, but these schemes are usually unable to find winning tickets as good as IMP. This raises the question of how to close the gap between pruning accuracy and pruning efficiency? To tackle it, we pursue the algorithmic advancement of model pruning. Specifically, we formulate the pruning problem from a fresh and novel viewpoint, bi-level optimization (BLO). We show that the BLO interpretation provides a technically-grounded optimization base for an efficient implementation of the pruning-retraining learning paradigm used in IMP. We also show that the proposed bi-level optimization-oriented pruning method (termed BiP) is a special class of BLO problems with a bi-linear problem structure. By leveraging such bi-linearity, we theoretically show that BiP can be solved as easily as first-order optimization, thus inheriting the computation efficiency. Through extensive experiments on both structured and unstructured pruning with 5 model architectures and 4 data sets, we demonstrate that BiP can find better winning tickets than IMP in most cases, and is computationally as efficient as the one-shot pruning schemes, demonstrating 2-7 times speedup over IMP for the same level of model accuracy and sparsity.

研究动机与目标

  • 弥合迭代剪枝(IMP)与一次性剪枝方法在深度学习模型压缩中的性能-效率差距。
  • 为IMP中使用的剪枝-微调范式提供理论基础坚实的优化框架。
  • 开发一种剪枝方法,实现与IMP相当的高稀疏度和准确率,但计算成本显著降低。
  • 证明通过利用剪枝问题中的双线性结构,双层优化可高效地通过一阶方法求解。
  • 实证验证BiP在多种架构和数据集上寻找稀疏“彩票”的优越性。

提出的方法

  • 将模型剪枝形式化为双层优化(BLO)问题,其中上层优化剪枝掩码,下层微调剪枝后的模型。
  • 利用BLO问题的双线性结构,实现高效的**一阶优化**,避免标准BLO求解器带来的计算负担。
  • 在下层微调中使用单步随机梯度下降(SGD),在收敛速度与计算成本之间取得平衡。
  • 采用一种训练批次方案,为上层和下层分别使用不同或相反的批次,以提升泛化能力和收敛性。
  • 采用可微分掩码机制,实现剪枝掩码与模型权重的端到端联合优化。
  • 通过预热阶段和自适应学习率调度,稳定训练初期的优化过程。

实验结果

研究问题

  • RQ1双层优化能否为寻找‘彩票’提供一个理论合理且计算高效的替代方案,以替代迭代剪枝(IMP)?
  • RQ2剪枝问题的双线性结构如何支持一阶优化?其计算优势是什么?
  • RQ3在高稀疏度下,BiP能否在准确率上超越一次性剪枝方法,特别是在低比例剪枝之外的区域?
  • RQ4训练批次策略的选择(相同、随机或相反)如何影响收敛性和最终模型性能?
  • RQ5BiP是否能在多种架构和数据集上一致地找到‘彩票’——即稀疏子网络,其准确率与原始稠密模型相当或更优?

主要发现

  • 在所有评估设置下,包括高达97.75%的高稀疏度,BiP均实现了与迭代剪枝(IMP)相当或更高的测试准确率。
  • 在CIFAR-10上使用ResNet-18进行74%稀疏度剪枝时,BiP达到89.4%的准确率,与IMP持平,并优于原始稠密模型(88.7%)。
  • 与IMP相比,BiP将训练时间最多缩短7倍,同时保持或提升准确率,展现出显著的计算效率。
  • 在Tiny-ImageNet和ImageNet上,BiP找到了最稀疏的‘彩票’:Tiny-ImageNet上稀疏度达36%,ImageNet上达83%,优于IMP和一次性基线方法。
  • 每次BLO迭代仅使用一步SGD,但延长训练周期,相比多步SGD,整体效率更高,尽管初期收敛较慢。
  • 为上层和下层分别使用不同或相反的训练批次,可提升收敛性和最终准确率,优于使用相同批次的方案。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。