Automated Pruning for Deep Neural Network Compression

Franco Manessi, Alessandro Rozza, Simone Bianco, Paolo Napoletano, Raimondo SchettiniarXiv 2017 · DOI

TL;DR

This paper introduces a novel, differentiable pruning method that allows neural networks to automatically learn optimal pruning thresholds during standard backpropagation. By jointly optimizing weights and thresholds, the authors achieve compression rates 14% to 33% better than previous state-of-the-art methods while proving that these pruned features remain highly effective for transfer learning tasks.

What Problem Does This Paper Address?

Deep neural networks are notoriously resource-hungry, consuming massive amounts of storage, memory bandwidth, and energy. This makes deploying them on embedded or mobile devices a significant challenge.

While "network pruning"—removing unimportant connections—is a well-known solution, existing methods like Han et al.’s "Deep Compression" have two major drawbacks:

  1. Iterative Complexity: They require multiple cycles of pruning and retraining to find the right thresholds, which is computationally expensive.
  2. Sub-optimal Thresholds: To manage complexity, they often use a single global threshold for all layers, which fails to account for the unique sensitivity of different parts of the network.

The authors aim to turn pruning into an end-to-end, automated process that happens during the initial training phase.

Methods

The core innovation is making the pruning process differentiable.

  • Differentiable Pruning Function: The authors define a function $\vartheta^\alpha(x; t)$ that acts as a "soft" threshold. Unlike a standard hard threshold (which has a derivative of zero almost everywhere and is thus "unlearnable"), this function is smooth. As shown in Figure 1 below, it allows gradients to flow back to the threshold parameter $t$.
The differentiable pruning function $\vartheta^{10}(x; 2)$ and its derivative.
  • Sibling Networks: During training, the authors create a "sibling" network where every weight is passed through this $\vartheta^\alpha$ function. This allows the network to optimize both the weights ($W$) and the layer-specific thresholds ($t$) simultaneously using standard Stochastic Gradient Descent (SGD).
  • Targeted Regularization: They introduce a new regularizer, $L_t$, specifically designed to push the thresholds to increase sparsity without sacrificing accuracy. They also use standard weight decay ($L_{wd}$) to encourage weights to cluster around the learned thresholds, which potentially makes subsequent quantization more efficient.

Datasets

The authors evaluated their method on a wide variety of benchmarks:

  • Core Training: MNIST (using LeNet-300-100 and LeNet-5) and ImageNet/ILSVRC-2012 (using AlexNet).
  • Transfer Learning Suite: To test how well pruned features generalize, they used a diverse set of 11 datasets including Pascal VOC 2007 (objects), MIT-67 (scenes), CUB 200-2011 (birds), Oxford 102 (flowers), and several image retrieval benchmarks like Oxford5k and Paris6k.

Key Insights and Ideas

  • End-to-End Learning: By making the threshold a learnable parameter, the network "decides" for itself which layers can be heavily pruned and which need to remain dense. This eliminates the need for manual, iterative tuning.
  • Layer-Specific Optimization: The differentiable nature allows for per-layer (or even per-filter) thresholds. The results show that the network naturally converges to higher pruning ratios in the larger, more redundant layers (like fc6 in AlexNet).
  • Preservation of Generality: This is the first study to explicitly analyze the transfer learning capabilities of pruned features. The "aha moment" is that pruning doesn't just save space; it maintains—and sometimes even improves—the quality of the learned representations.

Key Results

  • Superior Compression: The method achieved 12x to 19x compression across different networks. Crucially, it reduced the number of weights by 14% to 33% more than the previous state-of-the-art (Deep Compression) while maintaining comparable accuracy.
  • Minimal Accuracy Loss: For AlexNet on ImageNet, the top-1 error increased by only ~1.1%, a negligible trade-off for a 12x reduction in size.
  • Transfer Learning Success: Pruned features performed almost identically to non-compressed features across all 11 transfer tasks. In fine-grained recognition (CUB-200-2011), the pruned network actually saw a 1.3% increase in accuracy, suggesting that pruning may act as a beneficial form of regularization.

Limitations and Future Work

  • Scope of Compression: The paper focuses exclusively on the pruning stage. While the authors note their method is "orthogonal" to quantization and Huffman coding, they did not implement the full three-stage pipeline in this specific study.
  • Modern Architectures: The experiments were conducted on LeNet and AlexNet. While these are standard benchmarks, testing on more modern, already-efficient architectures like ResNet or MobileNet would be a valuable next step.
  • Differentiable Quantization: The authors suggest that a logical extension would be to devise a differentiable quantization technique to make the entire compression pipeline learnable via SGD.

Summary updated

BibTeX
@misc{manessi2017automated,
  author = {Franco Manessi and Alessandro Rozza and Simone Bianco and Paolo Napoletano and Raimondo Schettini},
  title = {{Automated Pruning for Deep Neural Network Compression}},
  year = {2017},
  eprint = {1712.01721},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.01721},
}
Figure