Long-Context Generalization with Sparse Attention
Not on the map. Why?
Abstract (arXiv)
Transformer-based architectures traditionally employ softmax to compute attention weights, which produces dense distributions over all tokens in a sequence. While effective in many settings, this density has been shown to be detrimental for tasks that demand precise focus on fixed-size patterns: as sequence length increases, non-informative tokens accumulate attention probability mass, leading to dispersion and representational collapse. We show in this paper that dynamically sparse attention mechanisms using α-entmax can avoid these issues, due to their ability to assign exact zeros to irrelevant tokens. Furthermore, we introduce Adaptive-Scalable Entmax (ASEntmax), which endows α-entmax with a learnable temperature parameter, allowing the attention distribution to interpolate between sparse (pattern-focused) and dense (softmax-like) regimes. Our empirical evaluation on synthetic tasks and language modeling demonstrates that ASEntmax substantially outperforms softmax, scalable softmax, and fixed-temperature α-entmax baselines, achieving up to 1000× length extrapolation on synthetic benchmarks and superior long-context generalization on language modeling while preserving short-context performance, including better perplexity trends and higher retrieval accuracies at 8× training length.
Key facts. Cited by 18 papers in the map (data through 7 Oct 2026). Builds on 58 of its 64 references that are in the map. First posted on arXiv 19 Jun 2025.
Builds on
58 of 64 references.
References · 58
- 2017Attention Is All You Needcited by 59,932
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
38 more
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,104
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 960
- 2020On Layer Normalization in the Transformer Architecturecited by 906
- 2020On the Bottleneck of Graph Neural Networks and its Practical Implicationscited by 624
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
- 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 375
- 2016From Softmax to Sparsemax: A Sparse Model of Attention and Multi-Label Classificationcited by 337
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2023Effective Long-Context Scaling of Foundation Modelscited by 301
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
- 2022Exploring Length Generalization in Large Language Modelscited by 204
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
- 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 188
- 2019Sparse Sequence-to-Sequence Modelscited by 167
- 2019Adaptively Sparse Transformerscited by 154
- 2023Stabilizing Transformer Training by Preventing Attention Entropy Collapsecited by 154
- 2022Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapsecited by 136
- 2025XAttention: Block Sparse Attention with Antidiagonal Scoringcited by 131
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inferencecited by 121
- 2019Learning with Fenchel-Young Lossescited by 117
- 2024Round and Round We Go! What makes Rotary Positional Encodings useful?cited by 111
- 2024Transformers need glasses! Information over-squashing in language taskscited by 87
- 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 84
- 2024TorchTitan: One-stop PyTorch native solution for production ready LLM pre-trainingcited by 80
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
- 2023Length Generalization in Arithmetic Transformerscited by 64
- 2021Memory-efficient Transformers via Top-k Attentioncited by 59
- 2025On the Emergence of Position Bias in Transformerscited by 57
- 2024Softmax is not Enough (for Sharp Size Generalisation)cited by 42
- 2025On Vanishing Gradients, Over-Smoothing, and Over-Squashing in GNNs: Bridging Recurrent and Graph Learningcited by 42
- 2025Scalable-Softmax Is Superior for Attentioncited by 38
- 2024Extending LLMs' Context Window with 100 Samplescited by 20
- 2021Sparse Continuous Distributions and Fenchel-Young Lossescited by 13
- 2021Predicting Attention Sparsity in Transformerscited by 13
50 most cited of 58 All 58 (JSON)
Built on by
Citing papers per year: 2025: 5; 2026: 13.
18 papers.
Sort:
By area:
- 2025DGP: A Dual-Granularity Prompting Framework for Fraud Detection with Graph-Enhanced LLMscited by 11
- 2026Addressable Memory for Video World Modelscited by 11
- 2025NOSA: Native and Offloadable Sparse Attentioncited by 4
- 2026Threshold Differential Attention for Sink-Free, Ultra-Sparse, and Non-Dispersive Language Modelingcited by 4
- 2026AdaSplash-2: Faster Differentiable Sparse Attentioncited by 3
- 2026Persistent Visual Memory: Sustaining Perception for Deep Generation in LVLMscited by 3
- 2026DashAttention: Differentiable and Adaptive Sparse Hierarchical Attentioncited by 3
- 2025Controllably Efficient Language Modelscited by 2
- 2026Can Language Models Actually Retrieve In-Context? Drowning in Documents at Million Token Scalecited by 2
- 2025Graph of Agents: Principled Long Context Modeling by Emergent Multi-Agent Collaborationcited by 1
- 2026Context Cartography: Toward Structured Governance of Contextual Space in Large Language Model Systemscited by 1
- 2026Screening Is Enoughcited by 1
6 more
- 2026ATMA: Long-Context Language Modeling via Polar Attention and Gated-Delta Compression Memorycited by 1
- 2026Perspectives on Tsallis Statistics for Artificial Intelligencecited by 1
- 2025An empirical study on the limitation of Transformers in program trace generationcited by 0
- 2026Salca: A Sparsity-Aware Hardware Accelerator for Efficient Long-Context Attention Decodingcited by 0
- 2026EntmaxKV: Support-Aware Decoding for Entmax Attentioncited by 0
- 2026HHR: Hierarchical Hash Retrieval for Efficient LLM Generationcited by 0
- 2026HHR: Hierarchical Hash Retrieval for Efficient LLM Generation1 Oct 2026
- 2026Addressable Memory for Video World Models7 Aug 2026
- 2026Perspectives on Tsallis Statistics for Artificial Intelligence2 Aug 2026
- 2026Can Language Models Actually Retrieve In-Context? Drowning in Documents at Million Token Scale1 Jul 2026
- 2026ATMA: Long-Context Language Modeling via Polar Attention and Gated-Delta Compression Memory23 Jun 2026
- 2026EntmaxKV: Support-Aware Decoding for Entmax Attention20 May 2026
- 2026DashAttention: Differentiable and Adaptive Sparse Hierarchical Attention18 May 2026
- 2026Persistent Visual Memory: Sustaining Perception for Deep Generation in LVLMs1 May 2026
- 2026Salca: A Sparsity-Aware Hardware Accelerator for Efficient Long-Context Attention Decoding27 Apr 2026
- 2026AdaSplash-2: Faster Differentiable Sparse Attention16 Apr 2026
- 2026Screening Is Enough1 Apr 2026
- 2026Context Cartography: Toward Structured Governance of Contextual Space in Large Language Model Systems21 Mar 2026
6 more
- 2026Threshold Differential Attention for Sink-Free, Ultra-Sparse, and Non-Dispersive Language Modeling17 Jan 2026
- 2025Controllably Efficient Language Models7 Nov 2025
- 2025NOSA: Native and Offloadable Sparse Attention15 Oct 2025
- 2025An empirical study on the limitation of Transformers in program trace generation29 Sep 2025
- 2025Graph of Agents: Principled Long Context Modeling by Emergent Multi-Agent Collaboration26 Sep 2025
- 2025DGP: A Dual-Granularity Prompting Framework for Fraud Detection with Graph-Enhanced LLMs29 Jul 2025
- 2025NOSA: Native and Offloadable Sparse Attentioncited by 4
- 2026EntmaxKV: Support-Aware Decoding for Entmax Attentioncited by 0
- 2026EntmaxKV: Support-Aware Decoding for Entmax Attention20 May 2026
- 2025NOSA: Native and Offloadable Sparse Attention15 Oct 2025
- 2026Addressable Memory for Video World Modelscited by 11
- 2026Addressable Memory for Video World Models7 Aug 2026
- 2025DGP: A Dual-Granularity Prompting Framework for Fraud Detection with Graph-Enhanced LLMscited by 11
- 2026Threshold Differential Attention for Sink-Free, Ultra-Sparse, and Non-Dispersive Language Modelingcited by 4
- 2026AdaSplash-2: Faster Differentiable Sparse Attentioncited by 3
- 2026DashAttention: Differentiable and Adaptive Sparse Hierarchical Attentioncited by 3
- 2025Controllably Efficient Language Modelscited by 2
- 2026Can Language Models Actually Retrieve In-Context? Drowning in Documents at Million Token Scalecited by 2
- 2026Screening Is Enoughcited by 1
- 2026ATMA: Long-Context Language Modeling via Polar Attention and Gated-Delta Compression Memorycited by 1
- 2026Perspectives on Tsallis Statistics for Artificial Intelligencecited by 1
- 2025An empirical study on the limitation of Transformers in program trace generationcited by 0
- 2026Salca: A Sparsity-Aware Hardware Accelerator for Efficient Long-Context Attention Decodingcited by 0
- 2026HHR: Hierarchical Hash Retrieval for Efficient LLM Generationcited by 0
- 2026HHR: Hierarchical Hash Retrieval for Efficient LLM Generation1 Oct 2026
- 2026Perspectives on Tsallis Statistics for Artificial Intelligence2 Aug 2026
- 2026Can Language Models Actually Retrieve In-Context? Drowning in Documents at Million Token Scale1 Jul 2026
- 2026ATMA: Long-Context Language Modeling via Polar Attention and Gated-Delta Compression Memory23 Jun 2026
- 2026DashAttention: Differentiable and Adaptive Sparse Hierarchical Attention18 May 2026
- 2026Salca: A Sparsity-Aware Hardware Accelerator for Efficient Long-Context Attention Decoding27 Apr 2026
- 2026AdaSplash-2: Faster Differentiable Sparse Attention16 Apr 2026
- 2026Screening Is Enough1 Apr 2026
- 2026Threshold Differential Attention for Sink-Free, Ultra-Sparse, and Non-Dispersive Language Modeling17 Jan 2026
- 2025Controllably Efficient Language Models7 Nov 2025
- 2025An empirical study on the limitation of Transformers in program trace generation29 Sep 2025
- 2025DGP: A Dual-Granularity Prompting Framework for Fraud Detection with Graph-Enhanced LLMs29 Jul 2025