Unlocking the Power of Loops in Pretrained LLMs with Loop Residuals

Xuanlei Zhao, Hailun Xu, Kai Wang, Yang Luo, Yingxuan Ren, Zirui Zhu, Yuxuan Lou, Kun Xu, Yan Wang, Kanchan Sarkar, Yang YouarXiv 2026

Ever feel like you need to re-read a difficult sentence a few times before it finally clicks? You aren’t adding new neurons to your brain; you’re just reusing the ones you have to process the same information more deeply.

In the world of Large Language Models (LLMs), we usually do the opposite: if we want more "thinking power," we build a bigger model with more layers and more parameters. But what if we could just let a smaller, pretrained model "loop" through its own layers to think harder?

That’s the core idea behind LoopRes. The authors have found a way to take existing, off-the-shelf LLMs and finetune them to reuse their own layers, achieving massive performance gains without adding a single parameter.

TL;DR

LoopRes allows pretrained LLMs to "think longer" by iterating through a shared block of layers multiple times. By introducing "loop-aware keys" to help the model distinguish between different iterations and a "residual window" to keep the computation focused, it achieves up to a 29% performance boost on reasoning tasks, effectively allowing a 4B model to punch in the weight class of an 8B model.

What Problem Does This Paper Address?

We know that deeper models generally perform better, but they are expensive to train and run. "Looped Transformers"—which reuse the same weights over and over in a single forward pass—offer a tantalizing alternative: infinite depth with a finite memory footprint.

However, there’s a catch. Historically, these models had to be trained from scratch, which is prohibitively expensive. When researchers tried to finetune existing pretrained models into loops, the gains were marginal.

Why? Because as a model loops, the hidden states of the 1st iteration and the 10th iteration start to look very similar. The model gets "confused," unable to distinguish where it is in its "thought process." Furthermore, standard attention mechanisms struggle to handle the growing number of inputs as the loop count increases.

Methods

The authors propose LoopRes, which builds on a technique called Attention Residuals (AttnRes). In a standard looped model, loop $t$ only sees the output of loop $t-1$. In LoopRes, each layer can "look back" at the outputs of previous loops.

To make this work, they introduced two key innovations:

  1. Loop-aware Keys: Since the iterates of the same layer are content-wise very similar, LoopRes adds a trainable, structural "key" to each loop. Think of this as a timestamp or a loop counter that tells the model, "This is what you thought during the third pass."
  2. Residual Window ($W$): Instead of attending to every previous loop (which becomes computationally heavy and allows the model to "skip" steps), LoopRes restricts each layer to a window of the most recent $W$ loops. This forces the model to build its reasoning incrementally, step-by-step.
The LoopRes architecture compared to standard looping and AttnRes.

The architecture splits the model into a prelude (initial layers run once), a core (the looped block), and a coda (final layers run once).

Datasets

The researchers put LoopRes through its paces across several demanding math and code benchmarks:

  • Math: MATH500, AIME25/26, AMC23, OlympiadBench, and IMO-AnswerBench.
  • Code: HumanEval+, MBPP+, and LiveCodeBench v6.
  • Backbones: They tested on the Qwen3 family (1.7B to 30B), Qwen3.5-2B, and Llama-3.2-1B.

Key Insights and Ideas

  • The Identity Crisis: The paper identifies that "similar iterates" are the primary reason finetuned loops fail. Without loop-aware keys, the model's attention mechanism can't tell the difference between early and late stages of reasoning.
  • Test-Time Scaling: LoopRes provides a new axis for scaling. Instead of just scaling model size (parameters) or data, we can scale loop depth. As you give the model more "thinking budget" (TFLOPs per response), LoopRes scales much more steeply than standard finetuning (SFT).
  • Efficiency via Fusion: To prevent the "look-back" mechanism from slowing down the model, the authors developed a custom Triton kernel that fuses the attention operations, keeping the training overhead to a negligible +4.8% in time.

Key Results

The results are, frankly, startling.

  • Beating the Baseline: On Qwen3-1.7B at 2× compute (looping the core 3 times), LoopRes improved the average score by 29.1% over standard finetuning. This more than doubled the gains of previous state-of-the-art looping methods.
  • Bridging the Gap: A Qwen3-4B model equipped with LoopRes actually surpassed the performance of a standard 8B model on average scores.
  • Steeper Scaling: As shown in Figure 1, LoopRes doesn't just start higher; it climbs faster. As the "thinking budget" increases, the gap between LoopRes and standard models widens significantly.
Figure 1. Average scores across compute budgets and backbones. Average scores on seven math and code benchmarks, where SFT is the same model finetuned without looping. (a) Qwen3-1.7B-Base at 2× (light) and 4× (dark) compute, with SOTA the best baseline at the same compute. (b) Scores against decode compute as the thinking budget grows from 1K to 30K tokens. (c) The same sweep on Qwen3-4B-Base and Qwen3-8B-Base over five math and code benchmarks.

Limitations and Future Work

While LoopRes is a powerhouse for math and code, the authors note a few areas for further exploration:

  • General Tasks: The evaluation focused heavily on reasoning (math/code). How well this translates to creative writing or general instruction following remains to be seen.
  • Reinforcement Learning (RL): The current work uses Supervised Finetuning (SFT). Combining LoopRes with RL (like the methods used in OpenAI's o1) could potentially unlock even higher reasoning ceilings.
  • Adaptive Looping: Currently, the number of loops is fixed. A future version could allow the model to decide for itself when it has "thought enough" and exit the loop early for simple questions.

Summary updated

Abstract

Looped Transformers iterate a shared block of layers to increase computation without adding parameters, offering stronger performance and test-time scaling. However, this power has so far required training from scratch and yielded only modest gains for LLMs. Finetuning existing models into loops is far cheaper, yet also brings only marginal gains over SFT. We propose LoopRes, an effective, scalable, and simple approach that turns loops into significant and consistent gains for pretrained LLMs. Building on Attention Residuals, LoopRes lets each looped layer attend directly to the outputs of earlier loops. Since these outputs are iterates of the same layers and become harder to tell apart, we give each a trainable loop-aware key that encodes its structural identity. Attending to all earlier loops also lets layers skip intermediate ones, so we restrict each layer to a residual window of the latest W loops, forcing every loop to build incrementally on recent ones. Across 6 pretrained LLMs from 3 model families and 9 benchmarks, LoopRes delivers significant and consistent gains: at 2x compute, it improves Qwen3-1.7B-Base by 29.1% over SFT, more than doubling the gain of the state-of-the-art baseline. The gains hold on larger models up to 30B and across all three families. More importantly, from 1.7B to 8B, LoopRes scales more steeply than SFT as compute grows, reaching a higher ceiling while needing less compute on long outputs. These results establish LoopRes as an effective looping approach, delivering both better performance and better test-time scaling.
BibTeX
@misc{zhao2026unlocking,
  author = {Xuanlei Zhao and Hailun Xu and Kai Wang and Yang Luo and Yingxuan Ren and Zirui Zhu and Yuxuan Lou and Kun Xu and Yan Wang and Kanchan Sarkar and Yang You},
  title = {{Unlocking the Power of Loops in Pretrained LLMs with Loop Residuals}},
  year = {2026},
  eprint = {2611.31094},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.31094},
}
Figure