acceptodds
Published as a conference paper at NeurIPS 2026

Beyond Masked Sparsity: SNACK Enables Truly Sparse Neural Networks on GPU

Jafar Badour, Elena Mocanu, Maurice Keulen

Abstract

Deep neural networks continue to grow in parameter count, driving up training and inference cost on GPUs. Sparse neural networks and Dynamic Sparse Training (DST) promise to reduce these costs, but most implementations rely on binary masks over dense tensors and recover little of the theoretical compute, memory, or energy savings. We propose SNACK, a truly sparse GPU layer that stores and computes only non-zero connections. SNACK exposes a simple PyTorch API for restructuring connections and backpropagating gradients entirely in the sparse paradigm, and uses a custom COO-format SpMM CUDA kernel with a batch-to-Streaming-Multiprocessor mapping tuned for the small-batch, high-sparsity regime typical of large-model training and single-stream inference. At the kernel level, SNACK is up to faster than the masked dense baseline (Dense+Mask) and competitive with cuSPARSE, Sputnik, and FlashSparse at 95% sparsity. At 90% sparsity, a single SNACK layer accelerates training by and , and inference by and , over Dense+Mask and fully dense layers, respectively, while using 25% less memory than dense and substantially less energy. End-to-end, SNACK reduces GPT-2 peak training memory by up to 40% and graph-style inference latency by over Dense+Mask at 99% sparsity.

Keywords:
Paris, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 49%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.33 over 3 reviews, above 49% of the others.
Reviewer_CvcnOpenReview ↗
Rating
3
Clarity
2
Confidence
3
Originality
3
Quality
3
Significance
2
Read review
Summary

This paper proposes SNACK, a truly sparse PyTorch layer that computes and stores only non-zero connections. The main issue that the paper identifies with the available SNNs and DSTs is that their implementations mostly rely on binary masks over dense tensors hence they recover only a fraction of the theoretical gains that they promise. In order to solve this problem, SNACK keeps weights in COO format end-to-end and never materializes a dense weight or gradient tensor. The two main contributions of this work include:

  1. SNACK-COO : a COO-format SpMM CUDA kernel with a batch-to-SM mapping tunned for the small-bath, high sparsity regime.
  2. SNACK layer : a truly sparse, backend agnostic drop-in for nn.Linear with a sparse outer-product gradient and memory-cheap uniform intializer. Third party SpMM kernels such as Sputnik, cuSPARSE or FlashSparse can be swapped in per regime.

The evaluation section covers isolated kernel benchmarks against eleven baselines on RTX 3070 (6GB) and A100, a single-layer training cycle and end-to-end GPT-2 DST and GAMLP graph inference.

Strengths and weaknesses

Strengths


S1 Well-positioned: Truly sparse, unstructured, no special hardware on commodity GPUs is a combination that is underserved by the current solutions. Table 1 helps establish the position quite clearly and need of this work.

S2 Thorough benchmarking: Eleven baselines across two GPUs is benchmarked and the authors show the crossover where Sputnik overtakes SNACK-COO at large batch and tie it to their parallel-efficiency analysis. This is a very useful insight.

S3 Demonstration of Correctness: Gradients match Dense+Mask to 1e-4 and RigL(SNACK) matches RigL on ResNet50-ImageNet within 0.2% top-1 over five seeds.

S4 Strong Inference Results: 4.8x latency and 2.8x memory over Dense+Mask on GAMLP at 99% sparsity, and 2.2x inference memory on GPT-2 with an energy win at high sparsity.

Weaknesses


W1 weak speed and energy results for training: In Table 4, SNACK is slower and more energy-hungry than Dense+Mask at every sparsity, roughly 14x slower and 50x more energy per step at 0.25 and still behind at 0.99. The small-batch DST training regime the kernel was built for is exactly where it loses on two of three axes.

W2 Applicable on FP32 only: No fp16/bf16 path and no Tensor Cores. For a submission motivated by modern LLM training and inference cost, the validated regime is not the one anyone trains in, and this is deferred entirely to future work.

