Introduction
As convolutional neural networks (CNNs) grow in scale to achieve higher performance, their deployment on resource-constrained edge devices becomes increasingly challenging. Channel pruning—the removal of redundant filters—is a standard technique to mitigate this. However, traditional "static" pruning methods often assume that all training samples contribute equally to the determination of filter importance. This paper introduces CWP (Complexity Weighted Pruning), a method that prioritizes "hard" training examples to ensure that filters essential for complex cases are preserved.
The Problem with Uniform Pruning
Most existing pruning strategies treat every image in a dataset as equally informative. In reality, "easy" images can often be correctly classified using only a subset of basic features, whereas "hard" or complex images require more sophisticated filters. By treating all samples identically, static pruning risks removing filters that are critical for the model's performance on difficult edge cases.
The CWP Framework
The CWP method addresses this by incorporating instance-specific logic into a static pruning pipeline. The framework consists of three primary components:
1. Instance-Specific Soft Masks
Instead of a global importance score, a dedicated "Mask Network" analyzes the features of individual input images to generate "soft masks" (values between 0 and 1) for each channel. This allows the model to learn which filters are active for specific types of data.
2. Complexity Weighting
To prioritize difficult samples, CWP calculates a weight for each training instance based on its Cross-Entropy loss. Images that the baseline model struggles with (high loss) receive higher weights. The final importance score for a filter is the weighted sum of these masks, ensuring that "hard" instances have a greater say in the pruning process.
3. Polarization Regularizer
To facilitate the transition from "soft" masks to "hard" pruning (binary removal), the authors employ a polarization regularizer. This mathematical penalty pushes mask values toward 0 (redundant) or 1 (important), minimizing the performance gap typically seen after discretization.
Experimental Results
The CWP method was evaluated on CIFAR-10, CIFAR-100, and ImageNet benchmarks across various ResNet architectures.
- CIFAR-10: On ResNet56, CWP achieved a 64.11% reduction in FLOPs while actually increasing accuracy by 0.32%. This suggests that removing redundant filters can serve as an effective form of regularization.
- ImageNet: On the large-scale ILSVRC-2012 dataset, CWP pruned 87.75% of FLOPs from ResNet50 with a negligible 0.93% drop in Top-1 accuracy, significantly outperforming existing state-of-the-art methods.
Conclusion
CWP demonstrates that "hard" samples are the most reliable indicators of a filter's necessity. By bridging the gap between dynamic logic and static deployment, CWP provides a robust solution for compressing high-performance CNNs for edge hardware without sacrificing accuracy on complex data.
Summary updated