TL;DR
Looped Transformers "think" silently by running hidden representations through the same layers multiple times, much like turning a math problem over in your head. Currently, they waste energy by spending the exact same effort on easy and hard parts of a problem alike. SwiftLoop introduces a lightweight inference-time mechanism that selectively "freezes" internal slots the moment they have done their job—delivering up to 2.48× real-world speedups while maintaining reasoning accuracy.
What Problem Does This Paper Address?
Explicit Chain-of-Thought (CoT) reasoning—having an LLM write out its step-by-step thoughts—is powerful, but generating hundreds of intermediate words is slow. Implicit reasoning swaps those readable words for continuous vector states ("latent slots") inside the model. To make implicit reasoning smart enough to rival explicit CoT, researchers turn to Looped Transformers, which repeatedly pass a workspace of latent slots through shared layers to refine an answer without adding parameters.
Here is the catch: existing looped models are rigid. Whether asked 2 + 2 or a six-step algebra word problem, they loop the exact same number of times and update every single latent slot on every pass.
Why not just stop updating a slot once its vector stops changing from one loop to the next? As the authors show, looking backward is a trap: 58% of slots that look locally stable suddenly drift in later loops, and conversely, 63% of slots that drift wildly later on barely affect the final answer anyway. We need a way to look forward—predicting when further updates are truly pointless.
Methods
Instead of modifying or retraining the base Transformer, SwiftLoop bolts on tiny predictors (simple linear layers or 1-layer MLPs) that watch the model at inference time and perform position-wise freezing.
After each recurrent pass, the predictor looks at each active slot's current hidden state and its recent change, outputting a "freezing score." If the score crosses a threshold, that slot is frozen: it skips all future compute updates, while its cached Keys and Values (K/V) remain sitting in memory so other still-thinking slots can attend to them.
Because an online predictor can't see the future at test time, the authors train it offline using hindsight-guided supervision—running full, unfrozen loops on a calibration set to see what actually mattered, then teaching the predictor to spot those patterns early. They explore two distinct definitions of "done":
- K/V Reusability (Internal Level): Measures how much a slot's K/V cache would drift in remaining loops if left unfrozen. Low future drift means it is safe to freeze now.
- Functional Impact (Output Level): Measures how much freezing a slot alters the final answer's confidence (logit margin). Computing this by freezing one slot at a time is prohibitively slow during calibration, so the authors introduce a clever Joint-path Integrated Gradients (IG) trick to estimate every slot's output impact simultaneously in just a few backward passes.
Datasets
No new benchmarks are introduced. The authors evaluate across two distinct regimes:
- Implicit Math Reasoning: Base LOTUS models are fine-tuned on GSM8K-Aug, SwiftLoop predictors are calibrated on 500 GSM8K validation problems, and tested on GSM8K plus three out-of-distribution math benchmarks: SVAMP, MultiArith, and GSM-Hard.
- Recurrent Prompt Prefilling: General looped language models (Ouro-1.4B and Huginn-3.5B) are calibrated and evaluated on commonsense and reasoning splits: ARC-Challenge, HellaSwag, and WinoGrande.
Key Insights and Ideas
- Local calm before the storm: Relying on recent vector convergence (a common heuristic in early-exit literature) fails in looped transformers because internal states routinely plateau for a step before shifting again—and raw hidden-state norms shoot up in later loops regardless of whether the prediction is already settled.
- Internal drift $\neq$ output relevance: A latent vector changing dramatically inside the network doesn't mean the final token probabilities care. Separating representational stability (K/V reusability) from predictive consequence (functional impact) gives practitioners two complementary dials to turn depending on model architecture.
- Emergent difficulty awareness: SwiftLoop is never told how hard a math problem is. Yet at test time, its local, slot-by-slot freezing decisions naturally allocate more loops to problems requiring more reasoning steps.
Key Results
- Drastic compute cuts without brain drain: On LOTUS-1B (CODI-style), IG-supervised SwiftLoop cuts recurrent loop updates by 70% (dropping from 6.00 to 1.80 average loops per slot) on GSM8K while keeping accuracy within 0.46 points (58.83% vs. 59.29%). At equal FLOPs, SwiftLoop beats fixed-loop inference on GSM8K by up to 9.1 accuracy points.
- Outperforming adaptive baselines: Across all 12 implicit reasoning model–benchmark pairs, SwiftLoop uses fewer loops than every tested adaptive baseline (including FlashLoop, H2O, LazyLLM, and CALM), staying within 0.5% of full-compute accuracy in 11 of 12 cases.
- Generalizes beyond latent slots: Applied to standard context tokens during prompt prefilling on Huginn-3.5B, K/V reusability slashes recurrent steps from 32 down to ~12.4–14.1 (a 56–61% reduction) with less than a 0.17% accuracy dip.
- Real wall-clock speedups: Theoretical FLOP savings translate to actual hardware acceleration, yielding 1.76×–2.48× end-to-end speedups on LOTUS-1B, 1.07×–1.50× on LOTUS-3B, and 1.43×–1.86× on Ouro/Huginn prefilling.
Limitations and Future Work
Not discussed in the paper. (Note: While the main text notes practical setup constraints—such as fitting separate predictors and thresholds per model/task on calibration splits, and exact counterfactual rollouts being computationally expensive compared to their IG approximation—an explicit Limitations and Future Work discussion is not included in the main body of the paper.)
Summary updated