提出S2HPruner,用软硬网络蒸馏缩小剪枝中的表征差距。
S2HPruner: Soft-to-Hard Distillation Bridges the Discretization Gap in Pruning
- 软硬网络并行训练,通过蒸馏让硬网络学习软网络特征。
- 在CIFAR-100、Tiny ImageNet和ImageNet上无需微调即达最优剪枝性能。
- 适合追求高效剪枝且不依赖微调的模型部署场景。
近期可微掩码剪枝方法通过连续松弛架构(软网络)代理离散剪枝网络(硬网络),以实现更优的子结构搜索。然而,由于离散化过程的不可知影响,硬网络难以达到与软网络相当的表征能力,即存在‘离散化差距’,严重损害剪枝性能。本文首次分析该差距,并提出新型单阶段结构化可微剪枝框架S2HPruner,通过在训练中同时前向传播软网络及其对应硬网络,并在软网络监督下蒸馏硬网络,来弥合差距。为优化掩码并防止性能下降,提出解耦双向知识蒸馏:阻断从硬到软网络的权重更新,同时保留掩码对应的梯度。相比现有方法,S2HPruner在CIFAR-100、Tiny ImageNet和ImageNet等多个基准上均取得超越性剪枝表现,且无需微调。实验分析验证了其有效性。代码即将开源。
原文摘要 · Abstract (English)
Recently, differentiable mask pruning methods optimize the continuous relaxation architecture (soft network) as the proxy of the pruned discrete network (hard network) for superior sub-architecture search. However, due to the agnostic impact of the discretization process, the hard network struggles with the equivalent representational capacity as the soft network, namely discretization gap, which severely spoils the pruning performance. In this paper, we first investigate the discretization gap and propose a novel structural differentiable mask pruning framework named S2HPruner to bridge the discretization gap in a one-stage manner. In the training procedure, SH2Pruner forwards both the soft network and its corresponding hard network, then distills the hard network under the supervision of the soft network. To optimize the mask and prevent performance degradation, we propose a decoupled bidirectional knowledge distillation. It blocks the weight updating from the hard to the soft network while maintaining the gradient corresponding to the mask. Compared with existing pruning arts, S2HPruner achieves surpassing pruning performance without fine-tuning on comprehensive benchmarks, including CIFAR-100, Tiny ImageNet, and ImageNet with a variety of network architectures. Besides, investigation and analysis experiments explain the effectiveness of S2HPruner. Codes will be released soon.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。