Jeongmin Brian Park, Wen-mei Hwu
Timely, well-engineered systems paper that fixes a documented HiSA recall failure at 1M context, but gains are modest, regime-dependent, and incremental over known IVF techniques.
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. 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.
The paper targets a bottleneck in learned sparse attention (DeepSeek Sparse Attention, used in DeepSeek-V4 and GLM-5.x). The lightweight indexer still scores every prefix key, so selection takes 53–58% of 1M-token prefill time. HiSA's contiguous-block routing cuts this cost, but its recall drops sharply as context grows at a fixed budget (from about 84% to 42% between 16K and 256K).
AttentionIndex replaces block routing with an inverted-file (IVF) index over indexer keys, followed by exact refinement with the native indexer score. Its three design elements are:
1. Causal, incremental maintenance. New keys enter an open window and are searchable immediately. Windows are sealed with size-capped k-means. Periodic warm-started refits use Elkan/Hamerly-style bounds. Versioned index publication ensures that no query sees centroids built from future keys.
2. Learned routing representatives. A shared per-layer DeepSets encoder predicts a correction to the cluster mean, because the ReLU-weighted multi-head indexer score is not an inner product. It is trained with a cross-entropy loss on reference keys per candidate slot.
3. Systems integration. The method is built into SGLang with Triton/TileLang kernels, side-stream refits, and tensor-parallel index ownership.
The novelty is mainly one of adaptation. IVF, bound-accelerated k-means, learned centroids (Vecchiato et al.) and LSM-style buffering are all known. The contribution is combining them under causality and per-request, in-forward-pass constraints, and showing that the combination works at 1M tokens in production-scale models.
- It is slower than HiSA at equal budget at long contexts and on V4-Flash.
- It is slower than exhaustive selection at 256K.
- Decoding gains are lower than HiSA's.
- LongBench-v2 accuracy at matched throughput is slightly worse.
- The learned-centroid gains are small on V4 (0.2 points).
This is a systems and algorithms paper for a narrow but increasingly important setting: inference of DSA-style models at 256K–1M+ tokens. Practical gains are meaningful but modest: 1.3–1.8× over exhaustive selection at 1M, with a crossover around 384–512K. At shorter contexts it provides no benefit.
The recall improvement over HiSA at matched throughput is substantial (10–23 points). It translates into accuracy gains mostly on RULER-style retrieval, and much less on LongBench-v2, where the authors suggest the model is the limiting factor. This suggests that perfect recall of the exhaustive top-k is not always the right target.
Adoption would require serving-stack engineering, and the complexity is considerably higher than HiSA's. Because the work comes from NVIDIA, there may be a path into the serving frameworks. The ideas (causal versioned ANN index, learned routing representatives for non-inner-product scores) could transfer to other dynamic-retrieval settings in LLM inference, such as KV retrieval and other learned-indexer sparse attention variants.
The work is very timely. Million-token contexts and DSA-style sparse attention are being adopted in frontier open models, and the indexer is now the dominant prefill cost. The paper identifies this bottleneck clearly, and the motivation section is itself a useful contribution.
Overall, this is a solid, timely systems contribution with a clear niche. It is likely to be cited by the sparse-attention efficiency community, but it is unlikely to be a field-defining paper.
Generated Nov 3, 2026
Timely, well-engineered systems paper that fixes a documented HiSA recall failure at 1M context, but gains are modest, regime-dependent, and incremental over known IVF techniques.