Information Flow in Looped Transformers

draft
reasoning
architecture
looped-transformers
Ablations on how a small 2-layer looped Transformer carries state across passes — and how an editable state matrix S doubles Sudoku-Extreme accuracy (21.0% → 42.6%) under the same FLOP budget.
Published

December 1, 2026

Overview

This note started from Shiwei Liu’s blog post, From Model Compression to Looped Transformers [1], and Thinking Machines Lab’s release of Inkling 2 Mini on Tinker [2]. Pruning studies show that many deep layers in large language models barely change the hidden state (Curse of Depth [3]). Inkling 2 Mini loops its middle 12 layers 3 times to get 48-layer depth in half the weights.

The direction we care about here pushes that idea much further — a tiny core reasoning model (2 layers, ~7M parameters) that runs hundreds or thousands of loops at test time, spending extra FLOPs only when a problem is hard [4], [5], [6]. That is the exact regime studied in Scaling to Tens of Thousands of Test-Time Iterations with Loop-Native Attention Residuals (InfiLoop) [6], whose architecture, training setup, and ablation design on Sudoku-Extreme [7] we directly build on.

As mapped out in Looped Transformers: Architecture, Training, and Inference [8] and InfiLoop [6], two things break when you push a tiny core to very high loop counts (N_test >> N_train):

  1. Signal washout vs. memory growth. Overwriting a single hidden vector h on every pass erases useful intermediate steps. Keeping all past passes in memory for softmax attention fixes recall, but memory grows linearly with loop count (14 MB → 1,098 MB at 160 segments).
  2. Latent overthinking. All T tokens in an input loop through the shared layers together. Easy tokens finish early; hard tokens need many passes. Extra passes keep editing tokens that were already right, flipping solved answers back to wrong.

Both failures come down to information flow: what state crosses from Pass p-1 to Pass p, and how each pass updates that state. Following InfiLoop’s ablation methodology [6], we hold the 2-layer core (6.8M parameters, trained for 12 segments = 504 layer visits) completely fixed, roll it out to 160 segments (6,720 layer visits = 13.3× training depth), and change only the cross-loop state mechanism.

Summary of what we found: replacing a single running-average vector (InfiLoop, 21.04%) with a small float32 state matrix S ([dk, D]), split into S_attn and S_mlp and updated inside every layer by the delta rule (v - k @ S) [9]:

  • Doubles exact puzzle accuracy at full compute (21.04% → 42.63%), while adding only +1.9% FLOPs per pass.
  • Uses 39× fewer FLOPs to beat the baseline ceiling: at 116 GFLOPs/board (4 segments), our model already solves 33.64% of boards, beating InfiLoop at 4,566 GFLOPs/board (21.04%).
  • Stops latent overthinking (Lost@160 = 0.00%): out of 827 boards solved at training depth, 0 boards break when looped 13.3× longer (6,720 layer visits).

Why Loop a Small Reasoning Core?

1. The Curse of Depth in Deep Transformers

In a standard Pre-LN Transformer, every layer normalizes its own input, runs Attention and MLP, and adds the result back onto the unnormalized residual stream x [3]:

# x: [B, T, D] residual stream at layer l
h      = rms_norm(x)     # [B, T, D] scaled back to ~1
delta  = block(h)        # [B, T, D] update of size ~1
x_next = x + delta       # [B, T, D] x grows larger at every layer!

By layer 40, x can have a scale of 100 while delta still has a scale of 1. Adding 1 onto 100 barely moves x. Deep layers turn into near no-ops, wasting both parameter memory and FLOPs [1], [3]. Attention Residuals [10] fix this along physical depth by normalizing earlier depth chunks first and taking a learned softmax average over them.

2. Looping as Reasoning Under a FLOP Budget

