Full text not available for this paper
Summary (Overview)
- LoopFold is a novel method for parallelizing recurrent depth in looped Transformers, folding computation at multiple recurrent depths into parallel batches for the same token prefix.
- A lightweight predictor estimates inputs to later loops so they can start before earlier loops finish, while a corrector refines outputs using newly available earlier-loop results.
- At target depth index , LoopFold achieves 46% lower decoding latency than a nine-loop vanilla model, requiring only five sequential stages instead of nine.
- Deeper LoopFold configurations achieve progressively higher mean zero-shot accuracy, rising from 53.41% to 56.38% across eight tasks, while vanilla looped models and PLT show limited gains.
- All components are trained jointly using only the final next-token prediction loss, with no auxiliary objectives.
Introduction and Theoretical Foundation
Background and Motivation
Looped Transformers increase computation per token by repeatedly applying a shared backbone, improving language modeling and downstream task performance at a fixed backbone parameter count. However, each loop depends on the preceding loop's output, creating a fundamental trade-off:
- Greater recurrent depth → better performance but higher decoding latency
- Parallel approaches (e.g., PLT) → reduced latency but diminishing marginal accuracy gains at larger depths
The core challenge: How can later loops start before their inputs are available while still incorporating the results of earlier loops?
Theoretical Foundation
LoopFold draws inspiration from:
- Universal Transformers (Dehghani et al., 2019) – recurrent-depth architectures with shared backbone
- Parallel Loop Transformers (PLT) (Wu et al., 2025) – pipelining loop depths across token positions
- Parareal (Lions et al., 2001) – classical parallel-in-time methods using fine/coarse propagators
- Recurrent-depth parallel samplers (Geiping et al., 2025b) – parallel draft refinement
Unlike classical Parareal which iteratively seeks to recover the sequential fine solution, LoopFold learns a fixed-stage parallel computation optimized directly for next-token prediction. Its objective is not to match the sequential recurrent trajectory, but to produce predictive states under a constrained number of sequential stages.
Methodology
Architecture Overview
Let be the input embeddings and be the shared causal Transformer backbone. Sequential states satisfy:
A schedule uses one initial backbone evaluation followed by stages of parallel evaluations, where:
- = parallel width
- = total stage count
- = target depth index
1. Predicting Inputs for Later Loops
After computing , the state change is used as an initial increment. A shared token-wise linear map transforms this increment:
For , this reduces to linear extrapolation: .
2. Parallel Evaluation and Correction
At each stage , states are batched and evaluated in parallel:
The corrector then refines outputs in depth order using a shared token-wise linear map :
3. Training Objective
The deepest state produces next-token logits:
Both maps are parameterized as with initialized to zero, adding only parameters (8.39M at 1.4B).
Computational Cost
| Model | Target depth index | Backbone evaluations | Sequential stages | Width |
|---|---|---|---|---|
| Vanilla looped model | 1 | |||
| LoopFold |
Empirical Validation / Results
Experimental Setup
- Models: 1.4B parameters trained from scratch on the Pile (30B tokens)
- Ablations: 410M models trained on 25B tokens
- Baselines: Vanilla looped models, PLT, Hidden Decoding
- Metrics: Pile validation perplexity, zero-shot accuracy on 8 tasks
Key Results
1. Quality vs. Training Compute (Matched Budgets)
At training compute of 1.68 and 2.16 ZFLOPs, LoopFold achieves lower PPL and higher mean zero-shot accuracy than vanilla looped models:
| Model | Training (ZFLOPs) | Avg-8 Accuracy |
|---|---|---|
| Vanilla Looped | 1.68 | 54.20% |
| LoopFold () | 1.68 | 54.71% |
| Vanilla Looped | 2.16 | 54.18% |
| LoopFold () | 2.16 | 55.13% |
2. Quality vs. Decoding Latency (Comparable Latency)
At matched decoding latency, LoopFold outperforms vanilla looped models in all three pairs:
| Model | Latency (ms/token) | Avg-8 Accuracy |
|---|---|---|
| Vanilla Looped | 73.11 | 51.98% |
| LoopFold | 74.41 | 53.41% |
| Vanilla Looped | 98.40 | 53.31% |
| LoopFold | 98.66 | 55.23% |
| Vanilla Looped | 122.88 | 53.69% |
| LoopFold | 121.68 | 56.38% |
3. Throughput with Larger Batches
At , LoopFold achieves 1.61–1.65× throughput compared to vanilla looped models across batch sizes 1–16.
4. Ablation Studies (410M models)
| Variant | Pile PPL ↓ | ΔPPL |
|---|---|---|
| Full LoopFold | 9.13 | – |
| No prediction | 9.29 | +0.16 |
| No correction | 9.47 | +0.34 |
Both components improve PPL; removing correction has the larger penalty, highlighting its importance.
Theoretical and Practical Implications
Theoretical Contributions
-
Decoupling recurrent depth from sequential depth: LoopFold demonstrates that recurrent depth and sequential decoding depth need not coincide—additional recurrent computation can be shifted onto the parallel dimension with proper correction mechanisms.
-
Learned parallel refinement: Unlike classical Parareal which seeks to recover the sequential solution, LoopFold learns a fixed-stage parallel computation optimized directly for next-token prediction, suggesting that minimizing instantaneous distance to the sequential trajectory is not necessary for good parallel refinement.
-
Component analysis: The predictor and corrector play complementary roles—the predictor provides reasonable initializations while the corrector propagates newly available information across parallel states.
Practical Implications
- Latency reduction: 46% lower decoding latency at while improving accuracy by 2.20 percentage points.
- Scalability: Throughput gains remain stable (1.61–1.65×) across batch sizes, making LoopFold practical for production deployment.
- Memory trade-offs: KV sharing can reduce cache storage from 7× to 5× with modest quality/latency trade-offs (Hard overwrite-64: PPL 7.63 vs. 7.62 baseline).
Conclusion
LoopFold introduces a principled approach to parallelizing recurrent depth in looped Transformers through:
- Predicted inputs to enable early start of later loops
- Corrected outputs to incorporate newly available earlier-loop results
- Joint training with only the final next-token prediction loss
The method achieves lower PPL and higher zero-shot accuracy at matched training compute and comparable decoding latency, with the key insight that recurrent depth and sequential decoding depth can be decoupled.
Future Directions
- Reducing computational overhead (additional FLOPs from parallel evaluations)
- Further optimizing KV-cache memory costs
- Preserving the benefits of parallel recurrent evaluation while minimizing resource requirements
Related papers
- When Agents Fail: Model or Harness—Who's to Blame?
Agent benchmark scores measure model-harness pairs jointly, not model capability alone; harness choice can reverse model rankings.
- Adaptive-Depth Is a Finishing Stage
Fixed-first training cuts adaptive-depth transformer training compute by 30-45% with negligible quality loss by reserving full-depth updates for a brief final phase.
- AgenticEvolve: Evolutionary Program Search with Persistent Language Model Agents that Design and Run Experiments
AgenticEvolve, where persistent LLM agents run self-designed experiments between evaluations, consistently outperforms baselines in heuristic design and symbolic regression while keeping costs under a few dollars per run.