arXiv(opens in a new tab)cs.AIOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.11570

Scaling to Tens of Thousands of Test-Time Iterations with Loop-Native Attention Residuals

Pengxiang Li, Dilxat Muhtar, Di He, Guinan Su, Lu Yin, Shiwei Liu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Pengxiang Li 1^{1}, Dilxat Muhtar 2^{2}, Di He 3,4,5^{3,4,5}, Guinan Su 6,7,8^{6,7,8}, Lu Yin 9^{9}, Shiwei Liu 6,7,8,†^{6,7,8,\dagger}

1^{1}The Hong Kong Polytechnic University, 2^{2}Independent Researcher,

3^{3}Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences,

4^{4}Peng Cheng Laboratory, 5^{5}University of Chinese Academy of Sciences,

6^{6}ELLIS Institute Tübingen, 7^{7}Max Planck Institute for Intelligent Systems,

8^{8}Tübingen AI Center, 9^{9}Shenzhen University of Advanced Technology

†^{\dagger}Corresponding author: sliu@tue.ellis.eu

In this paper, we argue that looped Transformers need their own residual connections to prevent performance degradation as the number of iterations grows. We observe that increasing loop iterations can reduce reasoning accuracy: noisy state updates overwrite correct intermediate deductions and even undo completed solutions. This leaves subsequent iterations to recover lost information from an already degraded representation: once an error arises in an earlier loop, often as a result of long-range propagation through the recurrence, later loops find it difficult to correct. In this paper, we introduce InfiLoop, a loop-native residual connection that learns which past computations to retain and how much to accept from each new update. InfiLoop combines content-based weighting with learned temporal decay to maintain a running summary of recurrent states. An exact streaming recurrence keeps its persistent aggregation memory constant as the loop count grows. The resulting adaptive update suppresses unreliable proposals and preserves useful intermediate states. Across extensive reasoning tasks, a 7M-parameter InfiLoop model outperforms existing recursive architectures, reaching 97.9% exact accuracy on Sudoku-Extreme, and 13.6% pass@2 on ARC-AGI-2. Notably, on Sudoku-Extreme, InfiLoop continues to improve with test-time looping beyond 20,000 effective steps, showing that added depth translates directly into stronger reasoning. Our code is available at https://github.com/pixeli99/InfiLoop.

1. Introduction

Looped Transformers address complex reasoning tasks by repeatedly applying a shared Transformer block (Dehghani et al., 2019; Wang et al., 2025; Jolicoeur-Martineau, 2025). Each iteration adds another sequence of layer transformations, increasing computational depth without introducing additional parameters. This allows models to devote more computation to reasoning by executing more loops at test time (Saunshi et al., 2025; Geiping et al., 2025). A common way to connect consecutive iterations is to feed the final output of one loop directly into the next, a strategy we refer to as the carry-last rule. Although effective, this rule makes the unrolled computation equivalent to a deep network with weights shared across repeated blocks. Increasing the loop count therefore returns us to a familiar question: does adding more depth lead to more useful computation?

Standard deep Transformers suffer from the curse of depth (Sun et al., 2025), where the contribution of deeper layers progressively diminishes. Repeatedly applying a shared block can compound this limitation, as the same transformations are applied at every iteration and the residual stream grows with the loop count. Related limitations have also been examined in fixed-point looping (Movahedi et al., 2026). Existing remedies use decay or layer scaling to control residual growth and regulate update magnitudes (Sun et al., 2025; Wang et al., 2026; Movahedi et al., 2026). These interventions address how strongly each update affects the representation, but leave a central architectural choice unchanged: the next loop still receives only the latest recurrent state.

We argue that this state-replacement rule is a key bottleneck in deep looped transformers. Under carry-last, earlier computations remain accessible only through the information preserved in the latest state. Standard Pre-LN or Post-LN

(a) Accuracy against effective depth

Figure

(executed Transformer layers)

(b) State change after solving

Figure

(c) Solution still correct

Figure

Updates after first solving the puzzle

Figure 1. Carry-last keeps changing its state after solving and loses solutions. (a) Exact accuracy against effective depth, the number of executed Transformer layers, on Sudoku-Extreme. Each outer update executes 26 layers. TRM peaks at 468 layers and then loses accuracy as depth grows. (b) Relative state change after the update at which each model first solves a puzzle, for the puzzles that both models solve within 36 updates. TRM settles briefly and then moves its state again. (c) Share of those puzzles whose solution is still correct.

residual connections provide paths for this information to propagate, but do not explicitly retain and select among outputs from earlier loops. Consequently, a noisy or undesirable iteration can degrade useful representations throughout propagation, leading to sub-optimal performance, as shown in Figure 1. This motivates changing how information is combined across loops, so that further computation can build on useful intermediate states without relying exclusively on the most recent output.

To this end, we introduce InfiLoop, a loop-native residual connection that replaces the carry-last rule with learned attention over recurrent outputs. A shared pseudo-query scores each candidate when it is produced, while a learned exponential decay discounts earlier contributions. The resulting normalized aggregation forms the input to the next iteration. Crucially, shared scoring and geometric decay admit an exact streaming recurrence, requiring only a weighted-state vector and a normalization scalar per token, with persistent aggregation memory independent of the loop count. This recurrence is equivalent to an adaptive residual update that balances the accumulated state against each new candidate, allowing the model to regulate how strongly subsequent computations alter its reasoning state.

This paper establishes four findings. First, empirical diagnosis reveals that carry-last destabilizes solved states at large depth, while InfiLoop preserves solutions indefinitely. Second, the exact recurrence guarantees constant-memory state combination across arbitrarily long reasoning trajectories. Third, on extensive reasoning benchmarks, InfiLoop surpasses strong damping baselines while requiring substantially fewer layer evaluations. Fourth, inspection of the learned step size reveals an emergent self-verification behavior: the connection discounts outputs produced during unsolved search, accepts the output that completes the solution, and freezes the state once solved.

References (31)