Pruning Filter via Geometric Median for Deep Convolutional Neural Networks Acceleration

Yang He, Ping Liu, Ziwei Wang, Yi Yang

Abstract

Previous works utilized ''smaller-norm-less-important'' criterion to prune filters with smaller norm values in a convolutional neural network. In this paper, we analyze this norm-based criterion and point out that its effectiveness depends on two requirements that are not always met: (1) the norm deviation of the filters should be large; (2) the minimum norm of the filters should be small. To solve this problem, we propose a novel filter pruning method, namely Filter Pruning via Geometric Median (FPGM), to compress the model regardless of those two requirements. Unlike previous methods, FPGM compresses CNN models by pruning filters with redundancy, rather than those with ''relatively less'' importance. When applied to two image classification benchmarks, our method validates its usefulness and strengths. Notably, on CIFAR-10, FPGM reduces more than 52% FLOPs on ResNet-110 with even 2.69% relative accuracy improvement. Moreover, on ILSVRC-2012, FPGM reduces more than 42% FLOPs on ResNet-101 without top-5 accuracy drop, which has advanced the state-of-the-art.

Introduction

To deploy deep Convolutional Neural Networks (CNNs) on mobile devices, researchers use filter pruning to reduce computational costs (FLOPs) and model size. The industry standard has long been the "smaller-norm-less-important" criterion: if a filter has small weights (a small $\ell_p$-norm), it is assumed to contribute little to the network and is safe to delete. However, this heuristic relies on two fragile assumptions: high norm deviation and a small minimum norm.

Motivation: Limitations of Norm-Based Pruning

In many modern architectures, such as deep ResNets, the conditions for norm-based pruning are often not met. Filters frequently exhibit similar norm values, or even the "smallest" filters carry significant information.

Empirical analysis of filter norm distributions in ResNet-110 and ResNet-18 shows that the requirements for norm-based pruning are often not satisfied in practice.

As shown in Figure 4, empirical analysis reveals that filter norms concentrate in specific ranges, violating the "high deviation" requirement. In many layers, the minimum norm is far from zero, suggesting that norm-based pruning acts like a blunt instrument, inadvertently removing vital parts of the network.

Proposed Method: Filter Pruning via Geometric Median (FPGM)

We propose a shift in perspective: don't prune the smallest filters; prune the most redundant ones. To identify redundancy, we utilize the Geometric Median (GM). In the high-dimensional space of filters within a single layer, the GM is the point that minimizes the sum of Euclidean distances to all other filters.

Comparison of traditional norm-based pruning versus the proposed FPGM method, along with the ideal requirements for norm-based criteria.

The Logic of FPGM: * A filter located near the Geometric Median is the "most representative" or "average" filter. * Because its information is essentially a common denominator of the other filters in that layer, it is the most replaceable. * By pruning filters closest to the GM, the network retains its unique, specialized filters while shedding those whose functions are already covered by the collective.

This approach is integrated into a training pipeline where filters are "zeroized" during training, allowing the model to adapt to the loss of those filters before they are permanently removed.

Experimental Results

FPGM consistently outperformed state-of-the-art pruning methods across various architectures on CIFAR-10 and ILSVRC-2012 (ImageNet):

  • ResNet-110 (CIFAR-10): Reduced FLOPs by 52.3% while actually increasing relative accuracy by 2.69%. This suggests that FPGM acts as a form of regularization, preventing over-reliance on repetitive features.
  • ResNet-101 (ImageNet): Reduced FLOPs by over 42% with zero drop in top-5 accuracy, a significant advancement over previous methods like SFP and PFEC.

Conclusion

FPGM provides a robust alternative to norm-based pruning by focusing on filter redundancy rather than magnitude. By leveraging the Geometric Median, it achieves significant compression even when filter norms are uniformly distributed. While it achieves significant theoretical acceleration, future work will focus on closing the gap between FLOPs reduction and real-world inference speedups on specialized hardware.

Summary updated

BibTeX
@inproceedings{he2019pruning,
  author = {Yang He and Ping Liu and Ziwei Wang and Yi Yang},
  title = {{Pruning Filter via Geometric Median for Deep Convolutional Neural Networks Acceleration}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00447},
}
Figure