Abstract
We propose ResRep, a novel method for lossless channel pruning (a.k.a. filter pruning), which slims down a CNN by reducing the width (number of output channels) of convolutional layers. Inspired by the neurobiology research about the independence of remembering and forgetting, we propose to re-parameterize a CNN into the remembering parts and forgetting parts, where the former learn to maintain the performance and the latter learn to prune. Via training with regular SGD on the former but a novel update rule with penalty gradients on the latter, we realize structured sparsity. Then we equivalently merge the remembering and forgetting parts into the original architecture with narrower layers. In this sense, ResRep can be viewed as a successful application of Structural Re-parameterization. Such a methodology distinguishes ResRep from the traditional learning-based pruning paradigm that applies a penalty on parameters to produce sparsity, which may suppress the parameters essential for the remembering. ResRep slims down a standard ResNet-50 with 76.15% accuracy on ImageNet to a narrower one with only 45% FLOPs and no accuracy drop, which is the first to achieve lossless pruning with such a high compression ratio.
The Challenge: The Resistance-Prunability Trade-off
Deep learning models are notoriously over-parameterized, containing significant redundancy that can be pruned to improve inference speed and reduce memory footprint. However, traditional pruning methods often struggle with a "resistance-prunability trade-off." In standard penalty-based paradigms, a sparsity-inducing penalty (like Lasso) is applied directly to the weights. This often inadvertently damages weights essential for the model's performance—the "remembering" components—before the model becomes sparse enough to prune. Consequently, by the time a model is sufficiently sparse, its accuracy has already degraded.
Methodology: Decoupling Remembering and Forgetting
ResRep takes inspiration from neurobiology, where the mechanisms for maintaining memories and discarding irrelevant information are independent. The framework introduces two core innovations to decouple these processes:
- Convolutional Re-parameterization (Rep): Instead of applying penalties to the original convolutional layers, ResRep inserts a "compactor" (a 1x1 convolutional layer) after every target layer. During training, the original layer focuses solely on "remembering" (minimizing the task loss), while the compactor learns which channels are redundant and can be "forgotten."
- Gradient Resetting (Res): To ensure the task loss doesn't interfere with the pruning process, ResRep uses a unique update rule. For channels identified for pruning, the algorithm "resets" (zeros out) the gradients from the standard loss function, applying only the penalty gradient. This allows the penalty to drive weights to absolute zero without being countered by the accuracy-seeking objective.
After training, the 1x1 compactors are mathematically fused back into the original layers through structural re-parameterization. This results in a standard CNN architecture with reduced width that requires no specialized hardware or software for deployment.
Experimental Results
The effectiveness of ResRep was evaluated on major benchmarks, including ImageNet-1K and CIFAR-10, across architectures like ResNet-50 and MobileNet.
On ImageNet-1K, ResRep achieved a breakthrough: slimming a ResNet-50 to just 45.46% of its original FLOPs (a 54.54% reduction) with zero loss in accuracy (76.15% Top-1). As shown in the results table below, ResRep consistently outperforms existing state-of-the-art methods. Even at extreme compression levels (62.10% FLOPs reduction), the accuracy drop remained under 1%, whereas competing methods like HRank saw drops exceeding 4%.
Conclusion
ResRep demonstrates that by decoupling the objectives of performance maintenance and parameter reduction, it is possible to achieve high-ratio, lossless pruning. This methodology shifts the focus from damaging existing weights to intelligently selecting and removing redundant channels via re-parameterization. Future work may extend this decoupling philosophy to other compression domains, such as quantization and Neural Architecture Search (NAS), to further push the boundaries of model efficiency.
Summary updated