Loo-P beyond Language: Scaling Looped Transformers with Structured Residuals
Reusing a Transformer's middle blocks trades parameters for repeated computation. In three vision tasks the trade leaves training loss comparable or lower with 34.6–45% fewer parameters at matched compute. In language it still costs loss, and our recipe, Loo-P, recovers more than half of it.
1Adobe Research · 2Chinese University of Hong Kong · 3University of Wisconsin–Madison *Work done as an intern at Adobe Research*工作完成于 Adobe Research 实习期间
The paper in under two minutes: a loop that reuses 4 blocks, the three factors Loo-P puts on its residuals, and what sharing costs in four tasks.不到两分钟看完这篇论文:反复使用 4 个 block 的循环,Loo-P 加在残差上的三个因子,以及参数共享在四个任务上的代价。
TL;DR
Can shared layers be trained more effectively? A looped Transformer reuses the same layers, but each pass receives a representation that the previous pass has already changed. Loo-P adjusts how strongly attention and feed-forward layers update that representation on each pass.
Loo-P: One base learning rate is the best value in all models we swept. Across all nine language-model configurations, the learning rate chosen on a small model remained the best we tested as we increased the number of passes, the depth of the shared block, or both. The recipe adds no learned parameters.
In language, our Loo-P removes more than half of the naive loop's loss gap, not all of it. All three models ran 20 layers of computation. Validation loss fell from 2.614 with a naive loop to 2.568 with Loo-P, closing 56% of the gap to the independent-layer model at 2.532. Would sharing layers carry the same cost in vision?
Across three vision tasks, looped models reached similar or lower training loss with 35–45% fewer parameters at matched compute. The downstream results show where that translated into better performance.
3D reconstruction · Better poses and novel views
Even the naive loop estimated camera poses more accurately and reconstructed unseen views more faithfully than the independent-layer model. Loo-P improved both a little further.
With 45% fewer denoiser parameters, Loo-P edged ahead on both prompt-following benchmarks after fine-tuning. The independent-layer model retained the better FID.
Class-to-image generation · Similar training loss, higher gFID
Training loss nearly matched the independent-layer baseline, but the looped model still had worse gFID at matched compute.
A looped Transformer reuses its middle循环 Transformer 重复使用中间的层
A looped Transformer applies the same blocks more than once. We use the sandwich layout from Huginn: a Prelude of P blocks, a Core of L blocks that is applied R times with shared weights, and a Coda of C blocks. The model stores P+L+C distinct blocks and runs at an effective depth of P+RL+C.
循环 Transformer 把同一组层用不止一次。我们沿用 Huginn 的 sandwich 结构:P 层 Prelude,L 层 Core 以共享权重重复执行 R 次,最后是 C 层 Coda。模型只存 P+L+C 个不同的层,有效深度却是 P+RL+C。
The appeal is the parameter count. Our language model has P=C=2 and L=4. At R=4 it runs 20 blocks deep and stores 8: 105.79M parameters, against 190.74M for a non-looped model of the same depth and width.
More visits add depth, not parameters访问次数增加,深度变大,参数不变
The language model used throughout: Prelude 2, Core 4, Coda 2, width 768. Choose the number of Core visits.全文使用的语言模型:Prelude 2 层、Core 4 层、Coda 2 层,宽度 768。选择 Core 被访问的次数。
Core visitsCore 访问次数
Top row: the blocks a token passes through, in order. Bottom row: the blocks whose weights are stored. Orange blocks are the Core, shared across visits. The non-looped size at R = 4 is a trained baseline; at R = 2 and R = 8 it is our arithmetic from the per-block size, not a trained model.上排:一个 token 依次经过的层。下排:实际存储权重的层。橙色是 Core,各次访问共享。R = 4 时的非循环模型大小来自训练过的基线;R = 2 和 R = 8 的数字是我们按每层参数量算出来的,没有训练过对应的模型。
Two questions follow. How should hyperparameters move when R or L grows? And how much of a non-looped model's performance survives the sharing at matched compute? Loo-P is a pretraining recipe built for the first, and we use it to measure the second in four tasks. Results come first; the recipe is further down.
随之而来两个问题。R 或 L 变大时,超参数该怎么跟着变?同等算力下,共享之后还能保住非循环模型多少性能?Loo-P 是为第一个问题设计的预训练方案,我们再用它在四个任务上测第二个问题。下面先讲结果,方案本身放在后面。
One learning rate survives every shape we tried一个学习率通吃我们试过的所有形状
If a recipe transfers, the learning rate that is best for a small model is still best after the model is made deeper. We test this in language pretraining on Climb Mix, with a fixed budget of 15.27B training tokens and five seeds per setting.
The best tested learning rate does not move as the loop count grows循环次数增加,测试过的最优学习率不动
Climb Mix validation cross-entropy after 15.27B tokens; Core depth L = 4, width 768. Dots are five seeds, lines their mean, bars ±1 standard error.训练 15.27B token 后的 Climb Mix 验证交叉熵;Core 深度 L = 4,宽度 768。小点是五个种子,折线是均值,误差棒为 ±1 个标准误。
Highlight高亮
Loo-P, mean of 5 seedsLoo-P,5 个种子的均值lowest mean on the curve曲线上的最低均值best mean of our Loop-μP reproduction at the same R我们复现的 Loop-μP 在同一 R 下的最好均值
Filled markers show each curve's lowest mean; all four sit at a base learning rate of 0.0133. Each dashed line is the best of a separate learning-rate sweep for our reproduction of Loop-μP, an earlier scaling rule for looped Transformers. The horizontal axis is logarithmic. Hover or tap for values.实心标记是每条曲线的最低均值,四条都落在基础学习率 0.0133。每条虚线是我们复现的 Loop-μP(一套更早的循环 Transformer 缩放规则)单独扫学习率后的最好结果。横轴为对数刻度。悬停或点按查看数值。
All four curves reach their lowest mean at 0.0133. The dashed lines are the baseline: Loop-μP, an earlier scaling rule for looped Transformers, which we reproduced and swept over its own learning rates at each R. The Loo-P minimum is below that best value at every R; at R=8, 2.548 against 2.566.
四条曲线的最低均值都在 0.0133。虚线是基线 Loop-μP,一套更早的循环 Transformer 缩放规则:我们复现了它,并在每个 R 上单独扫了一遍学习率。在每个 R 上,Loo-P 的最低值都低于它的最好值;R=8 时是 2.548 对 2.566。
Two limits on this reading. “Best” means best on an 8-point grid, and the curves are shallow near the minimum: at R=1 the two right-most points differ by 0.0016, less than the standard error of 0.0025 at the minimum. The claim is that the minimum does not drift, not that 0.0133 is sharply optimal. And the baseline is our own reproduction of Loop-μP, adapted to the sandwich layout.
The same holds when the Core gets deeper. Here Loo-P and Loop-μP differ in kind: Loop-μP scales Core residuals by 1/\sqrt{L}, Loo-P by 1/L (the section Why divide by L and not √L gives the reason). We hold R=4 and grow L from 2 to 12; from the (R, L) = (4, 4) reference we then grow both together to (8, 8) and (8, 12). The Loo-P minimum stays at 0.0133 on this sweep's 5-point grid.
Loo-P at one learning rate stays below Loop-μP retuned for each shape只用一个学习率的 Loo-P,低于逐个形状重新调参的 Loop-μP
R
L
Effective depth有效深度
Loo-P, LR 0.0133Loo-P,学习率 0.0133
Loop-μP, best tested LRLoop-μP,所测最优学习率
Difference差值
4
2
12
2.6447
2.6720
0.0273
4
4
20
2.5680
2.5890
0.0210
4
8
36
2.4906
2.5070
0.0164
4
12
52
2.4435
2.4577
0.0142
8
8
68
2.4702
2.4870
0.0168
8
12
100
2.4250
2.4395
0.0145
Mean Climb Mix validation cross-entropy over five seeds. Loo-P uses base learning rate 0.0133 in every row; our Loop-μP reproduction uses its best tested learning rate separately for each shape. Effective depth is 4 + RL. The difference column is our subtraction, Loop-μP minus Loo-P, so a positive value means Loo-P is lower.五个种子的 Climb Mix 验证交叉熵均值。Loo-P 每一行都用基础学习率 0.0133;我们复现的 Loop-μP 每个形状单独取测试过的最优学习率。有效深度为 4 + RL。差值一列是我们自己相减得到的:Loop-μP 减 Loo-P,正数表示 Loo-P 更低。
Loo-P minima stay put as the Core deepens; Loop-μP minima moveCore 加深时,Loo-P 的最低点不动,Loop-μP 的最低点在移动
(a, b) R = 4 with L from 2 to 12. (c, d) R and L grown together. Stars mark the lowest tested mean.(a、b) R = 4,L 从 2 到 12。(c、d) R 和 L 一起增大。星号是测试过的最低均值。
(a) Loo-P, R = 4(a) Loo-P,R = 4
(b) Loop-μP (our reproduction), R = 4(b) Loop-μP(我们的复现),R = 4
(c) Loo-P, R and L together(c) Loo-P,R 和 L 一起增大
(d) Loop-μP (our reproduction), R and L together(d) Loop-μP(我们的复现),R 和 L 一起增大
Plots from the paper. Dashed lines in (a) and (c) are the lowest means from the matching curves in (b) and (d), so the Loo-P curves sit below a baseline that was retuned for each shape. In (b) the L = 2 minimum and in (d) the R = 8, L = 8 minimum sit on the edge of the grid, so those two sweeps do not locate their optima.论文原图。(a)、(c) 里的虚线是 (b)、(d) 中对应曲线的最低均值,也就是说 Loo-P 的曲线低于一个为每种形状重新调过参的基线。(b) 中 L = 2 和 (d) 中 R = 8、L = 8 的最低点都落在网格边缘,这两次扫描并没有找到它们真正的最优值。
What this buys: a learning rate tuned on a small, cheap shape can be reused on a deeper one. We tested this transfer in language pretraining only.
In language, the loop still costs loss在语言上,循环仍然要付出损失
Beating another looped recipe is not the same as matching a model with independent layers. At effective depth 20 we trained all three: a non-looped model, a naive loop that shares the same weights without our residual coefficients, and Loo-P.
Loo-P closes more than half of the naive loop's gap and leaves the restLoo-P 补上了朴素循环一半以上的差距,剩下的还在
Model模型
Parameters参数量
Effective depth有效深度
Val. CE ↓验证 CE ↓
Gap to non-looped与非循环的差距
Non-looped非循环
190.74M
20
2.53166
–
Naive loop朴素循环 (R = 4, L = 4)
105.79M
20
2.61374
+0.0821
Loo-P (R = 4, L = 4)
105.79M
20
2.56796
+0.0363
Climb Mix validation cross-entropy after 15.27B training tokens. All three models have effective depth 20 at width 768 and use the same tokenizer and validation inputs. The gap column is our subtraction.训练 15.27B token 后的 Climb Mix 验证交叉熵。三个模型有效深度都是 20、宽度 768,分词器和验证输入相同。差距一列是我们自己相减得到的。
Sharing removes 44.5% of the parameters. The naive loop pays 0.082 in validation cross-entropy for that, and Loo-P pays 0.036. More than half of the gap is gone; the rest is not.
More visits do not buy the loss back in our runs at Core depth L=4. In the learning-rate sweep above, the best Loo-P mean at R=8 is 2.548. That model runs 36 blocks deep, and it is still above the 20-block non-looped model's 2.532.
In three vision tasks, the same trade costs little or no training loss在三个视觉任务上,同样的交易几乎不抬高训练损失
We ran the same comparison in three vision tasks: 3D reconstruction with E-RayZer, text-to-image generation with MiniT2I, and class-to-image generation with PixelDiT. Each keeps its own backbone, and we loop its middle blocks. The chart puts all four tasks on one axis: training loss relative to that task's non-looped model at matched compute.
同样的对比我们在三个视觉任务上各做了一遍:E-RayZer 的 3D 重建、MiniT2I 的文生图、PixelDiT 的类别条件生图。每个任务保留自己的主干网络,我们只把中间的层改成循环。下图把四个任务放到同一根轴上:同等算力下,训练损失相对该任务非循环模型的变化。
Sharing costs loss in language and little or none in the three vision tasks参数共享在语言上损失更高,在三个视觉任务上几乎没有代价
Training loss over the final 20% of training, as a change relative to each task's non-looped model at matched compute. Left of zero is lower loss.训练最后 20% 区间的训练损失,相对各任务算力对齐的非循环模型的变化。零线左边表示损失更低。
Each row is normalized by its own non-looped model, so rows are not comparable in absolute terms. Compute is matched per task: encoder forward operations in 3D, nominal denoiser compute in text-to-image, nominal training compute in class-to-image, and effective depth in language. Loo-P values are the labels printed in the paper; naive-loop values are read from the paper's vector figure. Percentages on the right are the parameters saved by sharing; for text-to-image that is denoiser parameters against the compute-matched 473M model.每一行用自己任务的非循环模型归一化,行与行之间不能比绝对值。算力按任务各自对齐:3D 是编码器前向运算量,文生图是去噪网络的名义算力,类别条件生图是名义训练算力,语言是有效深度。Loo-P 的数值是论文图上标注的数字;朴素循环的数值是从论文矢量图里读出来的。右侧百分比是共享省下的参数;文生图一行指去噪网络参数,对比的是算力对齐的 473M 模型。
With Loo-P, training loss ends 1.35% below the non-looped model in 3D reconstruction and 0.79% below in text-to-image. In class-to-image it ends 0.21% above, and in language 1.53% above. Loo-P is ahead of the naive loop in language, text-to-image and 3D reconstruction; in class-to-image the two looped variants sit within 0.1 percentage points of each other.
Training loss is not what gets evaluated downstream, so each task's own metrics follow. Those tables give one number per model and metric, without error bars; in text-to-image, GenEval and DPG are reported both before and after fine-tuning.
3D reconstruction: looping alone already helps3D 重建:光是循环就已经有帮助
We put the sandwich in both the pose encoder and the geometry encoder of E-RayZer, with P=C=4 and L=2, and keep its prediction heads and renderer. Models are trained on the DL3DV training split and evaluated on its held-out 140-scene benchmark.
The naive loop already beats the non-looped model; Loo-P adds a little more朴素循环已经超过非循环模型,Loo-P 再多一点
Model模型
R
Parameters参数量
Encoder TFLOPs编码器 TFLOPs
RPA@5 ↑
RPA@15 ↑
PSNR (dB) ↑
Non-looped非循环
1
245.83M
1.114
74.60
89.90
20.407
Naive loop朴素循环
4
160.88M
1.114
77.46
90.48
20.519
Loo-P
4
160.88M
1.114
77.70
90.52
20.525
Loo-P
8
160.88M
1.670
79.16
90.79
20.684
E-RayZer on the held-out DL3DV benchmark. RPA is relative-pose accuracy in percent, and the @5 and @15 columns are that accuracy at two error thresholds; PSNR is for novel-view synthesis. TFLOPs count encoder forward matrix operations for one scene window of ten 256×256 views. The last row uses 1.5× the encoder compute.E-RayZer 在留出的 DL3DV 基准上的结果。RPA 是相对位姿准确率(%),@5 和 @15 两列是它在两个误差阈值下的取值;PSNR 是新视角合成的指标。TFLOPs 统计一个场景窗口(10 张 256×256 视图)上编码器前向的矩阵运算量。最后一行的编码器算力是 1.5 倍。
With 34.6% fewer parameters and the same encoder compute, the naive loop is already ahead of the non-looped model on all three metrics. Loo-P adds a smaller gain on top: RPA@5 goes from 77.46 to 77.70. Most of the improvement here comes from looping itself, not from our coefficients.
Eight visits raise all three metrics again without adding parameters. That costs 1.5× the encoder compute, so it is a second operating point, not a gain at the original budget.
One scene, same input views: the looped model repairs the floor同一个场景、同样的输入视图:循环模型修好了地板
Novel-view synthesis for one target view, from the paper. The non-looped render scores 18.55 dB PSNR and the looped render 20.03 dB. This is a single example; the table carries the evidence.论文中的一个新视角合成例子。非循环模型的渲染结果 PSNR 为 18.55 dB,循环模型为 20.03 dB。这只是一个例子,证据在上面的表里。
Text-to-image: only the Loo-P recipe puts the loop ahead on both GenEval and DPG文生图:用上 Loo-P 的方案,循环才在 GenEval 和 DPG 上都领先
MiniT2I-B/32 is a pixel-space denoiser conditioned on frozen FLAN-T5-Large text features, generating 512×512 images. The looped models use P=C=6, L=5 and R=4: 17 distinct blocks at an effective depth of 32. Training is 250K pretraining updates on CC12M, then 40K updates of supervised fine-tuning (SFT).
There are two non-looped baselines. The 17-block one matches the looped models' 260M parameters and uses about half their compute. The 32-block one matches their compute and has 473M parameters.
One difference besides the coefficients: Loo-P pretrains at a learning rate of 1.6\times10^{-3}, while the naive loop and both non-looped baselines use 4\times10^{-4}. The comparison below is therefore between whole training recipes, not between coefficients alone.
Loo-P at 260M edges past the compute-matched 473M model on GenEval and DPG; the naive loop does not260M 的 Loo-P 在 GenEval 和 DPG 上略高于算力对齐的 473M 模型,朴素循环做不到
Model模型
R
Parameters参数量
TFLOPs
GenEval ↑ pretrain → SFT预训练 → SFT
DPG ↑ pretrain → SFT预训练 → SFT
FID ↓
FD-DINOv2 ↓
CMMD ↓
Non-looped非循环
1
260M
0.438
53.34 → 84.46
78.07 → 82.63
27.63
281.740
1.0301
Naive loop朴素循环
4
260M
0.806
51.39 → 82.38
78.56 → 83.33
27.28
296.525
1.0223
Loo-P
4
260M
0.806
55.21 → 85.83
80.63 → 84.67
27.62
274.819
0.9596
Non-looped非循环
1
473M
0.806
53.58 → 85.29
80.53 → 83.86
26.32
278.751
0.9722
MiniT2I-B/32 before and after SFT. GenEval (%) and DPG-Bench measure compositional prompt following. FID, FD-DINOv2 and CMMD are all measured after SFT: FID on 30K COCO samples, and FD-DINOv2 and CMMD by comparing 30K generated images with the matching COCO reference set. TFLOPs are nominal denoiser compute.MiniT2I-B/32 在 SFT 前后的结果。GenEval(%)和 DPG-Bench 衡量对组合式提示词的遵循程度。FID、FD-DINOv2 和 CMMD 都在 SFT 之后测:FID 用 3 万个 COCO 样本,FD-DINOv2 和 CMMD 用 3 万张生成图对比对应的 COCO 参考集。TFLOPs 为去噪网络的名义算力。
After SFT the naive loop finishes behind the compute-matched 473M model on both benchmarks: 82.38 against 85.29 on GenEval, 83.33 against 83.86 on DPG. On GenEval it is also behind the 260M non-looped model, which uses about half the compute.
Loo-P reaches 85.83 on GenEval and 84.67 on DPG, with 45% fewer denoiser parameters than the 473M model. FD-DINOv2 and CMMD also favor Loo-P. The larger model keeps the lower FID, 26.32 against 27.62.
Same prompts, same initial noise: the looped model follows the spatial relation more closely同样的提示词、同样的初始噪声:循环模型把空间关系画得更准
Three prompts from the paper, non-looped on the left of each pair and looped on the right. In the two spatial prompts the looped model places the objects more clearly: the cup sits above the couch rather than on its seat, and the frisbee lies to the right of the motorcycle rather than in front of its wheel. The scissors pair is less clear-cut: the non-looped render has a single blade, and the looped one has a stray purple wedge between the handles. Selected examples; the benchmark numbers are in the table above.论文里的三条提示词,每组左边是非循环模型,右边是循环模型。在两条空间关系的提示词上,循环模型把物体的位置画得更明确:杯子在沙发上方而不是坐垫上,飞盘在摩托车右边而不是前轮跟前。剪刀这一组没那么分明:非循环模型只画出一片刀刃,循环模型在两个把手之间多出一块紫色。例子是挑选过的,基准数字见上表。
Class-to-image: at four visits the loop gives something up类别条件生图:访问四次时,循环要让出一些质量
PixelDiT-XL generates ImageNet-1K images at 256×256. We loop its patch-level Transformer (P=8, L=4, C=2) and leave its four pixel-level blocks as they are. All rows are evaluated after 400,320 updates, using 50K samples from the exponential-moving-average (EMA) weights.
At matched compute gFID goes from 2.26 to 2.75; eight visits bring it back at 1.4× compute同等算力下 gFID 从 2.26 变成 2.75;访问八次能追回来,代价是 1.4 倍算力
Model模型
R
Parameters参数量
TFLOPs
gFID ↓
sFID ↓
IS ↑
Precision ↑精确率 ↑
Recall ↑召回率 ↑
Non-looped非循环
1
797.38M
0.989
2.2583
4.9459
64.4651
0.7898
0.5990
Naive loop朴素循环
4
510.60M
0.989
2.8348
5.1585
59.3902
0.7745
0.5904
Loo-P
4
510.60M
0.989
2.7511
5.2541
59.8168
0.7776
0.5999
Loo-P
8
510.60M
1.398
2.2423
4.9312
63.6385
0.7713
0.6057
PixelDiT-XL on ImageNet-1K 256×256, evaluated with the ADM suite. gFID is the Fréchet Inception Distance of generated samples, sFID its spatial variant, and IS the Inception Score. The first three rows have matched nominal training compute; the last row uses 1.413× as much.PixelDiT-XL 在 ImageNet-1K 256×256 上的结果,用 ADM 评测套件。gFID 是生成样本的 Fréchet Inception Distance,sFID 是它的空间版本,IS 是 Inception Score。前三行的名义训练算力相同,最后一行是 1.413 倍。
Class-to-image is the vision task where sharing costs the most quality at matched compute. With 36.0% fewer parameters, training loss is within 0.21% of the non-looped model, but gFID is 2.75 against 2.26. Loo-P is ahead of the naive loop on gFID, IS, precision and recall, and slightly behind on sFID.
Going to eight visits brings gFID to 2.24 and sFID to 4.93, level with the non-looped model, and recall slightly above it. IS and precision stay lower, and the model now uses 1.413× the compute.
Same class labels and initial noise: at four visits the looped samples look cleaner while gFID is worse同样的类别标签和初始噪声:访问四次时,循环模型的样本更干净,但 gFID 更差
Rows labelled Non-loop come from the non-looped model; rows labelled Loop come from the looped model at R = 4, with the same inference FLOPs, class labels and initial noise, so each image sits directly below its non-looped counterpart. In these eight samples the looped model produces cleaner object structure, while its gFID over 50K samples is worse. A few selected images cannot settle what the distribution-level metrics measure.标着 Non-loop 的一排来自非循环模型,标着 Loop 的一排来自循环模型(R = 4),两者的推理 FLOPs、类别标签和初始噪声都相同,所以每张循环模型的图就在对应的非循环图正下方。在这八张样本里循环模型的物体结构更干净,但它在 5 万张样本上的 gFID 更差。几张挑出来的图回答不了分布层面的指标要回答的问题。Training-loss curves for all four tasks四个任务的训练损失曲线
Language语言
3D reconstruction (E-RayZer)3D 重建(E-RayZer)
Class-to-image (PixelDiT)类别条件生图(PixelDiT)
Text-to-image (MiniT2I)文生图(MiniT2I)
Plots from the paper. Orange: Loo-P. Gray: naive loop. Blue: non-looped, compute-matched. In each panel the top plot is the full run and the bottom plot is the final 20%, the window the chart above summarizes.论文原图。橙色:Loo-P;灰色:朴素循环;蓝色:算力对齐的非循环模型。每格上图是完整训练过程,下图是最后 20%,也就是上面那张图汇总的区间。
More samples from the looped models循环模型的更多样本
Looped E-RayZer on the DL3DV test split. Each scene shows five input views (left), five predicted novel views (upper right) and the ground truth (lower right).循环版 E-RayZer 在 DL3DV 测试集上的结果。每个场景:五张输入视图(左)、五张预测的新视角(右上)和对应的真值(右下)。
Images generated by the looped MiniT2I.循环版 MiniT2I 生成的图像。
Images generated by the looped PixelDiT, ImageNet 256×256.循环版 PixelDiT 生成的图像,ImageNet 256×256。
Why vision and not language? A hypothesis, not a result为什么是视觉而不是语言?这是假说,不是结论
We did not isolate the cause. The four tasks differ in architecture, data and objective all at once, so nothing here separates “vision” from “this particular backbone”.
Our working hypothesis is that looping suits tasks whose input already carries rich structure to refine step by step, and suits less well tasks that expand a sparse condition or lean on many distinct layers.
In 3D reconstruction, multi-view observations supply dense geometric constraints. Text-to-image receives a compositional prompt through a frozen text encoder. Class-to-image starts from a single class label, and it is the vision task where the loop gave up the most.
3D 重建里,多视图观测提供了稠密的几何约束。文生图通过冻结的文本编码器拿到组合式的提示词。类别条件生图只从一个类别标签出发,而它正是循环让出质量最多的视觉任务。
Each vision task predicts far more values than it reads tokens; language predicts one target per token视觉任务要预测的值远多于读入的 token;语言是每个 token 预测一个目标
Counts per training example, from the paper. E-RayZer: 3,890 input tokens and 327,680 pixel positions. PixelDiT: 256 and 65,536. MiniT2I: 512 (256 image and 256 text) and 262,144. Language: 4,096 tokens and 4,095 next-token targets, each over a 32,000-token vocabulary. Both rows use the same logarithmic scale, starting at 100.每个训练样本的数量,论文原图。E-RayZer:3,890 个输入 token,327,680 个像素位置。PixelDiT:256 和 65,536。MiniT2I:512(256 图像 + 256 文本)和 262,144。语言:4,096 个 token,4,095 个下一 token 目标,每个目标在 32,000 的词表上预测。上下两行用同一个对数刻度,从 100 起。
Language pretraining has no spatial decoding stage: 4,096 tokens go in and 4,095 next-token predictions come out. We suspect this puts more weight on independent layer capacity, which is exactly what sharing removes. That is a reading of four data points. Whether looped language models pay off in reasoning, post-training or test-time compute is outside what we measured.
The recipe: three multipliers on the Core's residual branches方案:Core 残差分支上的三个乘子
Inside the Core, at visit r, each pre-norm block computes
在 Core 内部,第 r 次访问时,每个 pre-norm 层计算
z = x + \gamma_{A,r}\,\mathrm{Attn}(\mathrm{Norm}(x)),
x^{+} = z + \gamma_{F,r}\,\mathrm{FFN}(\mathrm{Norm}(z))
The Prelude and Coda keep both coefficients at 1. In the Core, each coefficient is a product of three factors:
Prelude 和 Coda 的两个系数保持为 1。在 Core 里,每个系数是三个因子的乘积:
\gamma_{A,r} = g_{R,L}\; w_A\; v_r,
\gamma_{F,r} = g_{R,L}\; w_F\; v_r
Module-wise, set by \rho.w_A = \rho\sqrt{2/(1+\rho^2)} and w_F = \sqrt{2/(1+\rho^2)}. Their ratio is \rho and w_A^2 + w_F^2 = 2, so \rho moves weight between attention and the FFN without changing the total.
Visit-wise, set by \beta.v_r = 1 + \beta\cos\!\big(\pi (r+\tfrac12)/R\big) for r = 0,\dots,R-1, with |\beta| < 1. It averages to 1 over the visits. Its mean square is 1+\beta^2/2 for R \ge 2, 12.5% above 1 at |\beta| = 0.5, so the visit weights are normalized in the mean, not in the square. A positive \beta makes early visits larger and late visits smaller; a negative one does the reverse.
Global, g_{R,L} = (R_0/R)(L_0/L). Relative to a base shape (R_0, L_0), every Core branch shrinks in proportion as the Core is visited more often or made deeper.
The module split keeps its squared sum at 2 and the visit schedule keeps its mean at 1模块权重的平方和保持为 2,访问权重的均值保持为 1
Multipliers on the Core's attention and FFN branches at each visit, before the global factor g. The dashed line is a unit residual.每次访问时 Core 的注意力分支和 FFN 分支上的乘子,不含全局因子 g。虚线是单位残差。
Setting设置
Core visitsCore 访问次数
attention, wA·vr注意力,wA·vrFFN, wF·vr
The first three presets are the values used in the paper's four tasks; “Unit” sets every multiplier to 1. Whatever the sliders say, the squared module weights sum to 2 and the visit weights average to 1; the readout also shows the visit weights' mean square, which a nonzero β raises above 1 once R ≥ 2.前三个预设是论文四个任务实际使用的取值;“单位残差”把所有乘子都设为 1。不管滑块怎么拖,两个模块权重的平方和都是 2,各次访问权重的平均值都是 1;读数里还给出访问权重的平方均值,R ≥ 2 时只要 β 不为 0 它就高于 1。
We pick \rho and \beta with a small proxy scan per task and then hold them fixed as the model changes shape. They are constants: no learned parameters and no visit-specific weight copies.
The values are not universal. Language uses \rho=2, \beta=0.5; E-RayZer and PixelDiT use \rho=2, \beta=-0.5; MiniT2I uses \rho=1, \beta=0.5. Even the sign of \beta differs between tasks, so a new task needs its own scan.
The other half of the recipe is the optimizer. Loo-P starts from the Loop-μP parameterization and changes how things scale with Core depth: the residual exponent goes from ½ to 1, the learning rates lose their depth factor, and AdamW's \epsilon in the blocks takes a full 1/L.
Loo-P moves the Core-depth factor out of the learning rates and into the residuals and εLoo-P 把 Core 深度因子从学习率里拿掉,放进残差和 ε
Loop-μP
Loo-P
Core attention residualCore 注意力残差
x + m_R^{-1} m_L^{-1/2}\,\mathrm{Attn}
x + m_R^{-1} m_L^{-1}\, w_A v_r\,\mathrm{Attn}
Core FFN residualCore FFN 残差
z + m_R^{-1} m_L^{-1/2}\,\mathrm{FFN}
z + m_R^{-1} m_L^{-1}\, w_F v_r\,\mathrm{FFN}
Hidden-weight learning rate隐藏层权重学习率
\eta\, m_N^{-1} m_L^{-1/2}
\eta\, m_N^{-1}
Pre-norm and hidden-bias learning ratepre-norm 与隐藏层偏置学习率
\eta\, m_L^{-1/2}
\eta
AdamW \epsilon in blocks各层 AdamW 的 \epsilon
\epsilon\, m_N^{-1} m_L^{-1/2}
\epsilon\, m_N^{-1} m_L^{-1}
From the paper's parameterization table; rows that are identical in both columns are omitted. m_R = R/R_0, m_L = L/L_0 and m_N are the recurrence, Core-depth and width multipliers relative to the base model, and L counts unique Core blocks. Our sweeps hold the width fixed.摘自论文的参数化表,两列相同的行已省略。m_R = R/R_0、m_L = L/L_0 和 m_N 分别是循环次数、Core 深度和宽度相对基准模型的倍数,L 只数 Core 里不同的层。我们的扫描里宽度是固定的。
Put together, using it looks like this:
合起来,用法是这样的:
Arrange the model as Prelude, Core, Coda, and loop only the Core. Leave Prelude and Coda residuals at 1.
Pick \rho and \beta with a small proxy scan on the task, then freeze them.
Multiply each Core residual branch by (R_0/R)(L_0/L), by w_A or w_F, and by v_r for the current visit.
Scale AdamW's \epsilon in the blocks by L_0/L, and do not rescale the learning rate with R or L.
Tune the base learning rate once on a small shape and reuse it on larger ones. We checked this last step in language pretraining only.
The one place Loo-P departs from Loop-μP on the global scale is the exponent on Core depth. Loop-μP divides the residual by \sqrt{L}, the Depth-μP rule. We divide by L, the choice CompleteP makes for non-looped depth. Along the loop axis both recipes divide by R.
A scalar toy shows what the exponent controls. Take a Core of L blocks visited R times, where each block multiplies its input by 1 + (ab-1)/(RL^{\alpha}). Both weights, a and b, start at 1, so the model starts as the identity. One Adam step with learning rate \eta L^{\alpha-1} moves each weight by \delta = \eta L^{\alpha-1}, and ab - 1 becomes 2\delta + \delta^2.
一个标量玩具模型可以说明这个指数管的是什么。设 Core 有 L 层、被访问 R 次,每层把输入乘上 1 + (ab-1)/(RL^{\alpha})。两个权重 a 和 b 都从 1 出发,所以模型一开始是恒等映射。用学习率 \eta L^{\alpha-1} 走一步 Adam,每个权重移动 \delta = \eta L^{\alpha-1},ab - 1 变成 2\delta + \delta^2。
The \delta^2 term is the interaction between the two weights inside one block. We compare the full output with one that drops only that term, and take the log-ratio D of the two:
With 1/√L, the within-block interaction fades as the Core deepens; with 1/L it stays用 1/√L,层内相互作用随 Core 变深而消失;用 1/L,它保留下来
D/η² against Core depth L in the scalar toy, after one Adam step. Both axes are logarithmic.标量玩具模型走一步 Adam 之后,D/η² 随 Core 深度 L 的变化。两个坐标轴都是对数刻度。
Core visitsCore 访问次数
Base learning rate基础学习率
α = 1, residual / L (the exponent Loo-P uses)α = 1,残差 / L(Loo-P 用的指数)α = ½, residual / √L (the exponent Loop-μP uses)α = ½,残差 / √L(Loop-μP 用的指数)
Curves are drawn from the closed form above, at the paper's grid points L = 1, 2, 4, …, 1024. The paper also checks every point numerically with an explicit unrolled model. D/η² = 1 means an output ratio of exp(η²), not a unit gain in performance.曲线由上面的闭式在论文的网格点 L = 1, 2, 4, …, 1024 上画出;论文另外用显式展开的模型对每个点做了数值验证。D/η² = 1 表示输出之比为 exp(η²),并不是性能提升了一个单位。
This is an illustration of one mechanism, not evidence about Transformers. It concerns the interaction between parameters inside a block after a single update. It says nothing about whole-network linearity, multi-step optimization, or cross-entropy.
The empirical case for 1/L is the depth sweep above: with it, one learning rate stays the best tested value from L=2 to L=12, and the loss is below our Loop-μP reproduction in all six shapes.
Scale. Every model here is below a billion parameters. Whether one learning rate keeps transferring, and whether the vision results hold, further up the scaling ladder is untested.
A unified backbone. The four tasks use four different architectures, so task and architecture are confounded in the cross-task comparison. A more unified backbone would be the cleaner test.
Where language looping pays. Our language result is standard next-token pretraining. Looping may do comparatively better on multi-step reasoning, in post-training, or when compute is scaled at test time. We did not test any of these.
Looped language models.Adaptive Computation Time introduced learned halting for recurrent networks; Universal Transformers and ALBERT then shared weights across Transformer depth. Recent work scales looping up: Huginn pretrains a Prelude–Core–Coda model with variable test-time compute, Mixture-of-Recursions routes tokens to different recursion depths, and Ouro combines large-scale looped pretraining with learned depth allocation. Huang et al. separate the effects of recurrence placement, input injection and recurrent-state design, with evidence for sandwich layouts.
Beating non-looped language models at matched compute remains hard (Schwethelm et al.; Saunshi et al.), and reported gains depend on the task and on carefully designed architectures or training recipes (RINS; SMELT). Our language numbers are consistent with that.
Looping in vision.HRM, TRM and LoopViT study recurrence on puzzles and ARC. For image generation, ELT uses intra-loop self-distillation to support several inference depths, Looped-DiT adds intermediate-loop supervision, LiFT supervises a continuous depth trajectory, and Dooop distills a pretrained non-looped diffusion Transformer into a looped one. We add 3D reconstruction and compare the sharing trade-off with language under task-specific compute matching.
Hyperparameter transfer.μP showed that a suitable parameterization keeps good hyperparameters stable as width grows, and Depth-μP extended the question to residual depth. CompleteP argued that transfer alone is not enough: each block should also keep learning nonlinear features, which motivates its inverse-depth residual scaling. Loop-μP analyses weight-tied recurrence and pairs 1/R loop scaling with 1/\sqrt{L} depth scaling. Loo-P keeps the 1/R rule, takes 1/L from CompleteP, and adds the normalized module-wise and visit-wise allocation.
We thank Matthew Fisher and Kalyan Sunkavalli for supporting compute resources. We thank Qitao Zhao for his help with E-RayZer training and data processing. We thank Nanxuan (Cherry) Zhao, Hao Tan, Yao-Chih Lee, Michael Fischer, Sam Sartor and Nathan Carr for helpful discussions.
@misc{xu2026loop,
title = {Loo-P beyond Language: Scaling Looped Transformers with Structured Residuals},
author = {Xu, Yiran and Luo, Yawen and Jiang, Hanwen and Ge, Chongjian and Cai, Zefan},
year = {2026}
}