Manuscript Offprint
arXiv:2610.25004UpLoop: Upcycling Large Language Models with Gated Loop
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Looped large language models trade parameter storage for recurrent computation, but most are trained from scratch. In practice, pretraining with looped depth is expensive, making post-training upcycling of a pretrained non-looped LLM an attractive alternative. We introduce UpLoop, a post-training recipe based on layer-wise recurrence. Instead of looping a whole model or a middle block, UpLoop loops each selected layer locally, preserving the pretrained depth hierarchy and avoiding feature-space mismatch. To make loop execution useful, we add hidden-wise gates on the attention and MLP residual branches, so later loops act as progressive refinements rather than redundant rewrites. Empirically, UpLoop breaks the commonly observed saturation at two loops (R = 2) in prior looped models. Starting from Qwen3-4B Base and applying SFT, UpLoop improves the average accuracy across 20 benchmarks by 6.17% at R = 3. We use R = 3 as the main setting for the best accuracy-cost trade-off, while both native and extrapolated R = 4 yield further gains.
1 Introduction
Large language model capability is commonly scaled by increasing parameters, data, or generated reasoning tokens. Looped Transformers provide a different axis: they reuse the same parameters multiple times in hidden space, trading parameter storage for additional computation. Recent work suggests that such looped computation can introduce a favorable bias for iterative reasoning and latent computation (Saunshi et al., 2025; Zhu et al., 2025; Fu et al., 2026; Deng et al., 2026; Kirk et al., 2026). As the area has developed, the focus has broadened from small-scale demonstrations of latent reasoning to questions of scaling, stability, efficiency, and deployment in realistic language model (Lee et al., 2026a; Chen et al., 2026c; Gao et al., 2026; Wang et al., 2026; Jeddi et al., 2026; Vendrell et al., 2026; Fein-Ashley & Rashidinejad, 2026; Fang et al., 2026).
In practice, however, a more relevant question is whether a strong pretrained non-looped LLM can be upcycled into a useful recurrent-depth model only through continued pretraining or supervised fine-tuning, rather than trained as a looped model from scratch. This question matters because pretraining with looped depth is often substantially more expensive. Looping during pretraining directly multiplies recurrent computation, increases optimization complexity, and complicates stability and systems efficiency (Yang et al., 2026; Zeitoun et al., 2026; Zhu et al., 2025; Wang et al., 2026). In many realistic settings, it is therefore preferable to start from a large-scale pretrained LLM and ask whether the same post-training recipe can further improve the model through hidden-state recurrence. Our goal is precisely this form of post-training upcycling.
However, post-training upcycling is not straightforward. After large-scale pretraining, an LLM develops a stable depth-wise feature hierarchy: shallow layers process embedding-side features, middle layers transform and compose them, and deeper layers produce representations closer to readout space (Koishekenov et al., 2025; Wang et al., 2026). This makes recurrence schemes common in native looped LLMs trained from scratch—especially model-wise and block-wise looping—poorly suited to upcycling, because they feed late-stage representations back into shallower interfaces that were not pretrained to process them. We therefore adopt the layer-wise loop of Loop the Loopies (Gao et al., 2026): in UpLoop, each selected layer performs looped visits locally before passing the hidden state onward, thereby preserving the pretrained depth hierarchy.
Moreover, preserving the pretrained depth hierarchy alone is not sufficient to make recurrent computation useful. Prior looped models exhibit a recurring empirical limitation: the most reliable gains are often obtained
*Work done at Ant Group. ✉ Corresponding Authors. †Core Contributors. Codes and model will be released soon.
at two loops, while increasing the loop count beyond frequently brings little benefit or even degrades performance (Wang et al., 2026; Yang et al., 2026; Gao et al., 2026; Lee et al., 2026b; Schwethelm et al., 2026; Prairie et al., 2026; Labovich, 2026; Kohli et al., 2026; Oncescu et al., 2026). Here and throughout the paper, denotes the number of local loop executions performed by each selected looped layer. We refer to a model instantiated with loop count as an “ model,” meaning that each selected looped layer is executed for local rounds indexed by . The case corresponds to the original pretrained forward pass of that layer, while the rounds are additional recurrent refinement passes that reuse the same parameters. A central goal of UpLoop is to overcome the “ ceiling” in post-training loop upcycling.
To make repeated execution useful, we therefore modulate the extra loops with learned hidden-wise gates on the attention and MLP residual writes. This design is inspired by stage-dependent modulation in Diffusion Transformers (Peebles & Xie, 2023): different refinement steps need not write equally or in the same way. In UpLoop, the modulation is implemented as learned gate vectors that are separately parameterized for each layer, loop, and residual branch. Thus, although parameters are shared across loops of the same layer, later loops can still apply different residual write strengths at different depths and hidden channels. Concretely, we keep the first loop identical to the pretrained forward pass and apply these layer- and loop-specific gates only to later loops. This preserves the original pretrained computation, while allowing subsequent loops to inject different amounts of new information at different depths and layers. The gate therefore serves not only as a stabilizer, but more importantly as a write controller that reduces redundancy, suppresses unnecessary overwriting, and enables controlled progressive refinement.
We further apply intermediate supervision and an improvement objective so that each recurrent depth remains decodable and later loops refine rather than degrade earlier ones. This is motivated by prior findings that looped models can otherwise suffer from drift and poorly controlled latent trajectories (Chen et al., 2026a; Williams & Tureci, 2026; Blayney et al., 2026; Labovich, 2026).
Empirically, starting from Qwen3-4B Base (Yang et al., 2025) and conducting supervised fine-tuning (SFT) on about 13B tokens, UpLoop breaks the commonly observed saturation pattern: the average accuracy across 20 benchmarks improves from 51.90 for the non-looped baseline to 55.56 at and further to 58.07 at . We use as our main setting because it offers the best accuracy-cost trade-off. Notably, remains beneficial: a natively trained model reaches 58.70 on average, and inference-time extrapolation from trained to test-time also improves the ave. to 58.55. Overall, our contributions are threefold:
• We introduce post-training loop-depth upcycling, showing that a non-looped pretrained LLM can be converted into a useful recurrent-depth model through only SFT.
• We propose UpLoop, a layer-wise recurrent architecture with gated attention/MLP residual writes and depth-aware supervision, which makes loop depths beyond R = 2 effective.
• Starting from Qwen3-4B Base, UpLoop improves the 20-benchmark average by 6.17% at R = 3. We use R = 3 as the main setting, while both native and extrapolated R = 4 still bring gains.
In parallel, several works have explored post-hoc conversion of pretrained non-looped LLMs. LoopUS (Park et al., 2026) turns a pretrained model into an encoder–reasoning–decoder architecture through continued training, using a shared middle reasoning block together with selective gating. However, LoopUS operates at the block level; its design can be less general across backbones: the choice of which intermediate block should serve as the loop module typically depends on model-specific tuning, and its gating acts at a relatively coarse granularity compared with finer layer-wise modulation. Training-Free Looped Transformers (Chen et al., 2026b), in contrast, introduces a purely inference-time loop wrapper over a frozen checkpoint, repeatedly applying a contiguous mid-stack block without any additional training. Our setting differs from both: we neither restructure the model into a new encoder–reasoning–decoder form nor treat recurrence as a training-free inference patch. Instead, we upcycle pretrained LLMs through continued training with layer-wise local recurrence, which better preserves pretrained depth hierarchy and limits feature-space mismatch.
Architectural and optimization mechanisms for effective loop. A second major theme in the looped-model literature is how to make additional recurrent steps useful rather than redundant or unstable. Prior work has explored architectural modifications and training objectives to improve recurrent information flow, stability, and controllability (Park et al., 2026; Chen et al., 2026a; Williams & Tureci, 2026; Blayney et al., 2026; Labovich, 2026; Zeitoun et al., 2026). However, current studies suggest that loop depth does not scale easily in practice: useful gains often peak around two recurrent steps, and increasing the number of training-time loop steps frequently yields little or no further improvement (Wang et al., 2026; Yang et al., 2026). We argue that this empirical ceiling is not necessarily a fundamental limit of recurrence itself, but may instead reflect insufficient control over recurrent writes. While concurrent work (Li et al., 2026) shares the motivation of preventing destructive overwrites, it relies on block-level scalar attention pooling with temporal decay to scale from-scratch 7M puzzle reasoners over thousands of steps. In contrast, UpLoop is tailored for upcycling 4B-Level pretrained LLMs: rather than coarse scalar state averaging across blocks, we inject channel-wise gates directly into each layer's internal attention and MLP branches, breaking the R = 2 ceiling across 20 general LLM benchmarks. Latent-reasoning work (Geiping et al., 2026) also scales loop depth by repeatedly conditioning on the initial input, effectively extending implicit reasoning before next-token prediction; despite the different setting, it shares our core intuition of balancing preserved initial information against later recurrent updates.
3 Method
UpLoop is built around three components. First, we replace the model- or block-wise loop with a layer-wise loop, so that each layer executes its loops locally. Second, we add gated residual writes on the extra loops, using a hidden-wise gate to modulate how much new information is injected. Third, we introduce a depth-aware objective that keeps intermediate loops decodable and encourages later loops to make genuine progress.
3.1 Layer-Wise Loop
A common looped design is to loop the whole model or a middle stack of layers. This works naturally when the looped model is trained from scratch, but is less well matched to post-training. In a pretrained decoder, earlier and later layers are not interchangeable: shallow layers are optimized to consume embedding-side features, while deeper layers operate on more task-ready representations (Koishekenov et al., 2025). Refeeding the deep-layer representations back into shallow layers therefore introduces a feature-space mismatch.
Similar to (Gao et al., 2026), UpLoop avoids this mismatch by making looping local to each layer. Instead of repeatedly traversing a whole stack, each selected layer executes several local loops to refine its own representation before passing the hidden state forward.
Let denote the pretrained Transformer layers, and let denote the hidden state entering the first selected looped layer. For layer and local loop index , we define
Thus, denotes the hidden state entering physical layer i, and is the output of that layer after R local loops, which is then passed to layer . The parameters of are shared across the R local loops of the same physical layer i. Under this convention, the case corresponds to the original pretrained single-pass computation of layer i, while the rounds are additional recurrent refinement steps that reuse the same layer parameters. This local recurrence preserves the pretrained depth hierarchy, because each repeated update remains within the feature space of the same physical layer.
3.2 Gated Residual Writes for Scaling Looped Depth
Simply repeating a layer several times does not guarantee useful extra computation. For post-training upcycling, two issues are central: full-strength extra loops can destabilize the pretrained representation, and without a small-step regime, repeated loops may fail to produce progressive refinement. We therefore want additional loops to act as controlled refinement: stable at each loop, yet cumulatively depth-like across loops.
To this end, UpLoop modulates later loops with gated residual writes. For each looped layer and each later local loop , we introduce branch-specific hidden-wise gate vectors
where is a learned raw gate vector, is the sigmoid function, is the hidden dimension, and is a fixed logit scale. Thus, the raw gate parameters are unconstrained, while the effective residual write coefficients always lie in . For the first local loop , we keep the original pretrained layer computation unchanged. For each later loop , we place hidden-wise gates on the attention and MLP residual branches:
The gates are hidden-channel-wise vectors, allowing different hidden dimensions to take different residual write strengths at different layers, loops, and residual branches. In this way, repeated execution is parameterized as loop-specific, channel-wise residual refinement rather than uniform full-strength rewriting.
To make the role of the gate explicit, it is convenient to introduce an abstract residual form. Let denote the effective residual transformation of layer after composing the normalized attention and MLP residual writes into a single update map. To unify the notation across all local loops, we define
where is the identity matrix, and denotes an abstract hidden-wise gate vector for loop after suppressing the attention/MLP branch split for notational simplicity. Then each local loop can be written as
Unrolling the recurrence gives
Thus, the effective computation is not a single repeated overwrite, but an accumulation of loop-specific residual refinements. This perspective is useful because it recasts looping as a sequence of gated residual steps, rather than repeated full-strength rewrites of the hidden state. This abstraction also clarifies why gating improves stability. Assume locally that is -Lipschitz, and that the gate matrix satisfies
Then for any two nearby states x, y, one loop satisfies
(9)
Compared with the ungated case, whose corresponding factor is , the gate explicitly shrinks the residual contribution through . Thus, when , perturbations are amplified less aggressively across loops. Intuitively, the gate moves looping toward a better-conditioned small-step regime.
This small-step regime is also what connects gated looping to effective depth. A standard non-looped model with N stored layers performs N feature transformations. A layer-wise looped model with R loops still stores only N layers, but it executes approximately RN transformation steps. Of course, this does not make it equivalent to an untied RN-layer network, since parameters are shared across loops. However, when each residual write is small, the multi-loop layer admits a first-order expansion that behaves like a depth-expanded residual stack with shared weights and loop-dependent coefficients.
Concretely, suppose each gated residual step is uniformly small:
and suppose is locally smooth around . Since each loop changes the state by at most , we have
By local smoothness, this implies
Substituting (12) into (7) gives
Under the small-step assumption, the remainder term satisfies
and therefore
Thus, to leading order in the small-step regime, the R-loop layer behaves like a depth-R residual stack with a shared transformation and loop-dependent diagonal coefficients . In the ungated case, where , the same expansion reduces to
which corresponds to adding the same residual update at full strength across loops. The role of gating is therefore not to enable the expansion itself, but to keep looping in a plausible small-step regime: shrinking recurrent writes limits cumulative drift and turns repeated execution into controlled residual refinement. Together, (9) and (15) show why hidden-wise gating is suitable for post-training upcycling: layer-wise looping preserves the pretrained feature hierarchy, while gating reallocates computation to recover part of the benefit of greater depth. Full derivations and complementary views are provided in Appendix A.
3.3 Depth-Aware Supervision
Even with layer-wise looping and gated residual writes, later loops may fail to improve over earlier ones, and earlier loops may become poorly decodable, effectively serving as temporary scratch space (Zhu et al., 2025).
Similar to (Zhu et al., 2025), we therefore supervise all loop depths, not just the final one. Let denote the token-averaged cross-entropy loss computed from the model output obtained after executing each selected looped layer up to local round , and let denote the maximum number of loops. We use two auxiliary terms in addition to the final-depth loss. First, we apply intermediate supervision:
This encourages earlier loops to remain directly readable by the output head, rather than drifting into hidden states that only become useful after several more loops. Second, we add an improvement loss:
where m is a margin. This term encourages each successive loop to outperform the previous one by at least a small amount, discouraging stagnant or regressive trajectories. The full training objective is
The role of this objective is not merely to improve optimization. It also shapes how looping is used: earlier loops must stay decodable, and later loops are explicitly trained to yield further improvements.
4 Experiments
4.1 Setup
Our primary model uses a maximum local loop count of R = 3, which we choose as the main setting for the best accuracy-cost trade-off. We also train R = 2 and native R = 4 variants, and study inference-time extrapolation from R = 3 to R = 4. We preserve the first and last three decoder layers as single-pass layers and apply looping only to the middle layers.
For loops beyond the first, both attention and MLP residual branches are modulated by learned hidden-wise gate vectors that are separately parameterized for each layer, loop, and branch. The gates are parameterized as unconstrained raw vectors and mapped to effective residual coefficients through a sigmoid with logit scale s = 8.0. We initialize the raw parameters by inverse-sigmoid so that the effective gate value is 0.3 at initialization for all later loops and both branches. Unless otherwise specified, all model parameters, including the later-round gates, are updated during SFT.
| Category | Dataset | Comparison under | Loop count under UpLoop | ||||
|---|---|---|---|---|---|---|---|
| Non-looped | Loop w/o gate | UpLoop | (UpLoop - Non-loop) | ||||
| Math | Math500 | 81.40 | 82.20 | 85.60 | +4.20 | 84.00 | 84.00 |
| GSM-Plus | 81.28 | 83.61 | 84.97 | +3.69 | 83.63 | 85.03 | |
| OlympiadBench | 53.19 | 56.46 | 60.81 | +7.62 | 58.22 | 59.00 | |
| AIME 2025 | 26.67 | 31.72 | 36.61 | +9.94 | 33.18 | 39.53 | |
| AIME 2026 | 26.67 | 26.98 | 36.09 | +9.42 | 32.45 | 39.27 | |
| Code | HumanEval+ | 64.85 | 62.20 | 68.29 | +3.44 | 70.12 | 73.78 |
| MBPP+ | 49.74 | 58.85 | 60.32 | +10.58 | 63.76 | 64.29 | |
| LiveCodeBench v6 | 23.45 | 24.17 | 25.77 | +2.32 | 25.28 | 26.43 | |
| BigCodeBench | 29.72 | 30.88 | 33.28 | +3.56 | 29.47 | 30.88 | |
| CruxEval | 63.44 | 65.12 | 65.75 | +2.31 | 66.32 | 66.81 | |
| Aider | 33.31 | 41.37 | 43.61 | +10.30 | 37.85 | 37.59 | |
| Reasoning | MuSR | 76.37 | 79.00 | 80.18 | +3.81 | 76.91 | 83.36 |
| BBH | 75.50 | 78.07 | 79.66 | +4.16 | 77.72 | 79.71 | |
| GPQA-Diamond | 39.02 | 43.32 | 44.48 | +5.46 | 40.88 | 46.88 | |
| ZebraLogic | 55.30 | 51.95 | 70.03 | +14.73 | 58.42 | 69.33 | |
| General | BFCL-v3 | 58.80 | 62.24 | 66.14 | +7.34 | 64.28 | 63.21 |
| PIQA | 80.32 | 83.73 | 84.33 | +4.01 | 83.95 | 84.60 | |
| KorBench | 45.60 | 53.04 | 56.56 | +10.96 | 48.72 | 57.52 | |
| IFBench | 19.00 | 21.27 | 21.47 | +2.47 | 19.53 | 23.13 | |
| MMLU-Pro | 54.37 | 55.81 | 57.54 | +3.17 | 56.44 | 59.56 | |
| Average | 51.90 | 54.60 | 58.07 | +6.17 | 55.56 | 58.70 | |
Table 1: Main results (%). The left group compares different strategies under the main setting, while the right group compares different loop counts for UpLoop. Layer-wise loop without gates serves as a reasonable baseline for post-training loop design, but it does not yield a clear and consistent gain. This motivates gated UpLoop, which delivers markedly stronger and consistent improvements. Although performance continues to improve at , the gain beyond is relatively small, making the best accuracy–cost trade-off.
The training objective combines final-depth CE, intermediate supervision, and improvement loss. In the default run, the intermediate and improvement loss weights are 0.3 and 5.0, respectively, with improvement margin . Training uses BF16, a global batch size of 128, the Muon optimizer (Liu et al., 2025), and about 3,000 optimization steps. We further adopt a staged loop-depth curriculum: training starts from the single-pass setting, increases to at step 300, to at step 700, and to at step 1,000.
4.2 Benchmarks
We evaluate on 20 benchmarks spanning mathematics, coding, tool use, commonsense reasoning, instruction following, reasoning, and knowledge:
• Math: Math500 (Hendrycks et al., 2021), GSM-Plus (Li et al., 2024), OlympiadBench (He et al., 2024), AIME 2025 (Zhang & Math-AI, 2025), AIME 2026 (Zhang & Math-AI, 2026)
• Code: HumanEval+ (Liu et al., 2023), MBPP+ (Austin et al., 2021), LiveCodeBench v6 (Jain et al., 2025), BigCodeBench (Zhuo et al., 2025), CruxEval (Gu et al., 2024), Aider (Gauthier, 2023)
• Reasoning / General: BFCL-v3 (Patil et al., 2025), PIQA (Bisk et al., 2020), MuSR (Sprague et al., 2024), BBH (Suzgun et al., 2023), KorBench (Ma et al., 2025), IFBench (Pyatkin et al., 2026), GPQA-Diamond (Rein et al., 2023), MMLU-Pro (Wang et al., 2024), ZebraLogic (Lin et al., 2025)
All benchmarks are evaluated under sampling-based decoding with at least 4 random samples per example, and we report mean pass@1. For AIME 2025 and AIME 2026, we use 64 samples per example.
4.3 Main Results
Table 1 shows that layer-wise looping is a reasonable baseline for post-training upcycling. Even without gates, it improves the 20-benchmark average from 51.90 to 54.60, but the gains are not clearly consistent across tasks. We therefore further introduce gated UpLoop, which raises the average to 55.56 at and 58.07 at , showing that useful loop depth need not saturate at in post-training upcycling. A native model reaches 58.70. These results indicate that the gate is crucial for modulating simple layer-wise loop.
Comparing and shows that the gains from looping do not saturate at two loops. We use as the main operating point because it provides the best trade-off between accuracy and cost, although still brings a small further gain. Unless otherwise specified, the following analyses focus on the model.
| Metric | ||||
|---|---|---|---|---|
| Entropy (nats) | 4.0186 | 3.3312 | 1.8674 | -2.1512 |
| Top-1 probability | 0.1827 | 0.2338 | 0.4420 | +0.2593 |
(a) Confidence statistics across loops.
| Transition | Churn rate |
|---|---|
| 3.11% | |
| 3.45% |
(b) All-token top-1 prediction churn across loops.
Table 2: Evidence for progressive refinement across loops. Left: later loops become more confident, with lower entropy and higher top-1 probability. Right: later loops still revise a non-trivial fraction of decisions.
| Metric | With gate | Without gate |
|---|---|---|
| Hidden -RMS | 0.47 | 1.19 |
| Hidden -RMS | 0.70 | 0.92 |
| update cosine | 0.43 | 0.34 |
| attention KL | 0.005 | 0.001 |
| output KL | 0.31 | 0.23 |
Table 3: Round-wise update statistics with and without gates. Following LoopCoder-v2 (Yang et al., 2026), hidden -RMS measures the magnitude of the recurrent hidden-state update, update cosine measures directional agreement of adjacent recurrent updates, attention KL measures the change in attention distributions, and output KL measures the change in token-level predictive distributions.
The improvements are broad rather than isolated. Relative to the vanilla model, the variant improves all 20 measured tasks, with especially large gains on ZebraLogic (+14.73), KorBench (+10.96), MBPP+ (+10.58), Aider (+10.30), AIME 2025 (+9.94), and AIME 2026 (+9.42). These results indicate that the benefit of layer-wise recurrent-depth upcycling is particularly strong on mathematical, coding, and reasoning tasks, while still extending to tool use, commonsense reasoning, instruction following, and knowledge-intensive benchmarks.
4.4 Progressive Refinement Across Loops
We ask whether extra local loops do meaningful work rather than redundantly re-encoding. To test this, we examine two output-level signals across loops: confidence in token prediction and token-level prediction churn. Together, they show whether UpLoop becomes more decisive while remaining functionally active.
As shown in Table 2a, mean entropy drops from 4.0186 at to 3.3312 at and 1.8674 at . Meanwhile, the mean top-1 probability rises from 0.1827 to 0.2338 and 0.4420. Thus, later loops do not simply preserve the same predictive distribution; they make the model more decisive at readout.
Confidence growth alone, however, could still reflect trivial sharpening of an already fixed choice. We therefore measure all-token prediction churn during greedy decoding. At each generation step, , , and receive the same prefix, and we compare their top-1 predictions. To isolate loop effects from divergence between separately generated sequences, we append the greedy token to a shared history. As shown in Table 2b, later loops remain active at the token level. So is not merely sharpening an earlier decision; it still revises local decoding choices.
At the same time, churn remains low in absolute terms. Most positions are preserved across loops, consistent with increasing recurrent stability, while a non-trivial minority are still refined. Overall, these results support progressive refinement: later loops are more confident, but not inert.
4.5 Gating Converts Repeated Execution into Controlled Refinement
Having shown that later loops remain useful at readout, we next ask why repeated layer reuse does not collapse into redundancy or destructive overwrite. We test this at three levels: (1) round-wise update statistics, (2) late-layer hidden-state dynamics, and (3) residual-write measurements.
Round-wise statistics show that gating suppresses overwrite without killing refinement. Table 3 shows two key effects. First, gating sharply reduces the earliest overwrite: the hidden-state -RMS from to drops from 1.19 to 0.47. This supports the gate's role as a write controller, making the second loop a refinement rather than a near-complete rewrite. Second, later loops remain non-trivial. Although gating also reduces the update magnitude, the update does not vanish. Instead, the gated model shows more directionally coherent refinement, with update cosine rising from 0.34 to 0.43. Attention KL and output KL are also larger with gates, indicating that still changes both retrieval patterns and token predictions.
Late-layer zoom (24--36): loop=3 local refinement vs non-loop base

