LoopRes: Doubling the Computational Efficiency of Pretrained LLMs Through Looped Computation

LoopRes turns looped computation into significant and consistent performance gains for pretrained LLMs through loop-aware keys and residual windows.
LoopRes is an efficient fine-tuning method that applies looped Transformers to pretrained LLMs. To address the issues that looped computation previously required training from scratch and yielded limited gains for LLMs, LoopRes builds on Attention Residuals, introducing trainable loop-aware keys for each loop output to distinguish different iterations, and limiting each layer to attend only to the most recent W loops (residual window) to avoid information skipping. Experiments on 6 pretrained LLMs and 9 benchmarks show that LoopRes improves performance by up to 29.1% over SFT at 2x computation, with better scalability than SFT, and consistent gains on larger models (up to 30B). This method provides a low-cost, high-reward path to performance enhancement for pretrained LLMs and improves test-time scaling efficiency.
Looped Transformers increase computation without adding parameters by repeatedly executing the same set of layers, showing promise in performance and test-time scaling. However, this approach previously required training from scratch and yielded limited gains for LLMs. Fine-tuning existing models into loops, while cheaper, only brought marginal improvements over SFT. To address this, researchers propose LoopRes, an effective, scalable, and simple method that turns looping into significant and consistent performance gains for pretrained LLMs.
The Bottleneck of Looped Computation and LoopRes's Breakthrough
The core idea of looped Transformers is to pass the model through the same set of layers multiple times, thereby increasing computation without adding parameters. But existing methods face two key problems: training from scratch is costly and yields insignificant gains for LLMs; and fine-tuning pretrained models into loops performs only on par with standard SFT. LoopRes was proposed precisely to break this deadlock.
According to the paper, LoopRes builds on Attention Residuals, allowing each looped layer to directly attend to the outputs of previous loops. Since these outputs are iterative results of the same set of layers and become increasingly indistinguishable from one another, a trainable, loop-aware key is introduced for each output to encode its structural identity. This design enables the model to distinguish outputs from different loop iterations, thereby effectively leveraging historical information.

Furthermore, attending to all previous loop outputs may cause layers to skip intermediate loops, so LoopRes limits each layer's residual window to the most recent W loops, forcing each loop to incrementally build on recent loops. This design preserves the depth advantage of looped computation while avoiding instability caused by information skipping.
Looped Transformer is a class of architectures that repeatedly execute the same set of Transformer layers multiple times. Unlike standard Transformers where each layer executes only once, looped Transformers pass the input through a block of shared-parameter layers multiple times, thereby increasing computational depth (i.e., "computation") without changing the parameter count. This design stems from exploring computational adaptivity: the model can dynamically adjust the number of loops based on task difficulty, improving performance at inference time through more loops. However, training looped structures is not simple—since the same set of layers is called repeatedly, gradients need to traverse multiple time steps, which can easily cause training instability; and the representations output by looped layers tend to become similar as iterations increase, making it difficult for the model to distinguish information from different rounds. Previous research mostly adopted training from scratch, which is costly and yields limited gains for large-scale pretrained language models.
Attention Residuals is a design that combines residual connections with attention mechanisms, allowing each layer to directly attend to the outputs of all previous layers (not just the output of the immediately preceding layer). In standard residual connections, the input to layer ( l ) is the sum of the output of layer ( l-1 ) and the original input; in Attention Residuals, layer ( l ) can selectively aggregate information from any previous layer through attention weights. This mechanism enhances information flow and alleviates the vanishing gradient problem in deep networks. In the context of looped Transformers, Attention Residuals enables each looped layer to directly attend to the outputs of previous loop iterations, thereby leveraging historical iteration information. But as LoopRes points out, because loop outputs are highly similar to each other, directly applying Attention Residuals makes it difficult for attention to distinguish different rounds, thus requiring additional structural identifiers to aid discrimination.
Experimental Validation: Significant Improvements Across Multiple Models and Benchmarks
LoopRes was evaluated on 6 pretrained LLMs (from 3 model families) and 9 benchmarks, showing significant and consistent gains. At 2x computation, LoopRes improves the performance of Qwen3-1.7B-Base by 29.1% over SFT, more than double the gain of state-of-the-art baselines. This improvement is maintained on larger models (up to 30B) and across all three model families.
More critically, from 1.7B to 8B, as computation increases, LoopRes scales more steeply than SFT, reaching a higher performance ceiling while requiring less computation on long outputs. This indicates that LoopRes not only improves absolute performance but also enhances the efficiency of test-time scaling.
Technical Details: Loop-Aware Keys and Residual Windows
LoopRes's core innovation lies in two aspects: loop-aware keys and residual window limits. Loop-aware keys assign a trainable structural identity to each loop output, enabling the attention mechanism to distinguish different iterations. The residual window limits each layer to attend only to the most recent W loops, avoiding information loss caused by skipping intermediate loops. This design ensures training stability and effectiveness while preserving the advantages of looped computation.
Compared to standard SFT, LoopRes's fine-tuning cost is lower but the benefits are significant. The paper points out that LoopRes shows consistent improvements across multiple model families and benchmarks, and the gains become more pronounced as model size increases. This provides a new approach for efficient adaptation of pretrained LLMs.
Test-time Scaling refers to techniques that improve performance during the model inference phase by increasing computation (e.g., more sampling, longer chain-of-thought, more loop iterations, etc.). Unlike training-time scaling (increasing parameters or data), test-time scaling allows the model to dynamically allocate computational resources based on task requirements, spending more computation on difficult tasks. Looped Transformers are naturally suited for test-time scaling: by increasing the number of loops, the model can perform deeper computation without adding parameters. However, too many loops may lead to representation degradation or wasted computation. LoopRes limits each layer to attend only to the most recent W loops through the residual window, effectively providing a structured control for test-time scaling—the model can benefit from additional loops while maintaining stability. Experiments show that LoopRes requires less computation to achieve the same performance in long-output scenarios, indicating higher test-time scaling efficiency.
Significance for LLM Development
The significance of LoopRes lies in that it is the first to transform looped computation from "requiring training from scratch with limited gains" into a practical technique where "fine-tuning alone yields significant improvements." For LLMs already pretrained on large amounts of data, LoopRes provides a low-cost, high-reward path to performance enhancement. Especially as test-time scaling becomes an important trend, LoopRes gives models an advantage in long-output scenarios by improving the efficiency of looped computation.
In the future, LoopRes is expected to be combined with more pretrained models and tasks, further unleashing the potential of looped computation. Its simple and scalable characteristics also make it easy to integrate into existing training pipelines.
Conclusion
Through loop-aware keys and residual windows, LoopRes solves key challenges in looped fine-tuning of pretrained LLMs, achieving significant and consistent performance improvements across multiple models and benchmarks. Experiments show that LoopRes improves performance by up to 29.1% over SFT at 2x computation, with better scalability than SFT, providing a new solution for efficient adaptation and test-time scaling of LLMs.
Related articles

From 0 to 1: Vibe Coding an AI Knowledge Base — A Practical Retrospective and Tech Stack Breakdown
A retrospective on building the AI knowledge base OilBook from scratch with Vibe Coding: Next.js+Neon stack, Oil Dev Skill workflow, Stripe paywall security, interview-style writing, AI-flavor control, and Vercel deployment.

GLM-5.4 Hands-On: Native Vision Meets a New Vibe Coding Workflow
Hands-on with Zhipu GLM-5.4: native vision tested across a 3D product demo, pure-code video generation, and remote-control Vibe Coding, compared with GPT-6.2 and Gemini Neon.

AI and Humans Claim to Prove the Riemann Hypothesis: Machine-Verified, Yet Nobody Can Understand It
Anthropic mathematician and AI Claude claim to prove the Riemann Hypothesis with 17 million lines of Lean code, machine-verified but unreadable by humans. This article analyzes the event, the zero proportion record from 41.6% to 67.2%, and the gap between machine verification and human understanding.