W3 Partly validated scale: End-to-end evidence rests on one small LLM and one graph workload, and the at-scale claim relies on a single architecture by the authors' admission. GPT-2 and GAMLP training are single-run, which undercuts the perplexity-equivalence claim specifically, since that claim rests on distributional equivalence over seeds but reports one seed per cell.

W4 Engineering over insight The contribution reads as competent systems work filling a niche rather than a new method, and the one regime where it should shine end to end does not.

Questions

Q1. Do you have any fp16/bf16 results? Does the COO atomic-accumulate scheme has a known obstacle in fp16?

Q2. The perplexity claim rests on distributional equivalence over seeds, but Table 4 reports one run per cell. Can you add at least three seeds for the GPT-2 numbers, or otherwise support a distributional claim from single runs?

Q3. The abstract (lines 13–15) and the intro bullets (lines 51–52) appear to swap which of 8x and ~4x belongs to training vs inference. Which is correct?

Q4. Do you have any result on a second, larger architecture, even inference-only, to support the generality claim?

Q5. With only c_fc and c_proj sparsified, the 40% memory reduction is capped at ~41% of parameters. Is there a principled obstacle to sparsifying attention projections, or is it just out of scope for this submission?

Limitations

Yes

Paper formatting concerns

NA

1 comment

We sincerely thank reviewer Cvcn for recognizing the strengths of our work and for providing valuable comments to help improve the paper. We address each question raised in the review below.

W1 weak speed and energy results for training in GPT2 experiment

We recognise that SNACK is slower on GPT due to the large sequence length therefore SpMM is slower than Dense multiplication. This is a limitation and it stems primarily from atomic-add contention on the scatter-accumulate path and irregular memory access per nonzero, both of which scale poorly with GPT-2's larger sequence length relative to Dense's regular access pattern. SNACK nonetheless makes it feasible to run these models on consumer GPUs where Dense+Mask would not fit in memory at all.

W2 / Q1: fp16/bf16 support, and the atomic-accumulation obstacle.

The submission was fp32-only, as our Limitations section stated. We have now added a dtype-templated COO path covering both the forward SpMM and the sparse outer-product weight gradient. Under the same experiment as per Table 3. Five independent runs per cell (seeds 42–46), each re-drawing the sparsity mask and re-initialising weights, so the spread reflects mask randomness in addition to measurement noise. Mean ±\pm sample std, n=5n=5; uncertainty on ratios is propagated from both operands.

Sparsity %Params (k)Memory fp32 (MB)Memory fp16 (MB)CUDA τ fp32 (µs)CUDA τ fp16 (µs)
9030,001173 ± 0.1959.5 ± 0.1482.6 ± 7.3465.8 ± 7.0
9515,00947 ± 0.1705.5 ± 0.1256.3 ± 3.8249.6 ± 3.7
993,00693 ± 0.1591.7 ± 0.163.2 ± 1.064.2 ± 1.0

For bf16 the atomic add for it is not supported to our knowledge on the same GPU and toolchain and needs further research. However, we do not foresee an obstacle in implementing it on newer generation GPUs/different toolchains. Unstructured sparsity multiplication fundamentally clashes with Tensor-Cores which execute fixed-size dense matrix fragments and cannot skip arbitrary scattered nonzeros; exploiting them would require moving to a structured format (e.g., 2:4 or block-sparse), which is a substantial redesign and out of scope for this submission.

It is also worth noting that memory does not shrink by the full ~50% expected from a naive fp32→fp16 cast, because each stored nonzero in SNACK-COO requires two index values (row, col) in addition to the value itself — i.e., trainable (value) parameters make up only 1/3 of total stored parameters, with the remaining 2/3 being index overhead that is independent of value dtype. Casting only the value to fp16 therefore reduces roughly 1/3 of total memory by half, while the dtype-independent 2/3 remains fixed, which is why the fp16 column in Table X shows a ~15–25% reduction rather than ~50%. (Please refer to figure 3).

