Structured Pruning is All You Need for Pruning CNNs at Initialization

Yaohui Cai, Weizhe Hua, Hongzheng Chen, G. Edward Suh, Christopher De Sa, Zhiru ZhangarXiv 2022 · DOI

Abstract

Pruning-at-Initialization (PAI) aims to reduce the computational cost of deep learning by sparsifying networks before training begins. While traditional PAI methods focus on fine-grained weight selection, this paper demonstrates that the specific weights chosen matter far less than the layer-wise density—the fraction of parameters retained in each layer. By shifting the focus to structured channel pruning, the authors introduce PreCrop, a method that achieves state-of-the-art accuracy while providing immediate hardware speedups on standard GPUs.

Introduction

Deep learning models are increasingly deployed on edge devices with limited resources. Traditional pruning typically involves a costly cycle of training, pruning, and fine-tuning. PAI offers a more efficient alternative by pruning the network at the start. However, existing PAI methods like SynFlow or SNIP primarily utilize "unstructured" pruning, which removes individual weights. This creates sparse matrices that are difficult to accelerate on standard hardware unless sparsity is extreme.

Recent findings suggest a surprising phenomenon: randomly shuffling a pruning mask within a layer often preserves accuracy. This implies that the "how many per layer" (density) is more critical than the "which weights" (granularity). This paper formalizes this insight to enable efficient structured pruning at initialization.

Methods

The authors propose a theoretical framework and practical tools to optimize layer-wise density:

  1. SynExp (Synaptic Expectation): A proxy for model accuracy based on the expectation of importance scores. The authors prove that as long as layer-wise density is held constant, the pruning granularity (weight vs. channel) does not significantly impact final accuracy.
  2. Convex Optimization: PAI is formulated as a convex optimization problem. By maximizing the SynExp proxy subject to parameter or FLOP constraints, the optimal density for every layer can be solved analytically.
  3. PreCrop: A structured PAI method that prunes entire channels based on the densities derived from SynExp. This results in a compact, dense model compatible with standard hardware.
  4. PreConfig: A variation that allows for network reconfiguration. It can expand or shrink layers before training, effectively serving as a high-speed Neural Architecture Search (NAS) tool.

Key Insights: Density and Granularity

The core insight of this work is that individual weight importance at initialization is a noisy signal. The true utility of PAI algorithms lies in determining the optimal distribution of parameters across the network's layers.

Figure 1: Accuracy vs. remaining parameters for different pruning granularities. Structured channel pruning (PreCrop) remains competitive with unstructured methods as the model is compressed.

Because layer-wise density is the primary driver of success, pruning can be performed at the channel level (structured) without sacrificing accuracy. This "granularity invariance" allows for hardware-friendly models that avoid the complexities of sparse matrix operations.

Key Results

The researchers evaluated their methods on CIFAR-10 and ImageNet across various architectures, including ResNet, MobileNetV2, and EfficientNetB0.

  • Superior Accuracy: On ImageNet, PreCrop outperformed the state-of-the-art SynFlow by 2.7% when pruning MobileNetV2.
  • Efficiency and Speed: PreConfig improved EfficientNetB0 accuracy by 0.3% while using 20% fewer parameters. Furthermore, the optimization problem is so efficient it can be solved on a standard CPU in under one second.
  • Hardware Compatibility: Unlike unstructured methods, PreCrop produces standard dense layers, providing immediate wall-clock speedups on any GPU.
Figure 6: Top-1 Accuracy vs. FLOPs comparing the proposed method against existing PAI techniques like SynFlow, SNIP, and GraSP.

Limitations and Future Work

While highly effective for CNNs, the authors have yet to demonstrate these results for Transformers or attention-based models. Additionally, pruning channels in networks with residual connections requires specific handling, such as zero-padding, to maintain shape compatibility. Future work may explore incorporating actual data into the SynExp proxy to further refine layer-wise densities for specific tasks, moving beyond the current data-agnostic approach.

Summary updated

BibTeX
@misc{cai2022structured,
  author = {Yaohui Cai and Weizhe Hua and Hongzheng Chen and G. Edward Suh and Christopher De Sa and Zhiru Zhang},
  title = {{Structured Pruning is All You Need for Pruning CNNs at Initialization}},
  year = {2022},
  eprint = {2203.02549},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.02549},
}
Figure