Saunshi et al. [4] show that a small looped Transformer running N iterations can reproduce N steps of chain-of-thought reasoning directly inside its [B, T, D] hidden state, without emitting intermediate text tokens. Under a fixed FLOP budget, looping gives two advantages:

  • Tiny weight footprint: a 2-layer core looped 24 times performs 48 layer visits with 24× fewer layer weights than a 48-layer model.
  • Test-time compute scaling: easy inputs can stop after a few passes (~100 GFLOPs), while hard multi-step inputs can run 100+ passes (~4,500 GFLOPs) using the exact same weights [5], [6].

3. Attention Residuals (Vertical) vs. Loop State (Horizontal): How They Complement Each Other

A looped model has two different depth axes, and they need different mechanisms:

  • Vertical axis (m = 0 .. M-1, inside one pass) — Attention Residuals [10]: Instead of adding every layer onto one unnormalized sum x, each layer normalizes earlier depth blocks first and mixes them with a learned softmax query:

    # V: [num_blocks, B, T, D] earlier depth blocks inside the current pass
    K    = rms_norm(V)                                    # equal scale per depth block
    p    = F.softmax(einsum('nbtd,d->btn', K, query), -1) # [B, T, num_blocks]
    x_in = einsum('btn,nbtd->btd', p, K)                  # [B, T, D] bounded input!

    This stops the Curse of Depth inside a deep block (for example, Inkling 2 Mini [2] groups its 12 Core layers into two 6-layer buckets with Attention Residuals).

  • Horizontal axis (p = 0 .. N-1, across passes) — Loop State: You cannot simply run Attention Residuals across all N = 160 passes (6,720 layer visits), because storing every past pass on a shelf grows GPU memory linearly (14 MB → 1,098 MB in our A100 benchmark) and turns compute quadratic (O(N²)). Across passes, you need a fixed-size state that carries forward useful steps and edits out wrong ones.

The two ideas are complementary, not competing: Attention Residuals keep a deep M-layer core well-scaled vertically, while loop state carries reasoning horizontally across N passes in O(1) memory. Because our testbed uses a tiny M = 2-layer core (too shallow for vertical variance blowup), plain vertical residuals (x = rms_norm(x + u)) are enough vertically — letting us isolate 100% of our ablation on horizontal information flow.

4. Can Token Early-Exit (MoR) Avoid Overthinking Instead?

One natural question is: if latent overthinking happens because easy tokens keep looping after they are already solved, why not just stop looping easy tokens early — as in Mixture-of-Recursions (MoR) [11]?

Early-exiting does protect the exited tokens from later edits, because a router physically drops them out of the active tensor ([B, 8, D] → [B, 4, D] → [B, 2, D]):

# Inkling 2 Mini / Ours: ALL T=8 tokens loop together on every pass
Pass 0: x is [B, 8, D]  --> Q, K, V are [B, 8, D]  (every token sees all 8 tokens)
Pass 1: x is [B, 8, D]  --> Q, K, V are [B, 8, D]  (every token sees updated K, V of all 8)
Pass 2: x is [B, 8, D]  --> Q, K, V are [B, 8, D]

# Mixture-of-Recursions (MoR): active token count shrinks each pass
Pass 0: active = [0..7]     --> Q is [B, 8, D]     # router keeps 4 hardest tokens
Pass 1: active = [2,5,6,7]  --> Q is [B, 4, D]     # tokens [0,1,3,4] exited!
Pass 2: active = [5,7]      --> Q is [B, 2, D]     # only [5,7] still run!

Look at what the 2 remaining hard tokens [5, 7] (Q [B, 2, D]) see inside Softmax Attention on Pass 2 [11]:

  1. Recursion-wise KV (K, V is [B, 2, D]): Tokens [5, 7] can only attend to [5, 7] — the 6 already-solved tokens ([0, 1, 2, 3, 4, 6]) are invisible! On a Sudoku board, hard empty squares would lose sight of the clues and solved neighbors they depend on.
  2. First-pass KV sharing (K_0, V_0 is [B, 8, D]): Tokens [5, 7] attend to Pass 0’s frozen K_0, V_0 — so if neighbor square 6 was solved on Pass 1, square 7 on Pass 2 still sees square 6 as blank (Pass 0).
  3. Test-time depth scaling (N = 160): MoR trains a fixed router per pass (router[0 .. N_train-1]), which does not extend to 160 test segments, and the hard tokens [5, 7] that stay in the loop still need a non-washing-out state across passes.

