1Fudan University · 2Peking University · †corresponding
A weight-tied looped transformer applies one block T times. Everyone assumes loop t executes algorithm step t. We built the instruments to check — and found the answer is a law, not a yes or no.
Frontier speed is priced by the training contract: v ≈ ntrain/Ttrain with exponent 0.98 ± 0.04 (R² = 0.99, 23 models, 8× demand range). SGD meets the demanded minimum — never exceeds it when speed is costly.
Standard transformers learn parallel scans on the same tasks; weight tying flips the selection to a serial frontier. At matched depth and parameters, fully untied models extrapolate worst and fail to learn A₅ at all.
NC¹-completeness costs nothing (A₅ generalizes fully); group order does — S₅'s 120×120 operator deadlocks joint learning. An operator-first curriculum dissolves the wall in 10/10 seeds.
Warm-starting across budget contracts transfers the algorithm in every seed — re-pricing its speed to the new contract — while forcing seriality through the input schedule fails where free training succeeds.
Per-(loop, position) accuracy heatmaps: each loop extends the solved prefix by a constant number of positions. The slope is a per-model fingerprint set by the training budget.
Patching states at (position, loop) produces strictly-downstream damage cones whose slope independently reproduces each model's frontier speed — the frontier is a causal object, not a decoding artifact. And because v is estimable in distribution, T* = ⌈n/v̂⌉ recovers near-oracle accuracy at unseen lengths while avoiding overthinking.
@article{zhang2026recurrence,
title = {When Does Recurrence Become an Algorithm?
Convergence Selection in Weight-Tied Looped Transformers},
author = {Zhang, Tong and Hu, Junhao and Peng, Yun and Xie, Tao},
year = {2026},
note = {Preprint}
}