Modern hardware accelerators, such as NVIDIA’s Ampere architecture, provide specialized "Tensor Cores" that can double the throughput of matrix multiplications—provided the weight matrices follow a specific N:M structured sparsity pattern (e.g., 2:4 sparsity, where two out of every four elements are zero). While this effectively accelerates inference, it has historically failed to speed up training.
The bottleneck lies in the backward pass. During backpropagation, the transpose of the weight matrix ($W^T$) is used to calculate gradients. Even if $W$ is perfectly pruned to satisfy N:M row-wise constraints, $W^T$ will likely violate them, forcing the hardware to fall back to slow, dense computations. Recent research has converged on a solution: making structured sparsity "transposable" or "bi-directional" to unlock hardware acceleration across the entire training loop.
The Transpose Problem in Structured Sparsity
To understand why training is difficult to accelerate, consider how hardware handles sparsity. To achieve speedups, hardware like Tensor Cores requires a specific alignment: zeros must be distributed such that every small block of $M$ elements in a row contains at least $N$ zeros.
When we compute the forward pass ($Y = WX$), the hardware reads $W$ row-by-row. However, during the backward pass, we compute gradients using the transpose ($W^T$). In the transpose, the original rows become columns. A matrix that was sparse row-wise is now sparse column-wise. Because current hardware is hard-wired for row-wise sparsity, it cannot "see" the structure in $W^T$, rendering the sparsity useless for accelerating gradient calculations.
Strategy 1: Finding Symmetric Masks
The most direct solution is to find a single sparsity mask that satisfies the N:M constraint in both its original and transposed forms. Itay Hubara, Brian Chmiel, and their colleagues demonstrated in Accelerated Sparse Neural Training that such "transposable masks" exist and can be found efficiently. By enforcing this symmetry, they enabled hardware acceleration for both the forward and backward passes, effectively doubling theoretical training throughput.
However, finding these masks is a difficult combinatorial problem, especially for large-scale models. Xiang Meng and Rahul Mazumder addressed this in TSENOR by formulating mask generation as an optimal transport problem. Their approach allows for the rapid discovery of transposable masks even in LLMs with billions of parameters, maintaining high accuracy while ensuring the entire training process remains hardware-compatible.
Strategy 2: Disentangled Bi-directional Masks
A more flexible alternative is to stop trying to find a single "perfect" mask and instead use two different masks: one for the forward pass and one for the backward pass.
In Bi-directional Masks for Efficient N:M Sparse Training, Yuxin Zhang and Mingbao Lin argue that enforcing a single transposable mask is too restrictive and hurts model accuracy. Their "Bi-Mask" approach applies an N:M row-wise mask to $W$ for the forward pass and a different N:M row-wise mask to $W^T$ for the backward pass. By "disentangling" these masks, they allow each pass to optimize its own sparse structure independently, recovering the accuracy lost by more rigid symmetric methods.
Similarly, the SLoPe framework developed by Mohammad Mozaffari and Amir Yazdanbakhsh utilizes a "double-pruned" backward pass. As detailed in SLoPe: Double-Pruned Sparse Plus Lazy Low-Rank Adapter Pretraining of LLMs, they prune the weight matrix independently for each direction. To compensate for any potential information loss from using two different sparse views of the same weights, they introduce "lazy" low-rank adapters in the final stages of training, ensuring the final model matches dense performance.
Strategy 3: Transposition Invariance
A third path involves using mathematical structures that are naturally invariant under transposition. Abhishek Tyagi and Yuhao Zhu explored this in Dynamic Sparse Training of Diagonally Sparse Networks. By training networks where weights are organized into sparse diagonals, the structural properties remain identical when the matrix is transposed. This "DynaDiag" approach provides a middle ground: it offers the flexibility of unstructured sparsity (by choosing which diagonals to keep) while maintaining the hardware-friendly structure needed for both training and inference speedups.
Why It Works: The Efficiency Gains
The shift toward transposable and bi-directional sparsity changes the economics of training. By ensuring that the backward pass—which typically accounts for two-thirds of the total training computation—is also sparse, these methods achieve:
- Throughput: Up to 2x theoretical speedups by utilizing Tensor Cores in both directions.
- Memory Reduction: By sparsifying activation gradients (as seen in work by Xucheng Ye and Yiran Chen in Accelerating CNN Training) and weights, researchers have reported memory savings of up to 40-75%.
- Regularization: Interestingly, Vaibhav Singh and Eugene Belilovsky found that this form of structured masking can act as a regularizer, sometimes leading to better generalization than dense training (Model Parallelism With Subnetwork Data Parallelism).
By solving the "transpose problem," this research direction transforms N:M sparsity from a mere inference-time optimization into a fundamental tool for efficient, large-scale neural network training.