Efficient Stein Variational Inference for Reliable Distribution-lossless Network Pruning

Yingchun Wang, Song Guo, Jingcai Guo, Weizhan Zhang, Richard Yida Xu, Jie Zhang, Yi LiuarXiv 2022 · DOI

Abstract

Network pruning is essential for deploying deep neural networks on resource-constrained devices, yet traditional methods often suffer from distribution truncation and a lack of quantified reliability. This paper introduces Distribution-Lossless Pruning (DLLP), a Bayesian framework that treats pruning as a discovery process rather than a deletion process. By utilizing a spike-and-slab prior and Stein Variational Inference (SVI), DLLP maintains the integrity of the weight distribution while providing uncertainty estimates. Experimental results on CIFAR-10 and ImageNet demonstrate that DLLP achieves state-of-the-art sparsity and accuracy, offering a robust solution for safety-critical applications.

Introduction

Deep neural networks (DNNs) are notoriously overparameterized, presenting significant challenges for deployment on edge devices with limited memory and computational power. Traditional "hard pruning" techniques typically remove weights based on magnitude, assuming that small weights are redundant. However, this approach faces two fundamental flaws: distribution truncation and a lack of reliability.

Distribution truncation occurs because most methods assume weights follow a single continuous distribution. Pruning "cuts off" the center of this distribution, destroying the model's representational logic and necessitating expensive fine-tuning. Furthermore, existing methods provide only point estimates, leaving no way to quantify the model's confidence. In safety-critical domains, an overconfident pruned model can be a major liability. To address these issues, we present Distribution-Lossless Pruning (DLLP), which leverages Stein Variational Inference to achieve efficient, reliable, and distribution-preserving network compression.

Methodology

DLLP shifts the pruning problem into a Bayesian framework, focusing on discovering the latent low-dimensional distribution already embedded within the model.

Spike-and-Slab Priors

Instead of a single distribution, DLLP models the network using a "spike-and-slab" prior. The "spike"—a very narrow distribution centered at zero—represents redundant parameters, while the "slab"—a broader Gaussian distribution—represents the essential sub-network. This formulation allows the model to naturally separate the "lottery ticket" parameters from the noise without mangling the underlying distribution.

Stein Variational Inference (SVI)

Calculating the exact Kullback-Leibler (KL) divergence between a learned model and a complex target distribution is often computationally prohibitive because the target's normalization constant is unknown. DLLP bypasses this hurdle using Stein Variational Gradient Descent (SVGD). SVGD is a deterministic algorithm that uses a kernelized Stein discrepancy to push the model toward the ideal distribution along the steepest functional direction, ensuring efficient and accurate posterior approximation.

Differentiable Sampling

To ensure the discrete choice of whether a weight belongs to the spike or the slab is trainable via standard gradient descent, DLLP employs the Gumbel-Softmax trick. This allows for end-to-end optimization of the pruning mask alongside the model weights.

Experimental Results

The researchers evaluated DLLP on standard computer vision benchmarks, including CIFAR-10 and ImageNet, using architectures such as VGG-16, ResNet-50, and ResNet-56.

Performance Benchmarks

DLLP consistently outperformed state-of-the-art (SOTA) methods across various metrics:

  • ResNet-56 (CIFAR-10): DLLP achieved a 55% reduction in FLOPs with a negligible accuracy drop of only 0.04%, outperforming established methods like AMC and DCP.
  • VGG-16 (CIFAR-10): The method reached a 74.65% FLOPs reduction with a minimal 1.24% accuracy drop.
  • ImageNet (ResNet-50): On large-scale data, DLLP achieved a 65.95% FLOPs reduction, significantly higher than SOTA competitors like SFP (62.14%) while maintaining superior accuracy.

Quantified Reliability

A key advantage of the Bayesian approach is the ability to capture both aleatoric uncertainty (data noise) and epistemic uncertainty (model uncertainty). Experiments demonstrated that as data quality decreased—for instance, through the addition of Gaussian blur—the DLLP-pruned model correctly reported higher uncertainty. In contrast, traditional pruned models remained overconfident despite the loss of information, highlighting DLLP's suitability for safety-critical tasks.

Discussion and Insights

The core innovation of DLLP lies in viewing pruning as discovery rather than deletion. By maintaining distribution integrity, the pruned "slab" remains a smooth Gaussian, meaning the models are "born ready" and do not require the extensive recovery phases common in magnitude pruning.

However, some limitations remain. The training process involves "twin models" and Stein gradients, which introduces higher computational overhead during the initial training phase compared to simple magnitude pruning. Additionally, the method's sensitivity to hyperparameters, such as the Gumbel-Softmax temperature, requires careful calibration. Future work will explore the application of distribution-lossless logic to non-vision architectures, such as Transformers and Large Language Models (LLMs).

Conclusion

DLLP represents a significant step forward in network pruning by combining Bayesian principles with efficient Stein Variational Inference. By preserving the integrity of weight distributions and providing reliable uncertainty estimates, DLLP offers a robust framework for creating efficient yet trustworthy neural networks for the next generation of edge computing.

Summary updated

BibTeX
@misc{wang2022efficient,
  author = {Yingchun Wang and Song Guo and Jingcai Guo and Weizhan Zhang and Richard Yida Xu and Jie Zhang and Yi Liu},
  title = {{Efficient Stein Variational Inference for Reliable Distribution-lossless Network Pruning}},
  year = {2022},
  eprint = {2212.03537},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.03537},
}
Figure