W3 / Q3 Partly validated scale

Please refer to our answer to reviewer Z8gj W2. We will add a multi seed run for GAMLP as well in the camera-ready version.

W3: engineering over insight

The engineering effort stems from creating a novel method of SpMM and bypassing the CUDA level constraints on the kernel level. We combined this with multiple novel methods to maintain sparsity throughout the training cycle. We believe that The pipeline and its feasibility on consumer hardware showing the decade long of theoretical benefits in the field of Dynamic Sparse Training is a strong contribution.

Q3: The abstract and intro points swap.

We recognize this is a mistake and it was written incorrectly. The abstract is correct, we will correct it in the next version. We thank the reviewer for the help in spotting this mistake.

Q4: results on other architectures.

We do not have for now other experimentations on different architectures and the experiments on GPT2 and GAMLP are a proof of concept where we outline the limitations in training and benefits in inference.

Q5: Is there a principled obstacle to sparsifying attention projections?

There is no obstacle in principle to sparsifying attention projections but it is out of scope for our work. However, it is an interesting idea and it deserves its own research to study effects of sparsity on attention projections inside LLMs.

We hope these clarifications and additional results address your concerns, and we're happy to discuss further

Reviewer_z8gjOpenReview ↗
Rating
5
Clarity
3
Confidence
4
Originality
3
Quality
4
Significance
4
Read review
Summary

The paper introduces SNACK, a sparse PyTorch layer for commodity GPUs that stores weights in COO format end-to-end, without materializing a dense weight tensor at any step of forward, backward, or topology update. It is paired with SNACK-COO, a custom CUDA kernel for sparse matrix multiplication tuned for the small-batch, high-sparsity regime. The SNACK layer is backend-agnostic: third-party SpMM kernels (Sputnik, FlashSparse, cuSPARSE) can be plugged in for other regimes. The authors evaluate at three levels — against eleven SpMM implementations at the kernel level, on a single sparse layer in a short training cycle, and end-to-end on GPT-2 dynamic sparse training and a graph-style inference workload. Results show kernel-level speedups at batch 1, up to 40% peak training memory savings on GPT-2 at 99% sparsity, and 4.8× lower inference latency at the same sparsity over the masked-dense baseline.

Strengths and weaknesses

Strengths

  • SNACK-COO is a real engineering contribution in its targeted regime: at batch 1, high sparsity, it is the only sparse implementation that beats Dense+Mask across every matrix size tested, and it marginally outperforms Sputnik COO (the relevant prior art) on both consumer- and datacenter-class GPUs.
  • The layer design is modular and well thought-out: the sparse outer-product gradient and the dense-free uniform initializer are decoupled from the SpMM backend, so future kernels can be dropped in without changes to the layer.
  • The benchmark sweep is mostly thorough, with eleven SpMM implementations compared across two GPUs and multiple matrix sizes; the regime crossover (Sputnik overtaking SNACK-COO at larger batches) is explicitly identified and matched to the theoretical analysis in Appendix F.
  • The inference-side end-to-end story holds up: Table 5 (GPT-2) and Table 6 (GAMLP) show monotone memory reduction with sparsity and competitive or better latency at η≥0.85\eta \geq 0.85 over Dense+Mask.
  • The paper is honest about regime-specific limitations in its limitations section and inside the body (the time/energy vs. memory trade in Section 5 is explicitly described as a trade rather than concealed).

Weaknesses

  • The end-to-end validation is somewhat narrow. The only LLM experiment is GPT-2 small on WikiText-103, with only the MLP projections (c_fc/c_proj) replaced. A second LLM, or a vision transformer model where a meaningful fraction of nn.Linear instances are sparsified, would substantially strengthen the "viable on commodity hardware" claim.
  • The GPT-2 tables report single-point numbers per cell with no per-seed variance, while the ResNet-50 results in Table 8 do report ± std. Given the explicit acknowledgment that SNACK(Sputnik) and Dense+Mask cannot be seed-aligned, the perplexity-equivalence claim rests on single-seed point estimates and would be considerably more convincing with three-seed means.