Keeping all T tokens in [B, T, D] while updating state S by the delta rule (err = v - k @ S) gives both benefits at once: hard tokens keep seeing freshly updated neighbors on every pass, while already-solved tokens hit err = 0 so their stored state stays locked (Lost@160 = 0.00%).


Information Flow Across Loop Passes

Every looped Transformer has two information pathways:

  1. Vertical flow (m = 0 .. M-1, inside one pass): how layers pass activations downward inside a single pass.
  2. Horizontal flow (p = 0 .. N-1, across passes): what state carries forward from Pass p-1 into Pass p.

Recent architectures make very different choices on the horizontal axis:

Architecture Cross-pass state per token How Pass p updates state What happens when N is large (N = 160)
Carry-Last (Huginn) [5] 1 vector [1, D] Overwrites h <- Block(h + x0) Input x0 stays sharp, but intermediate drafts from earlier passes are overwritten.
Inkling 2 Mini [2] (AttnRes + 1-Pass Bank) 2 vectors [2, D] Resets to Prelude; passes bank = [B2, B3] from Pass p-1 via 4 gated controllers (Q, K, V, MoE) Clean separate gating for Attention and MoE at N = 3, but overwrites bank every pass (Pass 0 is gone by Pass 2).
Step-Indexed Highway (MeSH) [12] K slots [K, D] Learned router W[p] per pass, adds M += w * h W[p] is not trained for p >= N_train; + w * h grows without bound (10.2× drift).
InfiLoop [6] 1 vector [1, D] Running weighted average num = b*num + w(z)*z Constant memory at any N, but mixes Attention & MLP into 1 vector and w(z) never checks if stored state is already solved.
Ours: Per-Layer State S 2 matrices 2 × [dk, D] Separate S_attn & S_mlp, updated at every layer by S = a*S + b*outer(k, v - k@S) Constant memory, separate Attention/MLP channels, writes only the difference v - k@S.

Interactive M × N Information Flow

All five tabs below are drawn on the same 2-layer Core × N-pass grid (in Inkling 2 Mini, the 2 core rows correspond to its two 6-layer Core blocks B2 and B3). Click through the five designs and hover (or click to pin) any block in Pass 2 or Pass N-1:

Vertical Flow (Inside Pass p)
Horizontal Flow (Across Passes 0 .. p-1)

        

Our Proposal: Maintaining State S Across Passes

Look at why Inkling 2 Mini and InfiLoop complement each other:

  • Inkling 2 Mini recognizes that Attention (where to look) and MLP / MoE (local token deduction) need separate cross-pass gates, but its bank only stores the single previous pass p-1.
  • InfiLoop [6] keeps a running memory across all passes 0 .. p-1 in constant space, but collapses everything into 1 vector and adds new candidates (+ w(z) * z) without checking what memory already holds.

We combine the strengths of both using a per-token state matrix S updated by the delta rule [9]. First, here is the high-level M × N loop structure when S sits purely between passes (our starting prototype):

# B = batch, T = tokens (81 squares), D = hidden size (512), dk = state rows (8)
# M = shared layers (2), N_passes = loop iterations (12 in train -> 160 in test)

def state_read(x, S, W_q):
    """Read a [B, T, D] vector from per-token state matrix S [B, T, dk, D]."""
    q = F.normalize(rms_norm(x) @ W_q.T, p=2, dim=-1)             # [B, T, dk]
    return torch.einsum('btk,btkd->btd', q, S)                    # [B, T, D]

def state_delta_write(v, S, cell):
    """Update S [B, T, dk, D] by writing ONLY the difference (v - k @ S)."""
    vn    = rms_norm(v)                                           # [B, T, D]
    k     = F.normalize(vn @ cell.W_k.T, p=2, dim=-1)             # [B, T, dk]
    alpha = torch.sigmoid(vn @ cell.W_a.T + cell.alpha_bias)      # [B, T, dk]   retention
    beta  = torch.sigmoid(vn @ cell.w_b.T + cell.beta_bias)       # [B, T, 1]    step size

    S    = alpha.unsqueeze(-1) * S                                # [B, T, dk, D]
    pred = torch.einsum('btk,btkd->btd', k, S)                    # [B, T, D]    what S holds at key k
    err  = v - pred                                               # [B, T, D]    0 when v matches pred!
    S    = S + beta.unsqueeze(-1) * torch.einsum('btk,btd->btkd', k, err)
    return S

def forward_pass_level(tokens, N_passes):
    x0 = tok_emb(tokens)                                          # [B, T, D]    original input clues
    h  = x0
    S  = torch.zeros(B, T, dk, D, dtype=torch.float32)            # [B, T, dk, D]

    for p in range(N_passes):
        x = h + x0                                                # [B, T, D]    re-inject input clues
        for m in range(M):                                        # plain M-layer Transformer vertically
            x = rms_norm(x + layers[m].softmax_attn(x))
            x = rms_norm(x + layers[m].mlp(x))
        S = state_delta_write(x, S, cell)                         # update S at end of pass
        h = (1 - g) * x + g * state_read(x, S, cell.W_q)
    return lm_head(h)

As our ablations below will show, updating a single shared S only at the end of the pass (A1 above) is not enough: x mixes Attention and MLP outputs into the same matrix, causing interference. Splitting S into S_attn + S_mlp and moving the write-then-read step inside every layer (A3) turns the loop into a much stronger reasoning core in 15 lines:

def delta_step(v, S, cell):
    """Write-then-read on S_attn or S_mlp in float32.
    v: [B, T, D]      layer output (a_out or m_out)
    S: [B, T, dk, D]  per-token state matrix (S_attn or S_mlp)
    """
    vn    = rms_norm(v)                                                    # [B, T, D]
    k     = F.normalize(vn @ cell.W_k.T, p=2, dim=-1)                      # [B, T, dk]
    q     = F.normalize(vn @ cell.W_q.T, p=2, dim=-1)                      # [B, T, dk]
    alpha = torch.sigmoid(vn @ cell.W_a.T + cell.alpha_bias)               # [B, T, dk]

    S     = alpha.unsqueeze(-1) * S                                        # [B, T, dk, D]
    pred  = torch.einsum('btk,btkd->btd', k, S)                            # [B, T, D]
    err   = v - pred                                                       # [B, T, D]
    beta  = torch.sigmoid(vn @ cell.w_b.T + cell.beta_bias)                # [B, T, 1]

    S     = S + beta.unsqueeze(-1) * torch.einsum('btk,btd->btkd', k, err) # write outer(k, err)
    o     = torch.einsum('btk,btkd->btd', q, S)                            # read q @ S
    g     = torch.sigmoid(vn @ cell.w_g.T + cell.g_bias)                   # [B, T, 1]
    return (1.0 - g) * v + g * o, S

# Full M x N forward pass (A3: Per-Layer S_attn + S_mlp):
S_attn = torch.zeros(B, T, dk, D, dtype=torch.float32)
S_mlp  = torch.zeros(B, T, dk, D, dtype=torch.float32)

for p in range(N_passes):
    x = h + x0
    for m in range(M):
        a_out          = layers[m].softmax_attn(x)                # [B, T, D] token-to-token attention
        u_attn, S_attn = delta_step(a_out, S_attn, attn_cell)     # [B, T, D] update & read S_attn
        x              = rms_norm(x + u_attn)

        m_out          = layers[m].mlp(x)                         # [B, T, D] per-token MLP
        u_mlp,  S_mlp  = delta_step(m_out, S_mlp,  mlp_cell)      # [B, T, D] update & read S_mlp
        x              = rms_norm(x + u_mlp)
    h = x

