mlsanityData to 24 Nov 2026

Recursive Sparse Attention: Million-Token Length Extrapolation at Logarithmic Cost

arXiv 2611.07232 ↗Submitted 4 Nov 2026cs.CL cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

At context lengths of about 1M tokens, dense attention is costly in prefill and decoding, and training typically relies on long documents, which become scarcer as the target length increases. Most sparse attention methods score all preceding blocks or tokens, so their selection cost per query is O(L) at context length L; hierarchical selection reduces it to O(log L), but prior trainable hierarchical methods report accuracy only within their training length. We propose RecSA (Recursive Sparse Attention), which builds a tree over the KV cache in which each node summarizes its subtree with one key and one mean-pooled value. The keys come from one pooler per layer, shared by all levels and distilled from dense attention. Each level above the tokens selects at most k candidates, so each query has O(log L) selection cost and reads O(log L) entries; the summaries of unselected candidates share one softmax with the exact tokens. Each entry's RoPE position is its index among the candidates of its level, so at any length every relative distance stays within the range seen during training. Initialized from Qwen3-4B and trained on 0.62B tokens at the original model's 32K training length, RecSA outperforms all baselines on RULER at every length from 131K to 2M; at 1M, it scores 60.5, compared with 40.0 for the best baseline, Dense + DCA. With our optimized kernels, RecSA is faster than dense attention in end-to-end prefill and decoding from 64K to 2M; at 524K on one H200 GPU, it accelerates prefill by 3.2x and decoding by 3.8x.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 42 of its 50 references that are in the map. Submitted 4 Nov 2026.

Builds on

42 of 50 references.

References · 42

  1. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,787
  2. 2021Training Verifiers to Solve Math Word Problemscited by 11,055
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,938
  4. 2020Measuring Massive Multitask Language Understandingcited by 8,473
  5. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 6,685
  6. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 5,336
  7. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 5,132
  8. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,276
  9. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,986
  10. 2021Program Synthesis with Large Language Modelscited by 3,972
  11. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,787
  12. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,444
30 more
  1. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,559
  2. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,557
  3. 2021MuSiQue: Multihop Questions via Single-hop Question Compositioncited by 1,011
  4. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 798
  5. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 794
  6. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 672
  7. 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 581
  8. 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 527
  9. 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 469
  10. 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 431
  11. 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 392
  12. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 348
  13. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 346
  14. 2025MoBA: Mixture of Block Attention for Long-Context LLMscited by 232
  15. 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 230
  16. 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 220
  17. 2024LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuningcited by 149
  18. 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inferencecited by 143
  19. 2024Training-Free Long-Context Scaling of Large Language Modelscited by 67
  20. 2024Length Generalization of Causal Transformers without Position Encodingcited by 55
  21. 2025SeerAttention-R: Sparse Attention Adaptation for Long Reasoningcited by 41
  22. 2025NExtLong: Toward Effective Long-Context Training without Long Documentscited by 23
  23. 2025Multipole Attention for Efficient Long Context Reasoningcited by 22
  24. 2026Hierarchical Sparse Attention Done Right: Toward Infinite Context Modelingcited by 19
  25. 2024A Training-free Sub-quadratic Cost Transformer Model Serving Framework With Hierarchically Pruned Attentioncited by 15
  26. 2025Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory Accesscited by 12
  27. 2025InfiniteHiP: Extending Language Model Context Up to 3 Million Tokens on a Single GPUcited by 11
  28. 2025Understanding and Improving Length Generalization in Hierarchical Sparse Attention Modelscited by 9
  29. 2025Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Modelscited by 5
  30. 2026Block Sparse Attention with Log-Linear Complexitycited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Rectified Sparse Attention
  2. 2025Mixture of Sparse Attention: Content-Based Learnable Sparse Attention via Expert-Choice Routing
  3. 2025Long-Context Modeling with Dynamic Hierarchical Sparse Attention for Memory-Constrained LLM Inference
  4. 2026Simplified Sparse Attention via Gist Tokens
  5. 2026Certified Sparse Attention via Perturbed Retrieval
  6. 2026Double-P: Hierarchical Top-P Sparse Attention for Long-Context LLMs
  7. 2026Latent Sparse Attention: Towards Subquadratic Ultra-Long Context Attention
  8. 2026Subquadratic Attention with a Hierarchical Tree-Structured Indexer