Figure 1: Late-layer zoom (layers 24–36) comparing the non-looped baseline, gated UpLoop, and ungated UpLoop (loop=3). Left: last-token hidden update RMS. Middle: cosine similarity between adjacent hidden states. Right: cosine similarity to the final decoder output. Gating suppresses late-layer write amplification, preserves better hidden-state continuity, and still allows gradual progress toward the final representation.
Gate-modulated refinement writes
Recurrent span

Figure 2: Gate-modulated residual write magnitude across looped layers. r = 1 is the base write, while r = 2 and r = 3 are gated refinement writes. Later-round writes remain more modest than the base pass, showing that recurrent refinement operates through controlled residual corrections.
Gating matters most near the top of the decoder. We zoom in on decoder layers and compare gated and ungated loop-3 models against the non-looped baseline. Figure 1 reports last-token hidden update RMS, adjacent hidden-state cosine, and cosine to the final decoder output. First, ungated recurrence produces systematically larger late-layer writes: its hidden update RMS stays above both the gated model and the baseline, with the gap widening near the top of the decoder. Gating keeps these updates closer to the base scale. Second, gating preserves local continuity: the ungated model shows a sharper drop in adjacent hidden-state cosine near the output-adjacent region, whereas the gated model remains closer. Third, both looped models move progressively toward the final decoder output, but the gated does so more gradually.
Post-gate residual writes confirm that later loops operate in a refinement regime. We next measure residual writes after gating to test whether later loops are controlled refinements rather than base-scale re-executions. Specifically, we compare the residual write magnitudes at r = 2 and r = 3 with the base write.
Figure 2 shows a consistent pattern. Across shallow and deep spans, the gated writes at r = 2 and r = 3 are only a small fraction of the corresponding base write at r = 1. Quantitatively, they retain about 14%–21% of the r = 1 magnitude. So later loops do not rewrite the residual stream at the original scale; they apply modest corrections. At the same time, r = 3 is consistently larger than r = 2, showing that the third loop remains active and often contributes more than the second refinement step, while still staying well below r = 1.
Overall, gating turns repeated execution into controlled refinement. Taken together, these results show that gating makes recurrence better conditioned. It suppresses excessive overwrite, preserves local continuity, and keeps later corrections meaningful but bounded.
4.6 Learned Gates Allocate Refinement Non-Uniformly
The previous subsection showed that gates make recurrent updates smaller and better behaved. We next ask how this refinement capacity is allocated across depth, branches, and hidden dimensions.