Why does err = v - pred stop latent overthinking? Because once a token settles on an answer, its layer output v matches what S already predicts (pred = k @ S), so err = v - pred shrinks to 0 automatically and later passes leave S alone.

How State S Differs from MeSH

At first glance, MeSH (Memory-as-State-Highways) [12] also keeps a [K, D] buffer per token across loop passes. Why does MeSH drop to 16.31% at 160 segments on Sudoku-Extreme while our state S (A3) reaches 42.63%?

Compare the two update rules side by side:

# --- MeSH (Yu et al., ICLR 2026) ---
# M: [B, T, K, D] updated once per pass with step-indexed routers
r   = min(p, N_train - 1)                                # p >= N_train has NO trained router!
ww  = F.softmax(rms_norm(h) @ W_write[r].T, dim=-1)      # [B, T, K]
M   = M + ww.unsqueeze(-1) * h.unsqueeze(-2)             # purely ADDITIVE: never subtracts old errors!
wr  = F.softmax(rms_norm(h) @ W_read[r].T, dim=-1)       # [B, T, K]
out = rms_norm(torch.einsum('btk,btkd->btd', wr, M))

# --- Ours (Per-Layer State S, A3) ---
# S_attn, S_mlp: [B, T, dk, D] updated at EVERY layer with shared weights
k    = F.normalize(rms_norm(v) @ W_k.T, p=2, dim=-1)     # shared W_k works at pass 12 or pass 160
S    = alpha.unsqueeze(-1) * S                           # decays old rows cleanly
pred = torch.einsum('btk,btkd->btd', k, S)               # checks what S already holds at key k
S    = S + beta.unsqueeze(-1) * torch.einsum('btk,btd->btkd', k, v - pred)  # writes ONLY (v - pred)

Four specific differences separate them:

  1. Shared weights vs. step-indexed weights (W[p]): MeSH trains a separate router W_write[p], W_read[p] for each loop step p = 0 .. N_train - 1. Past N_train = 12 (out at p = 160), MeSH has no trained routers for those steps and must clamp r = 11. Our W_k, W_q, W_a, w_b are shared across all passes and route purely by content, so Pass 160 works the exact same way as Pass 2.
  2. Delta overwrite (v - k @ S) vs. blind addition (M + w * h): MeSH only adds into M and never erases. Over 160 segments, M grows 10.2× in L2 drift (0.59 → 6.04) and loses −4.85% of individual squares (72.49% → 67.64%). Our update subtracts pred = k @ S first: wrong early guesses get overwritten, and finished squares (v == pred) receive a 0 update.
  3. Separate S_attn and S_mlp vs. one shared buffer: MeSH writes the combined end-of-pass vector into one buffer M. Splitting S into S_attn + S_mlp alone adds +20.4 points in our ablation (A1 → A2).
  4. Every layer vs. end of pass: MeSH updates once between passes; updating inside every layer so Layer 1 immediately reads Layer 0’s write adds another +16.9 points (A2 → A3).

Experimental Setup and FLOP Budget

Methodology and Dataset (Sudoku-Extreme)

We use the exact training setup and codebase from InfiLoop [6] on Sudoku-Extreme [7]:

  • Why Sudoku-Extreme fits looped reasoning: each 9×9 board is a sequence of 81 tokens (clues '1'..'9' or blank '_'), and the model predicts '1'..'9' for all 81 squares at once. Every board contains a mix of easy squares (7–8 neighbors already given, solvable on Pass 1) and hard squares (needing 20–40 chained eliminations across rows, columns, and 3×3 boxes).
  • Controlled training: every method uses the exact same 2-layer Transformer backbone (D = 512, H = 8 heads, 6.8M parameters, identical random seed 991231), trained on 1,000 base puzzles (1M symmetry-augmented boards, batch = 384, 14,400 steps) with 12 loop segments (504 layer visits).
  • Test-time depth rollout (2,048 unseen boards): we run a single forward pass per board from 1 segment (0.08× training depth) out to 160 segments (13.3× training depth = 6,720 layer visits) and track three metrics [8]:
    • Exact Board %: percentage of 2,048 puzzles with all 81 / 81 squares solved.
    • Lost@160 ↓ (Overthinking): out of puzzles already solved at 12 segments (1×), what % break when looped to 160 segments.
    • Gained@160 ↑ (Extra Reasoning): out of puzzles still unsolved at 12 segments (1×), what % get newly solved by looping to 160 segments.

