Exploration and Estimation for Model Compression

Yanfu Zhang, Shangqian Gao, Heng HuangICCV 2021

Abstract

Deep neural networks have achieved remarkable success in visual recognition, but their deployment is often constrained by computational resources. Pruning models under a strict budget is a common solution, yet finding the optimal sub-network is a non-convex, NP-hard combinatorial problem. This paper introduces a probabilistic framework that treats sub-networks as samples from a multivariate Bernoulli distribution. By employing an alternating Exploration and Estimation strategy—utilizing Stochastic Gradient Hamiltonian Monte Carlo (SGHMC)—the proposed method efficiently navigates the search space to find high-performing compressed models that respect FLOPs constraints.

The Challenge of Model Pruning

Deploying state-of-the-art CNNs on edge devices requires a significant reduction in parameters and FLOPs. Traditional pruning often relies on simple heuristics, such as removing weights with the smallest magnitudes. However, these methods lack theoretical grounding and often fail to find the global optimum in the complex landscape of possible sub-network configurations. Mathematically, searching for the best sub-network is an integer programming problem, which is notoriously difficult to optimize directly.

Methodology: Exploration and Estimation

To overcome the limitations of discrete search, the authors propose a probabilistic relaxation. Each channel's inclusion in the pruned model is modeled by a Bernoulli distribution. The search then proceeds through an iterative two-step loop:

  1. Exploration (Sampling): The algorithm uses Stochastic Gradient Hamiltonian Monte Carlo (SGHMC) to sample sub-network configurations. Unlike standard gradient descent, SGHMC incorporates momentum and controlled noise, allowing the search to escape local minima. A budget-aware term is integrated into the sampler to ensure that the explored configurations remain within the target FLOPs limit.
  2. Estimation (Updating): High-quality configurations identified during exploration are used to update the parameters of the underlying probability distribution. This focuses subsequent exploration on promising regions of the architecture space.
The Exploration and Estimation framework for sub-network search.

By alternating these steps, the model converges on a set of importance parameters ($p$) for each channel. Channels with low probability are eventually pruned, followed by a final fine-tuning phase.

Key Insights

  • The Necessity of Noise: The "noise" in the SGHMC sampling is a critical feature. It prevents the algorithm from falling into early local minima, a common failure mode for deterministic pruning methods.
  • Interpretable Importance: The learned probabilities ($p$) provide a direct measure of a channel's "discrimination power." As the search progresses, the variance of these parameters decreases, indicating a clear distinction between essential and redundant features.
  • Dynamic Search: The process naturally shifts from satisfying the computational budget in early stages to maximizing accuracy in later stages.

Experimental Results

The method was evaluated on CIFAR-10 and ImageNet using popular architectures like VGG and ResNet. The results consistently demonstrate state-of-the-art performance, often improving accuracy even with significant pruning.

Test accuracy comparison between the proposed method and a version without the exploration step across various models and budgets.

On CIFAR-10, the method pruned 56.6% of FLOPs from VGG-16 while actually increasing accuracy by 0.27%. On ImageNet, the pruned ResNet-50 outperformed competing methods like SCOP and DCP, maintaining high Top-1 accuracy even at 56% FLOPs reduction. Notably, for VGG-11bn on ImageNet, the pruned model (34% FLOPs) surpassed the full baseline by 0.31%, suggesting that the pruning process serves as an effective regularizer.

Conclusion

The "Exploration and Estimation" framework provides a mathematically grounded and efficient approach to structural pruning. By treating sub-network selection as a probabilistic sampling problem, it avoids the pitfalls of heuristic search and local minima. While currently focused on CNNs, the principles of budget-aware SGHMC exploration offer a promising path for compressing a wider range of deep learning architectures.

Summary updated

BibTeX
@inproceedings{zhang2021exploration,
  author = {Yanfu Zhang and Shangqian Gao and Heng Huang},
  title = {{Exploration and Estimation for Model Compression}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  url = {https://openreview.net/forum?id=4RpHnrKC_f},
}
Figure