LoopSpec: Pipelined Self-Speculative Decoding for Looped Transformers

SangLyul Cho, Langqing Cui, Sehoon Kim, Dongsu Han, Insu HanarXiv 2026

TL;DR

LoopSpec is a training-free, self-speculative decoding framework designed to accelerate Looped Transformers by turning recurrent depth into token-position parallelism. By pipelining draft tokens from early recurrent states and introducing a selective second proposal with a gating mechanism, it achieves up to a 6.83$\times$ inference speedup losslessly and without any extra parameter overhead.

What Problem Does This Paper Address?

Looped Transformers have emerged as a powerful, parameter-efficient architecture. Instead of stacking dozens of unique layers, they repeatedly apply a shared stack of Transformer blocks across recurrent depths. This allows a compact model to match or exceed the performance of much larger standard Transformers on complex reasoning tasks.

However, this parameter efficiency comes with a major execution bottleneck: at every single recurrent depth, the model must repeatedly fetch the exact same weights from memory. This makes the decoding phase heavily memory-bandwidth bound, leading to high inference latency.

While speculative decoding (using a smaller "draft" model to predict tokens ahead of time) can alleviate latency, it typically requires training a separate drafter model, introduces potential distribution mismatches, and consumes extra memory. LoopSpec addresses this by turning the Looped Transformer's inherent recurrent structure into its own self-contained, training-free drafting system.

Figure 2: Overview of a Looped Transformer with R = 4 recurrent steps. In Ouro models (Zhu et al., 2025), the pre-layers P and post-layers C contain only the Embedding layer and LM Head, respectively, whereas in Raven models (McLeish et al., 2026) both P and C contain several Trans- former layers.

Methods

LoopSpec introduces a pipelined self-speculative decoding framework that operates via the following core mechanisms:

  • Pipelined Self-Speculation: Instead of waiting for all $R$ recurrent steps to finish for a single token, LoopSpec reads out a draft token at an early depth $d_1 < R$. It immediately spawns a "child branch" to start computing the next token, effectively overlapping future token generation with the current token's final verification at depth $R$.
  • Residual Second Proposal: If the first draft is rejected during final verification, LoopSpec avoids a full pipeline stall by utilizing a second proposal from a deeper recurrent depth $d_2$. Crucially, this second proposal is sampled from a residual distribution ($q_2 = p_{d_2} \ominus p_{d_1}$) to specifically target the token space missed by the first proposal.
  • Gating Mechanism: To prevent an exponential explosion of parallel active branches (which would bloat compute overhead), LoopSpec employs a gating mechanism. It only opens the gate to create a fallback branch if the deeper recurrent state withdraws confidence from the first draft.
  • Optimal Depth Derivation: The authors mathematically derive the optimal proposal depths ($d_1^*, d_2^*$) in closed form by modeling the total variation (TV) distance decay between intermediate states and the final target distribution as a power law.
LoopSpec Pipelining Overview

Datasets

The framework was comprehensively evaluated across standard benchmarks spanning mathematical reasoning, general reasoning, and code generation:

  • GSM8K & MATH-500 (including Chain-of-Thought reasoning variants)
  • Big-Bench Hard (BBH)
  • HumanEval+ & MBPP+
  • AIME 2024 & AIME 2025 (for advanced math reasoning)

Key Insights and Ideas

  • Recurrence as Natural Refinement: The authors observe that intermediate recurrent states in Looped Transformers naturally form a sequence of increasingly refined proposals. Early states are surprisingly accurate—for instance, depth-1 greedy agreement exceeds 86% on GSM8K—making them excellent built-in drafters.
  • The Power of the Residual: Sampling the second proposal from the residual distribution ensures that the fallback branch is highly effective at correcting early errors without worsening the theoretical rejection bound.
  • Gating for Hardware Efficiency: Unconditionally spawning multiple proposals would increase the effective batch size and waste compute. The gating mechanism ensures hardware resources are only spent on alternative branches when the model itself exhibits uncertainty.
Figure 3: Comparison between intermediate proposals at depth r and the target distribution at depth R = 32 for Raven-Llama-3.2. (a) Greedy top-1 agreement on GSM8K and MATH-500. (b) Sam- pling (T = 1.0, top-p = 0.7) total variation (TV) distance to the target on the same benchmarks. TV is obtained on 10 depths over GSM8K and MATH-500, averaged per token position on top-p distribution. ϕ(r) is the empirical power-law upper envelope for the TV distance, constructed as described in Section 4.1.

Key Results

  • Substantial Speedups: LoopSpec achieves up to 6.83$\times$ lossless speedup on the Raven-TinyLlama-3T model and up to 3.36$\times$ on the Ouro family.
  • Outperforming Training-Based Methods: LoopSpec consistently outperforms DFlash (a state-of-the-art training-based speculative decoding method) by up to 1.7$\times$ on decoding time, completely bypassing the need for extra training data or parameters.
  • High Token Commitment from Early Depths: Empirical analysis shows that the first proposal accounts for over 86% of committed tokens, while the second proposal successfully recovers the majority of the remaining rejections, leaving less than 3% of tokens requiring a full pipeline restart.

Limitations and Future Work

  • Pre/Post Layer Overhead: Choosing a very shallow first proposal depth ($d_1$) triggers frequent drafting and branch initialization. In models with heavy pre- and post-processing layers (such as the Raven family), this initialization overhead can sometimes diminish or outweigh the recurrent step savings.
  • Future Directions: The authors suggest exploring dynamic or adaptive proposal depth configurations that can adjust on-the-fly based on token difficulty, alongside further optimizations for branch-wise KV cache management to minimize memory footprints during massive parallel branching.

Summary updated

BibTeX
@misc{cho2026loopspec,
  author = {SangLyul Cho and Langqing Cui and Sehoon Kim and Dongsu Han and Insu Han},
  title = {{LoopSpec: Pipelined Self-Speculative Decoding for Looped Transformers}},
  year = {2026},
  eprint = {2609.17184},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.17184},
}
Figure