跳到正文
arXiv cs.AI· Sahil Joshi, Prithvi Dixit, Aryan Katiyar, Agniva Chowdhury, Joseph E. Gonzalez, Anshumali Shrivastava, Aditya Desai, Kumar Krishna Agrawal·· 12 小时前AI 评分40

Stratified Sparse Attention(SSA):在极端稀疏度下缩小稀疏注意力与稠密注意力的差距

Stratified Sparse Attention: Reducing the Sparse-to-Dense Gap at Extreme Sparsity

AI 导读

研究者提出 Stratified Sparse Attention(SSA),将确定性检索与分数引导采样结合,用代理注意力分数对残余部分采样并按纳入概率校正,从而找回检索集之外的注意力质量,top-k、top-p 与 top-k+采样均为其特例。

正文 · 原文

View PDF HTML (experimental)

Abstract:Large Language Model inference over long contexts is increasingly bottlenecked by the cost of attending to a growing Key-Value (KV) cache. Sparse attention reduces this cost by accessing only a fraction of the cache, but existing methods face a trade-off between deterministic retrieval, which captures high-scoring tokens but discards residual attention mass, and sampling, which improves coverage at the cost of higher variance. Hybrid methods combine top-$k$ retrieval with uniform sampling, yet still exhibit a substantial gap from dense attention at aggressive sparsity. We introduce \emph{Stratified Sparse Attention (SSA)}, a unified framework combining deterministic retrieval with score-guided sampling. SSA deterministically attends to high-scoring tokens while sampling the residual using proxy attention scores and correcting for their inclusion probabilities, thereby recovering attention mass beyond the retrieval set. SSA encompasses top-$k$, top-$p$, and hybrid top-$k$+sampling as special cases. Across RULER, LongBench, LOFT, and AIME, and five models ranging from 3B to 27B parameters, SSA consistently improves over the baselines at matched sparsity. On RULER-HARD with Ministral-3-8B, SSA improves accuracy over the strongest practical baseline from 81.8\% to 84.2\% at 32K and from 63.8\% to 69.3\% at 128K under $50\times$ attention sparsity, recovering 94\% and 85\% of dense-attention performance, respectively. With optimized CUDA kernels, SSA achieves up to $2.96\times$ decode speedup over FlashInfer at 1M context, demonstrating that its accuracy gains translate into practical long-context inference acceleration. We open-source our code at this https URL.
Comments: 26 pages, 5 figures, 13 tables
Subjects: Artificial Intelligence (cs.AI)
Cite as: arXiv:2610.28441 [cs.AI]
  (or arXiv:2610.28441v1 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2610.28441

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Sahil Joshi [view email]
[v1] Tue, 20 Oct 2026 16:02:12 UTC (2,105 KB)

来源:arXiv cs.AI · arxiv.org