AttentionIndex: Accelerating Learned Sparse Attention with a Causal Inverted-File Index

Jeongmin Brian Park, Wen-mei Hwu
11/2/2026
cs.AIcs.LG

No confident code implementation found for this paper.

Abstract

Learned sparse attention, used in production models such as DeepSeek-V4 and GLM-5, lets each query attend to only k keys chosen by a lightweight indexer, but the indexer still scores every key in the prefix. At one million tokens, this selection takes more than half of prefill time.

Show full abstract

Two-stage selection over contiguous blocks, as in HiSA, reduces this cost, but its recall declines as context grows at a fixed candidate budget. We present AttentionIndex, which routes each query over an inverted-file index that groups indexer keys by similarity and refines the candidates with the native indexer score. AttentionIndex builds the index during prefill, making new keys searchable immediately, reusing previous clustering to keep maintenance cheap, and exposing each query only to clusters built from its own prefix. On GLM-5.3 and DeepSeek-V4-Flash at one million tokens, AttentionIndex delivers 1.3-1.8 times the prefill throughput of exhaustive selection, and at throughput within 5% of HiSA, it recovers 17.0 and 10.0 percentage points more of the exhaustive top-k, respectively. AttentionIndex also improves accuracy on long-context benchmarks by up to 18.4 percentage points over HiSA at the same candidate budget.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{park2026attentionindex,
  title  = {AttentionIndex: Accelerating Learned Sparse Attention with a Causal Inverted-File Index},
  author = {Jeongmin Brian Park and Wen-mei Hwu},
  year   = {2026},
  eprint = {2611.02508},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.02508v1}
}

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/2611.02508.svg)](https://codeofpaper.com/paper/2611.02508)

Discussion