Manipulating Identical Filter Redundancy for Efficient Pruning on Deep and Complicated CNN

Tianxiang Hao, Xiaohan Ding, Jungong Han, Yuchen Guo, Guiguang Ding

TL;DR

This paper introduces Centripetal SGD (C-SGD), a novel training method that encourages filters within a CNN to become identical, creating ideal redundancy for efficient pruning. This approach allows for lossless pruning without finetuning, leading to faster and more accurate compressed models compared to existing methods.

What Problem Does This Paper Address?

Convolutional Neural Networks (CNNs) are powerful but computationally expensive, leading to a need for model compression techniques. Filter pruning, which removes entire filters (or channels), is a promising method for reducing FLOPs and memory footprint. However, existing pruning methods often rely on heuristic importance metrics, require extensive finetuning to recover accuracy, or create "non-ideal" redundancy where filters are merely small in magnitude, not truly redundant. This makes it difficult to achieve significant, lossless compression, especially on complex, modern architectures like ResNets and DenseNets, which have intricate structures like skip connections.

Methods

The core innovation is Centripetal SGD (C-SGD). Unlike standard SGD that aims to minimize a loss function, C-SGD adds a "centripetal constraint" during training. This constraint encourages filters within a predefined cluster to converge to identical parameter values. The intuition is that if multiple filters become identical, all but one are purely redundant and can be removed without performance loss.

Key aspects of C-SGD:

  • Centripetal Constraint: A novel term is added to the gradient update rule that pushes filters in the same cluster towards their average. This is controlled by a hyperparameter, $\epsilon$, the "centripetal strength."
  • Clustering: Filters are grouped into clusters. The paper explores k-means, even, and imbalanced clustering, finding k-means to be generally effective.
  • Ideal Redundancy: By making filters identical, C-SGD creates "ideal redundancy," meaning filters can be removed without any accuracy drop.
  • Lossless Pruning: Because the redundancy is ideal, no finetuning is required after pruning, saving significant time and avoiding potential issues with finetuning trapping models in local minima.
  • Simultaneous Pruning: C-SGD can be applied to all layers simultaneously, making it efficient for deep and complex networks.
  • Scaling and Squeezing: A novel training methodology that first trains a wider network and then uses C-SGD to "squeeze" it down to the original architecture, often resulting in higher accuracy than standard training.

Datasets

The paper uses standard datasets for training and evaluation:

  • CIFAR-10: Used for pruning experiments on VGG, ResNet, and DenseNet architectures.
  • ImageNet: Used for pruning experiments on ResNet and DenseNet architectures.
  • COCO: Used for evaluating the generalization performance of pruned models on object detection tasks.
  • VOC 2012: Used for evaluating the generalization performance of pruned models on semantic segmentation tasks.

Key Insights and Ideas

  • Ideal Redundancy is Key: The paper argues that true redundancy, where filters are identical, is more effective for pruning than simply having filters with small magnitudes. This ideal redundancy allows for lossless pruning without finetuning.
  • Centripetal Force for Convergence: The "centripetal" term in C-SGD acts like a force pulling filters together, ensuring they become identical. This is a novel way to manipulate network structure during training.
  • Constrained Pruning Solved: C-SGD's ability to enforce the same redundancy pattern across layers is crucial for pruning complex architectures like ResNets and DenseNets, which have structural constraints (e.g., skip connections).
  • Redundancy Aids Training: The paper provides empirical evidence that training with identical filters (via C-SGD) can lead to better performance than training a model of the same width from scratch using standard SGD, suggesting redundancy can help overcome non-convex optimization landscapes.
  • Scaling and Squeezing for Performance Boost: The novel "Scaling and Squeezing" method demonstrates that training a wider network and then compressing it with C-SGD can yield higher accuracy than training a standard-width network from scratch.

Key Results

  • Significant FLOPs Reduction: C-SGD achieves substantial reductions in FLOPs (e.g., up to 90% for VGG, 60% for ResNets) with minimal or no accuracy drop.
  • Lossless Pruning: For many experiments, the pruned models achieve accuracy comparable to or even better than the original models, without any finetuning. For example, on CIFAR-10, C-SGD-VGG-C achieved 85.02% FLOPs reduction with only a -0.06% absolute error increase.
  • Competitive Performance: C-SGD outperforms or matches state-of-the-art pruning methods on CIFAR-10 and ImageNet benchmarks.
  • Generalization: Pruned models show good generalization on downstream tasks like semantic segmentation (VOC) and object detection (COCO).
  • Robustness: C-SGD is robust to the choice of clustering method and the centripetal strength hyperparameter $\epsilon$.
  • Scaling and Squeezing Benefits: The Scaling and Squeezing method consistently improved accuracy compared to standard training, even outperforming some pruning methods. For instance, on ResNet-50, a scaled and squeezed model achieved 72.54% accuracy compared to 69.67% for a standard-trained model of the same width.

Limitations and Future Work

  • Clustering Choice: While k-means is generally effective, the paper notes that the choice of clustering method can have a minor impact. Further exploration of optimal clustering strategies could be beneficial.
  • Hyperparameter Tuning: While C-SGD is robust to $\epsilon$, finding the optimal value might still require some experimentation for specific tasks or architectures.
  • Computational Cost of Scaling: The "Scaling and Squeezing" method increases training costs by first training a wider network. While this is acceptable for offline training, it's a consideration for resource-constrained training scenarios.
  • Future Work: The authors suggest further research into more advanced clustering methods, exploring the theoretical underpinnings of redundancy aiding convergence, and applying C-SGD to other network architectures and tasks. They also highlight the potential for C-SGD to be combined with other compression techniques.

Summary updated

BibTeX
@article{hao2021manipulating,
  author = {Tianxiang Hao and Xiaohan Ding and Jungong Han and Yuchen Guo and Guiguang Ding},
  title = {{Manipulating Identical Filter Redundancy for Efficient Pruning on Deep and Complicated CNN}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2021},
  doi = {10.1109/tnnls.2023.3298263},
}
Figure