Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Root Mean Square Layer Normalization

  • Problem LayerNorm's mean and variance statistics add per-step computation that grows with network size, which can offset the faster convergence it brings.
  • Method RMSNorm rescales each layer's summed inputs by their root mean square alone, dropping the mean subtraction. pRMSNorm estimates that root mean square from a fraction p of the summed inputs.
  • Results In TensorFlow RNNSearch, RMSNorm reached 22.4 SacreBLEU on newstest2014 against 22.6 for LayerNorm, at 501±11.8s against 665±32.5s per 1k training steps.

Why normalization gets expensive

LayerNorm standardizes the summed inputs of a layer with their mean and variance, which stabilizes training and speeds up convergence across many architectures. Its extra computation per step is small for shallow models with few normalization layers, but it grows as networks get larger and deeper, and then the gain in steps is offset by the cost of each step.

In the TensorFlow RNNSearch setting, the LayerNorm variant needed 665±32.5s per 1k training steps, against 399±3.40s for the baseline without normalization.

Figure 1 makes this trade-off concrete for a GRU-based RNNSearch over its first 10k training steps. Per training step, LayerNorm reaches a loss of 5.4 at the point where the baseline reaches 7.0, but per unit of training time it only reaches 5.9 at that same baseline loss. The authors read this gap as the per-step cost eroding the convergence advantage.

They hypothesize that the mean normalization therefore has little impact on why LayerNorm succeeds, and this hypothesis is what RMSNorm is built to test.

RMSNorm divides by the root mean square

RMSNorm divides each neuron's summed input by the root mean square of all summed inputs in the layer and then multiplies by a per-neuron gain. The gain \(g\) starts at 1, and the bias is added after normalization, so the layer output is \(f(\mathrm{Wx}/\mathrm{RMS}(a)\odot g + b)\).

LayerNorm subtracts the mean and divides by the standard deviation, whereas RMSNorm removes the subtraction and uses the root mean square of the raw summed inputs. The two coincide when the mean of the summed inputs is zero, but in general RMSNorm does not re-center the inputs. The authors accept giving up the invariance that mean normalization provides in exchange for a simpler computation.

The authors also tested the Euclidean norm, which differs from the RMS only by a factor of \(\sqrt{n}\), and found that it did not work for layer normalization.

Which scalings leave the output unchanged

The RMS satisfies \(\mathrm{RMS}(\alpha x)=\alpha\,\mathrm{RMS}(x)\) for a scale value \(\alpha\), so a common scale on the weight matrix or on the input cancels between the numerator and the denominator. Scaling the whole weight matrix by \(\delta\) therefore leaves the layer output unchanged, and the authors state the same for scaling the input by \(\delta\).

Scaling only individual weight vectors breaks this cancellation, because the factors no longer match the single RMS of the layer.

RMSNorm is not invariant to re-centering, since the mean is not subtracted and shifts of the inputs or weights pass through the normalization. Table 1 sets the invariance of BatchNorm, WeightNorm, LayerNorm, RMSNorm and pRMSNorm side by side.

The gradient for the weight matrix contains a term R that depends on both the inputs and the weights, and when inputs or weights are scaled by \(\delta\), R becomes R divided by \(\delta\). The authors read the resulting negative correlation with the weight scale as an implicit learning-rate adaptation that keeps the weight norm from growing too large.

Estimating the RMS from part of the inputs

pRMSNorm keeps the RMSNorm formula but computes the RMS only from the first k elements of the summed inputs, with \(k=\lceil n\cdot p\rceil\). Because the linearity property still holds on this subset, pRMSNorm has the same invariances as RMSNorm in Table 1. The justification rests on an assumption: neurons in one layer are taken to be independent and identically distributed, so a subset gives a usable estimate of the layer's RMS.

The estimate is biased, and the authors observed gradient instability, where the gradient tended to explode when fewer elements were used. In practice, the authors report that models with pRMSNorm still converged satisfactorily at a partial ratio of 6.25%.

RNNSearch and Transformer translation results

The translation experiments train on WMT14 English-German and test on newstest2014 and newstest2017, with newstest2013 used for the development curves. RNNSearch was implemented in TensorFlow with Nematus and compared without normalization, with LayerNorm, with L2-Norm, with RMSNorm, and with pRMSNorm at a 6.25% partial ratio. Time is reported as seconds per 1k training steps, averaged over three runs.

The baseline reached 21.7 on newstest2014 and 23.4 on newstest2017, LayerNorm 22.6 and 23.6, and RMSNorm 22.4 and 23.7. Per 1k training steps, the baseline took 399±3.40s, LayerNorm 665±32.5s and RMSNorm 501±11.8s, which the table gives as a 24.7% speed-up of RMSNorm over LayerNorm. pRMSNorm reached 22.6 and 23.1 at 493±10.7s, which the table gives as a 25.9% speed-up over LayerNorm.

According to the authors, both LayerNorm and RMSNorm reduced the number of training steps to convergence by about 50% relative to the baseline. The authors take the comparable accuracy of RMSNorm and LayerNorm as support for re-scaling invariance being the core property of LayerNorm. L2-Norm reached 20.7 on newstest2014 and 22.0 on newstest2017, and the authors judged that it failed to improve the model.

In this TensorFlow setting LayerNorm was slower than the baseline by about 67%, and RMSNorm improved on LayerNorm by about 25%.

