Skip to main content
QUICK REVIEW

[论文解读] Knapsack Pruning with Inner Distillation

Yonathan Aflalo, Asaf Noy|arXiv (Cornell University)|Feb 19, 2020
Evolutionary Algorithms and Applications参考文献 53被引用 18
一句话总结

本文提出了一种名为基于内部蒸馏的背包剪枝(Knapsack Pruning with Inner Distillation, KPID)的一次性神经网络剪枝方法,将通道剪枝建模为背包问题,以在准确率与FLOPs或推理时间之间实现最优平衡,同时利用内部知识蒸馏技术从父网络迁移特征表示。该方法在ResNet和EfficientNet主干网络上于ImageNet、CIFAR-10和CIFAR-100数据集上实现了最先进(SOTA)的准确率,生成的模型在相同FLOPs下比MobileNetV3和EfficientNet-B0更快。

ABSTRACT

Neural network pruning reduces the computational cost of an over-parameterized network to improve its efficiency. Popular methods vary from $\ell_1$-norm sparsification to Neural Architecture Search (NAS). In this work, we propose a novel pruning method that optimizes the final accuracy of the pruned network and distills knowledge from the over-parameterized parent network's inner layers. To enable this approach, we formulate the network pruning as a Knapsack Problem which optimizes the trade-off between the importance of neurons and their associated computational cost. Then we prune the network channels while maintaining the high-level structure of the network. The pruned network is fine-tuned under the supervision of the parent network using its inner network knowledge, a technique we refer to as the Inner Knowledge Distillation. Our method leads to state-of-the-art pruning results on ImageNet, CIFAR-10 and CIFAR-100 using ResNet backbones. To prune complex network structures such as convolutions with skip-links and depth-wise convolutions, we propose a block grouping approach to cope with these structures. Through this we produce compact architectures with the same FLOPs as EfficientNet-B0 and MobileNetV3 but with higher accuracy, by $1\%$ and $0.3\%$ respectively on ImageNet, and faster runtime on GPU.

研究动机与目标

  • 解决现有剪枝方法依赖启发式重要性评分、未能充分利用父网络表达能力的局限性。
  • 在剪枝过程中优化模型准确率与计算成本(FLOPs或推理时间)之间的权衡。
  • 实现对包含跳跃连接、深度可分离卷积和挤压-激励模块等复杂结构的ResNets和EfficientNets的有效剪枝。
  • 通过从父网络迁移中间特征表示的内部知识蒸馏(Inner Knowledge Distillation),提升剪枝后模型的性能。
  • 在相同FLOPs下,生成紧凑且快速的模型,其准确率可匹配或超越EfficientNet-B0和MobileNetV3等SOTA模型。

提出的方法

  • 将网络剪枝建模为背包问题,其中每个通道具有重要性评分和计算成本(FLOPs),目标是在预算约束下最大化准确率。
  • 对FLOP值应用GCD归一化,以支持基于动态规划的背包问题高效求解。
  • 采用模块分组策略,通过将跳跃连接和深度可分离卷积等复杂组件视为原子单元来处理剪枝过程。
  • 提出内部知识蒸馏(IKD),使剪枝后的网络在微调过程中模仿父网络各层的内部激活模式。
  • 采用基于父网络与剪枝网络中间特征之间特征相似性的知识蒸馏损失,而非仅依赖最终logits。
  • 支持基于FLOPs和基于推理时间的剪枝,后者使用实测GPU推理时间以更真实地反映实际性能。

实验结果

研究问题

  • RQ1将网络剪枝建模为背包问题,是否能相比启发式剪枝方法,实现更优的准确率与计算成本之间的权衡?
  • RQ2从父网络迁移中间特征表示(内部知识)是否能提升剪枝模型的准确率?
  • RQ3所提出的方法能否有效剪枝包含跳跃连接和深度可分离卷积等复杂结构的ResNets和EfficientNets?
  • RQ4基于时间的剪枝——即针对GPU上实际推理速度进行优化——是否能在相同FLOP预算下,生成比基于FLOPs的剪枝更快的模型?
  • RQ5所提出的方法能否在ImageNet和CIFAR基准上实现最先进准确率,同时在相同FLOPs下达到或超越MobileNetV3和EfficientNet-B0等SOTA模型的推理速度?

主要发现

  • 在2.58 G FLOPs下,使用剪枝后的ECA-ResNet-101D模型在ImageNet上达到80.69%的top-1准确率,优于相同FLOP水平下的EfficientNet-B0。
  • 在P100 GPU上,对ECA-ResNet-101D进行57%剪枝率的时间基剪枝,达到80.86%准确率和1010张/秒的推理速度,是当前在该FLOP水平下准确率超过80%的最快已知模型。
  • 在V100上,剪枝率43%的ECA-ResNet-50D模型达到79.71%准确率和3587张/秒的推理速度,其速度-准确率权衡优于MobileNetV3。
  • 内部知识蒸馏显著提升了微调性能,使剪枝网络能够更好地保留父网络的特征表示能力。
  • 模块分组方法成功实现了对非顺序及复杂层(如跳跃连接和挤压-激励模块)的有效剪枝。
  • 该方法为一次性剪枝,无需迭代微调,因此高效且适用于预训练模型。

更好的研究,从现在开始

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

无需绑定信用卡

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