Figure 3: Learned static gate values for later loops in the model. The attention gates are often larger, while the MLP gates are often more prominent, suggesting that the second loop contributes relatively more to contextual re-access and the third loop relatively more to feature consolidation.

Figure 4: Hidden-dimension clusters of later-round gate profiles. Each hidden dimension is represented by its four-value profile , standardized, and clustered with K-means . Different clusters exhibit distinct round- and branch-dependent patterns, indicating that recurrent refinement is distributed non-uniformly across hidden dimensions.
We first inspect the learned static gate values across physical depth. Figure 3 shows the mean effective gate values for the attention and MLP residual branches at rounds 2 and 3 in the loop-3 model. The gate profiles are clearly non-uniform across depth, indicating that the model does not use looping uniformly across layers. Instead, it allocates stronger looped writes to some layers and weaker ones to others. In attention, the gate is often slightly larger than the gate, suggesting that the second loop contributes relatively more to re-accessing contextual information. In MLP, the gate is often larger, especially in the middle layers, suggesting that the later loop contributes relatively more to feature transformation.
This loop-specific asymmetry suggests that later loops are not redundant repeats. Rather, different loops appear to play different functional roles. This is consistent with the analysis that gating places looping in a controlled small-step regime.
To examine how recurrent refinement is allocated within hidden space, we further analyze the learned later-round gates at the hidden-dimension level. For each hidden dimension, we form a four-value profile
where each value is averaged across the looped physical layers. We standardize these profiles and cluster hidden dimensions with deterministic K-means . Figure 4 shows that the learned gates are not uniform across hidden dimensions. Instead, they form several distinct subspaces with different round- and branch-dependent profiles. This indicates that later-round refinement is routed through differentiated hidden subspaces rather than controlled by a global gate strength.
Overall, the gate controls not only which layers use more recurrent refinement, but also which hidden subspaces are emphasized at different loops and branches. This structured allocation helps explain why UpLoop remains controlled yet non-trivial: recurrence is neither uniformly suppressed nor uniformly amplified, but selectively deployed where additional refinement is most useful.
| Category | Dataset | loop (R = 3) | KV-share(3 ← 2) | KV-share(2,3 ← 1) | Δ share(3 ← 2) |
|---|---|---|---|---|---|
| Math | Math500 | 85.60 | 84.40 | 83.00 | -1.20 |
| GSM-Plus | 84.97 | 84.74 | 83.72 | -0.23 | |
| OlympiadBench | 60.81 | 60.41 | 58.76 | -0.40 | |
| AIME 2025 | 36.61 | 36.82 | 33.23 | +0.21 | |
| AIME 2026 | 36.09 | 34.84 | 32.86 | -1.25 | |
| Code | HumanEval+ | 68.29 | 67.07 | 65.24 | -1.22 |
| MBPP+ | 60.32 | 62.96 | 59.26 | +2.64 | |
| LiveCodeBench v6 | 25.77 | 26.93 | 25.00 | +1.16 | |
| BigCodeBench | 33.28 | 31.70 | 30.88 | -1.58 | |
| CruxEval | 65.75 | 65.94 | 62.94 | +0.19 | |
| Aider | 43.61 | 42.11 | 35.83 | -1.50 | |
| Reasoning | MuSR | 80.18 | 81.39 | 79.39 | +1.21 |
| BBH | 79.66 | 79.32 | 75.59 | -0.34 | |
| GPQA-Diamond | 44.48 | 45.61 | 42.55 | +1.13 | |
| ZebraLogic | 70.03 | 70.53 | 60.30 | +0.50 | |
| General | BFCL-v3 | 66.14 | 65.09 | 63.15 | -1.05 |
| PIQA | 84.33 | 84.35 | 83.21 | +0.02 | |
| KorBench | 56.56 | 55.92 | 54.48 | -0.64 | |
| IFBench | 21.47 | 22.80 | 24.93 | +1.33 | |
| MMLU-Pro | 57.54 | 57.94 | 55.61 | +0.40 | |
| Average | 58.07 | 58.04 | 55.50 | -0.03 |
Table 4: KV-reuse study on the benchmark suite. We compare the standard UpLoop model against two approximations: reusing the KV cache at , and reusing the KV cache at both and . The last column reports the difference between standard and the KV-reuse variant.
| Loop pair | Q | K | V | PV | Attn out | Top-1 | Top-8 | Mass | X |
|---|---|---|---|---|---|---|---|---|---|
| 0.9566 | 0.9656 | 0.8799 | 0.8507 | 0.7637 | 0.8597 | 0.8126 | 0.8404 | 0.9373 | |
| 0.9882 | 0.9907 | 0.9758 | 0.9616 | 0.8948 | 0.9465 | 0.9059 | 0.9308 | 0.9853 |
Table 5: Similarity and overlap statistics between adjacent loops. "PV" denotes projected value similarity, "Mass" denotes attention-mass overlap, and X denotes hidden-state cosine similarity.
4.7 Cross-Loop KV Reuse during Inference
The analyses above raise a practical systems question: if later loops become increasingly aligned, can some of the extra inference cost be reduced by reusing KV caches across loops without materially hurting performance? Similar to LoopCoderV2 (Yang et al., 2026), we study this in the setting with two simple approximations. In the first, reuses the KV cache from while retaining its own query, output projection, and MLP computation. In the second, both and reuse the KV cache from .
Table 4 shows a clear asymmetry. Reusing the KV cache at leaves overall performance essentially unchanged: the unweighted mean moves from 58.07 to 58.04, indicating that can reuse the KV cache without harming performance. By contrast, reusing the KV cache for both later loops causes a substantial drop, reducing the mean to 55.50. To explain this asymmetry, we compare adjacent loops directly in representation and attention space. As shown in Table 5, all similarity and overlap metrics are higher for than for , including Q/K/V cosine similarity, hidden-state cosine, token overlap, and attention-mass overlap. This shows that the loop trajectory becomes more stable at later loops: by , the model largely agrees with on where to attend, while still refining what to write.
This stability pattern explains the KV-reuse results. Since and are already highly similar, reusing the KV cache at causes almost no loss. In contrast, is still substantially different from the later refined states, so forcing and to reuse the KV cache removes important loop refinement and degrades performance. Overall, UpLoop exhibits progressively increasing cross-loop consistency, making late-loop KV reuse a practical inference optimization, while early-loop KV sharing is too aggressive.
4.8 Inference-Time Loop Extrapolation Beyond Training Depth
A natural question for loop-depth models is whether useful computation can be extrapolated beyond the loop count seen during training. This question is especially relevant in our setting because UpLoop is obtained
| Category | Dataset | Extrapolated | Native | (Extrapolated - Native) | |
|---|---|---|---|---|---|
| Math | Math500 | 85.60 | 84.60 | 84.00 | +0.60 |
| GSM-Plus | 84.97 | 84.85 | 85.03 | -0.18 | |
| OlympiadBench | 60.81 | 59.52 | 59.00 | +0.52 | |
| AIME 2025 | 36.61 | 34.66 | 39.53 | -4.87 | |
| AIME 2026 | 36.09 | 33.99 | 39.27 | -5.28 | |
| Code | HumanEval+ | 68.29 | 71.95 | 73.78 | -1.83 |
| MBPP+ | 60.32 | 64.81 | 64.29 | +0.52 | |
| LiveCodeBench v6 | 25.77 | 27.26 | 26.43 | +0.83 | |
| BigCodeBench | 33.28 | 33.61 | 30.88 | +2.73 | |
| CruxEval | 65.75 | 68.50 | 66.81 | +1.69 | |
| Aider | 43.61 | 43.86 | 37.59 | +6.27 | |
| Reasoning | MuSR | 80.18 | 80.74 | 83.36 | -2.62 |
| BBH | 79.66 | 80.72 | 79.71 | +1.01 | |
| GPQA-Diamond | 44.48 | 44.73 | 46.88 | -2.15 | |
| ZebraLogic | 70.03 | 71.00 | 69.33 | +1.67 | |
| General | BFCL-v3 | 66.14 | 65.91 | 63.21 | +2.70 |
| PIQA | 84.33 | 84.19 | 84.60 | -0.41 | |
| KorBench | 56.56 | 56.36 | 57.52 | -1.16 | |
| IFBench | 21.47 | 22.21 | 23.13 | -0.92 | |
| MMLU-Pro | 57.54 | 57.61 | 59.56 | -1.95 | |
| Average | 58.07 | 58.55 | 58.70 | -0.15 |
Table 6: Inference-time loop extrapolation from training depth to test-time depth . The is not trained; it reuses the round-3 gates for both attention and MLP residual writes. We additionally compare this extrapolated model with a natively trained model.
by SFT upcycling from a strong pretrained non-looped LLM, rather than pretrained from scratch as a native looped model. If the loop refinement learned during SFT is well structured, one may hope that an additional inference-time loop remains at least partially useful even when that loop was never trained.
To test this, we take the model trained with maximum local loop count and perform inference-time loop extrapolation to only at test time. Concretely, the extra fourth loop reuses the same gated residual modulation as , i.e., the attention and MLP gates are set equal to the learned gates. This provides a simple test of whether the learned loop dynamics remain stable enough.
Table 6 shows that UpLoop supports useful loop extrapolation beyond its training depth. Extrapolating a model trained at to test-time improves the average from 58.07 to 58.55. The gains, however, are highly domain-dependent. The clearest benefit appears in code generation and program understanding, where the extrapolated loop step improves all six coding benchmarks, including HumanEval+ (+3.66), MBPP+ (+4.49), LiveCodeBench v6 (+1.49), and CruxEval (+2.75). Several general or reasoning-oriented tasks also improve modestly. In contrast, mathematical benchmarks degrade consistently under . This suggests that an additional recurrent refinement step is not uniformly beneficial.
Importantly, the extrapolated model is also close to the natively trained model: 58.55 versus 58.70 on average. This suggests that the learned recurrent dynamics are well structured and robust.
4.9 Generalization to MoE Backbones
To verify that UpLoop is not specific to dense Transformer backbones, we further test it on a Mixture-of-Experts (MoE) model, Ling-3.0 Tiny (Inclusion AI, 2026). This model has about 7B parameters in total (1B activated parameters) with a hybrid dense–MoE design: the first layer uses a dense FFN, while the remaining 23 layers use routed MoE FFNs with 128 experts per layer and top-8 expert activation per token.
We evaluate the non-looped and UpLoop- variants on 17 benchmarks spanning math, code, tool use, reasoning, and knowledge-intensive tasks. As shown in Table 7, UpLoop transfers well to this MoE backbone: the average score improves from 50.98 to 55.01, yielding a gain of +4.03 points. The improvements are broad, covering all 17 measured benchmarks. In particular, we observe consistent gains on math (Math500: +3.60, GSM8K-Plus: +5.80, OlympiadBench: +4.15), code (HumanEval+: +2.90, CruxEval: +4.44, Aider: +7.25), reasoning (MuSR: +7.50, KorBench: +5.76), and knowledge-heavy evaluation (MMLU-Pro: +9.09). This provides evidence that the proposed upcycling recipe generalizes beyond dense LLMs and can also serve as a practical depth scaling mechanism for MoE backbones.
| Dataset | Non-looped | UpLoop (R = 3) | Δ |
|---|---|---|---|
| Math500 | 74.80 | 78.40 | +3.60 |
| GSM8K-Plus | 70.77 | 76.57 | +5.80 |
| OlympiadBench | 49.63 | 53.78 | +4.15 |
| HumanEval+ | 77.59 | 80.49 | +2.90 |
| MBPP+ | 66.68 | 68.25 | +1.57 |
| LiveCodeBench v6 | 23.51 | 25.66 | +2.15 |
| BigCodeBench | 30.53 | 32.19 | +1.66 |
| CruxEval | 51.31 | 55.75 | +4.44 |
| Aider | 30.34 | 37.59 | +7.25 |
| BFCL Live | 37.92 | 39.94 | +2.02 |
| PIQA | 79.75 | 82.26 | +2.51 |
| MuSR | 60.02 | 67.52 | +7.50 |
| BBH | 61.71 | 64.38 | +2.67 |
| KorBench | 39.84 | 45.60 | +5.76 |
| IFBench | 20.13 | 22.20 | +2.07 |
| GPQA | 45.01 | 48.39 | +3.38 |
| MMLU-Pro | 47.13 | 56.22 | +9.09 |
| Average | 50.98 | 55.01 | +4.03 |
Table 7: Generalization of UpLoop to an MoE backbone on 17 benchmarks. We evaluate Ling-3.0 Tiny, a hybrid dense–MoE model. UpLoop consistently improves over the non-looped baseline, showing that the proposed recurrent-depth upcycling recipe also generalizes to routed MoE architectures.

