NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

AutoPrune: Automatic Network Pruning by Regularizing Auxiliary Parameters

Xia Xiao, Zigeng Wang, Sanguthevar RajasekaranNeurIPS 2019

TL;DR

AutoPrune is a novel framework that automates neural network pruning by optimizing trainable auxiliary "mask" parameters instead of directly penalizing the network's weights. By decoupling the pruning process from weight values and incorporating a "recoverable" pruning mechanism, AutoPrune achieves state-of-the-art compression ratios—such as a staggering 310x compression for LeNet5—with minimal hyperparameter tuning and high robustness to training noise.

The Challenge of Network Pruning

Deep Neural Networks (DNNs) are notoriously resource-hungry, making them difficult to deploy on mobile phones, edge devices, or in latency-sensitive applications. Pruning—the process of removing redundant weights or neurons—is a standard solution to compress these models. However, traditional pruning methods suffer from three major headaches:

  1. Hyperparameter Sensitivity: Traditional methods (like magnitude-based pruning) rely heavily on manually chosen thresholds. Finding the "sweet spot" for these thresholds often requires exhaustive, computationally expensive trial and error.
  2. Instability: Directly regularizing weights (e.g., using $L_1$ regularization) can be noisy. Stochastic training noise, such as batch variance or dropout, can lead to "incorrect" pruning that permanently damages model accuracy.
  3. Search Space Complexity: For layer-wise pruning, the number of possible threshold combinations grows exponentially with the number of layers, making it nearly impossible to manually find an optimal global structure.

To bridge the gap between traditional pruning and Neural Architecture Search (NAS), the authors propose AutoPrune, an easy-to-use method that generalizes effectively across different architectures.

How AutoPrune Works

The core idea behind AutoPrune is to introduce a set of trainable auxiliary parameters, $M$, that act as indicators for whether a specific weight should exist in the final model.

The Formulation

Instead of optimizing and pruning the weights $W$ directly, the network uses an effective weight tensor $T = W \odot h(M)$, where $\odot$ is the element-wise product and $h(\cdot)$ is an indicator function (mapping values to 0 or 1).

Bi-level Optimization

The training process is split into two distinct phases to prevent the network from overfitting the pruning mask to the training data. One set of data ($X_{train}$) is used to update the weights $W$, while a separate validation set ($X_{val}$) is used to update the auxiliary parameters $M$.

Algorithm 1: The AutoPrune bi-level optimization process.

Straight-Through Estimators (STE)

Because the indicator function $h(M)$ is a non-differentiable step function, standard backpropagation cannot update $M$. To solve this, the authors use "smooth" approximations like Softplus or Leaky ReLU during the backward pass, allowing gradients to flow back to $M$ during training.

A Novel Update Rule and Recoverable Pruning

The authors designed a specific gradient update rule for $M$ that ensures pruning sensitivity is decoupled from weight magnitude. This prevents large, important weights from being accidentally "jittered" out of existence. Furthermore, unlike "hard" pruning where weights are permanently deleted, AutoPrune allows pruned weights to be "spliced" back into the network if the loss increases significantly. This recoverable mechanism reduces the discrepancy between the continuous search phase and the final discrete model.

Key Insights

  • Regularizing the Mask, Not the Weight: By applying regularization to the auxiliary parameters $M$ rather than the weights $W$, the authors prevent "weight shrinkage." The weights can maintain their optimal values even as the mask pushes them toward being pruned.
  • Fixing BNN Update Rules: The authors realized that standard Binarized Neural Network (BNN) update rules are counter-intuitive for pruning because they make larger weights more sensitive to pruning. Their modified update rule fixes this, leading to much higher stability.
  • Training from Scratch: Remarkably, AutoPrune doesn't require a pre-trained model. It can start from random initialization and successfully converge to a highly sparse, accurate structure.

Key Results

The authors evaluated AutoPrune across a wide range of standard benchmarks (MNIST, CIFAR-10, ImageNet) and achieved state-of-the-art results across several categories:

  • Extreme Compression: On LeNet5 (MNIST), AutoPrune achieved a 310x compression ratio with no drop in accuracy.
  • Efficiency on CIFAR-10: For VGG-like structures, it reached 75x compression and reduced FLOPs to just 23% of the original model.
  • Scalability on ImageNet:
  • AlexNet: Achieved an 18.5x compression ratio with only a ~0.8% accuracy drop.
  • MobileNet V2: Outperformed existing methods at various FLOP levels. For instance, at the 200M FLOP level, it achieved 73.32% accuracy, significantly higher than competing automated pruning methods.
Compression results across various architectures, highlighting the 310x ratio on LeNet5 and 18.5x on AlexNet.

Additionally, ablation studies showed that AutoPrune is highly robust to hyperparameter changes; the final compression ratio remains remarkably consistent even when the learning rate for the auxiliary parameters varies by a factor of 50.

Limitations and Future Work

While highly effective, the authors note a few limitations:

  • Convergence Theory: The framework does not strictly guarantee theoretical convergence when optimized with certain regularizers, though empirical results show it converges quickly in practice.
  • STE Selection: There is a trade-off between the "smoothness" of the estimator (like Softplus) and the "speed" of sparsification (like Leaky ReLU). Choosing the right one still requires some engineering intuition based on time constraints.
  • Hardware Realization: The paper focuses on theoretical FLOP reduction and parameter counts. Realizing actual latency speedups from unstructured pruning on general-purpose CPUs/GPUs typically requires specialized hardware kernels, which are not discussed in this work.

Summary updated

BibTeX
@inproceedings{xiao2019autoprune,
  author = {Xia Xiao and Zigeng Wang and Sanguthevar Rajasekaran},
  title = {{AutoPrune: Automatic Network Pruning by Regularizing Auxiliary Parameters}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure