Towards One-Loop Inference for Looped Language Models

Yifei Zhao, Ying TangarXiv 2026

TL;DR

Looped language models boost their "thinking depth" by passing hidden states through the same neural block repeatedly—a clever parameter-saving trick that unfortunately creates a massive serial bottleneck at test time. This paper shows you can skip almost all the middle loops by attaching a tiny, fast predictor after the very first loop to guess where the hidden state is headed. Better yet, guessing the second-to-last state and letting the native model run just one final cleanup loop recovers nearly all the accuracy of a deep, multi-loop run at a fraction of the time.

What Problem Does This Paper Address?

Imagine reading a dense paragraph twelve times in a row to make sure you really get it. That is essentially how a looped language model (or Universal Transformer) operates. Instead of stacking dozens of unique layers, these models reuse a single shared block of weights, feeding the output hidden state right back in as the next input. You get the reasoning power of a deep network with the memory footprint of a shallow one.

The catch? Time. Because loop 2 needs the output of loop 1, and loop 12 needs loop 11, inference becomes strictly serial and painfully slow. Existing work tries to exit early or draft future tokens, but the authors ask a more fundamental question: After running just the first loop, is there already enough signal to jump straight to the end—and when do we still need the model to take one last native step?

Methods

Instead of trudging through all $R$ loops, the authors always run the first native loop to get an initial hidden state, then hand things over to a lightweight state predictor that estimates a future residual jump. They explore two distinct shortcut paths:

  1. Direct Readout (1 native loop): The predictor estimates the final state ($R$) directly, which goes straight to the model's output decoder.
  2. Retain Final Loop (2 native loops): The predictor estimates the penultimate state ($R-1$), and the original model runs its actual final loop ($R$) on that estimate before decoding.
Figure 1. Loop skipping in Looped GPT-BERT. Each stack runs the shared four-layer block once. Two alternative shortcuts add an RMS-scaled residual ∆j to the first-loop state. 1st loop only (direct readout) predicts the final state for readout. 1st + last loops (retain final loop) predicts the loop-11 state and runs loop 12. We report median GPU forward latency (released weights, one 128-token window) and WikiText-2 test NLL (nats/token). On Inkling, the last loop improves three-hop accuracy at a fixed predicted state (Figure 2b), consistent with gains from additional loops on multi-hop lookup (Thinking Machines Lab, 2026).

For smaller models like Looped GPT-BERT, the predictor is a tiny masked-attention and MLP module (~0.59M parameters). For larger, frozen pretrained models (0.6B to 4B+ parameters), it gets even simpler: just a task-specific affine map (a linear transformation) fitted on as few as 72 prompts, leaving the massive backbone weights completely untouched.

Datasets

The authors evaluate their shortcuts across language modeling, reasoning, and structured puzzle-solving benchmarks without introducing brand-new datasets, though they utilize synthetic setups to probe model mechanics:

  • Language & Grammar: WikiText-2 (language modeling loss) and BLiMP (grammatical acceptability).
  • Science & Math Reasoning: ARC (four-option science questions), GSM8K (grade-school math), text continuation, and Inkling's synthetic three-hop lookup tasks (designed to test latent chain-of-thought reasoning).
  • Structured Puzzles: ARC-AGI-2, Sudoku-Extreme, and Maze-Hard.

Key Insights and Ideas

  • Fast relaxation makes the future predictable: Why can you skip 10 loops in a dynamical system? The authors show mathematically that if a hidden state splits into slowly drifting components and fast-settling components, the fast parts quickly relax toward an equilibrium dictated by the slow parts. You don't need the whole state to contract—just predicting the slow drift lets you reconstruct the rest.
  • The final loop is an error-correcting powerhouse: Feeding a predicted penultimate state into one last native loop vastly outperforms reading out from that exact same state directly, or even training a same-capacity early readout head. Why? In many architectures, the final readout is hypersensitive to a freshly computed final write, and that last native update actively repairs prediction errors and completes multi-hop reasoning chains.
  • Not all two-loop budgets are equal: Running [Loop 1 -> Predictor -> Loop R] consistently beats running [Loop 1 -> Loop 2] natively. Spending your second compute step at the end of the trajectory is much more valuable than taking a second baby step at the beginning.

Key Results

  • Looped GPT-BERT (12 loops): Retaining only the first and twelfth loops achieves a 5.22× GPU speedup (dropping latency from 46.16 ms to 8.85 ms) and actually improves WikiText-2 test loss slightly (5.602 vs. 5.620 nats/token). Fitting the predictor on frozen weights takes under a minute (56.4 seconds).
  • Pretrained Language Checkpoints (ARLoop, LoopRes, Inkling, Dory-4B): Across 12 model-task pairs, the two-loop shortcut stays within 2.78 percentage points of the full three-loop baseline while delivering a 1.34× to 1.50× forward speedup on text continuation.
  • Latent Multi-Hop Reasoning: On Inkling's synthetic three-hop lookup task, reading directly from a predicted state gets 77/128 right. Running just the final native loop on that exact same predicted state jumps accuracy to 115/128 (approaching the full-depth score of 124/128).
  • Puzzle Solvers (16 loops): Skipping from loop 1 to loop 16 yields ~8× speedups across four puzzle architectures while preserving nearly all accuracy (e.g., 86.30% vs. 86.60% on Maze-Hard with EBR; 35.14% vs. 35.97% pass@2 on ARC-AGI-2 with CHARM).

Limitations and Future Work

The authors are candid about the boundaries of these experiments. First, the speedups are measured primarily as forward passes at fixed context lengths without long KV-cached autoregressive decoding. Second, while architectural cues offer hints on whether 1-loop direct readout or 2-loop final-update will win, there isn't a universal, zero-shot rule—the optimal route still varies across model checkpoints and task formats. Finally, training the GPT-BERT model from scratch relied on a single random seed and reconstructed data pipelines.

For future work, the authors suggest testing learned state predictors inside long-context cached generation, automating route selection on unseen architectures, and using predicted states to "warm-start" energy-based associative memories or draft tokens for speculative decoding.

Summary updated

BibTeX
@misc{zhao2026towards,
  author = {Yifei Zhao and Ying Tang},
  title = {{Towards One-Loop Inference for Looped Language Models}},
  year = {2026},
  eprint = {2611.37142},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.37142},
}
Figure