Papers › Progressive Gradient Flow for Robust N:M Sparsity Training in Transformers

Progressive Gradient Flow for Robust N:M Sparsity Training in Transformers

7 Feb 2024arXiv:2402.04744archive 2025-07-28

Abhimanyu Rajeshkumar Bambhaniya, Amir Yazdanbakhsh, Suvinay Subramanian, Sheng-Chun Kao, Shivani Agrawal, Utku Evci, Tushar Krishna

N:M Structured sparsity has garnered significant interest as a result of relatively modest overhead and improved efficiency. Additionally, this form of sparsity holds considerable appeal for reducing the memory footprint owing to their modest representation overhead. There have been efforts to develop training recipes for N:M structured sparsity, they primarily focus on low-sparsity regions (∼50\%). Nonetheless, performance of models trained using these approaches tends to decline when confronted with high-sparsity regions ($>$80\%). In this work, we study the effectiveness of existing sparse training recipes at \textit{high-sparsity regions} and argue that these methods fail to sustain the model quality on par with low-sparsity regions. We demonstrate that the significant factor contributing to this disparity is the presence of elevated levels of induced noise in the gradient magnitudes. To mitigate this undesirable effect, we employ decay mechanisms to progressively restrict the flow of gradients towards pruned elements. Our approach improves the model quality by up to 2% and 5% in vision and language models at high sparsity regime, respectively. We also evaluate the trade-off between model accuracy and training compute cost in terms of FLOPs. At iso-training FLOPs, our method yields better performance compared to conventional sparse training recipes, exhibiting an accuracy improvement of up to 2%. The source code is available at https://github.com/abhibambhaniya/progressive_gradient_flow_nm_sparsity.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.04744")

Code

Syntology Ran 15 of 17 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 3 ran · honoured contract; 12 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 15 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

abhibambhaniya/progressive_gradient_flow_nm_sparsity officialmentioned in paperpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 15 ran; 3 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
12ran
2unverified

Licence: 0 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from abhibambhaniya/progressive_gradient_flow_nm_sparsity. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

count_params abhibambhaniya/progressive_gradient_flow_nm_sparsity/benchmark.py official repository ran · honoured contract Apache-2.0 (permissive) · 410bffb8a07b52e3 · report
checkpoint_metric abhibambhaniya/progressive_gradient_flow_nm_sparsity/avg_checkpoints.py official repository ran fingerprinted Apache-2.0 (permissive) · 33bca8cbc866bf64 · report
cmd_from_args abhibambhaniya/progressive_gradient_flow_nm_sparsity/bulk_runner.py official repository ran Apache-2.0 (permissive) · e69e9b0108bef81c · report
cuda_timestamp abhibambhaniya/progressive_gradient_flow_nm_sparsity/benchmark.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 50d653ee6a59955c · report
hard_sigmoid_jit abhibambhaniya/progressive_gradient_flow_nm_sparsity/timm/layers/activations_jit.py official repository ran Apache-2.0 (permissive) · 91c27523dde7eb4a · report
map_mx_to_torch_model abhibambhaniya/progressive_gradient_flow_nm_sparsity/convert/convert_from_mxnet.py official repository ran fingerprinted Apache-2.0 (permissive) · 5bed58ca17652913 · report
mish abhibambhaniya/progressive_gradient_flow_nm_sparsity/timm/layers/activations.py official repository ran fingerprinted Apache-2.0 (permissive) · 801c85b8903bfff5 · report
mish_jit abhibambhaniya/progressive_gradient_flow_nm_sparsity/timm/layers/activations_jit.py official repository ran Apache-2.0 (permissive) · 14eddd8cc4c65fe0 · report
sigmoid abhibambhaniya/progressive_gradient_flow_nm_sparsity/timm/layers/activations.py official repository ran fingerprinted Apache-2.0 (permissive) · d83b6ecf3cdc1d6a · report
swish abhibambhaniya/progressive_gradient_flow_nm_sparsity/timm/layers/activations.py official repository ran fingerprinted Apache-2.0 (permissive) · 717e4d22b6d103e6 · report
swish_jit abhibambhaniya/progressive_gradient_flow_nm_sparsity/timm/layers/activations_jit.py official repository ran Apache-2.0 (permissive) · 8e341f8585b3fe94 · report
swish_jit_bwd abhibambhaniya/progressive_gradient_flow_nm_sparsity/timm/layers/activations_me.py official repository ran Apache-2.0 (permissive) · ccf59d4aa2ccacdb · report
swish_jit_fwd abhibambhaniya/progressive_gradient_flow_nm_sparsity/timm/layers/activations_me.py official repository ran Apache-2.0 (permissive) · 2d53e47b891cd927 · report
swish_me abhibambhaniya/progressive_gradient_flow_nm_sparsity/timm/layers/activations_me.py official repository ran Apache-2.0 (permissive) · 51a2f9920a170144 · report
timestamp abhibambhaniya/progressive_gradient_flow_nm_sparsity/benchmark.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 475160c5a1a1225a · report
clean_checkpoint abhibambhaniya/progressive_gradient_flow_nm_sparsity/clean_checkpoint.py official repository unverified Apache-2.0 (permissive) · 8024519a2a934824 · report
validate abhibambhaniya/progressive_gradient_flow_nm_sparsity/validate.py official repository unverified Apache-2.0 (permissive) · dddaf76c153d839d · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Focus

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections