Delayed Attention Training Improves Length Generalization in Transformer--RNN Hybrids
Not on the map. Why?
Abstract (arXiv)
We study length generalization in sequence models on a composite problem involving both state tracking and associative recall. Prior work finds that recurrent networks handle state tracking well but struggle with recall, whereas Transformers excel at recall yet fail to extend state-tracking capabilities to longer sequences. Motivated by the complementary strengths of these architectures, we construct hybrid models integrating recurrent and attention-based components, and train them on the combined task to evaluate whether both capabilities can be preserved. Our results reveal that, in such hybrids, the Transformer component tends to exploit shortcut solutions, leading to poor length generalization. We identify this shortcut reliance as a key obstacle and propose a simple yet effective training strategy -- delaying the training of the attention layers -- that mitigates this effect and significantly improves length generalization performance. Our experiments show that this approach enables hybrid models to achieve near-perfect accuracy (>90%) on hybrid sequences three times longer than those used during training.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 10 of its 12 references that are in the map. First posted on arXiv 30 Sep 2025.
Builds on
10 of 12 references.
References · 10
- 2017Attention Is All You Needcited by 60,361
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2020Shortcut Learning in Deep Neural Networkscited by 1,969
- 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 204
- 2024Hymba: A Hybrid-head Architecture for Small Language Modelscited by 99
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
- 2024Your Context Is Not an Array: Unveiling Random Access Limitations in Transformerscited by 11
- 2025Revisiting Bi-Linear State Transitions in Recurrent Neural Networkscited by 4
Built on by
Citing papers per year: 2026: 2.
2 papers.
- 2026On the "Induction Bias" in Sequence Modelscited by 2
- 2026On Locality and Length Generalization in Visual Reasoningcited by 0
- 2026On Locality and Length Generalization in Visual Reasoning10 Jul 2026
- 2026On the "Induction Bias" in Sequence Models20 Feb 2026