Network Trimming: A Data-Driven Neuron Pruning Approach towards Efficient Deep Architectures

Hengyuan Hu, Rui Peng, Yu-Wing Tai, Chi-Keung TangarXiv 2016

Abstract

Deep neural networks have achieved state-of-the-art performance across various domains but at the cost of massive parameter counts and high computational demands. This paper introduces "Network Trimming," a method to reduce model size by identifying and removing redundant neurons. The core of this approach is the Average Percentage of Zeros (APoZ) metric, which measures neuron inactivity. By iteratively pruning high-APoZ neurons and retraining the network with a "warm start," the authors achieve up to 3x compression on VGG-16 with improved accuracy on ImageNet.

Introduction: The Challenge of Over-parameterization

As architectures like VGG-16 and DeepFace have scaled to hundreds of millions of parameters, deploying them on resource-constrained edge devices has become increasingly difficult. These large models are often over-parameterized; many neurons are "weak" or "lazy," contributing minimally to the final output while consuming significant power and memory. This redundancy can also lead to overfitting and complicate the optimization process. Network Trimming addresses this by systematically removing these inactive components.

Methodology: Quantifying Redundancy with APoZ

The authors propose a data-driven metric called Average Percentage of Zeros (APoZ) to identify redundant neurons. APoZ measures how frequently a neuron’s output is zero after the ReLU activation function when evaluated on a validation set.

APoZ distribution in the CONV5-3 layer of VGG-16.

A high APoZ indicates that a neuron rarely activates, suggesting it is likely redundant. For instance, in the VGG-16 architecture, the authors identified 631 neurons with an APoZ higher than 90%, meaning they remain "dark" during the vast majority of inference tasks.

The Prune-and-Retrain Loop

Unlike weight pruning, which removes individual connections and results in sparse matrices, Network Trimming removes entire neurons or convolutional channels. This reduces the actual dimensions of the weight matrices, allowing for immediate speedups on standard GPU hardware without specialized sparse-matrix support.

The iterative Network Trimming workflow.

The process follows an iterative cycle:

  1. Pruning: A subset of neurons with the highest APoZ is removed.
  2. Weight Initialization: The remaining neurons retain their pre-pruning weights. This "warm start" is critical for efficient recovery compared to random initialization.
  3. Retraining: The trimmed network is fine-tuned to recover performance.

Experimental Results

The effectiveness of Network Trimming was evaluated on two major benchmarks:

LeNet on MNIST

On the MNIST handwritten digit dataset, the LeNet architecture achieved a 3.85x compression rate with negligible impact on accuracy (99.26% vs. the original 99.31%).

VGG-16 on ImageNet

The results on the ImageNet (ILSVRC2012) dataset were even more striking. By pruning the parameter-heavy CONV5-3 and FC6 layers, the authors achieved a 2.59x compression rate. Remarkably, the trimmed model's top-5 accuracy rose to 90.278%, surpassing the original model's 88.444%. This suggests that pruning acts as a form of regularization, forcing the network to learn more robust, non-redundant representations.

Conclusion and Future Work

Network Trimming provides a practical, hardware-friendly path to efficient deep learning. By focusing on neuron-level pruning rather than individual weights, it produces dense, smaller matrices that are highly optimized for current hardware. While the current heuristic for pruning thresholds (often one standard deviation above the mean APoZ) is empirical, future research could automate this selection and extend the methodology to modern architectures like ResNets or Transformers.

Summary updated

BibTeX
@misc{hu2016network,
  author = {Hengyuan Hu and Rui Peng and Yu-Wing Tai and Chi-Keung Tang},
  title = {{Network Trimming: A Data-Driven Neuron Pruning Approach towards Efficient Deep Architectures}},
  year = {2016},
  eprint = {1607.03250},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1607.03250},
}
Figure