TL;DR
Dynamic Sparse Training (DST) can theoretically slash the computational cost of neural networks, but "unstructured" sparsity rarely translates to actual speedups on standard hardware. This paper introduces SRigL, a method that enforces structured sparsity (constant fan-in) during training. By combining this structure with a novel "neuron ablation" technique, the authors achieve real-world inference speedups of up to 3.4× on CPUs and 1.7× on GPUs without sacrificing the high accuracy typically reserved for dense models.
The Sparsity Gap: Unstructured vs. Structured
In the world of deep learning, "sparse is the new dense." Methods like RigL (Rigging the Lottery) allow us to train networks where 90% or more of the weights are zero, significantly reducing the theoretical number of floating-point operations (FLOPs).
However, there is a massive "sparsity gap." Most DST methods produce unstructured sparsity, where the non-zero weights are scattered randomly. Standard hardware (CPUs and GPUs) is optimized for dense, blocky math and struggles to find speedups when it has to skip random zeros. Conversely, structured pruning (removing entire rows or channels) is hardware-friendly but often hurts the model's ability to learn complex patterns, leading to lower accuracy. The authors set out to find a "best-of-both-worlds" approach: a training method that is sparse from start to finish, hardware-efficient, and highly accurate.
Introducing SRigL: Methods & Mechanics
The authors propose Structured RigL (SRigL). It builds on the popular RigL algorithm but adds a critical constraint: constant fan-in.
- Constant Fan-In: Instead of letting weights be distributed anywhere, SRigL ensures that every single neuron (or convolutional filter) has exactly the same number of incoming non-zero weights. This regular structure allows for a "condensed" memory representation that hardware can process much faster than random sparse formats.
- Neuron Ablation: The authors discovered a subtle reason why previous structured methods failed at high sparsity (>90%). Standard RigL naturally "kills off" (ablates) entire underperforming neurons, effectively shrinking the layer width. A strict constant fan-in constraint prevents this, forcing every neuron to stay active even if it has no useful weights. SRigL introduces a hyperparameter ($\gamma_{sal}$) that identifies "weak" neurons and ablates them, redistributing their weight budget to more "salient" neurons.
- Sparse-to-Sparse Training: Unlike pruning methods that start with a dense model, SRigL maintains a sparse footprint throughout the entire training process, saving memory and compute from day one.
Key Insights: Stability and Neuron Ablation
- Structure is Stability: Through a theoretical analysis of "output-norm variance," the authors show that constant fan-in sparsity actually makes training more stable than unstructured sparsity. It reduces the wild swings in signal magnitude as data passes through deep layers.
- The "Aha" Moment on Ablation: The realization that RigL’s success at 95%+ sparsity was due to accidental neuron ablation was pivotal. By making this ablation explicit and controlled, SRigL can match the generalization of unstructured models while keeping a hardware-friendly format.
- Hardware-Agnostic Speedups: While some structured sparsity (like NVIDIA’s 2:4) requires specific new Tensor Cores, SRigL’s constant fan-in can be accelerated on almost any commodity CPU or GPU using straightforward "condensed" matrix multiplication.
Experimental Results
SRigL proves that you don't have to choose between speed and accuracy. The researchers evaluated SRigL across standard benchmarks, including CIFAR-10 (ResNet-18, Wide ResNet-22) and ImageNet (ResNet-50, MobileNet-V3, ViT-B/16).
- Accuracy: On ImageNet with ResNet-50, SRigL matches or exceeds the accuracy of the original (unstructured) RigL across all sparsity levels (80% to 99%).
- CPU Speedup: For "online" inference (batch size 1), a 90% sparse SRigL layer is 3.4× faster than a dense layer and 2.5× faster than a standard unstructured sparse layer (CSR format).
- GPU Speedup: For batched inference (batch size 256), the same layer is 1.7× faster than dense and a staggering 13.0× faster than unstructured sparse layers.
- Transformers: SRigL is particularly effective for Vision Transformers (ViT), where it significantly outperforms previous structured DST methods.
Limitations and Future Work
While SRigL is a major step forward, the authors note a few areas for growth:
- Hyperparameter Tuning: The neuron ablation threshold ($\gamma_{sal}$) adds another knob to turn, though the paper provides a sweep to help guide users.
- Implementation Effort: To see these gains, developers need to use the authors' "condensed" linear layer implementation rather than standard library calls.
- Future Directions: The authors suggest that combining SRigL with other techniques, like 2D block-balanced sparsity, could unlock even greater hardware efficiency in the future.
Summary updated