Abstract
Budgeted pruning is the problem of pruning under resource constraints. In budgeted pruning, how to distribute the resources across layers (i.e., sparsity allocation) is the key problem. Traditional methods solve it by discretely searching for the layer-wise pruning ratios, which lacks efficiency. In this paper, we propose Differentiable Sparsity Allocation (DSA), an efficient end-to-end budgeted pruning flow. Utilizing a novel differentiable pruning process, DSA finds the layer-wise pruning ratios with gradient-based optimization. It allocates sparsity in continuous space, which is more efficient than methods based on discrete evaluation and search. Furthermore, DSA could work in a pruning-from-scratch manner, whereas traditional budgeted pruning methods are applied to pre-trained models. Experimental results on CIFAR-10 and ImageNet show that DSA could achieve superior performance than current iterative budgeted pruning methods, and shorten the time cost of the overall pruning process by at least 1.5$\times$ in the meantime.
Introduction
Deep learning models are notoriously resource-hungry, making them difficult to deploy on edge devices with strict latency or energy budgets. Budgeted pruning aims to solve this by removing redundant channels from a network while staying under a specific resource limit (the "budget").
The most challenging aspect of this process is sparsity allocation: deciding exactly how many channels to keep in each layer. Traditional methods treat this as a discrete search problem—essentially "guessing and checking" different configurations using reinforcement learning or genetic algorithms. This is incredibly inefficient because it requires pre-training a full model first and then running hundreds of evaluation cycles to find a good architecture.
The DSA Framework
The authors propose Differentiable Sparsity Allocation (DSA), which moves the allocation process from a discrete search space into a continuous, differentiable one. By merging structure search and weight training into a single flow, DSA eliminates the "pre-train -> search -> fine-tune" cycle.
Key Components
- Differentiable Pruning Process: Instead of a "hard" cut, DSA uses a probabilistic approach. Each channel has a probability $p_i$ of being kept, controlled by an S-shaped sigmoid-log function. During training, binary masks are sampled from a Bernoulli distribution. As training progresses, the function is sharpened to settle on a final "hard" pruned architecture.
- ADMM-Inspired Optimization: To ensure the model adheres to resource budgets (like FLOPs or latency), DSA uses an optimization framework based on the Alternating Direction Method of Multipliers (ADMM). This allows the task loss (accuracy) and the budget constraint to be balanced via gradients.
- Topological Grouping: Pruning skip connections (like those in ResNets) requires multiple layers to have the same number of channels. DSA automatically groups these layers to ensure the resulting architecture is valid for deployment.
- Pruning from Scratch: Unlike most methods that require a fully trained "teacher" model, DSA can start with a randomly initialized network and learn the structure and the weights simultaneously.
Experimental Evaluation
The researchers evaluated DSA on standard computer vision benchmarks including CIFAR-10 (ResNet-20/56), ImageNet (ResNet-18/50), and VGG-16.
Key Results
- Efficiency: DSA shortens the overall pruning and training time by at least 1.5$\times$ compared to iterative budgeted pruning methods.
- Accuracy: On CIFAR-10, DSA pruned a ResNet-20 to 75% of its original FLOPs while maintaining 92.10% accuracy (virtually no drop from the 92.17% baseline).
- Scalability: For ResNet-18 on ImageNet at a 60% FLOPs budget, DSA outperformed popular methods like FPGM and SFP, showing a much smaller Top-1 accuracy drop (-1.11% vs -2.47% for FPGM).
- Constraint Satisfaction: Unlike regularization-based methods (like SSL or MorphNet) which often miss the target budget, DSA’s ADMM framework ensures the final model strictly adheres to resource constraints.
Conclusion
DSA transforms the tedious, discrete search for optimal neural network pruning into a smooth, gradient-based optimization problem. By making the pruning process differentiable, the authors enable "pruning from scratch," achieving superior accuracy with significant speedups. One interesting finding is that the gradients of the task loss with respect to the "keep ratios" align perfectly with empirical layer sensitivity, meaning the math naturally identifies which layers are critical for accuracy. Future work may involve applying DSA to non-convolutional architectures like Transformers and integrating more complex hardware-aware latency models.
Summary updated