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

Effective Sparsification of Neural Networks with Global Sparsity Constraint

Xiao Zhou, Weizhong Zhang, Hang Xu, Tong Zhang

Abstract

Deep Neural Networks (DNNs) are often over-parameterized, posing challenges for deployment on resource-constrained devices. Weight pruning is a common solution, yet determining optimal per-layer pruning rates remains a significant hurdle. We present ProbMask, a novel pruning framework that treats weight masks as learnable probabilities subject to a global sparsity constraint. By utilizing a differentiable optimization process, ProbMask automatically identifies essential network components across all layers simultaneously. Our results demonstrate that ProbMask achieves state-of-the-art accuracy at extreme compression levels, outperforming existing methods by up to 10% on ImageNet when 99% of the network is pruned.

Introduction

Weight pruning aims to reduce the computational and memory footprint of DNNs by removing unnecessary connections. However, traditional pruning strategies often struggle with the "budget allocation" problem: deciding exactly how much to prune from each individual layer. Common approaches—such as uniform pruning or manual tuning—are either suboptimal or prohibitively expensive for deep architectures. Furthermore, heuristic-based methods like weight magnitude pruning fail as a global metric because weight scales vary significantly across different layers.

ProbMask addresses these issues by introducing a "global comparator" based on probability. By treating the existence of each weight as a probabilistic event, the method provides a universal metric (0 to 1) that allows for direct comparison of weight importance across the entire network.

Methodology

Probabilistic Masking

Instead of a static binary mask, ProbMask assigns a continuous probability $s_i$ to every weight. This transformation allows the pruning problem to be framed as an optimization task. Because probabilities are bounded, they serve as a standardized currency for importance, regardless of the underlying weight magnitudes in a specific layer.

Global Sparsity Constraint and Optimization

Rather than enforcing local constraints per layer, ProbMask optimizes against a single global budget for the entire network. The objective is to minimize the task loss such that the sum of all probabilities remains below a target threshold $K$. To make this discrete selection process differentiable, the authors employ the Gumbel-Softmax trick, enabling gradient-based training of the mask probabilities via standard backpropagation.

To strictly adhere to the global budget during training, the framework utilizes Projected Gradient Descent (PGD). A specialized bisection-based algorithm is used to project the learned probabilities back into the valid feasible region after each update, ensuring the sparsity target is met throughout the learning process.

Layer-wise remaining weight ratios for VGG19 and ResNet32. ProbMask automatically learns a non-uniform distribution of weights, preserving more parameters in critical layers than heuristic-based methods.

Key Insights

Automatic Budget Allocation

As shown in Figure 6, ProbMask naturally learns to distribute its parameter budget non-uniformly. It tends to preserve more weights in the sensitive initial and final layers while aggressively pruning internal bottleneck layers. This behavior emerges automatically from the global optimization, eliminating the need for manual heuristics.

Prevention of Layer Collapse

At extreme sparsity levels (e.g., >99%), many pruning methods suffer from "layer collapse," where an entire layer is accidentally pruned to zero, breaking the signal flow. Because ProbMask evaluates the network globally, it retains a minimal functional path through every layer, maintaining model viability even at near-total compression.

Experimental Results

The researchers evaluated ProbMask across several benchmarks, including CIFAR-10/100 and ImageNet-1K, using architectures like VGG19, ResNet32, and ResNet50.

Top-1 Accuracy vs. Sparsity on ImageNet (ResNet50). ProbMask maintains significantly higher accuracy at extreme sparsity levels (98-99%) compared to state-of-the-art baselines.

On ImageNet (ResNet50), ProbMask demonstrates a clear advantage at high sparsity. At 98% sparsity, it achieves 66.83% Top-1 accuracy, approximately 5% higher than the next best method. At 99% sparsity, this gap expands to 10%, highlighting the robustness of the probabilistic approach. Similar gains were observed on MobileNetV1, where ProbMask outperformed the STR (Soft Threshold Reparameterization) method by over 38% at extreme sparsity levels.

Conclusion and Future Work

ProbMask provides a powerful, automated framework for neural network sparsification. By shifting from manual per-layer rules to a global probabilistic constraint, it achieves superior accuracy-to-sparsity trade-offs. While currently focused on unstructured pruning—which requires specific hardware support for speedups—future work may extend this probabilistic logic to structured pruning (removing entire channels) or apply it to large-scale Transformer models in natural language processing.

Summary updated

BibTeX
@inproceedings{zhou2021effective,
  author = {Xiao Zhou and Weizhong Zhang and Hang Xu and Tong Zhang},
  title = {{Effective Sparsification of Neural Networks with Global Sparsity Constraint}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00360},
}
Figure