Figure 5a: Performance vs. training cost.

Figure 5b: GPU memory and step time vs. depth.
4.10 Training Cost Comparison
We next assess whether the gains from increasing recurrent depth justify the added training cost. As shown in Figure 5a, performance improves monotonically from 51.90 at to 55.56, 58.07, and 58.70 at , respectively. However, the marginal gain diminishes sharply beyond : increasing from to yields only +0.63 average points, making the most favorable accuracy-cost operating point.
Figure 5b further shows how the overhead evolves within the native training run under the staged loop-depth curriculum, as training switches from the stage to , , and finally . The resource demand rises progressively across stages: GPU memory increases from GiB at to GiB, GiB, and GiB at , respectively. GPU utilization also climbs sharply from to and then , while iteration time stays nearly unchanged up to (17.36, 17.33, and 18.37 s). This suggests that increasing depth up to mainly improves hardware utilization with little runtime penalty. By contrast, the transition from to yields only a marginal utilization gain () but a sharp increase in iteration time and memory. Thus, beyond , the additional loop contributes disproportionately more cost than efficiency. Overall, UpLoop extends the useful loop-depth regime beyond the commonly observed ceiling, while remains the best practical trade-off.
5 Conclusion
We presented UpLoop, a post-training recipe that upcycles pretrained non-looped LLMs into looped models via layer-wise loop with gated residual modulation. Starting from Qwen3-4B Base with SFT, UpLoop improves the 20-benchmark average by at , overcoming the common saturation bottleneck. While offers the optimal accuracy-cost trade-off, both native and extrapolated yield further gains, and the recipe generalizes effectively to MoE backbones-Ling-3.0 Tiny. Our analyses confirm that gated modulation turns later loops into controlled yet non-trivial refinements. Moreover, through KV-reuse experiments, we further demonstrate that UpLoop has substantial potential for inference-time optimization. Overall, UpLoop establishes gated loop as a practical post-training scaling strategy for pretrained LLMs.
Acknowledgement
This work was supported by the Ant Group Research Intern Program.
Limitations and Future Work
Our work has several limitations. Although our KV-reuse results provide evidence that UpLoop has practical efficiency potential, we do not explicitly optimize training or inference cost in this work. Future work will focus on turning this potential into realized savings through more efficient implementations. In addition, while our initial results on an MoE backbone are encouraging, we have not yet analyzed in depth how layer-wise recurrence interacts with MoE-specific properties. Finally, our experiments focus mainly on autoregressive Transformer backbones, and it remains unclear how broadly the proposed upcycling recipe transfers to other architectures such as diffusion language models. We leave these directions to future work.
References
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021.
Yonatan Bisk, Rowan Zellers, Jianfeng Gao, and Yejin Choi. Piqa: Reasoning about physical commonsense in natural language. In Proceedings of the AAAI Conference on Artificial Intelligence, 2020.
Hugh Blayney, Álvaro Arroyo, Johan Obando-Ceron, Pablo Samuel Castro, Aaron Courville, Michael M Bronstein, and Xiaowen Dong. A mechanistic analysis of looped reasoning language models. arXiv preprint arXiv:2604.11791, 2026.
Guanxu Chen, Dongrui Liu, and Jing Shao. Loop as a bridge: Can looped transformers truly link representation space and natural language outputs? arXiv preprint arXiv:2601.10242, 2026a.
Lizhang Chen, Jonathan Li, Chen Liang, Ni Lao, and Qiang Liu. Training-free looped transformers. arXiv preprint arXiv:2605.23872, 2026b.
Tieyuan Chen, Xiaodong Chen, Haoxing Chen, Zhenzhong Lan, Weiyao Lin, and Jianguo Li. Dnd: Boosting large language models with dynamic nested depth. In International Conference on Learning Representations, pp. 28088–28105, 2026c.
Chunyuan Deng, Yizhe Zhang, Rui-Jie Zhu, Yuanyuan Xu, Jiarui Liu, TS Ng, and Hanjie Chen. Lt2: Linear-time looped transformers. arXiv preprint arXiv:2605.20670, 2026.
Rui Fang, Hsi-Wen Chen, and Ming-Syan Chen. Loopq: Quantization for recursive transformers. arXiv preprint arXiv:2605.16343, 2026.
Jacob Fein-Ashley and Paria Rashidinejad. Solve the loop: Attractor models for language and reasoning. arXiv preprint arXiv:2605.12466, 2026.
Rao Fu, Zixuan Yang, Jiankun Zhang, Jing Ma, Hechang Chen, Yu Li, and Yi Chang. Simply stabilizing the loop via fully looped transformer. arXiv preprint arXiv:2605.18797, 2026.
Zitian Gao, Yilong Chen, Yihao Xiao, Xinyu Yang, Ran Tao, Joey Zhou, and Bryan Dai. Loop the loopies! arXiv preprint arXiv:2607.16051, 2026.
Paul Gauthier. Aider code editing benchmarks. https://aider.chat/docs/benchmarks.html, 2023.
Jonas Geiping, Sean McLeish, Neel Jain, John Kirchenbauer, Siddharth Singh, Brian Bartoldson, Bhavya Kailkhura, Abhinav Bhatele, and Tom Goldstein. Scaling up test-time compute with latent reasoning: A recurrent depth approach. Advances in Neural Information Processing Systems, 38:41340–41391, 2026.
Alex Gu, Baptiste Rozière, Hugh Leather, Armando Solar-Lezama, Gabriel Synnaeve, and Sida I Wang. Cruxeval: A benchmark for code reasoning, understanding and execution. arXiv preprint arXiv:2401.03065, 2024.
Chaoqun He, Renjie Luo, Yuzhuo Bai, Shengding Hu, Zhen Thai, Junhao Shen, Jinyi Hu, Xu Han, Yujie Huang, Yuxiang Zhang, et al. Olympiadbench: A challenging benchmark for promoting agi with olympiad-level bilingual multimodal scientific problems. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 3828–3850, 2024.
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021.
Inclusion AI. Ling-3.0-tiny. https://huggingface.co/inclusionAI/Ling-3.0-tiny, 2026. Hugging Face model repository.
Naman Jain, Alex Gu, Wen-Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Armando Solar-Lezama, Koushik Sen, and Ion Stoica. Livecodebench: Holistic and contamination free evaluation of large language models for code. In International Conference on Learning Representations, volume 2025, pp. 58791–58831, 2025.
Ahmadreza Jeddi, Marco Ciccone, and Babak Taati. Loopformer: Elastic-depth looped transformers for latent reasoning via shortcut modulation. arXiv preprint arXiv:2602.11451, 2026.
James R Kirk, Robert E Wray, and John E Laird. Stars: extending interactive task learning with large language models. Frontiers in Computer Science, 8:1848830, 2026.
Harsh Kohli, Srinivasan Parthasarathy, Huan Sun, and Yuekun Yao. Loop, think, & generalize: Implicit reasoning in recurrent-depth transformers. arXiv preprint arXiv:2604.07822, 2026.
Yeskendir Koishekenov, Aldo Lipani, and Nicola Cancedda. Encode, think, decode: Scaling test-time reasoning with recursive latent thoughts. arXiv preprint arXiv:2510.07358, 2025.
Asher Labovich. Stability and generalization in looped transformers. arXiv preprint arXiv:2604.15259, 2026.
Ryan Lee, Jacob Biloki, Edward J Hu, and Jonathan May. Sparse layers are critical to scaling looped language models. arXiv preprint arXiv:2605.09165, 2026a.
Sanghyun Lee, Chunsan Hong, Seungryong Kim, Jonghyun Lee, Jongho Park, and Dongmin Park. Looped diffusion language models. arXiv preprint arXiv:2605.26106, 2026b.
Pengxiang Li, Dilxat Muhtar, Di He, Guinan Su, Lu Yin, and Shiwei Liu. Scaling to tens of thousands of test-time iterations with loop-native attention residuals. arXiv preprint arXiv:2610.11570, 2026.
Qintong Li, Leyang Cui, Xuan Zhao, et al. Gsm-plus: A comprehensive benchmark for evaluating the robustness of llms as mathematical problem solvers. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 2961–2984, 2024.
Bill Yuchen Lin, Ronan Le Bras, Kyle Richardson, Ashish Sabharwal, Radha Poovendran, Peter Clark, and Yejin Choi. Zebralogic: On the scaling limits of llms for logical reasoning. arXiv preprint arXiv:2502.01100, 2025.
Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation. Advances in neural information processing systems, 36:21558–21572, 2023.
Jingyuan Liu, Jianlin Su, Xingcheng Yao, Zhejun Jiang, Guokun Lai, Yulun Du, Yidao Qin, Weixin Xu, Enzhe Lu, Junjie Yan, et al. Muon is scalable for llm training. arXiv preprint arXiv:2502.16982, 2025.
Kaijing Ma, Xeron Du, Yunran Wang, Haoran Zhang, Zhoufutu Wen, Xingwei Qu, Jian Yang, Jiaheng Liu, Minghao Liu, Xiang Yue, et al. Kor-bench: Benchmarking language models on knowledge-orthogonal reasoning tasks. In International Conference on Learning Representations, volume 2025, pp. 80062–80161, 2025.
Costin-Andrei Oncescu, Depen Morwani, Samy Jelassi, Alexandru Meterez, Mujin Kwun, and Sham Kakade. The recurrent transformer: Greater effective depth and efficient decoding. arXiv preprint arXiv:2604.21215, 2026.
Taekhyun Park, Yongjae Lee, Dohee Kim, and Hyerim Bae. Loopus: Recasting pretrained llms into looped latent refinement models. arXiv preprint arXiv:2605.11011, 2026.
Shishir G Patil, Huanzhi Mao, Fanjia Yan, Charlie Cheng-Jie Ji, Vishnu Suresh, Ion Stoica, and Joseph E. Gonzalez. The berkeley function calling leaderboard (BFCL): From tool use to agentic evaluation of large language models. In Forty-second International Conference on Machine Learning, 2025.
William Peebles and Saining Xie. Scalable diffusion models with transformers. In 2023 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 4172–4182. IEEE, 2023.
Hayden Prairie, Zachary Novack, Taylor Berg-Kirkpatrick, and Daniel Y Fu. Parcae: Scaling laws for stable looped language models. arXiv preprint arXiv:2604.12946, 2026.
Valentina Pyatkin, Saumya Malik, Victoria Graf, Hamish Ivison, Shengyi Huang, Pradeep Dasigi, Nathan Lambert, and Hanna Hajishirzi. Generalizing verifiable instruction following. Advances in Neural Information Processing Systems, 38, 2026.
David Rein, Betty Li Hou, Asa Cooper Stickland, Jackson Petty, Richard Yuanzhe Pang, Julien Dirani, Julian Michael, and Samuel R Bowman. Gpqa: A graduate-level google-proof q&a benchmark. arXiv preprint arXiv:2311.12022, 2023.
Nikunj Saunshi, Nishanth Dikkala, Zhiyuan Li, Sanjiv Kumar, and Sashank J Reddi. Reasoning with latent thoughts: On the power of looped transformers. In International Conference on Learning Representations, volume 2025, pp. 14855–14881, 2025.
Kristian Schwethelm, Daniel Rueckert, and Georgios Kaissis. How much is one recurrence worth? iso-depth scaling laws for looped language models. arXiv preprint arXiv:2604.21106, 2026.
Zayne Sprague, Xi Ye, Kaj Bostrom, Swarat Chaudhuri, and Greg Durrett. Musr: Testing the limits of chain-of-thought with multistep soft reasoning. In International Conference on Learning Representations, volume 2024, pp. 14670–14728, 2024.
Mirac Suzgun, Nathan Scales, Nathanael Schärli, Sebastian Gehrmann, Yi Tay, Hyung Won Chung, Aakanksha Chowdhery, Quoc Le, Ed H Chi, Denny Zhou, et al. Challenging big-bench tasks and whether chain-of-thought can solve them. In Findings of the Association for Computational Linguistics: ACL 2023, pp. 13003–13051, 2023.
Victor Conchello Vendrell, Arnau Padres Masdemont, Niccolò Grillo, Jordi Ros-Giralt, Arash Behboodi, and Fabio Valerio Massoli. Memory-efficient looped transformer: Decoupling compute from memory in looped language models. arXiv preprint arXiv:2605.07721, 2026.
Shaowen Wang, Ge Zhang, Kairong Luo, Yuhao Wu, Shaofan Liu, Jiaheng Liu, Wenhao Huang, Shen Yan, and Jian Li. Smelt: Scaling laws for compute-matched moe looped transformers. arXiv preprint arXiv:2609.01343, 2026.
Yubo Wang, Xueguang Ma, Ge Zhang, Yuansheng Ni, Abhranil Chandra, Shiguang Guo, Weiming Ren, Aaran Arulraj, Xuan He, Ziyan Jiang, et al. Mmlu-pro: A more robust and challenging multi-task language understanding benchmark. Advances in Neural Information Processing Systems, 37:95266–95290, 2024.
Jonathan Williams and Esin Tureci. Prioritize the process, not just the outcome: Rewarding latent thought trajectories improves reasoning in looped language models. arXiv preprint arXiv:2602.10520, 2026.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.
Jian Yang, Shawn Guo, Wei Zhang, Tianyu Zheng, Yaxin Du, Haau-Sing Li, Jiajun Wu, Yue Song, Yan Xing, Qingsong Cai, et al. Loopcoder-v2: Only loop once for efficient test-time computation scaling. arXiv preprint arXiv:2606.18023, 2026.
Abbas Zeitoun, Lucas Torroba-Hennigen, and Yoon Kim. Hyperloop transformers. arXiv preprint arXiv:2604.21254, 2026.
Yifan Zhang and Team Math-AI. American invitational mathematics examination (aime) 2025, 2025.
Yifan Zhang and Team Math-AI. American invitational mathematics examination (aime) 2026, 2026.
Rui-Jie Zhu, Zixuan Wang, Kai Hua, Tianyu Zhang, Ziniu Li, Haoran Que, Boyi Wei, Zixin Wen, Fan Yin, He Xing, et al. Scaling latent reasoning via looped language models. arXiv preprint arXiv:2510.25741, 2025.
Terry Yue Zhuo, Minh Chien Vu, Jenny Chim, Han Hu, Wenhao Yu, Ratnadira Widyasari, Imam Nur Bani Yusuf, Haolan Zhan, Junda He, Indraneil Paul, et al. Bigcodebench: Benchmarking code generation with diverse function calls and complex instructions. In International Conference on Learning Representations, volume 2025, pp. 66602–66656, 2025.
Appendix
A Theoretical Perspective on Gated Recurrent Refinement
This appendix formalizes the main theoretical claims in Section 3.2. We study one looped physical layer in the abstract residual form
where is the hidden state entering the layer, is the effective residual transformation of that layer, and
with the hidden-wise gate vector for loop . The ungated case corresponds to for all .
We make precise three points used in the main text: (i) gating reduces worst-case perturbation amplification across loops, (ii) in a local small-step regime, multi-loop execution admits a depth-like first-order expansion, and (iii) the value of gating is not to make such an expansion possible in principle, but to make its assumptions more plausible in practice.
A.1 Local Assumptions
We work in a neighborhood containing the recurrent trajectory of interest and assume:
- Local Lipschitzness. There exists such that
- Local smoothness. is differentiable on with bounded first derivatives. Equivalently, there exists such that for all sufficiently close to ,
- Bounded gate operators. For each loop , there exists such that
These are local assumptions only. They are intended to describe the recurrent refinement trajectory actually visited during looping, not the global behavior of the full network.
A.2 One-Step Stability
We first quantify how gating improves local stability by shrinking the residual contribution at each revisit.
Proposition 1 (one-step stability bound). Under (22) and (24), the recurrent map
satisfies
Consequently, for any two trajectories and that remain in ,
Proof. For any ,
Taking norms and applying the triangle inequality gives
Using (22) and (24),
which proves (26). Iterating over yields (27).
Ungated comparison. If , then and the one-step factor becomes
Thus, whenever , gating strictly reduces the worst-case amplification contributed by the residual branch.
Interpretation. This is the local stability statement behind (9) in the main text. Gating does not remove the residual transformation; it attenuates its worst-case contribution to perturbation growth, making repeated reuse better conditioned.
A.3 First-Order Expansion in the Small-Step Regime
We next formalize the depth-like interpretation of looping. The key point is that if each gated write is small relative to the local hidden-state scale, then the trajectory remains near , and repeated execution admits a controlled first-order expansion.
Proposition 2 (first-order depth expansion). Assume that the recurrent trajectory remains in U and that each gated residual step is uniformly small:
Then
Moreover, under (23),
Proof. From (20),
Hence, by repeated use of the triangle inequality and (32),
which proves (33).
Now write
By (23) and (33),
Unrolling (20),
Substituting (37) into (39),
Using (24) and (38),
where the last step uses and the fact that each residual step has size at most . Therefore,
which proves (34).
Ungated comparison. If , the same argument yields
So the point is not that only gated recurrence admits such an expansion. Rather, gating replaces repeated full-strength residual accumulation with loop-dependent small-step accumulation, which makes the underlying local regime much more plausible in practice.
Interpretation. Equation (34) is the formal version of the main-text claim that a looped layer behaves like a depth-expanded residual stack to leading order. This is not equivalence to an arbitrary untied depth-R network. The claim is narrower: in a local small-step regime, repeated execution decomposes into a shared residual accumulation term plus a controlled higher-order correction.
Connection to measurements. In the main experiments, later-round hidden updates are empirically small relative to the ambient hidden-state scale, and cumulative displacement remains modest across loops. These measurements support the local small-step regime assumed above and help explain why gated looping remains useful beyond R = 2.
A.4 Jacobian View
A complementary local view comes from the Jacobian of the recurrent map.
Proposition 3 (Jacobian control). Assume F is differentiable on U. Then
Consequently,
In particular, if on , then
Proof. Differentiate . Since is constant with respect to ,
which proves (44). Taking operator norms and using submultiplicativity gives (45); then (24) gives (46). ☐
Interpretation. The Jacobian bound shows that gating keeps each recurrent step closer to identity plus a controlled correction. This is the differential analogue of the one-step Lipschitz bound: smaller gated writes imply less abrupt distortion of local hidden-space geometry.
A.5 Continuous-Depth Interpretation
The recurrence in (20) can also be viewed as a discretized residual flow,
where is diagonal and positive semidefinite. If one discretizes time with step sizes and identifies
then (20) becomes
which is an explicit Euler step for (48). In this view, the gate acts as a learned coordinate-wise step-size controller. This interpretation is most meaningful precisely in the same small-step regime used in Section A.3.
A.6 Discussion
The results above support a narrow but practically relevant conclusion for post-training upcycling. Section A.2 shows that gating reduces worst-case perturbation amplification across loops. Section A.3 shows that, in a local small-step regime, repeated execution admits a depth-like first-order expansion with shared weights and loop-dependent coefficients. Section A.4 shows that gating keeps each recurrent map closer to identity in local geometry.
Taken together, these results clarify the role of hidden-wise gating. It does not add new parametric knowledge, nor does it make a recurrent layer equivalent to an arbitrary untied deeper network. Its role is more specific: it places repeated layer reuse in a better-conditioned local regime, where additional loops are more likely to act as controlled residual refinement rather than repeated full-strength overwrite. This is precisely the regime needed for stable and useful post-training depth upcycling.