mlsanityData to 7 Oct 2026

Understanding and Improving Length Generalization in Recurrent Models

arXiv 2507.02782 ↗First posted 3 Jul 2025cs.LGcited by 19

Not on the map. Why?

Abstract (arXiv)

Recently, recurrent models such as state space models and linear attention have become popular due to their linear complexity in the sequence length. Thanks to their recurrent nature, in principle they can process arbitrarily long sequences, but their performance sometimes drops considerably beyond their training context lengths-i.e. they fail to length generalize. In this work, we provide comprehensive empirical and theoretical analysis to support the unexplored states hypothesis, which posits that models fail to length generalize when during training they are only exposed to a limited subset of the distribution of all attainable states (i.e. states that would be attained if the recurrence was applied to long sequences). Furthermore, we investigate simple training interventions that aim to increase the coverage of the states that the model is trained on, e.g. by initializing the state with Gaussian noise or with the final state of a different input sequence. With only 500 post-training steps (~ 0.1% of the pre-training budget), these interventions enable length generalization for sequences that are orders of magnitude longer than the training context (e.g. 2klongrightarrow 128k) and show improved performance in long context tasks, thus presenting a simple and efficient way to enable robust length generalization in general recurrent models.

Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). Builds on 50 of its 56 references that are in the map. First posted on arXiv 3 Jul 2025.

Builds on

50 of 56 references.

References · 50

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2024The Llama 3 Herd of Modelscited by 14,192
  4. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
  5. 2020Longformer: The Long-Document Transformercited by 3,362
  6. 2022Training Compute-Optimal Large Language Modelscited by 2,927
  7. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
  8. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  9. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  10. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  11. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
  12. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
38 more
  1. 2019Root Mean Square Layer Normalizationcited by 1,425
  2. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
  3. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  4. 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
  5. 2022Simplified State Space Layers for Sequence Modelingcited by 776
  6. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
  7. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 711
  8. 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 594
  9. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
  10. 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
  11. 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 483
  12. 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 390
  13. 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
  14. 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 329
  15. 2024xLSTM: Extended Long Short-Term Memorycited by 320
  16. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
  17. 2015Towards AI-Complete Question Answering: A Set of Prerequisite Toy Taskscited by 309
  18. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
  19. 2024Long-context LLMs Struggle with Long In-context Learningcited by 285
  20. 2023LongLoRA: Efficient Fine-tuning of Long-Context Large Language Modelscited by 243
  21. 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 232
  22. 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystackcited by 211
  23. 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
  24. 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
  25. 2024Simple linear attention language models balance the recall-throughput tradeoffcited by 197
  26. 2024An Empirical Study of Mamba-based Language Modelscited by 177
  27. 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 167
  28. 2024Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrencecited by 155
  29. 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 109
  30. 2024Longhorn: State Space Models are Amortized Online Learnerscited by 58
  31. 2024Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Lengthcited by 46
  32. 2023GateLoop: Fully Data-Controlled Linear Recurrence for Sequence Modelingcited by 45
  33. 2024DeciMamba: Exploring the Length Extrapolation Potential of Mambacited by 45
  34. 2025LongMamba: Enhancing Mamba's Long Context Capabilities via Training-Free Receptive Field Enlargementcited by 36
  35. 2023Length Extrapolation of Transformers: A Survey from the Perspective of Positional Encodingcited by 32
  36. 2024ReMamba: Equip Mamba with Effective Long-Sequence Modelingcited by 12
  37. 2023Adaptive recurrent vision performs zero-shot computation scaling to unseen difficulty levelscited by 6
  38. 2024LongSSM: On the Length Extension of State-space Models in Language Modellingcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 8; 2026: 11.

19 papers.

Sort:

By area:

  1. 2025TTT3R: 3D Reconstruction as Test-Time Trainingcited by 122
  2. 2025Human3R: Everyone Everywhere All at Oncecited by 35
  3. 2026LoGeR: Long-Context Geometric Reconstruction with Hybrid Memorycited by 33
  4. 2025Short window attention enables long-term memorizationcited by 11
  5. 2025Quantitative Bounds for Length Generalization in Transformerscited by 8
  6. 2025Understanding and Improving Length Generalization in Hierarchical Sparse Attention Modelscited by 6
  7. 2026Raven: High-Recall Sequence Modeling with Sparse Memory Routingcited by 4
  8. 2025To Infinity and Beyond: Tool-Use Unlocks Length Generalization in State Space Modelscited by 3
  9. 2026Effective Distillation to Hybrid xLSTM Architecturescited by 3
  10. 2026MDN: Parallelizing Stepwise Momentum for Delta Linear Attentioncited by 3
  11. 2025Estimating Clinical Lab Test Result Trajectories from PPG using Physiological Foundation Model and Patient-Aware State Space Model -- a UNIPHY+ Approachcited by 2
  12. 2026Anatomy of Associative Recall in Fixed-State Recurrences: A Matched-State Decomposition, an Interference Wall, and a Curriculum That Breaks Itcited by 1
7 more
  1. 2025MambaEye: A Size-Agnostic Visual Encoder with Causal Sequential Processingcited by 0
  2. 2026Refit the Probe: Single-Direction Ablation Is Not a Necessity Testcited by 0
  3. 2026Diffusion-Guided Uncertainty-Aware Delayed Policy Optimizationcited by 0
  4. 2026On the Importance of Gating: Memorization vs. In-Context Learning in State Space Modelscited by 0
  5. 2026FIVE-VLA: Fast and EffectIVE Autonomous Driving with Recurrent Action Memorycited by 0
  6. 2026The Automaton Underneath: The Additive Input Pathway Is a Parasitic Attractor for State Tracking in Householder Linear RNNcited by 0
  7. 2026Adapting Linear-Time Architectures for Tabular In-Context Learningcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024On Provable Length and Compositional Generalization
  2. 2025Overflow Prevention Enhances Long-Context Recurrent LLMs
  3. 2024State Soup: In-Context Skill Learning, Retrieval and Mixing
  4. 2025Long-Short Alignment for Effective Long-Context Modeling in LLMs
  5. 2024State-Space Modeling in Long Sequence Processing: A Survey on Recurrence in the Transformer Era
  6. 2026Length-Independent State Tracking Under a Parallel Scan
  7. 2026The Impossibility Triangle of Long-Context Modeling
  8. 2026RunningTensor: Generalizing Linear Attention to Higher-Order Recurrent States