cs.LGOct 14, 2026

Learning to Compute Is Not Learning to Retain or Reuse in Looped Transformers

Authors: Peilong Zhou, Hongtao Zhang, Yulong Huang, Cangyuan Li, Mingyu Chen, Ying Wang

Organizations: SKLP, Institute of Computing Technology, Chinese Academy of Sciences · University of Chinese Academy of Sciences · School of Advanced Interdisciplinary Sciences · The Hong Kong University of Science and Technology (Guangzhou)

Abstract

Looped transformers compute by applying one block repeatedly, so they can run for more loops than they were trained with. Recurrent reasoners are known to overthink: iterating past the trained depth can turn a correct answer into a wrong one. Such a late error can reflect failed computation, loss of retention, or a state that later computation cannot reuse. We separate these cases in in-context Mealy-machine execution, where a simulator supplies intermediate targets and exact counterfactuals for hidden-state interventions. Models trained to answer at loop 32 are fully correct there but keep only 22% of these answers at loop 64. Retention depends on what training asks for: supervising one randomly chosen position per example, instead of always the last, keeps 99.8%, and randomizing the number of training loops also helps; truncating gradients, as in progressive training against overthinking, does not. The computation itself is exact: position kk is computed at loop kk, and swapping its loop-kk hidden vector for the one from another input redirects every later position to that input's exact continuation (237/237 pairs in each of ten models). Retention, however, is not reuse. Even in models that keep nearly all answers, holding each position kk fixed from loop kk drops accuracy to 4--6%, whereas holding it from loop k+4k+4 is harmless. A released recurrent maze network trained to avoid overthinking behaves the same way. Learning to compute is thus not learning to retain, and avoiding overthinking does not make a state reusable when its answer first appears.

Figures & tables

Appendix figures & tables32 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Chain-of-Thought and Compressed Looped Transformers: A Memory-Budget Separation

    May 29, 2026Haozhou ZhangCoT ReasoningPersistent Memory for Language Models

  2. Beyond the Training Horizon: Mechanisms and Limits of Length Generalization in Looped Transformers

    Sep 27, 2026Jia Liang, Xi Jin, Liangming PanLength GeneralizationRecurrent Transformers

  3. Adaptive Loops and Memory in Transformers: Think Harder or Know More?

    Mar 9, 2026Markus Frey, Behzad Shomali, Ali Hamza Bashir +3TransformerMemory-Augmented Language Models