[论文解读] Soft Filter Pruning for Accelerating Deep Convolutional Neural Networks
Soft Filter Pruning (SFP) 在训练过程中通过将范数较小的过滤器置零并在后续训练轮次中允许它们更新来裁剪过滤器,从而提升模型容量并实现有效加速,同时对预训练模型的依赖较小。
This paper proposed a Soft Filter Pruning (SFP) method to accelerate the inference procedure of deep Convolutional Neural Networks (CNNs). Specifically, the proposed SFP enables the pruned filters to be updated when training the model after pruning. SFP has two advantages over previous works: (1) Larger model capacity. Updating previously pruned filters provides our approach with larger optimization space than fixing the filters to zero. Therefore, the network trained by our method has a larger model capacity to learn from the training data. (2) Less dependence on the pre-trained model. Large capacity enables SFP to train from scratch and prune the model simultaneously. In contrast, previous filter pruning methods should be conducted on the basis of the pre-trained model to guarantee their performance. Empirically, SFP from scratch outperforms the previous filter pruning methods. Moreover, our approach has been demonstrated effective for many advanced CNN architectures. Notably, on ILSCRC-2012, SFP reduces more than 42% FLOPs on ResNet-101 with even 0.2% top-5 accuracy improvement, which has advanced the state-of-the-art. Code is publicly available on GitHub: https://github.com/he-y/soft-filter-pruning
研究动机与目标
- 在保持准确性的同时降低 CNN 推理成本的动机。
- 开发一种通过允许被裁剪的过滤器被更新来维持模型容量的裁剪方法。
- 通过将裁剪集成到标准训练中,消除逐层裁剪和繁重微调的需要。
- 展示在不同 CNN 架构和大规模数据集(CIFAR-10 和 ImageNet)上的有效性。
- 展示 SFP 能超越硬裁剪方法,并且可以从头开始或在有预训练模型的情况下工作。
提出的方法
- 在每个训练轮结束时基于它们的 Lp 范数(主要是 L2)裁剪过滤器,以在每一层中选择一定比例 P 的过滤器。
- 将选定的低重要性过滤器置为零,暂时在正向传播中移除它们的贡献。
- 继续训练,使被置零的过滤器通过反向传播重新更新,从而保持模型容量。
- 同时裁剪所有带权层,而不是逐层裁剪,在各层使用相同的裁剪率 P。
- 在训练收敛后通过舍弃被置零的过滤器并调整相应的输入/输出通道维度来重建一个紧凑的模型。
- 提供理论与经验上的加速分析,强调实际提升取决于硬件和库实现。
实验结果
研究问题
- RQ1在训练期间对过滤器进行软裁剪是否能比硬裁剪保持更高的模型容量?
- RQ2在使用 SFP 时,从头开始裁剪是否可行且与裁剪预训练模型具有竞争力?
- RQ3跨层统一裁剪率对精度和加速有何影响?
- RQ4与最先进的裁剪方法相比,SFP 在不同的 CNN 架构和数据集(CIFAR-10 和 ILSVRC-2012)上的表现如何?
主要发现
- SFP 实现了有意义的加速(在某些设置下,ResNet-101 的 FLOPs 最高可减少约 42%,在 ILSVRC-2012 上准确率几乎不变甚至略有提升。)
- 从头裁剪时,软裁剪相对于基线保持或提升准确率,且在使用预训练模型时可达到或超过其性能。
- 与硬裁剪相比,SFP 在训练期间维持更高的模型容量,从而裁剪后获得更好的准确率。
- 基于 L2 范数的筛选在实验中比 L1 范数在裁剪决策上稍微更有效。
- 现实世界的加速(实际推理时间)被证明是显著的,但可能与理论基于 FLOP 的加速不同,原因在于 IO 和 BLAS 效率。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。