Questions
  • The sparsities at which SNACK delivers its largest memory and energy advantages on GPT-2 (η ≥ 0.95) are also the sparsities at which the model is least usable: perplexity goes from 30 (dense) to 103 at η = 0.95 and 130 at η = 0.99. The "matches Dense+Mask perplexity" claim is true but applies to a regime in which both models are heavily degraded. Given the perplexity-vs-sparsity behaviour in Table 4, where in the sparsity range would you locate the practical operating point that jointly satisfies memory, time, and model quality?
Limitations

The authors include a thorough Limitations section that addresses the regime constraints of SNACK-COO (n≪m,η≥0.9n \ll m, \eta \geq 0.9, fp32), the architectural ceiling on end-to-end gains (≈41% of GPT-2-small at η=0.9\eta = 0.9), the single-architecture scope of the LLM evaluation, and the fp32-only setting. The points raised in the Weaknesses section above extend what the paper itself acknowledges.

Paper formatting concerns

None.

Final justification

I am maintaining my score at 5 (Accept) and have raised my confidence from 3 to 4 following the rebuttal.

I had no major concerns with this submission to begin with. The two weaknesses I raised were addressed appropriately: the authors ran five seeds and provided full per-cell standard deviations across all sparsity levels for perplexity, memory, energy, and latency, which confirms the perplexity-equivalence claim with Dense+Mask within variance and materially strengthens the end-to-end evidence. They also gave a clear and honest answer on the practical operating point, recommending η ∈ [0.75, 0.85] while conceding that the advantage in that range is memory-only rather than a joint memory/time/energy win. The commitment to integrate the five-seed table into the revised paper is fitting.

1 comment

We thank the reviewer for this insightful query regarding the optimal sparsity range where GPT2 would get the largest advantage.

W1 The end-to-end validation is somewhat narrow.

We recognise this point. We did not benchmark a larger LLM because we needed to run Dense+Mask on the same GPU and for many models the dense format would cause out of memory errors. However, experimenting on a vision transformer is a good idea and deserves its own research.

W2 The GPT-2 tables report single-point numbers per cell with no per-seed variance.

We recalculated the standard deviations based on new 5 runs and here are the results:

SparsityMethodPerplexityMemoryEnergy_spentLatency_token_ms
0.25Dense+Mask30.14 ± 0.232261.11 ± 0.566982.00 ± 55.2641.60 ± 0.03
0.25SNACK(Sputnik) (ours)29.91 ± 0.142510.72 ± 2.83352649.26 ± 14671.23563.00 ± 85.62
0.50Dense+Mask36.53 ± 0.492260.83 ± 0.027021.04 ± 16.7941.52 ± 0.04
0.50SNACK(Sputnik) (ours)36.74 ± 0.962127.06 ± 2.13186438.35 ± 5319.18391.49 ± 69.64
0.75Dense+Mask43.68 ± 0.632260.84 ± 0.027127.47 ± 13.4341.48 ± 0.06
0.75SNACK(Sputnik) (ours)42.12 ± 1.151746.83 ± 0.8434700.27 ± 515.79342.66 ± 36.00
0.85Dense+Mask61.56 ± 0.742260.49 ± 0.357085.45 ± 8.6441.68 ± 0.02
0.85SNACK(Sputnik) (ours)61.64 ± 1.231601.04 ± 2.1818747.36 ± 263.58175.65 ± 14.47
0.90Dense+Mask77.17 ± 1.192260.73 ± 0.077065.33 ± 9.4441.73 ± 0.02
0.90SNACK(Sputnik) (ours)77.12 ± 1.251498.37 ± 1.3514226.77 ± 12.27127.51 ± 0.45
0.95Dense+Mask103.89 ± 1.182260.83 ± 0.057006.17 ± 4.8641.69 ± 0.12
0.95SNACK(Sputnik) (ours)104.33 ± 1.231420.95 ± 0.3710173.07 ± 20.8486.03 ± 0.11
0.99Dense+Mask132.25 ± 1.232260.26 ± 1.167025.38 ± 32.8041.69 ± 0.09
0.99SNACK(Sputnik) (ours)130.44 ± 1.651366.28 ± 0.308151.38 ± 27.8570.77 ± 0.36
–dense29.52 ± 0.312031.54 ± 0.446730.74 ± 52.8639.99 ± 0.08

