On the Residual Scaling of Looped Transformers: Stability and Transferability

Shaowen Wang, Bingrui Li, Ge Zhang, Wenhao Huang, Jian LiLIT @ ICLR 2026

TL;DR

Looped Transformers, which reuse the same blocks multiple times to increase depth without increasing parameters, often suffer from training instability. This paper shows that the standard residual scaling of $1/\sqrt{L}$ is insufficient for these models and proposes a new scaling of $1/L$ that significantly improves stability and allows for hyperparameter transfer across different loop counts.

What Problem Does This Paper Address?

Deep neural networks, particularly Transformers, have seen remarkable success. A common technique to improve their performance is to increase their depth. However, simply stacking more layers can lead to training difficulties, such as exploding gradients or vanishing signals. To combat this, researchers often employ "residual scaling," where the output of each residual block is multiplied by a small factor $\epsilon$ that decreases with depth. For standard, non-shared deep networks, $\epsilon = 1/\sqrt{L}$ (where $L$ is the depth) has been found to be effective.

However, a growing trend in Transformer architectures is "looping" or "weight tying," where the same block of layers is reused multiple times. This allows for a much deeper effective network without a proportional increase in parameters. Examples include Universal Transformers and ALBERT. The problem is that this weight sharing fundamentally changes how signals propagate. The standard $1/\sqrt{L}$ scaling might not be sufficient, leading to instability and making it difficult to tune hyperparameters, especially when varying the number of loop iterations. This paper investigates the correct residual scaling for these "looped" Transformers to ensure stable training and enable hyperparameter transfer.

Methods

The authors tackle this problem by first analyzing a simplified, single-layer looped residual network. They derive theoretical conditions for stable training, focusing on how the norm of the hidden states evolves. A key insight is that weight sharing causes residual updates to become correlated, leading to a quadratic accumulation of variance, unlike the random-walk-like accumulation in non-shared networks. This necessitates a stronger scaling factor.

They then extend their analysis to multi-layer blocks, where each of the $L$ unique layers is looped $N$ times. Here, two sources of variance accumulation are identified: within-layer loop correlation (requiring $1/N$ scaling) and across-layer random walk (requiring $1/\sqrt{L}$ scaling). The authors propose a factorized parameterization $\epsilon = \lambda/(N\sqrt{L})$ that addresses both.

The theoretical findings are then validated through extensive experiments on decoder-only Transformers trained on a large language modeling dataset. They compare different scaling rules ($\epsilon=1$, $\epsilon=1/\sqrt{N}$, $\epsilon=1/N$) and analyze learning-rate transferability across varying loop counts and depths.

Datasets

The paper uses the FineWeb-Edu corpus for language modeling experiments. This is a large, publicly available dataset derived from web crawls.

Key Insights and Ideas

  • Weight sharing breaks independence: The core issue in looped Transformers is that sharing weights across iterations makes residual updates correlated. This correlation amplifies the growth of hidden state norms, moving from a $\Theta(\sqrt{N})$ growth in non-shared networks to $\Theta(N)$ in looped ones.
  • $1/\sqrt{L}$ is insufficient, $1/N$ is key: For single-layer loops, the standard $1/\sqrt{N}$ scaling is inadequate. Instead, a $1/N$ scaling is required to keep the residual-stream norm bounded. This is because the correlated updates lead to quadratic variance accumulation.
  • Factorized scaling for multi-layer loops: For more complex architectures with $L$ unique layers looped $N$ times, a factorized scaling $\epsilon = \lambda/(N\sqrt{L})$ is proposed. This elegantly separates the within-loop scaling ($1/N$) from the across-layer scaling ($1/\sqrt{L}$).
  • Hyperparameter transfer is enabled: A crucial consequence of the $1/N$ and $1/(N\sqrt{L})$ scaling is that the optimal learning rate becomes independent of the loop count $N$. This allows for direct hyperparameter transfer from models with fewer loops to those with many, saving significant tuning effort.
  • Empirical validation: The theoretical predictions are strongly supported by experiments, showing that $1/N$ scaling leads to more stable training and better learning-rate transfer than $1/\sqrt{N}$ or no scaling.

Key Results

  • Stability: Linear scaling ($\epsilon = 1/N$) successfully bounds the residual-stream norm in looped networks, whereas $\epsilon = 1/\sqrt{N}$ leads to exploding norms, especially at larger loop counts. This effect is specific to weight sharing; $\epsilon = 1/\sqrt{L}$ remains effective for non-shared deep networks.
  • Learning-rate transfer: Experiments demonstrate that with the proposed $1/N$ (for single-layer loops) and $1/(N\sqrt{L})$ (for multi-layer loops) scaling, the optimal learning rate remains nearly constant across different loop counts ($N$) and depths ($L$). This is a significant improvement over $\sqrt{N}$ scaling, which requires re-tuning.
  • Improved performance: At larger loop counts, linear scaling leads to lower validation loss, indicating better trainability.
  • Correlation persistence: The positive correlations between loop-step increments, which drive the quadratic accumulation, persist even after full training, not just at initialization.

Limitations and Future Work

  • Theoretical assumptions: The theoretical analysis relies on assumptions like ReLU activations and specific parameterizations (e.g., Gaussian weights for some proofs). While experiments use SwiGLU, the predicted scaling still holds empirically. The analysis also abstracts away optimizer state dynamics and normalization variants.
  • Model size and scope: Experiments were conducted on models up to 438M parameters. Scaling up to production-sized models and exploring heterogeneous multi-stage looped architectures are suggested future directions.
  • Ethical considerations: The work uses the FineWeb-Edu corpus, which inherits biases from web crawls. The authors acknowledge this and do not release new models or datasets.
  • Post-Norm architectures: The theoretical framework is primarily for pre-norm Transformers. Extending the analysis to post-norm architectures, where normalization placement might interact differently with weight sharing, is a promising avenue.

Summary updated

BibTeX
@inproceedings{wang2026residual,
  author = {Shaowen Wang and Bingrui Li and Ge Zhang and Wenhao Huang and Jian Li},
  title = {{On the Residual Scaling of Looped Transformers: Stability and Transferability}},
  booktitle = {LIT @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=bj8l2FYjSd},
}
Figure