[论文解读] Movement Pruning: Adaptive Sparsity by Fine-Tuning
本文提出 Movement Pruning,一种一阶、在微调中可感知权重剪枝的方法,利用累积的权重移动来选择可剪枝权重,在预训练语言模型如 BERT 的高稀疏度区间表现强劲,尤其是在蒸馏的情况下。
Magnitude pruning is a widely used strategy for reducing model size in pure supervised learning; however, it is less effective in the transfer learning regime that has become standard for state-of-the-art natural language processing applications. We propose the use of movement pruning, a simple, deterministic first-order weight pruning method that is more adaptive to pretrained model fine-tuning. We give mathematical foundations to the method and compare it to existing zeroth- and first-order pruning methods. Experiments show that when pruning large pretrained language models, movement pruning shows significant improvements in high-sparsity regimes. When combined with distillation, the approach achieves minimal accuracy loss with down to only 3% of the model parameters.
研究动机与目标
- 在迁移学习中激励剪枝,因为预训练权重在任务数据上进行微调。
- 引入 movement pruning,作为一种一阶的自适应剪枝方法。
- 提供数学基础并与零阶和一阶剪枝方法进行比较。
- 展示在高稀疏性区间以及与蒸馏结合时在自然语言处理任务上的强大表现。
提出的方法
- 定义重要性分数 S 和掩码 M,用于在微调过程中基于移动来剪裁权重。
- 在硬 movement pruning 中使用直通估计器来训练掩码;相对于 S 的梯度满足 ∂L/∂S_{i,j} = ∂L/∂a_i · W_{i,j} · x_j。
- 提供带固定阈值的软 movement pruning 变体以及一个稀疏性正则项以鼓励分数随时间下降。
- 将 movement pruning 与 L0 正则化联系起来,并描述在该框架中梯度如何传播。
- 在 SQuAD、MNLI 和 QQP 上对 BERT-base-uncased 进行实验,使用三次方稀疏度计划和任务特定的微调。
- 在剪枝时引入蒸馏以提升性能。
实验结果
研究问题
- RQ1在 NLP 的迁移学习场景中,movement pruning 能否超越幅度(magnitude)剪枝?
- RQ2在微调过程中的一阶移动信息如何影响高稀疏水平下的稀疏模式和性能?
- RQ3带蒸馏的软 movement pruning 是否在模型大小和准确率之间取得更好的权衡?
- RQ4在局部掩码与全局掩码策略下,剪枝模型有哪些特征?
主要发现
- 在高稀疏区间(剩余权重<15%)中,Movement pruning 显著优于幅度剪枝。
- 在高稀疏设置下,软 movement pruning 在剪枝方法中取得最强性能,尤以蒸馏时为甚。
- 在 SQuAD 上剩余 3% 权重时,movement pruning 达到 65.2/76.3(EM/F1),软 movement pruning 达到 69.5/79.9。
- 在 MNLI 的 3% 权重剩余时,软 movement pruning 达到 79.0/79.6(acc/mm acc)。
- 在 QQP 的 3% 权重剩余时,软 movement pruning 达到 89.3/85.6(acc/F1)。
- 蒸馏在所有剪枝方法中提升性能,在高稀疏下保持强劲表现(例如 SQuAD 3% 在蒸馏下达到 76.6/84.9)。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。