Compressing Convolutional Neural Networks via Factorized Convolutional Filters.

Tuanhui Li, Baoyuan Wu, Yujiu Yang, Yanbo Fan, Yong Zhang, Wei LiuCVPR 2019 · DOI

TL;DR

This paper introduces a novel "Factorized Convolutional Filter" (FCF) that unifies filter learning and selection for CNN compression. By training a CNN with these FCFs using a combined back-propagation and ADMM approach, they achieve significant model compression with competitive accuracy, outperforming existing filter pruning methods.

What Problem Does This Paper Address?

Deep Convolutional Neural Networks (CNNs) have achieved remarkable success in various computer vision tasks, but their large size and computational demands make them unsuitable for resource-constrained environments like mobile devices. Model compression techniques aim to reduce these models' footprint while preserving performance. A popular method is "filter pruning," which removes entire filters (and their corresponding output channels) from a network. Traditional filter pruning involves a three-step process: training a large model, ranking filters based on some criterion (e.g., their norm), and then fine-tuning the smaller model. The authors argue that this separation of filter selection and learning makes it difficult to control performance and can lead to suboptimal results. They aim to bridge this gap by performing filter learning and selection simultaneously.

Methods

The core innovation is the Factorized Convolutional Filter (FCF). An FCF is composed of a standard convolutional filter ($W$) and a binary scalar ($v \in \{0, 1\}$). The output of an FCF is the result of a dot product between the filter's weights and the binary scalar, effectively acting as a switch for the filter.

To train a CNN with these FCFs (dubbed CNN-FCF), the authors propose a novel optimization algorithm: back-propagation with ADMM.

  • Filter Learning ($W$): The standard convolutional filters ($W$) are updated using the traditional gradient descent (back-propagation) method.
  • Filter Selection ($v$): The binary scalars ($v$) are updated using the Alternating Direction Method of Multipliers (ADMM). This is crucial because the binary constraint on $v$ makes direct gradient-based optimization impossible. ADMM helps to solve this constrained optimization problem by iteratively updating auxiliary variables that enforce the constraints.

After training, filters corresponding to $v=0$ are discarded, and the remaining filters form a compact CNN. This approach allows for simultaneous learning of filter weights and selection of which filters to keep.

Datasets

The authors evaluate their method on two widely used benchmark datasets:

  • CIFAR-10: A dataset with 10 classes, commonly used for image classification.
  • ImageNet LSVRC-2012 (ImageNet): A larger dataset with 1000 classes, a standard benchmark for evaluating deep learning models.

Key Insights and Ideas

  • Unified Learning and Selection: The most significant insight is that performing filter learning and selection simultaneously is more effective than the traditional sequential approach. This allows the network to learn which filters are truly important during the training process itself.
  • Factorized Convolutional Filter (FCF): The FCF is an elegant way to introduce a learnable binary switch for each filter, enabling a unified optimization framework.
  • ADMM for Binary Constraints: The integration of ADMM into the back-propagation pipeline is a key technical contribution, enabling the optimization of the binary selection variables ($v$) alongside the continuous filter weights ($W$).
  • Flexibility in Pruning: The FCF approach offers more flexibility. It can be seen as a single-channel pruning strategy during training, and then, after training, a pair-channel pruning strategy can be applied for further compression, especially beneficial for networks with shortcut connections like ResNet.

Key Results

The proposed CNN-FCF method demonstrates competitive performance across various ResNet architectures on both CIFAR-10 and ImageNet.

  • CIFAR-10: At a pruning ratio of ~43%, their method achieved an accuracy loss of only 1.07% on ResNet-20, outperforming SNLI and SFP. At a higher pruning ratio (~69%), their accuracy loss was also lower than SNLI. They observed that deeper ResNet models showed greater redundancy and less accuracy loss at the same pruning ratio.
  • ImageNet: On ResNet-34 and ResNet-50, their method achieved competitive parameter and FLOP reductions with minimal accuracy loss. For instance, on ResNet-34 with ~27% pruning, their Top1 accuracy loss was -0.25%, better than NISP's 0.28%.
  • Comparison with Baselines: When compared against random pruning and l1-norm ranking-based pruning, their method (even without fine-tuning) achieved significantly better compressed model accuracy. With pair-channel pruning and fine-tuning, their method achieved the highest accuracy among all compared approaches.

Limitations and Future Work

  • Computational Cost: While the method is effective, the paper acknowledges that the ADMM component adds computational complexity to the training process, particularly for the QP solver for the $z_1$ variable, which is $O((C_l)^3)$ for layer $l$. However, they argue this is acceptable given the performance gains.
  • Fine-tuning Still Beneficial: Although the joint training produces a good compressed model, fine-tuning after pruning (especially with pair-channel pruning) is still shown to be beneficial for resuming performance.
  • Pruning Ratio Allocation: The paper suggests that allocating distinct pruning ratios to different layers (based on filter importance) can lead to better compression performance than using identical ratios across all layers. They plan to explore more sophisticated allocation strategies in the future to further reduce FLOPs.
  • Numerical Differences: The paper notes that small numerical differences between the converged $v$ and its binarized version can lead to slight accuracy drops, which are then recovered by fine-tuning. Further investigation into mitigating these numerical discrepancies could be a future direction.

Summary updated

BibTeX
@inproceedings{li2019compressing,
  author = {Tuanhui Li and Baoyuan Wu and Yujiu Yang and Yanbo Fan and Yong Zhang and Wei Liu},
  title = {{Compressing Convolutional Neural Networks via Factorized Convolutional Filters.}},
  booktitle = {CVPR},
  year = {2019},
  doi = {10.1109/cvpr.2019.00410},
}
Figure