S2HPruner: Soft-to-Hard Distillation Bridges the Discretization Gap in Pruning
Weihao Lin, Shengji Tang, Chong Yu, Peng Ye, Tao Chen
TL;DR
S2HPruner addresses the discretization gap in differentiable mask pruning by introducing a one-stage soft-to-hard distillation framework. It jointly optimizes a soft pruning mask and distills a corresponding hard network under supervision from the soft network, employing decoupled bidirectional knowledge distillation to avoid degrading the soft model. Empirically, it delivers superior pruning performance across CIFAR-100, Tiny ImageNet, and ImageNet for CNNs and Transformers without post-training, and provides analyses of gradient components and gap behavior to justify effectiveness. The work highlights the importance of bridging the soft-hard discrepancy in pruning, with practical impact on producing higher-quality pruned architectures under strict resource budgets, while noting limitations and avenues for future extensions.
Abstract
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.
