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:
- 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."
- 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 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.
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