Abstract
Deep Neural Networks (DNNs) are increasingly deployed on resource-constrained edge devices, necessitating efficient compression techniques. While Post-Training Sparsity (PTS) offers a faster alternative to retraining-based pruning, it traditionally struggles to maintain accuracy at high sparsity levels due to suboptimal layer-wise sparsity allocation. This paper introduces Fast and Controllable Post-training Sparsity (FCPTS), a framework that enables differentiable sparsity allocation and global optimization. FCPTS achieves significant accuracy improvements (up to 30% at high compression rates) and reduces optimization time to minutes, providing a robust solution for rapid model deployment.
1. Introduction
The deployment of Deep Neural Networks (DNNs) on edge devices, such as smartphones and autonomous drones, is often hindered by their high memory and energy requirements. Sparsity—the process of pruning unimportant weights to zero—is a primary strategy to mitigate these costs. However, researchers face a persistent trade-off between speed and quality. Retraining-based methods yield high-quality sparse models but require massive datasets and days of compute. Conversely, existing Post-Training Sparsity (PTS) methods are fast but often suffer catastrophic accuracy loss when sparsity exceeds 50%.
The primary bottleneck in PTS is the challenge of sparsity allocation. Different layers within a network exhibit varying sensitivities to pruning; over-pruning a sensitive layer can lead to model collapse. Current PTS approaches typically rely on uniform pruning or manual heuristics that fail to capture the complex inter-dependencies of a global network structure.
2. The FCPTS Framework
FCPTS addresses the allocation problem by treating it as a fast, global optimization task. The framework is built upon two core technical innovations:
2.1 Differentiable Sparsity Allocation
In standard pruning, the relationship between a weight threshold and the resulting sparsity rate is a non-differentiable step function, which prevents the use of gradient-based optimization. FCPTS overcomes this by employing Kernel Density Estimation (KDE) to create a smooth, differentiable "bridge" function. This allows the framework to learn the optimal pruning threshold for every layer simultaneously through backpropagation.
2.2 Controllable Global Optimization
FCPTS utilizes a dual-loss objective function to balance model fidelity with compression targets:
- Reconstruction Loss ($L_{rec}$): This uses Kullback–Leibler (KL) divergence to minimize the discrepancy between the outputs of the sparse model and the original dense model.
- Control Loss ($L_c$): This serves as a global constraint, ensuring the total network sparsity converges precisely to a user-defined target (e.g., 80% total sparsity).
Unlike prior methods that optimize layers in isolation, FCPTS performs a "net-wise" optimization, adjusting all layer thresholds in a single pass to find the most efficient global configuration.
3. Experimental Evaluation
The researchers evaluated FCPTS across a diverse range of benchmarks and architectures to demonstrate its versatility:
- Datasets: Image classification on CIFAR-10, CIFAR-100, and ImageNet (ILSVRC12); object detection on PASCAL VOC.
- Architectures: ResNet (18, 32, 50, 56), MobileNetV2, RegNet, and Vision Transformers (ViT-Base and ViT-Large).
3.1 Accuracy and Efficiency
The results indicate a significant performance leap over previous state-of-the-art (SOTA) methods. On ImageNet with a ResNet-50 architecture at 80% sparsity, FCPTS maintained a 71.3% Top-1 accuracy, while the previous leading method (POT) dropped to approximately 17%.
Efficiency is a hallmark of the FCPTS approach. By optimizing thresholds and minor weight adjustments rather than the entire weight mask, the system converges rapidly. For instance, generating a sparse ResNet-18 on ImageNet takes only 29 minutes on a single NVIDIA RTX 3090 GPU, compared to over 100 minutes for earlier PTS techniques.
3.2 Hardware Deployment and Generalization
To validate real-world utility, the authors deployed a 70% sparse ResNet-18 on an Ambarella CV22 AI chip. The sparse model achieved a 2.4x speedup and reduced memory consumption by over 50% compared to the dense baseline. Furthermore, FCPTS demonstrated strong generalization to Vision Transformers (ViT), outperforming baselines by ~35% in accuracy at 70% sparsity for ViT-Base.
4. Discussion and Key Insights
A critical insight from the study is the discovery of the "sensitivity map." FCPTS automatically identified that in architectures like ResNet, the initial layers can often tolerate higher pruning rates, while deeper layers are significantly more sensitive. By optimizing the pruning threshold as a proxy for the mask, FCPTS avoids the instability often seen in other learnable sparsity methods when applied to post-training scenarios.
5. Conclusion and Future Work
FCPTS represents a significant advancement in making model compression accessible and fast. While the current work focuses on unstructured sparsity (individual weight pruning), which benefits specialized hardware like the Ambarella CV22, future iterations could extend to structured sparsity (channel pruning) to provide speedups on standard CPUs and GPUs. Additionally, the differentiable bridge concept introduced here holds potential for other domains, such as mixed-precision quantization and hardware-aware neural architecture search (NAS).
Summary updated