Unlocking Out-of-Distribution Generalization in Transformers via Recursive Latent Space Reasoning
On the map: LLM reasoning → Mathematical reasoning
Abstract (arXiv)
Systematic, compositional generalization beyond the training distribution remains a core challenge in machine learning -- and a critical bottleneck for the emergent reasoning abilities of modern language models. This work investigates out-of-distribution (OOD) generalization in Transformer networks using a GSM8K-style modular arithmetic on computational graphs task as a testbed. We introduce and explore a set of four architectural mechanisms aimed at enhancing OOD generalization: (i) input-adaptive recurrence; (ii) algorithmic supervision; (iii) anchored latent representations via a discrete bottleneck; and (iv) an explicit error-correction mechanism. Collectively, these mechanisms yield an architectural approach for native and scalable latent space reasoning in Transformer networks with robust algorithmic generalization capabilities. We complement these empirical results with a detailed mechanistic interpretability analysis that reveals how these mechanisms give rise to robust OOD generalization abilities.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Mathematical reasoning, one of 17 directions in LLM reasoning. Builds on 23 of its 68 references that are in the map. First posted on arXiv 15 Oct 2025.
Builds on
23 of 68 references.
Closest ancestors · 2
Same direction, newest first
- 2024Physics of Language Models: Part 2.1, Grade-School Math and the Hidden Reasoning Process29 Jul
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models5 Feb
Other references · 21
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2017Neural Discrete Representation Learningcited by 4,712
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2023Let's Verify Step by Stepcited by 3,789
- 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,181
- 2021Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gaugescited by 1,167
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
- 2018Universal Transformerscited by 647
- 2016Adaptive Computation Time for Recurrent Neural Networkscited by 506
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 415
- 2021Thinking Like Transformerscited by 184
9 more
- 2021PonderNet: Learning to Pondercited by 168
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 149
- 2021Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networkscited by 117
- 2024Looped Transformers for Length Generalizationcited by 99
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
- 2023Length Generalization in Arithmetic Transformerscited by 66
- 2022End-to-end Algorithm Synthesis with Recurrent Networks: Logical Extrapolation Without Overthinkingcited by 33
- 2024Composing Global Solutions to Reasoning Tasks via Algebraic Objects in Neural Netscited by 6
- 2024Mechanisms of Symbol Processing for In-Context Learning in Transformer Networkscited by 6
Built on by
Citing papers per year: 2025: 1; 2026: 5.
6 papers.
- 2026The Latent Space: Foundation, Evolution, Mechanism, Ability, and Outlookcited by 43
- 2026Bridging the Gap Between Latent and Explicit Reasoning with Looped Transformerscited by 13
- 2025Transformers as Intrinsic Optimizers: Forward Inference through the Energy Principlecited by 3
- 2026Improving Test-Time Scaling with Adaptive Looped Transformerscited by 1
- 2026Do Transformers Have the Ability for Periodicity Generalization?cited by 0
- 2026Anti Mode-Collapse in Mean-Field Transformer via Auxiliary Variablescited by 0
- 2026Improving Test-Time Scaling with Adaptive Looped Transformers28 Sep 2026
- 2026Bridging the Gap Between Latent and Explicit Reasoning with Looped Transformers30 Jun 2026
- 2026Anti Mode-Collapse in Mean-Field Transformer via Auxiliary Variables28 May 2026
- 2026The Latent Space: Foundation, Evolution, Mechanism, Ability, and Outlook2 Apr 2026
- 2026Do Transformers Have the Ability for Periodicity Generalization?30 Jan 2026
- 2025Transformers as Intrinsic Optimizers: Forward Inference through the Energy Principle2 Nov 2025
Similar, not cited
Close in wording, no citation either way
- 2022Achieving and Understanding Out-of-Distribution Generalization in Systematic Reasoning in Small-Scale Transformers
- 2024Principled Understanding of Generalization for Generative Transformer Models in Arithmetic Reasoning Tasks
- 2025A Theoretical Framework for OOD Robustness in Transformers using Gevrey Classes
- 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformers
- 2026At the Edge of Understanding: Sparse Autoencoders Trace The Limits of Transformer Generalization
- 2024Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of Generalization
- 2026Beyond the Training Horizon: Mechanisms and Limits of Length Generalization in Looped Transformers
- 2026Loop, Think, & Generalize: Implicit Reasoning in Recurrent-Depth Transformers