Inside the Loop: A Mechanistic Study of Weight-Tied Transformers on Depth-Bound Algorithmic Tasks
New in LLM reasoning; no direction yet. LLM reasoning
Abstract (arXiv)
Solving algorithmic tasks with many sequential steps typically requires scaling up transformer depth or chain-of-thought length, incurring unfavorable parameter and inference-compute costs, respectively. Looped transformers, which reuse one block of layers across many iterations, are poised to address this, since they scale effective depth without adding parameters or tokens. Yet, it remains unclear what each iteration is actually computing, or whether the loop merely simulates a deeper untied stack. Here, we study directed permutation traversal, in which a model follows H hops from a starting node and reports the node it reaches, so every intermediate hop has a known ground truth. We find that a minimum effective depth is necessary to solve the task, beyond which the degree of weight tying becomes the determining factor. For instance, a looped transformer with a four-layer block iterated eight times solves the task in every seed, while an identically trained untied transformer of the same effective depth never does, succeeding only with a lower learning rate or supervision of its intermediate layers. Probing and intervening on the residual stream, we find that the looped model advances through the intermediate nodes gradually, forming a staircase that adapts to its iteration budget, whereas the untied model, at that lower rate, exposes them only in its final layers. Taken together, our results recast looped transformers as iterative program learners, which allocate their iterations to successive steps of the algorithm and solve tasks that identically trained untied models of the same effective depth do not. Code is available at https://github.com/magnus-sesodia/insidetheloop.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 43 of its 44 references that are in the map. Submitted 16 Oct 2026.
Builds on
43 of 44 references.
References · 43
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,890
- 2024Training Large Language Models to Reason in a Continuous Latent Spacecited by 894
- 2018Universal Transformerscited by 769
- 2019Designing and Interpreting Probes with Control Taskscited by 736
- 2019Deep Equilibrium Modelscited by 657
- 2016Adaptive Computation Time for Recurrent Neural Networkscited by 578
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 526
- 2025Reasoning with Latent Thoughts: On the Power of Looped Transformerscited by 303
- 2023Looped Transformers as Programmable Computerscited by 283
- 2025Scaling Latent Reasoning via Looped Language Modelscited by 241
- 2025Hierarchical Reasoning Modelcited by 216
- 2021PonderNet: Learning to Pondercited by 197
31 more
- 2025Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computationcited by 189
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 186
- 2023Physics of Language Models: Part 3.2, Knowledge Manipulationcited by 158
- 2024Looped Transformers for Length Generalizationcited by 119
- 2024Relaxed Recursive Transformers: Effective Parameter Sharing with Layer-wise LoRAcited by 119
- 2024Hopping Too Late: Exploring the Limitations of Large Language Models on Multi-Hop Queriescited by 95
- 2026Parcae: Scaling Laws For Stable Looped Language Modelscited by 92
- 2026LoopFormer: Elastic-Depth Looped Transformers for Latent Reasoning via Shortcut Modulationcited by 85
- 2025Teaching Pretrained Language Models to Think Deeper with Retrofitted Recurrencecited by 76
- 2025A Little Depth Goes a Long Way: The Expressive Power of Log-Depth Transformerscited by 62
- 2025Inner Thinking Transformer: Leveraging Dynamic Depth Scaling to Foster Adaptive Internal Thinkingcited by 61
- 2024A Mechanistic Analysis of a Transformer Trained on a Symbolic Multi-Step Reasoning Taskcited by 55
- 2026Loop, Think, & Generalize: Implicit Reasoning in Recurrent-Depth Transformerscited by 48
- 2026How Much Is One Recurrence Worth? Iso-Depth Scaling Laws for Looped Language Modelscited by 45
- 2026A Mechanistic Analysis of Looped Reasoning Language Modelscited by 43
- 2025Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon Layerscited by 39
- 2024On Expressive Power of Looped Transformers: Theoretical Analysis and Enhancement via Timestep Encodingcited by 38
- 2025Latent Chain-of-Thought? Decoding the Depth-Recurrent Transformercited by 32
- 2024Transformers Struggle to Learn to Searchcited by 26
- 2025Skip a Layer or Loop it? Test-Time Depth Adaptation of Pretrained LLMscited by 22
- 2026Hyperloop Transformerscited by 22
- 2025How do Transformers Learn Implicit Reasoning?cited by 20
- 2025A Formal Comparison Between Chain of Thought and Latent Thoughtcited by 18
- 2025Two-Scale Latent Dynamics for Recurrent-Depth Transformerscited by 17
- 2025Universal Reasoning Modelcited by 16
- 2026SpiralFormer: Looped Transformers Can Learn Hierarchical Dependencies via Multi-Resolution Recursioncited by 14
- 2026Loop as a Bridge: Can Looped Transformers Truly Link Representation Space and Natural Language Outputs?cited by 11
- 2026From Growing to Looping: A Unified View of Iterative Computation in LLMscited by 11
- 2026When Does Recurrence Become an Algorithm? Convergence Selection in Weight-Tied Looped Transformerscited by 8
- 2026Thinking Deeper, Not Longer: Memory-Efficient Test-Time Reasoning with Depth-Recurrent Transformers for Compositional Generalizationcited by 3
- 2026Do Transformers Use their Depth Adaptively? Evidence from a Relational Reasoning Taskcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Looped Transformers as Optimizers
- 2026Stability and Generalization in Looped Transformers
- 2026Shared Weights, Selected Computations: How Looped Transformers Route What Each Loop Does
- 2026Adaptive Loops and Memory in Transformers: Think Harder or Know More?
- 2022Transformers Learn Shortcuts to Automata
- 2026SMELT: Scaling Laws for Compute-Matched MoE Looped Transformers
- 2026Training-Free Looped Transformers
- 2026Represented Is Not Computed: A Causal Test of Candidate Algorithmic Intermediates in a Transformer