Understanding and Improving Length Generalization in Hierarchical Sparse Attention Models
Not on the map. Why?
Abstract (arXiv)
Effectively processing long contexts is a critical challenge for language models. While standard Transformers are limited by quadratic complexity and poor length extrapolation, alternative architectures like sliding window attention and state space models sacrifice the ability to effectively utilize the full context due to their fixed-size memory. Chunk-based sparse attention has emerged as a promising paradigm for extreme length generalization, yet the key architectural principles underpinning its success are not yet fully understood. In this work, we present a systematic dissection of these models to identify the core components driving their performance. Through a unified framework and comprehensive ablation studies, we demonstrate that a combination of three design principles is critical: (1) an expressive, non-linear Chunk Encoder with a dedicated CLS token to produce representations for retrieval; (2) a Bypassing Residual Path to stably integrate retrieved global information without it being overridden by the local residual stream; and (3) enforced selection sparsity during pre-training to bridge the train-test distribution gap. We provide a theoretical motivation for intra-chunk information processing and landmark generation. By combining these principles, we establish a new state-of-the-art for training-free length extrapolation, successfully generalizing models trained on a 4K context to 32 million tokens on RULER and BABILong. Our findings provide a clear and empirically-grounded set of design principles for developing future, highly-capable long-context language models.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 40 of its 53 references that are in the map. First posted on arXiv 20 Oct 2025.
Builds on
40 of 53 references.
References · 40
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2020Reformer: The Efficient Transformercited by 1,668
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
28 more
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2023Large Language Modelscited by 780
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
- 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 407
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
- 2015Towards AI-Complete Question Answering: A Set of Prerequisite Toy Taskscited by 314
- 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 242
- 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystackcited by 215
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 213
- 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 174
- 2024You Only Cache Once: Decoder-Decoder Architectures for Language Modelscited by 144
- 2024Zamba: A Compact 7B SSM Hybrid Modelcited by 124
- 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Modelscited by 122
- 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 112
- 2025On Memory Construction and Retrieval for Personalized Conversational Agentscited by 105
- 2023Hierarchically Gated Recurrent Neural Network for Sequence Modelingcited by 102
- 2024RecurrentGemma: Moving Past Transformers for Efficient Open Language Modelscited by 64
- 2024A Controlled Study on Long Context Extension and Generalization in LLMscited by 26
- 2025Understanding and Improving Length Generalization in Recurrent Modelscited by 23
- 2024Scaling Stick-Breaking Attention: An Efficient Implementation and In-depth Studycited by 13
- 2024Efficient Length-Generalizable Attention via Causal Retrieval for Long-Context Language Modelingcited by 9
- 2025Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory Accesscited by 9
- 2025RWKV-X: A Linear Complexity Hybrid Language Modelcited by 6
- 2024Zebra-Llama: A Context-Aware Large Language Model for Democratizing Rare Disease Knowledgecited by 3
Built on by
Citing papers per year: 2025: 1; 2026: 5.
6 papers.
- 2026Addressable Memory for Video World Modelscited by 15
- 2026Hierarchical Sparse Attention Done Right: Toward Infinite Context Modelingcited by 12
- 2025Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Modelscited by 3
- 2026Can Language Models Actually Retrieve In-Context? Drowning in Documents at Million Token Scalecited by 2
- 2026Superlinear Multi-Step Attentioncited by 0
- 2026Opinion Leader Dynamics: How Sparse Attention Shapes Token Clusteringcited by 0
- 2026Opinion Leader Dynamics: How Sparse Attention Shapes Token Clustering21 Sep 2026
- 2026Addressable Memory for Video World Models7 Aug 2026
- 2026Hierarchical Sparse Attention Done Right: Toward Infinite Context Modeling3 Jul 2026
- 2026Can Language Models Actually Retrieve In-Context? Drowning in Documents at Million Token Scale1 Jul 2026
- 2026Superlinear Multi-Step Attention26 Jan 2026
- 2025Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Models28 Nov 2025
Similar, not cited
Close in wording, no citation either way
- 2026AB-Sparse: Sparse Attention with Adaptive Block Size for Accurate and Efficient Long-Context Inference
- 2026Full Attention Strikes Back: Transferring Full Attention into Sparse within Hundred Training Steps
- 2025Sliding Window Attention Training for Efficient Large Language Models
- 2025Scaling Linear Attention with Sparse State Expansion
- 2025Long-Context Modeling with Dynamic Hierarchical Sparse Attention for Memory-Constrained LLM Inference
- 2025Rectified Sparse Attention
- 2025Training-free Context-adaptive Attention for Efficient Long Context Modeling
- 2025Lag-Relative Sparse Attention In Long Context Training