Abstract
We study network pruning which aims to remove redundant channels/kernels and hence speed up the inference of deep networks. Existing pruning methods either train from scratch with sparsity constraints or minimize the reconstruction error between the feature maps of the pre-trained models and the compressed ones. Both strategies suffer from some limitations: the former kind is computationally expensive and difficult to converge, while the latter kind optimizes the reconstruction error but ignores the discriminative power of channels. In this paper, we propose a simple-yet-effective method called discrimination-aware channel pruning (DCP) to choose the channels that actually contribute to the discriminative power. Note that a channel often consists of a set of kernels. Besides the redundancy in channels, some kernels in a channel may also be redundant and fail to contribute to the discriminative power of the network, resulting in kernel level redundancy. To solve this, we propose a discrimination-aware kernel pruning (DKP) method to further compress deep networks by removing redundant kernels. To prevent DCP/DKP from selecting redundant channels/kernels, we propose a new adaptive stopping condition, which helps to automatically determine the number of selected channels/kernels and often results in more compact models with better performance. Extensive experiments on both image classification and face recognition demonstrate the effectiveness of our methods. For example, on ILSVRC-12, the resultant ResNet-50 model with 30% reduction of channels even outperforms the baseline model by 0.36% in terms of Top-1 accuracy. The pruned MobileNetV1 and MobileNetV2 achieve 1.93x and 1.42x inference acceleration on a mobile device, respectively, with negligible performance degradation.
Introduction
Deep Neural Networks (DNNs) have achieved state-of-the-art performance in various computer vision tasks but are notoriously "heavy," requiring massive computational power and memory. To deploy these models on mobile devices or embedded systems, model compression is essential.
Network pruning is a popular approach that involves removing redundant channels or kernels. However, existing methods typically fall into two categories: training from scratch with sparsity constraints, which is computationally expensive, or minimizing reconstruction error (MSE) between the feature maps of the original and pruned models. The authors argue that the latter approach has a major flaw: it ignores the final classification goal. A channel might be effective at reconstructing a feature map but redundant for discriminating between classes. This paper introduces "discrimination-aware" pruning to bridge this gap.
Methodology: Discrimination-aware Pruning
The proposed framework, Discrimination-aware Channel Pruning (DCP), selects channels based on their contribution to the discriminative power of the network.
Core Components
- Additional Losses: The authors insert "discrimination-aware" losses (e.g., cross-entropy) at various intermediate layers of a pre-trained network. This forces intermediate layers to align with the final classification task.
- Dual-Objective Selection: When choosing channels to retain, the method uses a joint loss function that balances reconstruction accuracy (MSE) and discriminative power (the added intermediate losses).
- Greedy Optimization: Channel selection is formulated as a sparsity-inducing optimization problem solved via a greedy algorithm. Channels are selected one by one until a stopping condition is met.
- Adaptive Stopping: Instead of manual pruning ratios, an adaptive condition stops pruning for a layer if the loss increases too sharply, ensuring optimal model compactness.
- Kernel-level Pruning (DKP): For finer compression, DKP removes redundant 2D kernels within the selected 3D channels.
Experimental Results
The researchers evaluated DCP across major benchmarks, including CIFAR-10, ILSVRC-12 (ImageNet), and various face recognition datasets.
ImageNet Performance
On the challenging ILSVRC-12 dataset, DCP demonstrated that pruning can act as a form of regularization. By removing "noisy" channels that do not contribute to discrimination, the pruned models often outperformed their uncompressed baselines.
As shown in the results, a ResNet-50 model with a 30% reduction in channels (Adapt-DCP) achieved a Top-1 error of 24.85%, which is a 0.86% improvement over the baseline. Similar improvements were observed for MobileNet architectures, where DCP significantly reduced FLOPs with minimal impact on accuracy.
Mobile Acceleration
Real-world testing on a smartphone (Snapdragon 845) confirmed the practical benefits. Pruned versions of MobileNetV1 and V2 achieved 1.93× and 1.42× speedups, respectively. In face recognition tasks on the MegaFace benchmark, a pruned LResNet34E-IR maintained a 96.14% True Accepted Rate, proving the method's versatility.
Conclusion
DCP and DKP offer a robust solution for model compression by prioritizing discriminative power over simple feature reconstruction. The introduction of adaptive stopping and intermediate losses allows for the creation of compact models that maintain, or even exceed, the performance of their full-sized counterparts. Future work may explore global pruning strategies that consider multiple layers simultaneously and the integration of pruning with weight quantization.
Summary updated