We will adapt this table in the revised version of the paper.

Q1: where in the sparsity range would you locate the practical operating point that jointly satisfies memory, time, and model quality?

We recommend sparsity between 0.75 and 0.85 as it does not degrade as much as in extreme sparsity. We concede that on the energy and time perspective it is not as fast as the dense counterpart. However, it can use up less memory and therefore some models that barely cannot fit on a GPU, when pruned or trained using DST will be able to fit. This is a win for SNACK which is the feasibility aspect we outlined in the paper.

We will be happy to discuss further and hope that the questions are clarified.

Reviewer_CbAbOpenReview ↗
Rating
5
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
4
Read review
Summary

This work proposes SNACK, a sparse layer for commodity GPUs that stores and computes only non-zero connections. It stores weights in COO format end-to-end to avoid the dense weight tensor that masked sparsity materializes. The two contributions are SNACK-COO, a custom COO-format SpMM CUDA kernel with a batch-to-SM mapping tuned for the small-batch, high-sparsity regime, and a backend-agnostic layer with a sparse gradient and a memory-cheap sparse initializer, into which third-party SpMM kernels (e.g., Sputnik, FlashSparse, cuSPARSE) can be plugged. The experiments span kernel microbenchmarks, a single-layer training cycle, and end-to-end workloads, reporting memory and energy savings over the masked-dense baseline. The largest speedups are reported at the kernel and single-layer level (up to 8× over Dense+Mask), whereas end-to-end gains are primarily in memory and energy.

Strengths and weaknesses

Strength:

  • The paper clearly defines the problem of truly sparse vs. simulated (masked) sparsity. The scope is well defined and the comparison is solid.
  • The SNACK-COO design for the small-batch regime is a meaningful improvement, and the method is deployable as a drop-in replacement for nn.Linear.
  • SNACK enables high-sparsity models to run on lower-end commodity GPUs that would otherwise OOM under masked sparsity, which is a practical benefit for memory-constrained settings.

Weakness:

  • There is no quantitative criterion for backend switching. The paper recommends SNACK-COO for n≪mn \ll m and a third-party backend otherwise, but n≪mn \ll m is only qualitative. An explicit threshold (in terms of nn, mm, and η\eta) would help, as backend selection is currently manual and the runtime dispatcher is deferred to future work.
  • The "end-to-end" framing may be overstated. The headline speedups are single-layer microbenchmarks rather than end-to-end (end-to-end GPT-2 training is in fact slower per step than Dense+Mask, Table 4), and only a subset of layers is sparsified.
  • If the framing is taken as end-to-end, the experiments are also somewhat shallow and mostly single-run: GPT-2 small only, single-GPU, on one dataset, with no multi-seed variance to support the perplexity comparison.
  • The closest competitor is not compared head-to-head. BLaST [39] also targets high-sparsity Transformers with a fused SpMM kernel, but no quantitative comparison is provided.
