A Framework for Neural Network Pruning Using Gibbs Distributions

Alex Labach, Shahrokh Valaee

Introduction

Modern deep neural networks are notoriously overparameterized, presenting significant challenges for deployment on resource-constrained edge devices. Pruning—the systematic removal of unnecessary connections—is a primary strategy for model compression. However, existing methods often rely on post-training heuristics or static fine-tuning that prevents weights from fully adapting to the emergent sparse structure. This paper introduces Gibbs pruning, a framework that treats pruning as a statistical physics problem, allowing weights and pruning masks to co-adapt through simulated annealing.

The Gibbs Pruning Framework

The core of the proposed method is modeling the pruning mask $x$ as a random variable following a Gibbs distribution: $$p(x) \propto e^{-\beta H(x)}$$

The framework utilizes two primary components to guide the sparsification process:

  1. The Hamiltonian ($H(x)$): An energy function defining desirable mask configurations. A Linear Hamiltonian favors masks retaining high-magnitude weights for unstructured pruning, while a Quadratic Hamiltonian (inspired by the Ising model) enforces structured pruning by encouraging groups of weights, such as convolutional filters, to be pruned together.
  2. Simulated Annealing: By manipulating the inverse temperature parameter $eta$, the model transitions from a state of high randomness (early training) to a "frozen" sparse state (late training). This stochastic regularization phase forces the network to become robust before the final mask is determined.
Schematic of Gibbs sampling for pruning masks during the training forward pass.

To handle the computational complexity of sampling from these distributions, the authors employ Chromatic Gibbs Sampling. This MCMC method enables efficient, parallelized mask generation on GPUs during training. Additionally, "schedule stretching" is used to provide the weights and masks sufficient time to co-adapt, which significantly enhances final model accuracy.

Experimental Results

The framework was evaluated on CIFAR-10 using ResNet-20 and ResNet-56 architectures. Gibbs pruning established new state-of-the-art results, particularly in extreme sparsity scenarios. For ResNet-56, the method successfully removed over 95% of weights in targeted layers with a negligible 0.45% drop in top-1 accuracy.

Pruning statistics for ResNet-20 and ResNet-56, showing the high percentage of parameters removed from convolutional layers.

Notably, Gibbs pruning outperformed Iterative Magnitude Pruning (IMP), the traditional benchmark for finding "Lottery Tickets," when combined with extended training schedules. The quadratic Hamiltonian approach also proved superior to simpler heuristics for structured filter-wise pruning.

Conclusion and Future Work

Gibbs pruning bridges the gap between statistical mechanics and hardware-aware AI. By allowing weights to "learn" which connections are being phased out, the network avoids the performance "shock" typical of traditional pruning methods. Future research directions include extending this framework to Recurrent Neural Networks (RNNs), exploring non-uniform pruning rates across layers, and integrating the method with weight quantization for further compression.

Summary updated

BibTeX
@inproceedings{labach2020framework,
  author = {Alex Labach and Shahrokh Valaee},
  title = {{A Framework for Neural Network Pruning Using Gibbs Distributions}},
  booktitle = {GLOBECOM},
  year = {2020},
  doi = {10.1109/globecom42002.2020.9322333},
}
Figure