Counting Matrix-Multiply FLOPs per Pass

To compare methods fairly under a compute budget, we count all matrix-multiply operations (1 multiply-add = 2 FLOPs) for one call of our M = 2-layer block (D = 512, T = 97 tokens including 16 prefix tokens, SwiGLU width 3D = 1536, dk = 8):

  • Attention matmuls (2 layers): qkv, QK^T, PV, W_o = 16·D² + 8·T·D = 4.59M FLOPs / token
  • MLP matmuls (2 layers): gate_up and down = 36·D² = 9.44M FLOPs / token
  • Shared backbone total: 52·D² + 8·T·D = 14.01M FLOPs / token / call (28.54 GFLOPs / puzzle / segment)

Adding the matrix ops inside each cross-pass state update (W_k, W_q, W_a, k @ S, outer(k, err), q @ S):

Method State kept / token Loop-update FLOPs / token Total FLOPs / token / call Total over R calls
carry_last [5] 512 nums (D) 0 14.01M (1.00×) O(R)
infiloop (B0) [6] 513 nums (D + 1) 3.6K 14.02M (1.00×) O(R)
full_attn (attend all r calls) r · 512 (grows!) ~2·r·D (grows!) 17.45M @ r=3360 (1.25×) O(R²)
gd_single_pass (A1) 4,096 nums (8·D) 55.3K 14.07M (1.004×) O(R)
gd_dual_pass (A2) 8,192 nums (2·8·D) 110.6K 14.12M (1.008×) O(R)
gd_dual_layer (A3, Ours) 8,192 nums (2·8·D) 274.4K 14.28M (1.019×) O(R)
gd_dual_layer_pred (A4) 8,192 nums (2·8·D) 278.5K 14.29M (1.020×) O(R)

Nearly 98% of all FLOPs sit in the shared Attention and MLP layers. Even updating both S_attn and S_mlp inside every layer (A3) adds only +1.9% FLOPs per pass (29.09 vs 28.55 GFLOPs per segment).


Ablation Results

Hover across the chart below to compare methods at any test-time FLOP budget (29 GFLOPs to 4.6 TFLOPs per puzzle), or switch tabs to inspect overthinking (Lost@R), newly solved puzzles (Gained@R), and GPU state memory:

1. Accuracy Under Matched FLOP Budgets

Because A3 (29.09 GFLOPs/seg) and B0: InfiLoop (28.55 GFLOPs/seg) spend almost identical FLOPs per segment, comparing them across compute budgets shows how much better information flow buys per FLOP:

Test Compute Budget / Puzzle Loop Segments B0: InfiLoop [6] A2: Pass-End S_attn + S_mlp A3: Per-Layer S_attn + S_mlp (Ours)
~58 GFLOPs 2 (0.17×) 2.59% 2.88% 13.62%
~116 GFLOPs 4 (0.33×) 10.69% 13.82% 33.64%
~345 GFLOPs (train budget) 12 (1.0×) 20.07% 23.49% 40.38%
~1,390 GFLOPs 48 (4.0×) 21.53% 25.54% 42.43%
~4,600 GFLOPs 160 (13.3×) 21.04% (drops) 25.73% 42.63%

At 116 GFLOPs (4 segments), A3 already solves 33.64% of unseen boards — +12.6 percentage points higher than InfiLoop even when InfiLoop spends 4,568 GFLOPs (39× more FLOPs). And as we scale compute from 345 GFLOPs to 4,650 GFLOPs, InfiLoop peaks early and drops back down, whereas A3 climbs at every single checkpoint (40.38% → 42.63%).

