Full text not available for this paper

Summary (Overview)

  • Core question: When does a weight-tied looped transformer—one block applied T times—actually implement a serial algorithm, and can existing interpretability instruments even detect it?
  • Key finding 1 (Budget Law): Free training installs a linear computation frontier—a serial mechanism solving v positions per loop, where v ≈ n_tr/T_tr (exactly 1.00 under T = n training). Speed is an experimenter-controllable knob priced by the training contract.
  • Key finding 2 (Architecture prior, not expressivity): Weight tying flips SGD's algorithm selection from the parallel scan learned by standard-depth transformers to a serial frontier, even when positional addressing for a log-depth scan is supplied.
  • Key finding 3 (Walls are optimization, not complexity): NC¹-completeness costs nothing (A₅ generalizes fully), while group order does (S₅'s 120×120 operator deadlocks joint learning)—an operator-first curriculum dissolves the wall.
  • Key finding 4 (Mechanism portability): Warm-starting across budget contracts transfers the algorithm in every seed attempted (4/4), re-pricing its speed to the new contract and bypassing a seed lottery that defeats most from-scratch runs.
  • Key finding 5 (Measurement theory): Standard tail instruments provably saturate at fixed points; the authors introduce a head instrument—convergence-time scaling τ(n,i)—with causal validation via activation patching.

Introduction and Theoretical Foundation

Background

Looped (depth-recurrent) transformers reuse a single block T times, promising adaptive test-time compute: harder or longer inputs get more loops. The implicit mechanistic story is that loop t performs the t-th step of an iterative computation. The paper asks: Is this story true?

The question splits into two parts:

  1. What mechanism does a trained looped transformer actually implement?
  2. Can our instruments even tell?

The authors show the second question gates the first. Natural tests—skip tolerance, cross-step similarity—are tail instruments: they probe the trajectory near its end state. But trained loops converge, and a converged state is a fixed point of the loop map. Near an idempotent point, skipping is free and successive local circuits agree by construction.

Theoretical Foundation

The paper leverages a task ladder from complexity theory:

  • Solvable groups (Z₆₀, S₄) admit constant-depth shortcuts (Liu et al., 2023)
  • S₅ and A₅ word problems are NC¹-complete (Barrington, 1989)
  • Θ(log n) looped depth suffices in principle via associative scan (Merrill & Sabharwal, 2025)
  • Fixed-depth transformers sit in TC⁰ (Merrill & Sabharwal, 2023)

Against this theory menu—one-shot shortcut, log-depth scan, fixed-point refinement—trained models choose a fourth option: a linear frontier whose speed is a function of the training contract.

Key Theoretical Result: Tail Blindness

Proposition 1 (Tail blindness, informal): Let h⋆h^\star be a fixed point of the loop map G(h)=Fθ(h,e)G(h) = F_\theta(h, e) reached at loop τ⋆≤T−k\tau^\star \leq T - k. Then:

  • (i) skipping any k loops after τ⋆\tau^\star leaves the output unchanged;
  • (ii) the local Jacobians Jt=∂ht+1/∂htJ_t = \partial h_{t+1}/\partial h_t agree for all t≥τ⋆t \geq \tau^\star;
  • (iii) any feature dictionary z=E(h)z = E(h) and any attribution graph built from it agree across loops t≥τ⋆t \geq \tau^\star.

None of these quantities constrain the computation performed at loops t<τ⋆t < \tau^\star.

The approximate form (Proposition 3) states that if ∥G(ht)−ht∥≤ϵ\|G(h_t) - h_t\| \leq \epsilon for t≥τ⋆t \geq \tau^\star and G is L-Lipschitz, then skipping k tail loops perturbs the final state by at most ϵ∑i=0k−1LT−τ⋆−i\epsilon \sum_{i=0}^{k-1} L^{T-\tau^\star-i}, making near-converged trajectories indistinguishable from converged ones at instrument precision.


Methodology

Architecture

  • Weight-tied looped transformer: applies block FθF_\theta (2 or 4 pre-norm transformer layers) T times to state ht∈RN×dh_t \in \mathbb{R}^{N \times d}: ht+1=Fθ(ht,e)h_{t+1} = F_\theta(h_t, e) where e is the token embedding, optionally re-injected each loop via a learned adapter (input injection).
  • Readout: linear head on LN(hT)\text{LN}(h_T)
  • Scales: S (2L, d=128), M (2L, d=256), L (4L, d=512)
  • No positional encoding (NoPE) in the main grid

Tasks

All tasks are per-position sequence-to-sequence (blocks answer-only shortcuts, gives every intermediate value a ground truth):

Task TypeExamplesProperty
PilotPrefix parity, LSB-first increment-with-carryConstant-depth shortcuttable
Selection gridPrefix products over Z₆₀, S₄, S₅Solvable/non-solvable groups

Task formulation: input g1…gng_1 \ldots g_n, target pi=g1∘⋯∘gip_i = g_1 \circ \cdots \circ g_i at every i.

Regimes

  • Free: all tokens visible from loop 0; loop schedules T = ⌈log₂n⌉+3 (jittered) or fixed T; length curriculum
  • Streaming: token i revealed only from loop i−1 on (seriality forced by construction); T = n+2

The Head Instrument: Convergence-Time Scaling

Definition 1: For a solved input of length n, let y^it\hat{y}^t_i be the label decoded from hth_t at position i. Define:

τ(n,i)=min⁡{k:y^it=y^iT ∀t≥k}\tau(n, i) = \min\{k : \hat{y}^t_i = \hat{y}^T_i \ \forall t \geq k\} τmax⁡(n)=medianinputsmax⁡iτ(n,i)\tau_{\max}(n) = \text{median}_{inputs} \max_i \tau(n, i)

The scaling class is the growth of τmax⁡(n)\tau_{\max}(n):

  • Flat: shortcut/refinement
  • Θ(log n): parallel scan
  • Θ(n): serial

Calibration

  • Streaming parity (seriality forced by construction): slope dτmax⁡/dn=1.00d\tau_{\max}/dn = 1.00
  • Fixed-T parity (bounded budget): slopes 0.39–0.41, bounded by T
  • Learned-PE models (positional wall): reported as out of instrument range

Empirical Validation / Results

The Linear Computation Frontier

Free training discovers frontier algorithms on S₄ and A₅ prefix products: the contiguous solved prefix advances v positions per loop, with v essentially constant across input lengths within a model.

Table 1: Frontier speed and uniformity by training contract

GroupContract (demand n/T)runsvunif.@64
S₄S T=2n (0.5)40.51 [.51,.52].55
S₄S T=n (1)21.00 [1.00,1.00].98
S₄S T=n/2 (2)42.00 [1.93,2.13].19
S₄S T=n/4 (4)24.00 [3.60,4.00].00
S₄S log-T (mixed)162.00 [1.86,2.42].33
S₄M log-T (mixed)41.88 [1.86,1.88].41
S₄L log-T (mixed)42.73 [2.09,3.33].09
A₅S T=n, horizon (1)160.96 [0.08,1.03]—
S₅M op.-first, T=n (1)21.00.56
Z₆₀S log-T (mixed)82.15 [1.82,5.17]—
ETH parityT=n (1)4≈1.5—

The Budget Law

Across contracts spanning an 8× range of demand, measured v tracks ntr/Ttrn_{tr}/T_{tr} with a power-law exponent of 0.98±0.040.98 \pm 0.04 (95% CI; R² = 0.99 over 23 models at 8 demand levels). The complete form:

v≈clip(ntr/Ttr,vfree,vmax)v \approx \text{clip}(n_{tr}/T_{tr}, v_{free}, v_{max})

Three regimes:

  • Law-bound (A₅, S₄): v tracks demand exactly
  • Floored (parity): v never drops below ≈1–1.5 (attention composes cheap XOR operators over multiple positions)
  • Escaped (Z₆₀): tight contracts push the model off the frontier class entirely (abelian task has a parallel shortcut)

Causal Validation

Resampling the state at (position i, loop t) yields damage that is strictly downstream-in-position (zero upstream damage in all 72 grid cells), structured by the frontier. The cone slope reproduces each model's measured v independently.

Storage Phenotypes

Table 3: Repair phenotype (mean self-damage when stored value at a position already passed by the frontier is resampled)

A₅ T=nS₄ logS₄ T=n/2S₅ op-first
self-damage behind frontier.02.95.96.99
  • Self-healing (A₅ star solution): repairs corrupted stored values within a loop
  • Store-once (most models): near-total, permanent self-damage

Learning Walls: Operator Scale, Not Circuit Class

Table 4: Optimization cost of the group operator (training steps to per-token accuracy ≥ .98 on pair composition, n=2)

| | S₄ (|G|=24) | Z₆₀ | A₅ (|G|=60) | S₅ (|G|=120) | |---|---|---|---|---| | scale S | ∼0.5k | 2.5k | ∼4k | >40k (never) | | scale M | — | 2.0k | — | 6.5k |

  • A₅ is exactly as NC¹-hard as S₅, yet trains to full length generalization
  • Operator-first curriculum cracks S₅ in 10/10 seeds (exact match ≥ 0.92 at 2× training length)
  • Joint learning of operator and chain deadlocks; sequenced learning does not

Imposed Seriality Fails

Table 5: Mechanism cannot be mandated through the input schedule

freestreamingstreaming + per-loop sup.
parity✓✓—
A₅✓ (lottery)××
S₅× (op. wall)××
S₅, operator-first✓——

Tying-Degree Control

Table 6: Tying-degree control at fixed effective depth 12 (mean per-token accuracy at n=64, 3 seeds per cell)

G=1 (tied)G=2G=3G=4G=6G=12 (untied)
S₄ const. width.21.27.30.30.32.26
S₄ param-matched.21.28.27.25.25.15
A₅ const. width.10.23.17.25.23.15
A₅ param-matched.10.15.05.05.05.05

With parameters matched, untying hurts extrapolation (S₄) and destroys learnability (A₅, G≥3 at chance). Weight reuse is a load-bearing inductive bias.

Budget Annealing: Mechanism Portability

Table 7: Budget annealing results

Armcontractcrackedv beforev after
A₅ from scratchT=n8/22 seeds—≈1.0
A₅ from scratchlog-Tbimodal, weaker—≈2
A₅ annealT=n → log4/41.02.0
S₄ annealT=n → log4/41.02.4
S₄ anneallog → T=n4/42.41.2
S₅ operator-firstT=n10/10—1.0

The transferred mechanism is re-priced by the new contract, but without re-running the seed lottery.

Halting Rule

Stopping at T⋆=⌈n/v^⌉T^\star = \lceil n/\hat{v} \rceil (with v^\hat{v} estimated in distribution) recovers near-oracle accuracy at test lengths and avoids overthinking.

Head Instruments Predict Generalization

Table 8: Predicting OOD generalization (n ∈ {64, 128}) from strictly in-distribution measurements (n ≤ 32), 16 seeds per cell

Metric [ID, n ≤ 32]S₄ log-TA₅ prop-Tparity prop-T
frontier speed v₃₂ [head]+.87 (.95)—+.38 (.62)
frontier completion@32 [head]+.83 (.94)+.90 (1.00)+.58 (.84)
cosine (adjacent) [tail]−.02 (.44)−.77 (.03)+.01 (.37)
Jacobian align. [tail]−.61 (.10)−.79+.11 (.44)
AA / path indep.+.31 (.60)−.66 (.14)+.21 (.65)

Entries: Spearman ρ (median-split AUROC). Head instruments dominate in every cell; the path-independence score never wins a cell.

Open-Benchmark Validation

Table 9: Easy-to-hard prefix sums (train 32-bit official split)

Armn=32n=64n=128n=256official 512
T=n, seed 21.001.001.0000
T=n, seed 31.001.000.9600
T=n, seeds 0/1 (lottery)1.000000
log-T, all seeds1.000000
DT conv-RNNsolves 512 (locality-forced frontier)

The frontier breaks between 128 and 256 bits—convolutional locality forces a linear frontier and shields it from long-range interference, whereas the frontier learned inside global attention inherits attention's length fragility.


Theoretical and Practical Implications

Theoretical Implications

  1. Instrument validity constraint: Any loop-mechanism claim based on skip tolerance, cross-step similarity, or shared-dictionary attribution is uninformative unless localized to the head of the trajectory (t<τ⋆t < \tau^\star). This is a general theorem (Proposition 1), not an empirical observation.

  2. Selection, not expressivity: Which algorithm SGD finds is set by the architecture prior and the budget contract—not by what the architecture can express. Weight tying flips selection from parallel scans to serial frontiers.

  3. Learning walls are optimization objects: Non-solvability blocks nothing at these scales; the order of the group sets the optimization cost of its operator. NC¹-hardness is free (A₅), operator scale is not (S₅).

  4. Localization–editing dissociation is architectural under weight tying: Any weight edit hits every loop, so activation-space localization cannot inform weight-space editing even in principle.

Practical Implications

  1. Halting rules: The useful stopping signal is frontier completion (T≥n/vT \geq n/v), predictable per input length, rather than state convergence.

  2. Test-time compute: The safe operating range of test-time compute is a contract property—pushing T far beyond frontier completion degrades tight-budget models (overthinking).

  3. Training design: Budget annealing transfers mechanisms across contracts, bypassing seed lotteries. Operator-first curricula dissolve optimization walls.

  4. Interpretability for depth-recurrent LMs: Instruments that probe converged states inherit Proposition 1's blindness; they should be replaced or augmented by head-of-trajectory measurements.


Conclusion

The paper's central contributions are:

  1. The linear computation frontier and its budget law: Free training installs a serial mechanism whose speed obeys v≈ntr/Ttrv \approx n_{tr}/T_{tr} (exactly 1.00 under T = n), with per-position loop-extrapolation rescue at fixed length.

  2. Algorithm selection is set by architecture prior: Weight tying flips SGD's choice from parallel scan to serial frontier.

  3. Learning walls are optimization objects, not complexity-theoretic ones: NC¹-hardness is free (A₅), operator scale is not (S₅), and an operator-first curriculum dissolves the wall.

  4. Mechanism portability: Budget annealing transfers algorithms across loop contracts in 4/4 seeds, bypassing the from-scratch seed lottery.

  5. The measurement theory: A saturation proposition showing standard instruments are blind at fixed points, the τ(n,i) head instrument with causal validation, and three 16-seed races in which head instruments predict seed-level generalization while tail metrics and path independence do not.

Scope and Future Directions

  • Claims concern what end-to-end training selects in weight-tied loops on per-position algorithmic sequence tasks at ≤25M parameters
  • The S₅ result is a statement about optimization cost at |G|=120, not an NC¹ impossibility claim
  • Pretrained depth-recurrent LMs (Huginn, Ouro) are out of scope; extending τ to them requires resolving tokenization and format confounds
  • Future work: demonstrating that faster-but-equally-trainable solutions exist at the same contract (and are avoided) would require constructive search over solutions not yet performed

Related papers