TL;DR
Looped (weight-tied) Transformers reuse a shared residual block multiple times to increase effective depth without adding parameters, but they suffer from severe training instability at high loop counts. This paper reveals that standard $1/\sqrt{N}$ residual scaling fails because weight sharing causes successive updates to constructively align rather than cancel out. By introducing a linear $1/N$ residual scaling rule, the authors stabilize training and enable direct, zero-shot hyperparameter transfer across different loop counts.
What Problem Does This Paper Address?
Looped Transformers offer an elegant way to scale model capacity parameter-efficiently by routing tokens through the same block of layers multiple times ($N$ iterations). However, as engineers push the loop count $N$ higher, training quickly becomes unstable, leading to exploding hidden states and extreme sensitivity to the learning rate.
In standard deep networks with distinct layers ($L$), a well-established remedy is to scale down each residual branch by $\varepsilon = 1/\sqrt{L}$. Naturally, researchers assumed that substituting depth for loop count ($\varepsilon = 1/\sqrt{N}$) would stabilize looped architectures. This paper demonstrates that this assumption is fundamentally flawed and derives the correct scaling principles required to make looped Transformers stable and predictable.
Methods
The authors approach the problem by theoretically analyzing variance and norm accumulation within the residual stream under parameter reuse:
- Mathematical Proof of Norm Growth: They prove that because the weight matrix $W$ is shared across loop steps, successive residual updates are highly correlated. Instead of acting like a random walk (which cancels out and grows at $\Theta(\sqrt{L})$), the updates constructively align, causing the residual stream norm to grow linearly ($\Theta(N)$) and its variance quadratically ($\Theta(N^2)$).
- Linear Residual Scaling: To counteract this quadratic variance accumulation, the authors introduce a strict linear scaling rule: $\varepsilon = 1/N$.
-
Factored Parameterization: For practical blocks containing $L$ unique layers looped $N$ times, they derive a factored parameterization: $$\varepsilon = \frac{\lambda}{N\sqrt{L}}$$ This elegantly decouples the two sources of growth: $1/N$ controls the within-layer loop correlation, while $1/\sqrt{L}$ controls the standard across-layer variance.
-
Maximal-Update Principle ($\mu$P) Extension: Applying the maximal-update principle to the loop axis, they prove that under this factored parameterization, the optimal learning rate becomes invariant to the loop count $N$.
Datasets
The authors validated their theoretical scaling laws by training decoder-only Transformers from scratch on:
- FineWeb-Edu (10B tokens): Used for full-scale language modeling sweeps across various loop counts $N \in \{1, 2, 4, 8\}$ and unique layer depths $L \in \{12, 24, 48\}$.
Key Insights and Ideas
- The Geometry of Weight Sharing: Weight sharing fundamentally alters optimization geometry. Activations do not propagate randomly; due to the non-negativity of activations (like ReLU or SwiGLU), repeating the same matrix pushes hidden states in a consistent, dense positive direction.
- Zero-Shot Hyperparameter Transfer: Typically, changing a model's depth or loop count requires re-tuning the learning rate via expensive grid searches. The factored parameterization $\varepsilon = \lambda / (N\sqrt{L})$ ensures that a learning rate tuned at $N=1$ remains optimal when scaling up to $N=8$, treating the loop count as a freely adjustable test-time compute axis.
Key Results
- Explosion Control: At initialization and early training, $1/\sqrt{N}$ scaling fails to bound the residual stream norm, causing it to explode as $N$ increases. Linear $1/N$ scaling keeps the norm perfectly flat across all loop counts.
- Persistence Throughout Training: The dense positive cosine similarity between loop steps is not just an initialization artifact; it persists through tens of thousands of training steps, validating the core $\Theta(N^2)$ growth mechanism.
- Better Downstream Loss: When training on FineWeb-Edu at $N=8$, linear scaling achieves a lower minimum validation loss than square-root scaling (a reduction of 0.025 nats), indicating significantly better trainability.
- Invariant Learning Rates: As predicted, when using the factored parameterization, the optimal learning rate curves perfectly align across different loop counts ($N$) and cleanly scale across unique depths ($L$).
Limitations and Future Work
- Simplified Block Assumptions: The formal proofs assume a simplified shared-weight MLP block with ReLU activations. While empirical results show the rules hold perfectly for multi-head attention and SwiGLU blocks, a rigorous unified theory for attention mechanisms is still open.
- Optimizer Dynamics: The analysis does not explicitly account for complex optimizer state dynamics (such as how Adam's second moment accumulates over long horizons) or alternative normalization placements (e.g., Post-LN architectures).
- Scale Constraints: The largest model evaluated was 438M parameters trained on 10B tokens. Testing these scaling laws on multi-billion parameter production models remains an important next step.
Summary updated