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

Peilong Zhou, Hongtao Zhang, Yulong Huang, Cangyuan Li, Mingyu Chen +1 more
10/14/2026
cs.LG

No confident code implementation found for this paper.

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 $k$ is computed at loop $k$, and swapping its loop-$k$ 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 $k$ fixed from loop $k$ drops accuracy to 4--6%, whereas holding it from loop $k+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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhou2026learning,
  title  = {Learning to Compute Is Not Learning to Retain or Reuse in Looped Transformers},
  author = {Peilong Zhou and Hongtao Zhang and Yulong Huang and Cangyuan Li and Mingyu Chen and Ying Wang},
  year   = {2026},
  eprint = {2610.19768},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.19768v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.19768.svg)](https://codeofpaper.com/paper/2610.19768)

Discussion