Beyond the Training Horizon: Mechanisms and Limits of Length Generalization in Looped Transformers
cs.LG, cs.AI
Submitted: 2026-09-27
Updated: 2026-09-27
Comments: 39 pages, 10 figures
License: http://creativecommons.org/licenses/by/4.0/
The gist: Looped Transformers can generalize to reasoning chains longer than those encountered during training, but the computations enabling this behavior and limiting its extent remain unclear.
Terminology
Abstract
Looped Transformers can generalize to reasoning chains longer than those encountered during training, but the computations enabling this behavior and limiting its extent remain unclear. We mechanistically compare two looped-Transformer configurations, which we call the Matched-Recurrence Looped Transformer (MR-Loop) and Decoupled-Recurrence Looped Transformer (DR-Loop), reflecting their respective recurrence-training schemes. We evaluate polynomial iteration, finite-state composition, and knowledge-graph traversal using detailed mechanistic analysis. Attention analysis, intermediate-state decoding, and causal interventions reveal distinct mechanisms learned under final-answer supervision. MR-Loop updates an intermediate state at a fixed readout while advancing relation selection through adjacent-token interactions and a transferable progress cue. DR-Loop instead propagates intermediate states across relation positions, forming an advancing computational frontier. However, both mechanisms become unreliable at greater depths: MR-Loop exhibits degradation of its readout state and progress cues, while DR-Loop exhibits declining reliability of state propagation. Limited self-correction allows local errors to persist and compound. Across both models, we uncover a common representational principle: recurrent states encode not only task-relevant content but also its computational status, whether that content remains in a form that can support subsequent computation. Transferable live-consumed and fresh-aged residual directions causally control whether represented information can participate in subsequent computation, including beyond the training horizon. We further show that length generalization need not rely on faithful step-by-step reasoning, as Looped Transformers can exploit task structure without explicitly representing every intermediate state.
Sources
- A Mechanistic Analysis of Looped Reasoning Language Models
- Looped Transformers for Length Generalization
- Bridging the Gap Between Latent and Explicit Reasoning with Looped Transformers
- Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach
- Loop, Think, & Generalize: Implicit Reasoning in Recurrent-Depth Transformers
- Stability and Generalization in Looped Transformers
- Measuring Faithfulness in Chain-of-Thought Reasoning
- Do Latent-CoT Models Think Step-by-Step? A Mechanistic Study on Sequential Reasoning Tasks
- Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Tasks
- Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small
- Stabilizing Recurrent Dynamics for Test-Time Scalable Latent Reasoning in Looped Language Models
- Transformers Can Achieve Length Generalization But Not Robustly
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks