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

Learned Threshold Pruning

Kambiz Azarian, Yash Bhalgat, Jinwon Lee, Tijmen Blankevoort

Abstract

This paper presents a novel differentiable method for unstructured weight pruning of deep neural networks. Our learned-threshold pruning (LTP) method learns per-layer thresholds via gradient descent, unlike conventional methods where they are set as input. Making thresholds trainable also makes LTP computationally efficient, hence scalable to deeper networks. For example, it takes 30 epochs for LTP to prune ResNet50 on ImageNet by a factor of 9.1. This is in contrast to other methods that search for per-layer thresholds via a computationally intensive iterative pruning and fine-tuning process. Additionally, with a novel differentiable $L_0$ regularization, LTP is able to operate effectively on architectures with batch-normalization. This is important since $L_1$ and $L_2$ penalties lose their regularizing effect in networks with batch-normalization. Finally, LTP generates a trail of progressively sparser networks from which the desired pruned network can be picked based on sparsity and performance requirements. These features allow LTP to achieve competitive compression rates on ImageNet networks such as AlexNet (26.4x compression with 79.1% Top-5 accuracy) and ResNet50 (9.1x compression with 92.0% Top-5 accuracy). We also show that LTP effectively prunes modern compact architectures, such as EfficientNet, MobileNetV2 and MixNet.

Introduction

Pruning deep neural networks—the process of removing unnecessary weights to make models smaller and faster—has traditionally been a complex task. Engineers often spend significant time manually tuning pruning thresholds or running computationally expensive search algorithms to determine which weights to cut. Learned Threshold Pruning (LTP) addresses these challenges by transforming pruning thresholds into trainable parameters, allowing the model to learn optimal per-layer thresholds through standard gradient descent.

Methodology

Differentiable Soft Pruning

In standard magnitude pruning, a weight is kept if its absolute value exceeds a threshold $\tau$ and dropped otherwise. This step function is non-differentiable, preventing gradient-based optimization of the threshold. LTP replaces this with a sigmoid-based soft-pruning function. By utilizing a sigmoid with a temperature parameter, the pruning operation becomes smooth and differentiable, enabling the threshold $\tau$ for each layer to be updated during training alongside the network weights.

Soft $L_0$ Regularization and Batch Normalization

To encourage sparsity, LTP employs a novel soft $L_0$ regularization. Traditional $L_1$ or $L_2$ penalties often fail in modern networks that utilize Batch Normalization (BN). Because BN can re-scale a layer's output, it can effectively "hide" weight magnitudes from $L_1/L_2$ penalties, rendering the regularization ineffective.

Comparison of regularization schemes: $L_0$ regularization maintains training accuracy and weight magnitudes more effectively than $L_2$ in the presence of batch normalization.

As shown in the experimental analysis, $L_2$ regularization causes the expected weight magnitude to drop significantly, which negatively impacts training accuracy. In contrast, the proposed soft $L_0$ approach is scale-invariant; it focuses on whether weights are being pushed toward the pruned side of the threshold rather than their absolute magnitude. This makes it highly effective for architectures using batch normalization.

Experimental Results

The authors evaluated LTP on standard computer vision benchmarks, including CIFAR-100 and ImageNet (ILSVRC-2015), using a variety of architectures from classic models like AlexNet to modern compact networks.

  • ResNet50: Achieved 9.11x compression with 92.0% Top-5 accuracy on ImageNet in just 30 epochs, significantly faster than competing methods requiring hundreds of epochs.
  • AlexNet: Achieved a massive 26.4x compression with no drop in Top-5 accuracy.
  • Compact Models: LTP successfully compressed models already designed for efficiency, such as MobileNetV2 (3x compression) and EfficientNet-B0 (2.22x compression), with minimal loss in accuracy.
Top-1 Accuracy vs. Keep ratio, demonstrating the trade-off between model sparsity and performance.

Conclusion

LTP provides a computationally efficient, end-to-end trainable framework for unstructured pruning. By treating thresholds as parameters and introducing scale-invariant $L_0$ regularization, it overcomes the limitations of manual tuning and the scaling issues introduced by batch normalization. While unstructured pruning currently requires specialized hardware for real-world speedups, the differentiable thresholding concept offers a promising path forward for automated model compression.

Summary updated

BibTeX
@misc{azarian2020learned,
  author = {Kambiz Azarian and Yash Bhalgat and Jinwon Lee and Tijmen Blankevoort},
  title = {{Learned Threshold Pruning}},
  year = {2020},
  eprint = {2003.00075},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.00075},
}
Figure