Abstract
Structured channel pruning has been shown to significantly accelerate inference time for convolution neural networks (CNNs) on modern hardware, with a relatively minor loss of network accuracy. Recent works permanently zero these channels during training, which we observe to significantly hamper final accuracy, particularly as the fraction of the network being pruned increases. We propose Soft Masking for cost-constrained Channel Pruning (SMCP) to allow pruned channels to adaptively return to the network while simultaneously pruning towards a target cost constraint. By adding a soft mask re-parameterization of the weights and channel pruning from the perspective of removing input channels, we allow gradient updates to previously pruned channels and the opportunity for the channels to later return to the network. We then formulate input channel pruning as a global resource allocation problem. Our method outperforms prior works on both the ImageNet classification and PASCAL VOC detection datasets.
Introduction
As convolutional neural networks (CNNs) grow in complexity, deploying them on edge devices requires "pruning"—removing redundant parameters to reduce latency and computation. Structured channel pruning is the preferred method because it translates directly to hardware speedups. However, most existing methods make permanent, "myopic" decisions: once a channel is zeroed out, it is gone forever. At high pruning ratios (70-90%), these early permanent choices often lead to significant accuracy loss. Furthermore, removing many channels simultaneously causes "gradient instability," where the remaining channels receive massive, erratic updates that disrupt training.
Methods
The SMCP framework introduces three main components to address these challenges:
Soft Input Channel Masking
Instead of deleting weights, SMCP re-parameterizes them using a mask ($\widetilde{W} = W \odot m$). Using a Straight-Through Estimator (STE), gradients can flow back even to "pruned" (masked) weights, allowing the network to adaptively "regrow" channels if they become important later in training. Crucially, the authors show that masking input channels (rather than output channels) is necessary for these gradients to remain useful in standard Conv-BN-ReLU architectures.
Batch Normalization (BN) Scaling
To mitigate "gradient thrashing" when many channels are removed, SMCP adjusts the BN weights ($\gamma$) based on the fraction of channels left unpruned. This stabilizes the training process and prevents numerical overflows.
Global Resource Allocation (MCK)
Rather than using hand-tuned pruning ratios for each layer, SMCP treats the entire network as a Multiple-Choice Knapsack Problem (MCK). It automatically finds the optimal number of channels for every layer to meet a specific global cost constraint, such as target latency or FLOP count. This is solved efficiently using a "meet-in-the-middle" algorithm.
Results
SMCP was evaluated on ImageNet (ILSVRC2012) for classification and PASCAL VOC for object detection.
SMCP consistently outperforms prior state-of-the-art pruning methods like AutoSlim, MetaPruning, and HALP. On ResNet50 (ImageNet), SMCP achieved a 0.6% Top-1 accuracy improvement at the same FPS compared to previous methods, or an additional 20% speedup at the same accuracy level. For object detection using SSD512, SMCP achieved a 2.12x speedup, making it faster than the smaller SSD300 model while maintaining higher mean Average Precision (mAP).
Conclusion
SMCP demonstrates that pruning does not have to be a "death sentence" for channels. By keeping underlying weights and using soft masks, the model can explore different sparse configurations throughout training. Future work may extend this framework to jointly consider channel pruning and N:M structured sparsity, allowing for even tighter latency targets on modern hardware.
Summary updated