Scaling inference computation offers a way to improve diffusion transformers (DiTs), but taking more sampling steps leaves the depth of each denoising prediction unchanged. Recurrently reusing Transformer blocks increases computation within each step, allowing further refinement of hidden representations. Retrofitting pretrained models enables this capability without repeating pretraining, but requires blocks learned for fixed-depth computation to refine states produced by their own repeated application. The challenge is to use each additional pass to correct local errors without disrupting the structure established by earlier passes. We introduce LoopFit, which uses feedback from earlier passes to guide refinement at each image patch. Residual Attention Modulation (RAM) uses each patch's feature change in one pass to scale and shift its input to attention in the next. During training, Residual Relay Loss (RRL) gives greater weight to patches whose prediction errors persist across passes. A noise-dependent depth schedule speeds up sampling by using four passes at high noise and one at lower noise levels. At comparable cost, backbones trained with four passes solve more problems using recurrent depth than extra sampling steps. Across 12 visual puzzle settings, LoopFit solves 89.8% of boards, compared with 87.8% for the strongest baseline evaluated on all 12. Most of the gain comes from tracing long paths on mazes and frozen lakes.
Figures & tables
Figure 1: What returns to the shared DiT core? The schematic follows the last two letters of the sign. Their bottom strokes reach the same length as one shrinks (dashed outline) and the other grows (solid blue). Both models reuse the current state at fixed diffusion time. LoopFit also conditions the next pass on each patch’s signed feature change.
Figure 2: LoopFit. (a) The pretrained core repeats at fixed t . Training decodes every exit y^r . Sampling decodes only the selected exit. The marked cells in (b) and (c) trace one position i in computations applied to every image patch. (b) From the second pass, Residual Attention Modulation (RAM) adds a correction from the preceding signed feature update at i to the time-and-loop term shared across patches. Their sum sets the scale and shift before the image QKV projections. (c) Residual Relay Loss (RRL) compares the velocity derived from y^r with the training target. The history through exit r sets the weight on the new error er+1(i) at that position. Weights average to one across patches in each image. Dashed signal arrows mark detachment.
FrozenLake
Maze
TSP
Sudoku
Model
Params
16
32
Hard
16
32
Hard
12
15
Hard
40
35
Hard †
Avg.
Zero-shot
GPT-5
–
3
0
0
0
0
0
0
0
0
0
0
1
0.3
Gemini-3-Flash
–
52
3
0
0
0
0
25
9
4
29
3
0
10.4
Qwen3-VL-32B [ 6 ]
32B
0
0
0
0
0
0
0
0
0
0
0
0
0.0
Qwen-Image-Edit-2511 [ 48 ]
20B
0
0
0
0
0
0
0
0
0
0
0
0
0.0
Table 1: Reasoning by generation. Success (%) on 100 puzzles per setting. Hard uses FrozenLake boards with 100-move shortest paths, independently generated long-path Maze-32 boards and released 18-city TSP instances. † Sudoku Hard uses the released 30-given puzzles re-rendered with our training typeface and layout. Avg. covers all 12 settings. Dashes denote unavailable scores. Each LoopFit model uses 20 Euler steps and four passes per step.
Model
Composition
Reasoning
Overall
MiniT2I-B/16
68.46
49.77
56.00
NaiveLoop
75.68
47.80
57.09
LoopFit
76.86
49.40
58.55
Table 2: Composition and reasoning on T2I-CoReBench. The overall score averages all 12 tasks, four for composition and eight for reasoning. All three denoisers have 0.26B parameters.
(a) Component ablation Success rate (%)
Adaptation
Maze
Sudoku
RAM
RRL
Regular
Hard
Regular
Hard
–
–
73.44
34.38
98.33
48.33
✓
–
71.88
41.67
99.00
52.00
–
✓
73.44
34.90
98.33
50.42
✓
✓
75.00
57.29
98.67
53.50
Table 3: Residual feedback during adaptation. (a) With RAM off we fit shared modulation. With RAM on we freeze it and fit the patch correction. RRL off uses uniform patch weights. Backbone, shared-controller and adaptation budgets are 3K/120/400 updates for Maze (64 regular, 192 hard boards, one seed) and 10K/120/3K for Sudoku (300 regular, 600 hard, two-seed mean). (b) With RAM on, we vary the error history on 384 independent long-path mazes and the same hard Sudoku boards.
Figure 3: Puzzle solving and text-to-image composition. (a) The crops show the boxed region. Both DiffThinker variants stop after 60 moves on the full board, while LoopFit reaches the goal in 100. (b) Boxes mark empty cells and underlines mark repeated sixes. (c) The prompt specifies three small green-capped mushrooms at the base of a large purple one. Only LoopFit matches that count in this example.
Figure 4: Recurrent refinement on Hard Maze. The curves show final success on 384 mazes with depth fixed across 20 Euler steps. The images show the clean prediction after each pass of a single four-pass forward through each model at the first denoising step. Both models receive the same maze and initial noise. Percentages below the images give path IoU, scored before recoloring the predictions to match the curves.
Figure 5: High-error patches persist across passes. The mug comes from the FLUX-Reason text-rendering subset [ 13 ] . The error maps share a color scale. Orange outlines patches in the highest-error fifth at both passes, tracing the lettering, crossed rackets and parts of the handle.
4 training passes
8 training passes
Inference passes
4
8
4
8
Maze (384)
50
45
35
82
Sudoku (600)
48
86
16
70
Table 4: Training and inference depth. Entries count solved boards on long-path Maze-32 and hard Sudoku. All RRL backbones train for 3K updates. Eight passes at training time cost more per update than four.
Time + loop
With RAM
RAM vs. control
L
Solved
+/−
Solved
+/−
Gained
Lost
1
23
—
23
—
0
0
2
201
179/1
276
255/2
84
9
3
292
97/6
337
66/5
50
5
4
347
58/3
366
30/1
19
0
Table 5: Patch feedback at matched inference depth. Both adapters use the same 8K backbone and the same 384 long-path mazes. Within each model, +/− counts solutions gained or lost from depth L−1 to L . The last two columns compare RAM with the time-and-loop control at fixed L .
Figure 6: Where should extra inference compute go? Both comparisons start from one pass per step and 20 Euler steps (open circle). Each point uses the same boards and initial noise within a task. Time is the median per batch of 16 after warm-up.
Figure 7: Allocating recurrent passes at inference. Bars show median H800 time per batch of 16. Labels inside the bars give success rates on 384 mazes and 600 Sudoku puzzles (seed 43 for Sudoku). All policies use 20 Euler steps and the same initial noise. Exit thresholds are 0.331 for Maze and 0.105 for Sudoku.
Diffusion Transformers use attention-based networks to generate and transform images, video, audio, and other structured data through iterative denoising.
Looped transformers reuse one block of shared weights along the depth of the network. Recent looped diffusion transformers are trained from scratch, which repeats the full pretraining cost although strong pretrained non-looped diffusion transformers exist. We propose Distill to Loop (Dooop), which distills a pretrained non-looped diffusion transformer into a looped student whose blocks are initialized from the teacher's. We cast distillation as a fixed-point iteration toward the teacher, in which the output after every loop is trained toward the teacher, and each loop is one step of an ordinary differential equation in depth. As a result, one model runs any number of loops at test time without retraining, and the higher-order ODE solvers of diffusion model sampling can be applied along the depth dimension for better results. Meanwhile, because a looped model produces an output after every loop, we also construct loop guidance between the outputs of different loop counts, which improves the generated samples at little extra compute. On SD3-medium, a looped student with about 37% of the teacher's parameters matches the teacher on average over GenEval, ImageReward, PickScore and HPSv2.1 with two to four loops, and with two loops it uses about 58% of the teacher's compute. And on a four-step SD3-medium, loop guidance raises the average of the four metrics from 88.2 to 99.2.
Reusing Transformer blocks offers a way to increase diffusion-model computation at test time, but naive recurrence can degrade generation beyond its training depth. We introduce LoopREG, a representation-supervised recurrent diffusion Transformer that repeatedly applies a shared block at the state supervised by a pretrained visual encoder. Alignment is applied after the final recurrent visit during training; inference extends the same learned operator to additional visits. On ImageNet 256 x 256, LoopREG reduces SiT-B/2 FID from the local REG baseline's 15.08 to 4.91 at 400K training steps, a 67.41% reduction. Within a checkpoint trained with two visits, one extra inference visit improves FID from 14.71 to 5.34 with unchanged weights. The benefit persists on SiT-L/2 and SiT-XL/2. Controlled interventions show that useful recurrence follows the location of representation supervision, while REPA alignment produces a smaller extrapolation benefit. These results make representation-supervised recurrence a practical route to improving diffusion generation through additional inference depth.
Zipeng Wang, Anping Xiong, Jing Zhang +17
Chongqing University of Posts and Telecommunications · China United Network Communications Group Co., Ltd. · University of Electronic Science and Technology of China +1
Looped transformers scale computational depth without increasing parameter count by repeatedly applying a shared transformer block and can be used for iterative refinement, where each loop rewrites a full fixed-size prediction in parallel. On difficult problems, such as those that require search-like computation, reaching a highly structured solution starting from noise can require long refinement trajectories. Learning such trajectories is challenging when training specifies only the target solution and provides no supervision over the intermediate refinement path. Diffusion models tackle this issue by corrupting data with varying magnitudes of noise and training the model to reverse it in a single step. However, this process misaligns training and testing behaviour. We introduce Denoising Recursion Models, a method that similarly corrupts data with noise but trains the model to reverse the corruption over multiple recursive steps. This strategy provides a tractable curriculum of intermediate states, while better aligning training with testing and incentivizing non-greedy, forward-looking generation. Through extensive experiments, we show this approach outperforms the Tiny Recursion Model (TRM) on ARC-AGI, where it recently achieved breakthrough performance.
Chris Cameron, Wangzheng Wang, Nikita Ivanov +3
Huawei Technologies · University of Waterloo · University of Toronto