Stochastic Sparse Attention for Memory-Bound Inference

Kyle Lee, Corentin Delacour, Kevin Callahan-Coray, Kyle Jiang, Can Yaras +3 more
5/3/2026
4 citations
cs.LGcs.AIcs.DC

Official code: OPUSLab/SANTA (5 stars, MIT, last commit 2026-05-03).

Abstract

Autoregressive decoding becomes bandwidth-limited at long contexts, as generating each token requires reading all $n_k$ key and value vectors from KV cache. We present Stochastic Additive No-mulT Attention (SANTA), a method that sparsifies value-cache access by sampling $S \ll n_k$ indices from the post-softmax distribution and aggregates only those value rows.

Show full abstract

This yields an unbiased estimator of the post-softmax value aggregation while replacing value-stage multiply-accumulates with gather-and-add. We introduce stratified and systematic sampling to design variance-reduced, GPU-friendly variants. Evaluated on Llama-3.1-8B-Instruct at 32k-token contexts, S$^2$ANTA matches baseline accuracy while achieving up to $1.5\times$ decode-step attention-kernel speedup over FlashInfer and FlashDecoding on an NVIDIA RTX 6000 Ada. In batched long-context generation, these kernel gains translate to up to $1.25\times$ end-to-end decode-latency speedup. Finally, we propose Bernoulli $qK^\mathsf{T}$ sampling as a complementary technique to sparsify the score stage, reducing key-feature access through stochastic ternary queries. Both methods are complementary to upstream quantization, low-rank projection, KV-cache compression, and KV-cache selection methods. Together, they point toward sparse, multiplier-free, and energy-efficient inference. We open-source our kernels at: https://github.com/OPUSLab/SANTA.git

View on arXivView PDF

Code Implementations(1)

OPUSLab/SANTAOfficial100%
MIT

Open-source GPU kernels from the paper "Stochastic Sparse Attention for Memory-Bound Inference" (ICML 2026)

52May 3, 20267 months agoMIT

Similar Papers

Cite this paper

@article{lee2026stochastic,
  title  = {Stochastic Sparse Attention for Memory-Bound Inference},
  author = {Kyle Lee and Corentin Delacour and Kevin Callahan-Coray and Kyle Jiang and Can Yaras and Samet Oymak and Tathagata Srimani and Kerem Y. Camsari},
  year   = {2026},
  eprint = {2605.01910},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.01910v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.01910.svg)](https://codeofpaper.com/paper/2605.01910)

Discussion