arXiv(opens in a new tab)cs.LGOct 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2610.02185

Decoding Looped Transformers Better for (Almost) Free

Weihao Liu, Huangjie Zheng, Tianrong Chen, Rohit Dilip, Richard He Bai, Yizhu Jiao, Yuyang Wang, Ruixiang Zhang

ABSTRACT

Looped Transformers achieve parameter efficiency by repeatedly executing a shared block across recurrent loops. Each loop yields an intermediate representation decodable for the same next token, yet standard decoding discards earlier states. Because earlier loops embody less computation, recurrence inherently supplies aligned weak-and-strong prediction pairs without auxiliary models or external training. We introduce LoopCD, a training-free contrastive decoding framework that guides token selection by contrasting the final prediction with an earlier recurrent pass, operating either in logit space with one extra output pass (LoopCD-Logits) or in hidden-state space with zero output overhead (LoopCD-Hidden). Across four looped Transformer families, LoopCD delivers substantial, consistent gains at full recurrent depth: LoopCD-Logits raises Ouro-2.6B-Thinking's AIME 2024 pass@1 from 61.88% to 73.33%, while LoopCD-Hidden lifts Huginn's HumanEval pass@1 from 22.56% to 31.71%. Crucially, these performance gains enable halving the number of recurrent loops while still matching or exceeding full-depth unguided baselines, reducing forward FLOPs by 22.5% to 48.2%. By transforming intermediate recurrent states into effective guidance signals, LoopCD achieves superior decoding quality while substantially reducing inference compute.

CORRESPONDENCE Weihao Liu (wliu681@uic.edu; work done at Apple internship) Ruixiang Zhang (ruixiangz@apple.com)

the same block, applied R times

LoopCD guides the final prediction with an earlier one

a

Figure

b LoopCD is better at the same depth

baseline

gain under LoopCD

AIME 2024 Ouro-2.6B Thinking

AIME 2024 Ouro-1.4B Thinking

HumanEval Huginn R=32

HumanEval Huginn R=16

HumanEval Ouro-2.6B

ARC-Challenge Parcae-370M

HellaSwag Parcae-1.3B

MBPP Looped-Qwen3

Figure

c LoopCD is as good at half the iterations

Figure

forward TFLOPs, analytic (log axis, one segment per model)

FIGURE 1 LoopCD lets an earlier loop guide the final one: more accuracy at full depth, less compute at half.

a LoopCD reads an earlier state through the same output layers and uses it to guide the final prediction.

b Accuracy at full depth without LoopCD (hatched) and the gain with it (solid), for eight model and benchmark pairs; Huginn at R = 32 uses hidden-state guidance.

c Seven-benchmark mean against forward compute, on a log axis broken into one segment per model: the unguided model at full depth (hatched) and LoopCD at half the iterations (filled), with the compute saved; all six settings are in Figure 4.

Introduction

1 Introduction

Looped Transformers offer an appealing architecture for language modeling and reasoning by decoupling depth from parameter count: they repeatedly execute a block of shared layers, allowing effective computation to scale with recurrent iterations without increasing parameter count (Dehghani et al., 2019; Zhu et al., 2025a; Geiping et al., 2025; Prairie et al., 2026). During generation, the model refines its representation across several recurrent passes before emitting a token. Existing methods focus exclusively on the state emitted by the final iteration. However, each intermediate pass also produces a hidden state that can be decoded into a valid token distribution, which standard decoding typically discards.

Contrastive decoding guides a strong predictor away from an aligned weaker reference (Li et al., 2023). Similar principles appear in diffusion models, where autoguidance improves sample fidelity by contrasting against a degraded version of the same network (Karras et al., 2024). In standard language models, obtaining an aligned weak predictor typically requires an auxiliary smaller model, a perturbed context, or an intermediate layer (Li et al., 2023; Shi et al., 2023; Chuang et al., 2024). In contrast, because a looped Transformer repeatedly executes a shared parameter block over depth, each iteration adds compute while operating in the same representation space. The recurrent trajectory thus inherently produces an aligned weak-to-strong prediction pair for the same prefix, without auxiliary models or modified prompts.

We introduce LoopCD, which turns this weak-to-strong trajectory into a direct inference-time decoding method. Because looped Transformers execute the same shared layer block repeatedly, intermediate states lie in the same semantic representation space as the final state and can be decoded by the shared output head. LoopCD contrasts the final prediction with the first iteration to guide token selection along the direction of recurrent refinement, requiring no additional training and no extra recurrent loops. We present two variants of this method: LoopCD-Logits, which evaluates both states through the output layers with one extra output pass, and LoopCD-Hidden, which combines the representations in hidden-state space before the output layers to preserve a single output pass with no extra overhead. We evaluate both representation spaces under two guidance schemes: fixed guidance strength as well as a token-level adaptive guidance method that dynamically scales guidance with prediction uncertainty.

Our experiments demonstrate that LoopCD provides substantial, consistent gains across two distinct computational regimes. At full recurrent depth, LoopCD delivers improvements across all four evaluated model families—Ouro (Zhu et al., 2025a), Huginn (Geiping et al., 2025), Parcae (Prairie et al., 2026), and Looped-Qwen3 (Chen et al., 2026)—spanning mathematical reasoning (AIME, OlympiadBench), code generation (HumanEval, MBPP), and multiple-choice benchmarks (MMLU, ARC). LoopCD-Logits lifts Ouro-2.6B-Thinking's (Zhu et al., 2025a) AIME 2024 pass@1 from 61.88% to 73.33% (Figure 1), while in hidden space, LoopCD-Hidden achieves these gains with zero output overhead, raising Huginn's HumanEval pass@1 from 22.56% to 31.71%. Crucially, these substantial performance gains enable reducing the number of recurrent iterations: operating at only half the recurrent depth, LoopCD still matches or exceeds the unguided full-depth baseline across evaluated model families, reducing forward FLOPs by 22.5% to 48.2%.

Summary of contributions. This work makes three primary contributions. First, building on the observation that looped Transformers inherently generate aligned weak-and-strong representations across recurrent depth, we propose LoopCD, a training-free contrastive decoding method requiring no auxiliary models or external training. Second, we establish two guidance spaces, showing that LoopCD-Hidden combines representations before the coda layers to eliminate extra output projection overhead while preserving accuracy gains. Third, we demonstrate across four model families that LoopCD consistently improves reasoning and generation at full recurrent depth, and that these substantial gains enable halving recurrent iterations while matching or exceeding full-depth baseline accuracy, reducing forward FLOPs by 22.5% to 48.2%.

References (100)

Couldn't load all references. Reload the page to try again.