2. Controlled 5-Arm State-Flow Ablation (B0 → A4)

To see which design choice drives the gain, each row below changes one piece at a time on the exact same 6.8M backbone (float32 state S, dk = 8, 14,400 training steps):

Arm Cross-Pass State S Split Where S Updates beta Gate 1× (12) 4× (48) 13.3× (160) Lost@160 ↓ Gained@160 ↑ Cell@160
B0 infiloop [6] 1 running-avg vector End of pass w(v) only 20.07% 21.53% 21.04% 3.41% 2.08% 65.24%
A1 gd_single_pass 1 shared S [8, D] End of pass sigmoid(vn @ w_b) 18.31% 8.30% 5.32% 70.93% 0.00% 72.92%
A2 gd_dual_pass S_attn + S_mlp End of pass sigmoid(vn @ w_b) 23.49% 25.54% 25.73% 0.83% 3.19% 75.82%
A3 gd_dual_layer S_attn + S_mlp Every layer sigmoid(vn @ w_b) 40.38% 42.43% 42.63% 0.00% 3.77% 80.89%
A4 gd_dual_layer_pred S_attn + S_mlp Every layer sigmoid(vn@w_b − pn@w_p) 37.65% 38.92% 39.11% 0.00% 2.35% 80.18%

What each step teaches us:

  1. B0 (InfiLoop, 21.04%): Solves 20.07% at training depth, peaks at 36 segments (21.68%), and then loses 3.41% of its solved boards by segment 160 while individual square accuracy drops −9.06% (74.30% → 65.24%).
  2. A1 (1 shared S at pass end, 5.32% — a useful failure): Writing the end-of-pass hidden vector x into a single S outside the residual block fails at high loop counts. Attention routing updates and MLP digit updates overwrite the same subspace inside S, flipping 1–2 squares per board (Cell@160 stays 72.92%, while 81/81 exact solve drops to 5.32%).
  3. A1 → A2 (Separate S_attn and S_mlp, 5.32% → 25.73%): Giving Attention and MLP their own S matrices inside the residual stream — still updated only once per pass — fixes the collision (+20.41 points over A1, +4.69 points over B0, and 4× lower Lost@160).
  4. A2 → A3 (Update S inside every layer, 25.73% → 42.63%, 0 extra parameters): A3 has the exact same parameter count as A2 (6,885,416 params) and +1.1% FLOPs, yet jumps +16.90 points and reaches Lost@160 = 0.00%. When Layer 0 writes into S_attn, S_mlp, Layer 1 immediately reads that updated memory inside the same pass instead of waiting for the next pass.
  5. A3 → A4 (Testing an explicit - pred @ w_p brake inside beta, 39.11% vs 42.63%): We also tested subtracting rms_norm(pred) @ w_p inside beta so high confidence in pred would force beta -> 0. On a tiny 150-step 4×4 Sudoku sanity test, A4 beat A3 (65.6% vs 46.9%). On full 14,400-step 9×9 training, however, A3 already achieves Lost@160 = 0.00% because err = v - k @ S naturally goes to zero when v agrees with S. Adding a second brake inside beta (A4) keeps Lost@160 = 0.00% too, but makes late multi-step updates slightly too cautious (Gained@160 = 2.35% vs 3.77%). The simpler delta rule wins.

3. Earlier 7-Method Baseline Survey & Precision Lesson

Before running the controlled B0–A4 ladder above, we ran a broad 7-method baseline survey (click 7-Method Baseline Survey in the chart above):

