Deep Neural Networks (DNNs) are notoriously power-hungry and computationally expensive, making them difficult to deploy on edge devices like smartphones or embedded systems. To combat this, N:M sparsity—a pattern where at most $N$ non-zero elements exist in every $M$ consecutive weights—has emerged as a highly effective, hardware-friendly solution. Supported by modern architectures like NVIDIA’s Ampere, N:M sparsity can provide up to 2x inference speedups.
However, there is a significant catch: training these sparse networks remains computationally expensive. Most existing methods rely on "dense backward propagation." Even if the forward pass is sparse, they calculate gradients for all weights (including the pruned zeros) to decide which ones should be "regrown" in the next iteration. This "dense-in-the-back" approach negates much of the potential energy and time savings during the training phase.
To solve this, researchers have introduced BAME (Block-Aware Mask Evolution), a novel training framework that maintains consistent sparsity throughout the entire N:M sparse training process, eliminating the need for dense gradient updates.
The Solution: BAME's Sparse-to-Sparse Architecture
BAME introduces a "sparse-to-sparse" training regime that evolves the network mask without ever needing to compute a full, dense gradient. It perpetually keeps both forward and backward propagation sparse, iteratively performing weight pruning-and-regrowing within designated weight blocks to tailor the N:M mask.
The framework relies on two core components to achieve this:
1. Loss-Aware Mask Adaption (LMA)
Instead of simply pruning the smallest weights (magnitude pruning), BAME uses a first-order Taylor expansion to estimate how much the training loss would change if a specific weight were removed or restored. Every $\Delta T$ iterations, it performs a "prune-and-revive" step within each N:M block based on this estimated loss impact. This ensures that the network retains the weights most critical to minimizing error, rather than just the largest ones.
2. Oscillation-Aware Block Freezing (OBF)
During training, the authors observed that some weight blocks are "unstable"—their masks flicker back and forth frequently, which destabilizes the loss landscape. BAME tracks this "mask oscillation frequency" using an Exponential Moving Average (EMA). It then selectively freezes the masks of the most volatile blocks, allowing the rest of the network to converge more smoothly.
Key Insights: Stability Over Constant Change
A key "aha moment" in the paper is the realization that frequent mask changes in certain blocks are actively detrimental to training.
By identifying and "freezing" these indecisive blocks via OBF, the authors found they could actually improve final accuracy while simultaneously reducing computation. Furthermore, BAME proves that the "dense-backward" tax is entirely optional. Estimating loss reduction via sparse gradients is sufficient to find a high-quality mask, paving the way for true hardware-algorithm synergy where specialized sparse hardware accelerates the training loop itself.
Empirical Results
The authors evaluated BAME across standard computer vision benchmarks, including CIFAR-10 (with ResNet-32 and MobileNet-V2) and ImageNet-1K (with ResNet-18, ResNet-50, and DeiT-small). BAME consistently outperformed or matched existing N:M training methods while being significantly more efficient:
- ImageNet-1K (1:16 sparsity): Training a ResNet-50 model, BAME achieved 72.0% top-1 accuracy. This outperforms the popular SR-STE method by 0.5% while requiring 2.37x fewer training FLOPs.
- CIFAR-10 (2:4 sparsity): Using ResNet-32, BAME reached 94.99% accuracy, surpassing baseline dense models and other sparse training methods like LBC and ASP.
- Architectural Versatility: The method showed strong results on both traditional CNNs (MobileNet, ResNet) and modern Vision Transformers (DeiT), suggesting the approach is architecture-agnostic.
Limitations and Future Work
While BAME represents a major step forward for efficient training, it does introduce new hyperparameters (like $\alpha$ and $\beta$ for freezing/adaptation control, and the update interval $\Delta T$). While robust defaults are provided, optimal settings might require tuning for entirely new architectures.
Additionally, while the paper demonstrates a massive reduction in theoretical FLOPs, actual wall-clock training speedups depend heavily on software library support for sparse backward passes, which is currently less mature than dense kernels. Finally, as the current study focuses on vision tasks, expanding and testing BAME on Large Language Models (LLMs)—where training costs are a primary bottleneck—is a logical and highly anticipated next step.
Summary updated