Abstract
Modern deep learning models are increasingly resource-intensive, complicating deployment on edge devices. Network pruning is a standard mitigation strategy, yet it typically forces a compromise between hardware acceleration and model fidelity. This paper introduces Learning Best Combination (LBC), a novel framework that treats N:M sparsity as a combinatorial search problem. By utilizing learnable scores to identify optimal weight patterns within blocks, LBC achieves state-of-the-art accuracy while significantly reducing training overhead compared to traditional dense-gradient methods.
Introduction
Deploying large-scale neural networks on resource-constrained hardware requires efficient compression techniques. Pruning—the removal of redundant weights—is effective but often results in irregular memory access patterns (unstructured sparsity) or significant accuracy degradation (structured sparsity). N:M sparsity has emerged as a compelling middle ground, offering hardware-friendly regular patterns (e.g., 2:4) that are natively supported by modern architectures like NVIDIA Ampere. However, existing N:M pruning methods often suffer from high computational costs during training.
The Sparsity Landscape
To contextualize the LBC approach, it is essential to distinguish between the primary forms of network sparsity:
- Unstructured Sparsity: Involves removing individual weights based on importance. While it preserves accuracy, the resulting irregular matrices are difficult for standard hardware to accelerate.
- Structured Sparsity: Removes entire architectural components like filters or channels. This is highly efficient for hardware but often leads to substantial drops in model performance.
- N:M Sparsity: A fine-grained structured approach where exactly $N$ weights are non-zero out of every $M$ consecutive weights. This provides a balance, maintaining high accuracy while enabling significant hardware speedups.
Proposed Method: Learning Best Combination (LBC)
The core innovation of LBC is the reformulation of N:M pruning as a selection problem. For any block of $M$ weights, there exists a finite set of $C_M^N$ possible combinations. LBC learns to select the optimal combination through several key mechanisms:
- Learnable Importance Scores: Instead of relying solely on weight magnitude, LBC assigns a learnable score ($S$) to each possible combination within a block. These scores are optimized concurrently with the model weights.
- Combinatorial Search: The method evaluates the importance of subsets of weights, effectively modeling the potential change in loss ($\Delta L$) associated with removing specific combinations.
- Efficient Optimization: By employing a Straight-Through Estimator (STE), LBC avoids the need for full dense-gradient updates across all weights. This "sparse-gradient" approach significantly lowers the training FLOPs required to reach convergence.
- Gradual Pruning Schedule: The model begins with multiple candidate combinations and progressively narrows them down until only the single best-performing pattern remains for each block.
Experimental Evaluation
The researchers validated LBC across diverse benchmarks, including ImageNet for classification and COCO for object detection and segmentation.
Performance on ImageNet
LBC demonstrated superior performance across various architectures. For a 2:4 sparse ResNet-50, LBC achieved 77.2% top-1 accuracy, outperforming the dense baseline (77.1%) and previous state-of-the-art methods like SR-STE (77.0%). In the context of Vision Transformers, LBC reached 80.1% accuracy on DeiT-small, a 0.5% improvement over competitive baselines.
Training Efficiency
A critical advantage of LBC is its reduced computational footprint. For a 2:4 sparse ResNet-50, LBC reduced training FLOPs to 0.72x of the baseline, whereas previous methods like SR-STE required 0.83x. This efficiency makes LBC a more viable candidate for large-scale model training.
Conclusion
Learning Best Combination (LBC) provides a robust and efficient framework for achieving N:M sparsity. By shifting the pruning paradigm from individual weight removal to combinatorial subset selection, LBC maintains high model accuracy while optimizing for modern hardware. Future research may extend this combinatorial scoring approach to activations and gradients, potentially unlocking further efficiencies in deep learning deployment.
Summary updated