mlsanityData to 14 Oct 2026

Length Generalization Needs Proper Regularization

arXiv 2610.04518 ↗First posted 3 Oct 2026cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

Length generalization is the ability of sequential models to perform well on context lengths unseen during training. In this work, we show that the challenge of achieving length generalization is related not only to architectural choices such as positional encoding and the attention mechanism but also to the training procedure itself. We study how regularization affects length generalization and find that weight decay can hinder extrapolation. In contrast, dropout improves extrapolation when its placement within the architecture is reconsidered. In that regard, we show that the standard placement of dropout before layer normalization introduces a systematic distributional mismatch, and that applying dropout just before the linear projection resolves this issue. For example, a modified SmolLM3 with sliding window attention, continually pre-trained with dropout, can extrapolate perfectly to 64× on Needle-in-a-Haystack and far beyond the pre-training context size on RULER and HELMET. Mamba2 also benefits from dropout, suggesting an architecture-agnostic nature of the problem. We further propose Variance-Preserving Affine Dropout (VPAD), a new dropout strategy that substantially reduces the resulting pre-activation variance mismatch, leading to further extrapolation improvements in transformers.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 72 of its 83 references that are in the map. First posted on arXiv 3 Oct 2026.

Builds on

72 of 83 references.

References · 72

  1. 2017Attention Is All You Needcited by 60,361
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2025Qwen3 Technical Reportcited by 8,820
  5. 2016Layer Normalizationcited by 5,669
  6. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  7. 2015Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classificationcited by 3,611
  8. 2020Longformer: The Long-Document Transformercited by 3,413
  9. 2023Mistral 7Bcited by 3,164
  10. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  11. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  12. 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
38 more
  1. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  2. 2019Root Mean Square Layer Normalizationcited by 1,480
  3. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  4. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  5. 2018Averaging Weights Leads to Wider Optima and Better Generalizationcited by 1,209
  6. 2018Self-Attention with Relative Position Representationscited by 1,120
  7. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
  8. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
  9. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
  10. 2017Self-Normalizing Neural Networkscited by 598
  11. 2017Convolutional Sequence to Sequence Learningcited by 552
  12. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
  13. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 313
  14. 2023Effective Long-Context Scaling of Foundation Modelscited by 303
  15. 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 216
  16. 2022Exploring Length Generalization in Large Language Modelscited by 206
  17. 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 204
  18. 2024Data Engineering for Scaling Language Models to 128K Contextcited by 186
  19. 2024An Empirical Study of Mamba-based Language Modelscited by 186
  20. 2024How to Train Long-Context Language Models (Effectively)cited by 146
  21. 2024LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuningcited by 136
  22. 2022A Length-Extrapolatable Transformercited by 127
  23. 2023Scaling Laws of RoPE-based Extrapolationcited by 125
  24. 2023LM-Infinite: Zero-Shot Extreme Length Generalization for Large Language Modelscited by 124
  25. 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
  26. 2022Overcoming a Theoretical Limitation of Self-Attentioncited by 113
  27. 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 111
  28. 2013Dropout Training as Adaptive Regularizationcited by 93
  29. 2024Transformers need glasses! Information over-squashing in language taskscited by 91
  30. 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 86
  31. 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
  32. 2024TorchTitan: One-stop PyTorch native solution for production ready LLM pre-trainingcited by 85
  33. 2024Exponential Moving Average of Weights in Deep Learning: Dynamics and Benefitscited by 71
  34. 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 63
  35. 2024Training-Free Long-Context Scaling of Large Language Modelscited by 62
  36. 2024Contextual Position Encoding: Learning to Count What's Importantcited by 54
  37. 2024Base of RoPE Bounds Context Lengthcited by 52
  38. 2024DeciMamba: Exploring the Length Extrapolation Potential of Mambacited by 49

50 most cited of 72 All 72 (JSON)

Built on by

Not cited yet.