What Makes Recurrence Generalize Across Lengths?
Yoonsung Jung, Sunghun Jung, Louise Nayeong Koh, Yongjun Choi
Abstract
Multi-step reasoning requires models to preserve and update intermediate information as computation unfolds. State tracking captures this fundamental requirement, but models that succeed within a fixed range of state transitions may not generalize when substantially more updates are required. Recurrent Transformers offer a natural mechanism for addressing this challenge by repeatedly applying shared Transformer blocks, allowing computation to scale with problem length. We study when such recurrent computation generalizes beyond the training range in a controlled state-tracking task, varying operation representation, positional encoding, and recurrent capacity. We find that recurrence alone is insufficient: multi-token template representations and absolute positional encoding can severely limit extrapolation, whereas atomic operation representations enable substantially stronger length generalization. The effect of positional structure also varies with recurrent depth, with periodic positional encoding achieving the strongest mean performance at greater recurrent depth. Most importantly, scaling the recurrent operator extends the extrapolation horizon, reaching 35.1% exact-match accuracy on sequences of 20-40 operations after training only on 2-10, while substantially larger fixed-depth Transformers remain at 0%. Additional recurrent computation at test time can extend the range over which the model generalizes, but does not eliminate failure on much longer sequences. These results suggest that recurrent computation can support length-generalizable state tracking, but that its effectiveness depends critically on whether the learned computation remains reusable across sequence lengths.
Create a lesson
Related papers
Do Larger Fully Connected Neural Networks Generalize Better?
Shared title terminology · Mohammad Jalili Torkamani, Suhib Hamid, Moaz N. Ishag
AgriManager: A Framework and Benchmark for LLM-RL Generalization in Agricultural Management
Shared title terminology · Chi Gui, Junwen Zheng, Ritwik Nigam et al.
Pretraining Representation Lottery Determines Fine-tuning Generalization
Shared title terminology · Fuming Yang, Core Francisco Park
Bridging Teacher-Student Capability Gaps with Recurrent Computation
Shared title terminology · Zeyi Huang, Jiuxiang Gu, Eli Shechtman et al.
Benchmarking EEG feature families for ADHD research in children and adolescents: performance and explainability across attention tasks
Shared title terminology · Javier Sanchis, Jorge García-Carrasco, Álvaro Navarro et al.
A world model for longitudinal health-trajectory prediction in older adults across multinational cohorts
Shared title terminology · Jingyi Wu, Chenghua Guo, Qianlin Zuo et al.