Baseline Method State per Token 1× (12) 4× (48) 13.3× (160) Lost@160 ↓ Gained@160 ↑
last_lookup (recursive 1-slot delta) [1, D] 23.14% 27.00% 27.20% 0.42% 5.40%
kda_loop (v1) (8-slot bfloat16 delta) [8, D] 19.43% 20.90% 20.85% 0.50% 1.88%
carry_last [5] [1, D] 18.46% 20.70% 20.85% 0.00% 2.93%
infiloop [6] [1, D] 20.21% 21.24% 20.61% 7.73% 2.45%
loom_ema (uniform running average) [1, D] 21.04% 20.61% 20.41% 8.12% 1.36%
window_8 (8-pass sliding window) [8, D] 11.33% 15.87% 16.89% 0.00% 6.28%
mesh [12] [8, D] 16.89% 16.60% 16.31% 4.05% 0.12%

That first sweep taught us a critical implementation lesson that unlocked A3:

  • Never keep loop state S in bfloat16. In kda_loop (v1), S was stored in bfloat16, where the gap between numbers near 1.0 is 2^-7 ≈ 0.0078. Whenever a gated step beta * err was smaller than 0.004, bfloat16 addition rounded S + step right back to S — freezing 66%–97% of S coordinates. Keeping S in float32 (torch.autocast(..., enabled=False)) costs just +305 MB of GPU memory and lets small multi-pass refinements accumulate cleanly across 6,720 layer visits.

References

[1]
S. Liu, “From model compression to looped transformers.” Blog post, Nov. 2026. Available: https://shiweiliuiiiiiii.github.io/blog/2026/from-model-compression-to-looped-transformers/
[2]
Thinking Machines Lab, “Introducing Inkling 2 Mini.” Thinking Machines Lab Blog, Nov. 2026. Available: https://thinkingmachines.ai/news/inkling-2-mini/
[3]
W. Sun, X. Song, P. Li, L. Yin, Y. Zheng, and S. Liu, “The curse of depth in large language models,” in Advances in neural information processing systems (NeurIPS), 2025. Available: https://arxiv.org/abs/2502.05795
[4]
N. Saunshi, S. Nishikawa, S. Singh, S. J. Reddi, and S. Kumar, “Reasoning with latent thoughts: On the power of looped transformers,” in International conference on learning representations (ICLR), 2025. Available: https://arxiv.org/abs/2502.17416
[5]
J. Geiping et al., “Scaling up test-time compute with latent reasoning: A recurrent depth approach,” arXiv preprint arXiv:2502.05171, 2025, Available: https://arxiv.org/abs/2502.05171
[6]
P. Li, D. Muhtar, Y. He, J. Su, L. Yin, and S. Liu, “Scaling to tens of thousands of test-time iterations with loop-native attention residuals,” arXiv preprint arXiv:2610.11570, 2026, Available: https://arxiv.org/abs/2610.11570
[7]
Sapient Intelligence, “Sudoku-extreme dataset.” Hugging Face Datasets, 2025. Available: https://huggingface.co/datasets/sapientinc/sudoku-extreme
[8]
M. Le et al., “Looped transformers: Architecture, training, and inference,” arXiv preprint arXiv:2611.35712, 2026, Available: https://arxiv.org/abs/2611.35712
[9]
S. Yang, J. Kautz, and A. Hatamizadeh, “Gated delta networks: Improving Mamba2 with delta rule,” in International conference on learning representations (ICLR), 2025. Available: https://arxiv.org/abs/2412.06464
[10]
Kimi Team, G. Chen, Y. Zhang, J. Su, et al., “Attention residuals,” arXiv preprint arXiv:2603.15031, 2026, Available: https://arxiv.org/abs/2603.15031
[11]
S. Bae, A. Fisch, H. Harutyunyan, T. Ziarko, S.-Y. Kim, and T. Schuster, “Mixture-of-recursions: Learning dynamic recursive depths for adaptive token-level computation,” arXiv preprint arXiv:2507.10524, 2025, Available: https://arxiv.org/abs/2507.10524
[12]
C. Yu et al., “MeSH: Memory-as-state-highways for recursive transformers,” in International conference on learning representations (ICLR), 2026. Available: https://arxiv.org/abs/2510.07739