Summary (Overview)
- MISA (Mixture of Indexer Sparse Attention) is a drop-in replacement for the DeepSeek Sparse Attention (DSA) indexer that treats its indexer heads as a pool of mixture-of-experts (MoE) experts, routing only active heads per query.
- A lightweight block-pooled router selects the query-dependent subset of heads using cheap statistics on pooled keys, reducing per-query indexer cost from to .
- A hierarchical variant, MISA, uses the MoE-routed pass to keep an enlarged candidate set (size ) and re-ranks it with the full DSA indexer to recover the final top-k almost exactly.
- Without any additional training, MISA matches dense DSA on LongBench within 0.5 average points on both DeepSeek-V3.2 and GLM-5 while using only active heads (8× and 4× fewer heads respectively), outperforms HISA on average, and preserves fully green Needle-in-a-Haystack heatmaps up to 128K context.
- The TileLang kernel implementation delivers approximately a 3.82× speedup over DSA's original indexer kernel on a single NVIDIA H200 GPU.
Introduction and Theoretical Foundation
Frontier large language models now routinely process prefixes of hundreds of thousands to millions of tokens, making dense attention the dominant cost of both prefill and decode. Among sparse attention techniques, DeepSeek Sparse Attention (DSA) stands out as the best-performing fine-grained variant in production: it uses a lightweight learned indexer that scores every prefix token and feeds the top-k tokens into the main attention. This design carries into DeepSeek-V4's Compressed Sparse Attention (CSA), confirming that learned token-wise indexing remains the strongest building block.
The central problem: DSA's indexer is multi-head — although the main attention operates in MQA mode with a single shared KV entry per token, DSA uses indexer heads. Each head specialises in a different relevance pattern (recency, syntactic role, lexical/semantic similarity), and the aggregated score benefits from this diversity. However, scoring each of the prefix tokens with all heads makes the indexer the dominant cost on long contexts.
The key observation: While diversity across heads is essential when aggregated over a large pool, only a few heads are actually informative for any given query. The relevant set changes slowly along the prefix and can be identified from cheap block-level statistics.
The indexer relevance score in DSA is:
with the top-k token selection:
Methodology
1. MISA: Mixture of Indexer Experts
MISA treats the indexer heads as a pool of MoE experts. The method has two components:
Block-pooled router. The prefix is partitioned into blocks , each summarized by a pooled indexing key:
For query position , the router computes per-head per-block affinities and aggregates across blocks:
The top-h heads are selected as the active expert set:
Sparse token scoring with active experts. Only active heads compute the token-level score:
with final selection:
Key distinction from HISA: Both methods compute the same per-head per-block affinities , but reduce them along orthogonal axes — HISA aggregates across heads to select top-m blocks (token-axis), while MISA aggregates across blocks to select top-h heads (head-axis). MISA uses a much coarser block partition ( vs. HISA's ), keeping routing overhead negligible.
2. Hierarchical MISA (MISA)
A two-stage coarse-to-fine approach:
- Coarse stage: MoE scoring selects an enlarged candidate set: with (Eq. 11)
- Fine stage: Original DSA scoring with all heads is applied within : (Eq. 12)
Unlike HISA, MISA keeps the coarse pass at full token granularity (head-level routing rather than block-level filtering), so tokens within the same block are still ranked individually.
Empirical Validation / Results
LongBench Results (Table 1)
All sparse methods applied at inference time without additional training. Token budget fixed at across all methods.
| Model | Indexer | Heads | SQA | MQA | Sum | FS | Syn | Code | Avg. |
|---|---|---|---|---|---|---|---|---|---|
| DeepSeek-V3.2 | DSA | 64 | 50.89 | 52.66 | 22.11 | 62.24 | 69.83 | 48.56 | 51.05 |
| Block | 64 | 48.36 | 49.76 | 21.90 | 59.45 | 68.67 | 49.09 | 49.54 | |
| HISA | 64 | 49.17 | 51.96 | 22.13 | 61.62 | 70.83 | 48.99 | 50.78 | |
| MISA | 8 | 50.83 | 51.62 | 22.31 | 61.77 | 70.00 | 48.54 | 50.85 | |
| MISA | 8 | 50.91 | 52.27 | 22.04 | 62.10 | 69.83 | 48.45 | 50.95 | |
| GLM-5 | DSA | 32 | 41.23 | 27.89 | 18.39 | 63.20 | 68.84 | 56.53 | 46.01 |
| Block | 32 | 38.35 | 24.29 | 16.95 | 60.64 | 60.49 | 55.29 | 42.67 | |
| HISA | 32 | 42.45 | 27.62 | 17.90 | 63.78 | 69.35 | 56.79 | 46.32 | |
| MISA | 8 | 41.64 | 29.16 | 18.22 | 63.53 | 68.76 | 57.24 | 46.43 | |
| MISA | 8 | 41.16 | 28.67 | 18.56 | 63.57 | 69.26 | 57.83 | 46.51 |
Task abbreviations: SQA = Single-Document QA, MQA = Multi-Document QA, Sum = Summarization, FS = Few-shot Learning, Syn = Synthetic Retrieval, Code = Code Completion.
Key findings:
- MISA matches DSA within 0.20 points on DeepSeek-V3.2 (50.85 vs. 51.05) and surpasses it on GLM-5 (46.43 vs. 46.01)
- MISA closes the gap to 0.1 average points on DeepSeek-V3.2, with every per-category score within 0.4 points of DSA
- Block-Sparse trails by 1.5–3.4 average points, confirming block-uniform selection is too coarse
Needle-in-a-Haystack (NIAH) Retrieval
Both MISA variants reproduce DSA's near-perfect green grid across the full depth–length plane up to 128K context. Block-Sparse shows visible accuracy holes at intermediate depths beyond ~32K; HISA shows minor degradations at deepest needle positions. MISA is essentially indistinguishable from DSA.
Indexer Kernel Speed
- 1-stage MISA: consistently faster than DSA across all sequence lengths
- 2-stage MISA: outperforms DSA when sequence length exceeds 32K
- Achieved speedup: ~3.82× end-to-end over DSA's original indexer kernel on NVIDIA H200
Ablation: Number of Active Heads
- : too aggressive — visible accuracy holes in NIAH heatmap
- : mitigates most deficiencies but suboptimal at 128K
- : essentially indistinguishable from dense 64-head indexer
- : no further gain despite twice the compute of
Default: as the smallest setting that consistently matches DSA.
Theoretical and Practical Implications
Theoretical contributions:
- Head-axis routing as a new efficiency axis: MISA identifies the indexer's per-token head-token products as the dominant cost and introduces head-axis routing, complementary to token-axis hierarchies (HISA) and block-level methods (MoBA, Quest, InfLLM).
- Decoupling of routing from output: Unlike prior attention-side MoE methods (Mixture-of-Attention-Heads, MoH) that route the heads producing attention output, MISA routes only the heads producing the indexer score — the downstream attention remains dense over the chosen set. This decoupling enables very small expert counts () without harming quality.
- Preservation of diversity: Every head remains available in the pool; routing only selects which ones to consult per query, preserving the full expressiveness of the indexer.
Practical implications:
- Drop-in replacement: MISA requires no additional training and can be inserted into pretrained DSA-based models (DeepSeek-V3.2, GLM-5) with identical interface (same Sparse MLA operator, same token budget)
- Hardware efficiency: Realized ~3.82× kernel speedup confirms head-axis routing translates to measurable savings
- Scalability: The approach is complementary to token-level schemes and can be combined orthogonally with methods like HISA and IndexCache
- Generalizability: The MoE-routed indexer concept could extend to future architectures like DeepSeek-V4's CSA, which applies DSA on compressed KV streams
Conclusion
MISA demonstrates that indexer-head-axis routing is a practical and complementary axis of efficiency for fine-grained sparse attention. The lightweight block-pooled router reduces the dominant per-token cost from to while preserving full indexer diversityaine. With active heads and no additional training, MISA:
- Matches dense DSA on LongBench within 0.5 average points on both models
- Outperforms both Block-Sparse and HISA on average
- Retains fully green NIAH heatmaps up to 128K context
- Recovers more than 92% of DSA-selected tokens per layer
- Delivers ~3.82× wall-clock kernel speedup on NVIDIA H200
Future directions (as noted in limitations):
- Measuring end-to-end model latency (not just indexer kernel)
- Reducing memory access volume to the KV cache in the indexer stage
- Jointly training the router with the indexer to further close residual quality gaps
The authors hope this work stimulates further exploration of head-level routing in sparse attention systems.
Related papers
- Harness Continual Learning: Continual Adaptation Beyond Model Parameters
Harness Continual Learning enables frozen foundation models to accumulate capabilities by evolving prompts, memories, and tools around them, with guarded updates preventing harness-level forgetting.
- EvoMem: Memory-Augmented Evolution for Code Optimization
EvoMem's persistent memory of successful mutation strategies yields a 6.40% average performance gain and 5.93x speedup in LLM-based evolutionary code search.
- Phantom Gains: Auditing Self-Improvement Against a Measured Null
Transition-level auditing of LLM self-improvement requires measured nulls for every statistic; without them, a frozen model falsely appears to expand at 0.280.