Questions
  • n≪mn \ll m is qualitative so far, could you provide a quantitative criterion for when SNACK-COO should yield to a third-party backend? For example, a threshold on n/mn/m, or on nnz⋅nnnz \cdot n relative to the SM count, that a user could follow without re-benchmarking on their own GPU? I understand the exact crossover shifts across hardware, but a normalized rule of thumb (or a boundary fitted from the data you already have) would make the backend-agnostic claim actionable.
  • Could you separate which speedups are kernel-level, single-layer, and end-to-end? As written, the 8×/3.7× figures read as end-to-end, whereas end-to-end training is slower per step ( see in Table 4).
  • For the end-to-end "true sparsity" claim: what fraction of total end-to-end compute and memory actually runs through the truly-sparse path, given that only c_fc and c_proj (GPT-2) and the feature head (GAMLP) are sparsified?
  • Could you provide a comparison with the closest approach, BLaST [39], given that it is the most directly related high-sparsity Transformer system, or, if a full comparison is not feasible, some quantitative evidence to position SNACK against it?
Limitations

yes.

Paper formatting concerns

no.

Final justification

Thank you for the detailed responses addressing my concerns. I appreciate the clarification that the speedups are kernel-driven, and the honest note that Table 4's per-step slowdown comes from the large effective first dimension falling outside the small-batch regime. It resolves my main worry about the end-to-end framing.

The breakdown of the sparse path (e.g., ~45% of params and forward MACs, ~41% reduction, and a 33.7% memory cut at η=0.9) is also helpful for grounding the "true sparsity" claim. The n<4 rule of thumb for backend selection and the BLaST distinction both make sense. Thanks also for the added multi-seed and ViT-Tiny/CIFAR-10 results. I'm happy to maintain my rating of Accept.

1 comment

We sincerely thank the reviewer CbAb for the constructive feedback and for acknowledging the potential of our proposed SNACK framework. We appreciate your detailed questions regarding breakdown of sparsified layers and root cause of speedup.

W1/ Q1: Criterion for backend switching

In general for batch sizes n < 4 SNACK-COO is a clear winner however, batch size 4 and above Sputnik becomes an attractive competitor to use. However, it is complex as the matrix dimensions affect this criterion (refer to Table 11, 12). We see in these tables a win for SNACK-COO for larger batch sizes. Providing a per SM criterion is more difficult and requires more benchmarks on different GPUs to validate. This is a very interesting point for future work.

W2 / Q2: Speedup breakdown.

The speedup is entirely kernel driven with notable speedup from the sparse outer product function over a dense one. Table 3 reflects a more realistic batch size of 4, while Table 10 (appendix) shows a higher 8.3× speedup at batch size 1 with larger matrix dimensions. Table 4 is slower because the effective first dimension (sequence length × batch size) is very large there, which falls outside SNACK small-batch optimization regime — this is a limitation of the current work.

W3 experimental feedback.

We did provide a multi-seed runs results (please refer to the response to reviewer Z8gj W2).

Q3: Fraction of total parameters that is sparse.

GPT-2-small (124.4M params): the sparse path is 45.5% of parameters and 45.4% of forward MACs/token. Attention projections are a further 22.8%; the tied embedding + LM head is 31.6% and is unreachable by any linear-layer kernel. At η=0.9 this eliminates 41.0% of parameters and 40.9% of forward compute (the "≈41%"), and realizes a 33.7% peak-memory cut (1498 vs 2261 MB).

Q4: Comparison to BLaST.

To our knowledge BLaST targets structured sparsity. In essence, it targets weight matrices at block granularity (b×b tiles, with 32×32, 64×64, and 128×128 evaluated) rather than element-wise (which is our case). We will clarify this in the revised version of the paper.

We are happy to discuss further if any questions arise.

Comments on the paper

1 comment
Meta-review

The paper is seen favorably by two out of three reviewers, with all reviewers appreciating the paper's main motivation, clarity, and engineering contribution. The reviewers raise a range of concerns, which include:

  • a potential overstatement of the end-to-end claim given the current experiments
  • a narrow evaluation in modern real-world settings, which includes large scale (LLM) model settings and fp16/bf16 support, especially as the real-world applicability is so much part of the premise of this paper
  • the quality of the models decreasing in the sparsity regimes where the proposed method is ostensibly recommended by the authors

Overall, I urge the authors to address the raised concerns in this rebuttal/discussion period. The outcome of this period will allow me to be confident in a final recommendation for this paper.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.