Table 3 repeats the comparison with a Theano-version Nematus and with an in-house PyTorch RNNSearch. In Theano, RMSNorm reached 22.5 and 23.2 at 652±24.1s, and LayerNorm reached 22.3 and 23.8 at 988±1.10s. In PyTorch, LayerNorm took 857±17.2s and RMSNorm 763±16.2s, and across these implementations the speed-ups of RMSNorm over LayerNorm range from 11% to 34%.

The Transformer base setting was trained for 300K steps, and without normalization training failed, so its BLEU is recorded as zero. RMSNorm reached 26.8 and 27.7 against 26.6 and 27.7 for LayerNorm, at 231±0.04s against 248±1.31s per 1k training steps, a 6.9% speed-up in the table, measured on a Tesla V100. pRMSNorm reached 26.5 and 27.8 at 225±1.63s, a 9.3% speed-up over LayerNorm in the same table.

Reading comprehension on CNN/Daily Mail

The bidirectional attentive reader answers cloze-style questions by picking an anonymized entity from a passage, and it was trained on the CNN corpus. Its variants were an unnormalized baseline, two BatchNorm placements, LayerNorm, RMSNorm and pRMSNorm. RMSNorm took 333±5.20s per 0.1k training steps against 392±5.70s for LayerNorm, a 15.1% reduction in the table.

Both LayerNorm and RMSNorm reached lower validation error than the BatchNorm variants, and the two curves are comparable in the figure. pRMSNorm took 330±5.50s, a 15.8% reduction over LayerNorm, but its error is slightly higher than RMSNorm's. The BatchNorm timings come from a cuDNN-based implementation, so they cannot be directly compared with the other rows.

Image-caption retrieval with the order-embedding model

The order-embedding model learns a joint embedding of images and sentences on Microsoft COCO and is scored with Recall@K for caption and image retrieval. Averages are taken over five test sets from Microsoft COCO, and the table lists the baseline, LayerNorm, RMSNorm and pRMSNorm variants. RMSNorm reached R@1 of 48.7 for caption retrieval against 47.9 for LayerNorm, and 39.0 against 38.4 for image retrieval.

Mean rank is 5.3 for both RMSNorm and LayerNorm on caption retrieval, and 7.5 for both on image retrieval, where lower is better. pRMSNorm reached R@1 of 46.8 for caption retrieval and 39.0 for image retrieval. The table also lists previously published results, which were obtained under separate conditions and are not part of this comparison.

Per 0.1k training steps, the baseline took 2.11±0.047s, LayerNorm 12.02±0.191s, RMSNorm 7.12±0.207s and pRMSNorm 4.34±0.168s. Against LayerNorm, the table gives a 40.8% reduction for RMSNorm and 63.9% for pRMSNorm. The text puts the speed-up at 40% to 64%, which covers both RMSNorm and pRMSNorm in the table.

CIFAR-10 classification

On CIFAR-10, a modified ConvPool-CNN-C was trained following the experimental protocol of Salimans and Kingma, with the baseline, BatchNorm, LayerNorm, WeightNorm, RMSNorm and pRMSNorm. Test error was 8.96% for the baseline, 8.25% for BatchNorm, 8.28% for WeightNorm, 10.49% for LayerNorm, 8.83% for RMSNorm and 10.37% for pRMSNorm. The authors note that LayerNorm converged faster than the baseline but did not generalize to the test set.

RMSNorm's test error is 8.83% against 8.96% for the baseline, and its epoch time is 31±0.5s against 39±0.4s for LayerNorm, a 20.5% reduction in the table. pRMSNorm's epoch time is 30±0.4s, 23.1% below LayerNorm, but its test error is 10.37%. These timings were measured on a GeForce RTX 2080 Ti for this experiment, so they are not the same measurement as the translation timings.

Hidden activation statistics and initialization robustness

Table 5 reports the mean and standard deviation of the decoder GRU hidden-to-hidden mapping in RNNSearch on newstest2013, per token position and averaged over all positions. The authors describe the mean of RMSNorm as more stable than the baseline's mean, and they read this as RMSNorm stabilizing recurrent activations without normalizing the mean explicitly.

In the robustness test, the center of weight initialization was moved to 0.2 for RNNSearch in TensorFlow Nematus. LayerNorm became very unstable under this initialization, while RMSNorm was more robust, though both underperformed the original initialization. This is a single experiment on one model, and the authors read it as RMSNorm being similarly robust to LayerNorm or more so.

Limits of the efficiency and pRMSNorm claims

The authors observed gradient instability for pRMSNorm when fewer elements are used for the estimate, and their main pRMSNorm setting is a 6.25% partial ratio. pRMSNorm did not consistently give empirical speed improvements, and the authors leave its code optimization to future work.

Speed results depend on the framework, the hardware, the architecture and the cost of other components, and the authors observed speed-ups of 7% to 64% across models and implementations. The timings come from different frameworks and hardware: TensorFlow, Theano and PyTorch runs differ, and the Transformer and CIFAR-10 timings used different GPUs.

The implicit learning-rate adaptation is argued from the form of the gradient and is not measured directly in the reported experiments.

Paper info

Authors
Biao Zhang, Rico Sennrich
Venue
arXiv · Preprint
First published
2019-10-16
Added
2026-10-18
Updated
2019-10-16
Version
v1
arXiv
1910.07467
Category
cs.LG · cs.CL · stat.ML
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Biao Zhang, Rico Sennrich (2019). Root Mean Square Layer Normalization. arXiv:1910.07467v1. https://arxiv.org/abs/1910.07467v1

BibTeX
@misc{zhang2019root,
  title = {{Root Mean Square Layer Normalization}},
  author = {Biao Zhang and Rico Sennrich},
  year = {2019},
  eprint = {1910.07467},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.07467v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up