SBPF: Sensitiveness Based Pruning Framework For Convolutional Neural Network On Image Classification

Yiheng Lu, Maoguo Gong, Wei Zhao, Kaiyuan Feng, Hao LiarXiv 2022

Abstract

Pruning techniques are used comprehensively to compress convolutional neural networks (CNNs) on image classification. However, the majority of pruning methods require a well pre-trained model to provide useful supporting parameters, such as C1-norm, BatchNorm value and gradient information, which may lead to inconsistency of filter evaluation if the parameters of the pre-trained model are not well optimized. Therefore, we propose a sensitiveness based method to evaluate the importance of each layer from the perspective of inference accuracy by adding extra damage for the original model. Because the performance of the accuracy is determined by the distribution of parameters across all layers rather than individual parameter, the sensitiveness based method will be robust to update of parameters. Namely, we can obtain similar importance evaluation of each convolutional layer between the imperfect-trained and fully trained models. For VGG-16 on CIFAR-10, even when the original model is only trained with 50 epochs, we can get same evaluation of layer importance as the results when the model is trained fully. Then we will remove filters proportional from each layer by the quantified sensitiveness. Our sensitiveness based pruning framework is verified efficiently on VGG-16, a customized Conv-4 and ResNet-18 with CIFAR-10, MNIST and CIFAR-100, respectively.

The Inconsistency Dilemma

Structural pruning is essential for deploying CNNs on resource-constrained hardware. However, most existing methods rely on "weight-oriented" metrics—such as $\ell_1$-norm, Batch Normalization (BN) scaling factors, or gradient information—to determine which filters to remove.

The authors identify a critical "dilemma of inconsistency": these metrics are highly dependent on the model's training state. Pruning a model after 50 epochs versus 150 epochs often leads to entirely different architectural recommendations. This inconsistency requires researchers to expend massive computational effort fully training a "dense" model before the pruning process can even begin.

Comparison of filter counts across training epochs for traditional pruning methods, highlighting the inconsistency issue.

The Sensitiveness Metric

The Sensitiveness Based Pruning Framework (SBPF) addresses this by evaluating layer importance from the perspective of inference accuracy rather than individual weight values. Sensitiveness is defined by two robust components:

  1. Reliability ($f^r$): The accuracy drop observed when a specific layer's parameters are frozen while the rest of the network is retrained briefly.
  2. Stability ($f^s$): The network's ability to recover accuracy after filters are randomly removed from a layer and the model is retrained.

Theoretical analysis using the von Mises-Fisher (vMF) distribution suggests that these structural properties remain consistent throughout training, even while specific weight values are still fluctuating.

The SBPF Workflow

The framework implements a two-stage approach to efficiently slim down networks:

  • Hierarchy Pruning: This stage explores the sensitiveness of each layer in parallel by applying intentional "damage" (freezing or removing filters) and measuring the resulting accuracy gap.
  • Iterative Pruning: Layers with similar sensitiveness scores are grouped. Filters are then removed proportionally—sensitive layers are pruned conservatively, while insensitive layers are pruned aggressively.
Overview of the two-stage pruning framework: Hierarchy Pruning and Iterative Pruning.

Experimental Results

SBPF was validated across multiple architectures and datasets:

  • VGG-16 on CIFAR-10: Achieved an 85.65% reduction in parameters and a 38.71% reduction in FLOPs, maintaining the baseline accuracy of 92.0%.
  • ResNet-18 on CIFAR-100: Reduced parameters by 82.79% and FLOPs by 50%, matching the baseline accuracy of 85.1%.
  • Conv-4 on MNIST: Demonstrated extreme compression, maintaining 98% accuracy even with 95% of filters pruned.

Key Insights

A major takeaway is that structure outweighs specific weights. Once a layer's importance is established, randomly removing filters within that layer performs as well as magnitude-based methods. Furthermore, because the sensitiveness metric is robust, SBPF can obtain accurate layer-importance evaluations from models trained for only a fraction of the usual time (e.g., 50 epochs instead of 150 for VGG-16), significantly shortening the development cycle for compressed models.

Conclusion

SBPF provides a robust, training-state-independent framework for CNN pruning. By focusing on the intrinsic "sensitiveness" of network layers through intentional sabotage, it bypasses the inconsistencies of weight-oriented metrics and enables efficient model compression early in the training process.

Summary updated

BibTeX
@misc{lu2022sbpf,
  author = {Yiheng Lu and Maoguo Gong and Wei Zhao and Kaiyuan Feng and Hao Li},
  title = {{SBPF: Sensitiveness Based Pruning Framework For Convolutional Neural Network On Image Classification}},
  year = {2022},
  eprint = {2208.04588},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.04588},
}
Figure