Learning from Recurrence: Internalizing Depth-Induced Preferences in Looped Language Models
Authors: Hui Chen (University of Wisconsin-Madison), Joshua Elsdon (Microsoft), Can Goksen (Microsoft)
Summary (Overview)
- The paper introduces preference write-back, a self-distillation method for looped language models where deeper recurrent executions generate training trajectories that teach the shared recurrent block through shallow (single-pass) training, without reference answers or correctness filtering.
- The authors show that additional recurrent depth primarily redistributes probability among already top-ranked tokens (top token unchanged 95.6% of positions across 4 passes), occasionally changing the preferred continuation.
- Single-pass learning outperforms full-depth learning on the same targets: on GSM8K, one-pass training reaches 62.70% vs. 56.86% for four-pass training at four-pass inference in the mean-depth-4 model.
- Updates learned through one pass remain useful at later recurrent passes: using the updated block only on passes 2–4 recovers 62.47% of the 62.70% full-update accuracy (6.29 of 6.52 points).
- The method generalizes across multiple looped model families (Retro-OLMo, Retro-LLaMA, Huginn, LoopUS, Ouro), improving one-pass and multi-pass accuracy in most cases while retaining non-mathematical capabilities (OLMES average changes <0.2 points).
Introduction and Theoretical Foundation
Background
Looped Transformer language models scale inference-time computation by reapplying recurrent blocks before emitting each token, decoupling computation depth from layer depth. This makes recurrent depth attractive for:
- Serving efficiency: parameter sharing, depth-wise batching, KV-cache reuse
- Latent test-time computation: iterating in hidden-state space before token emission
Key Research Questions
The paper addresses a fundamental gap: although reapplying a shared block makes additional depth available, the model must learn to use it. The central questions are:
- What do additional passes actually change in predictions?
- Can the shared block learn from its own deeper predictions?
Theoretical Foundation
The work connects to:
- Iterative computation in controlled settings: recurrent models can learn genuine iterative algorithms (Schwarzschild et al., 2021; Bansal et al., 2022; Saunshi et al., 2025)
- Self-distillation: changes in a model's own predictive distribution can provide useful training signal (Zhang et al., 2026)
- Weight-tied architectures: Universal Transformers (Dehghani et al., 2019), ALBERT (Lan et al., 2020)
Methodology
Architecture: Looped Language Model
The model retrofits OLMo-2 1B stage-1 checkpoint with:
- Input stack : first 7 Transformer blocks
- Shared recurrent core : middle 4 blocks
- Output stack : final 5 blocks
- Injection projection : position-wise linear projection
The recurrent computation for a prefix is:
where is the input encoding, is the state after pass , and denotes concatenation along the hidden dimension.
The next-token distribution after passes is:
Mid-Training
- Continued causal language modeling on the Dolmino mixture
- Execution depth sampled from a Poisson-lognormal distribution: with mean
- Recurrence curriculum: gradually increase mean depth toward target
Preference Write-Back
Three decoupled depths:
- Teacher depth : execution whose behavior is retained as supervision
- Training depth : recurrent computation through which supervision acts
- Inference depth : depth at which updated computation is reused
Supervision construction: For a prompt , greedy decoding at teacher depth produces:
Training objective (completion-only next-token likelihood):
Only the shared recurrent core is updated; all other parameters (including injection projection) remain fixed.
Empirical Validation / Results
Main Results: Mathematical Reasoning
Table 1: Accuracy before/after write-back across recurrent depths
| Model | GSM8K (m) | GSM1K (m) | SVAMP (m) | Avg. vs. control |
|---|---|---|---|---|
| Non-looped control | 44.05 | 39.83 | 56.50 | - |
| Mean depth 4 | 56.18 (+27.5%) | 51.12 (+28.3%) | 63.30 (+12.0%) | +26.5% |
| + Self-distillation | 62.70 (+42.3%) | 54.36 (+36.5%) | 64.70 (+14.5%) | +34.9% |
| Mean depth 8 | 56.33 (+27.9%) | 52.53 (+31.9%) | 66.00 (+16.8%) | +39.9% |
| + Self-distillation | 62.85 (+42.7%) | 56.02 (+40.6%) | 65.20 (+15.4%) | +43.6% |
| Mean depth 32 | 57.01 (+29.4%) | 53.36 (+34.0%) | 67.70 (+19.8%) | +34.0% |
| + Self-distillation | 62.09 (+41.0%) | 54.36 (+36.5%) | 65.70 (+16.3%) | +46.2% |
Key findings:
- Write-back increases accuracy in 15 of 18 model–benchmark comparisons at mean depths
- Final models achieve 34.9–46.2% mean relative gains over non-looped control
- On GSM8K, mean-depth-4 improves from 40.86% (1 pass) to 56.18% (4 passes) to 62.70% (after write-back)
Learning Depth Matters
Table 4: Single-pass vs. full-depth learning
| Model | Teacher | Training | GSM8K (m) | GSM1K (m) | SVAMP (m) |
|---|---|---|---|---|---|
| Mean depth 4 | 4 | 1 | 62.70 (+11.6%) | 54.36 (+6.3%) | 64.70 (+2.2%) |
| 4 | 4 | 56.86 (+1.2%) | 51.04 (-0.2%) | 62.20 (-1.7%) | |
| 4 | 4† (last pass only) | 56.63 (+0.8%) | 49.96 (-2.3%) | 61.30 (-3.2%) |
Gradient analysis explains the advantage:
- One-pass learning places loss directly on first-pass state
- With four-pass learning, gradient at first-pass state has only 7.3% of the norm of direct one-pass gradient and cosine similarity 0.009
- First and fourth applications account for 5.4% and 59.1% of per-pass gradient norms under four-pass learning
Pass-Wise Interventions
Table 3: Using updated block at different passes (GSM8K, 4-pass inference)
| Pass 1 | Pass 2-4 | Accuracy (%) |
|---|---|---|
| ✗ | ✗ | 56.18 |
| ✓ | ✗ | 56.25 (+0.1%) |
| ✗ | ✓ | 62.47 (+11.2%) |
| ✓ | ✓ | 62.70 (+11.6%) |
The later-pass replacement recovers 6.29 of 6.52 points of the fully updated model's gain.
Recipe Dependence
Table 5: Input injection matters
| Injection | Training depth | GSM8K gain | GSM1K gain | SVAMP gain |
|---|---|---|---|---|
| ✓ | 1 | +11.6% | +6.3% | +2.2% |
| ✓ | 4 | +1.2% | -0.2% | -1.7% |
| ✗ | 1 | +3.1% | +0.0% | -3.7% |
| ✗ | 4 | -0.1% | +3.1% | +0.5% |
With input injection, one-pass learning wins; without it, four-pass learning is comparable or better.
Transfer Across Model Families
Table 6: Write-back on public looped checkpoints (GSM8K)
| Model | m | Depth 1 gain | Depth m gain |
|---|---|---|---|
| Mean depth 4 (ours) | 4 | +4.6% | +7.7% |
| Retro-OLMo | 16 | +15.2% | +6.0% |
| Retro-LLaMA | 8 | +25.7% | +5.3% |
| Huginn (3.5B) | 32 | N/A (0→1.59) | +0.9% |
| LoopUS | 8 | +73,300% (0.08→55.65) | -0.3% |
| Ouro | 4 | +47.8% | -3.1% |
Non-Mathematical Capabilities Retained
Table 8: OLMES 17-task average
| Model | All (17) |
|---|---|
| Non-looped control | 53.94 |
| Mean-depth-4 Looped LM | 56.88 (+6.3%) |
| + Self-distillation | 57.02 (+6.9%) |
| Mean-depth-8 + Self-distillation | 57.09 (+7.1%) |
| Mean-depth-32 + Self-distillation | 56.40 (+5.6%) |
Write-back changes the 17-task average by less than 0.2 percentage points for each model.
Theoretical and Practical Implications
Theoretical Implications
-
Depth-induced preferences as learnable signal: The paper demonstrates that deeper recurrent execution produces preference changes that serve as useful training signal—a form of "learning from one's own computation."
-
Decoupling behavior exposure from incorporation: Separating teacher depth (), training depth (), and inference depth () reveals that the computational path connecting supervision to parameters matters as much as the supervision itself.
-
Gradient analysis explains shallow-learning advantage: Full-depth training dilutes and redirects gradients away from early-pass states (cosine similarity 0.009 to direct one-pass gradient), explaining why single-pass learning is more effective with input injection.
-
Recipe-dependent learning: The advantage of shallow learning depends on whether input injection is used, linking how recurrent computation is developed to how it can be improved.
Practical Implications
-
Efficient self-improvement: Models can improve their reasoning without reference answers, correctness filtering, or external supervision—only their own deeper executions.
-
Parameter-efficient updates: Only the shared recurrent core is updated (4 of 16 blocks), keeping the rest of the model frozen.
-
Cross-model applicability: The method transfers to diverse looped architectures (fixed-injection, gated, non-injected), suggesting broad utility.
-
Test-time compute scaling: The approach enhances the value of inference-time computation, complementing serving efficiency gains of looped models.
Conclusion
The paper demonstrates that once a model learns to benefit from recurrent depth, its own deeper executions can provide supervision for further learning. Key takeaways:
-
Preference write-back improves both one-pass and multi-pass accuracy across six mathematical reasoning benchmarks, with mean relative gains up to 46.2% over non-looped controls.
-
Single-pass learning outperforms full-depth learning on the same targets in input-injected models, with gradient analysis revealing that deeper training dilutes the signal reaching early-pass states.
-
Shallow-learned updates remain useful at later recurrent passes, recovering nearly the entire four-pass gain when applied only at passes 2–4.
-
The advantage of shallow learning depends on the recurrent recipe, connecting the development of recurrent computation to its subsequent improvement.
Future Directions
The findings open up broader questions about how behavior emerging during recurrent computation development can guide continued learning, including:
- What other behaviors beyond preference refinement emerge with depth
- How to design recurrent recipes that maximize learnability from depth-induced behavior
- Whether these mechanisms scale to larger models and more diverse tasks
Related papers
- Looped Models are Fast Multi-Token Predictors
Floodgates achieves up to 7.5x lossless decoding speedup on looped language models by using a single loop with low-rank adapters to draft multiple future tokens in parallel.
- Unlocking the Power of Loops in Pretrained LLMs with Loop Residuals
LoopRes finetunes pretrained LLMs into looped Transformers, adding loop-aware keys and residual windows to boost math and code scores by up to 29.1% over SFT.
- You don't need long context
Compaction and selective input reading let frontier models match full-context accuracy on long-context benchmarks while cutting context length and cost by up to 233x.