Root Mean Square Layer Normalization

The paper introduced RMSNorm: a lighter LayerNorm variant that keeps scale normalization but removes mean-centering.

Metadata

FieldValue
PaperRoot Mean Square Layer Normalization
AuthorsBiao Zhang, Rico Sennrich
Year2019
VenueNeurIPS 2019
arXiv1910.07467
ProceedingsNeurIPS abstract
CodebzhangGo/rmsnorm
Statusfull note started

One-Line Takeaway

RMSNorm keeps the most useful part of Layer Normalization for many sequence models: rescaling a hidden vector by its feature-wise magnitude, while skipping mean subtraction and the usual additive shift.

Question

LayerNorm normalizes a hidden vector by both centering and scaling:

RMSNorm asks:

The paper’s hypothesis is that, for many neural architectures, the rescaling part is the more important stabilizing property. If that is true, the normalization block can be simpler:

Main Claim

RMSNorm normalizes by the root mean square of the hidden vector:

Then:

The durable architecture claim is:

This does not mean RMSNorm is always better than LayerNorm. It means the normalization family should be read by its axis and invariance contract, not only by its name.

Architecture Contract

ItemContract
Inputhidden vector or token residual-stream vector
Outputsame shape as input
Statisticroot mean square across feature dimension
Mean subtractionno
Learned scaleusually yes,
Learned shiftusually no in the canonical RMSNorm form
Train/eval behaviorsame formula; no running statistics
Main invariantrescaling invariance
Common placementpre-norm Transformer blocks and recurrent blocks

For a sequence tensor:

RMSNorm is usually applied independently per batch item and token:

Batch index and token index are not pooled. Only the feature axis is normalized.

LayerNorm vs RMSNorm

The difference is not cosmetic. The two blocks normalize different statistics:

DimensionLayerNormRMSNorm
Centeringsubtracts does not subtract mean
Scale statisticstandard deviation after centeringroot mean square
Additive biasusually usually omitted
Learned scale
Invariance emphasisrecentering and rescalingrescaling
Running statsnono
Common modern usegeneral sequence modelsdecoder-only LLM blocks

For LayerNorm:

For RMSNorm:

If has zero mean, the two scale terms are closely related:

If has a large mean offset, they differ:

This identity explains the architectural tradeoff. RMSNorm keeps the mean component in the vector and normalizes total magnitude. LayerNorm removes the mean component first.

Invariance Reading

If the input is scaled by a positive scalar :

then:

So, ignoring :

This gives RMSNorm its rescaling invariance:

But RMSNorm is not recentering invariant. If:

then the RMS changes and the mean offset remains part of the normalized representation. The paper’s bet is that removing this recentering step is often acceptable.

Partial RMSNorm

The paper also proposes partial RMSNorm, or pRMSNorm. Instead of estimating RMS from every feature:

pRMSNorm estimates it from a subset of features:

The idea is:

while preserving the same style of rescaling invariance in expectation. For most modern LLM reading, the standard full-feature RMSNorm is the important artifact; pRMSNorm is useful as a reminder that normalization statistics are also an efficiency design choice.

Block View

RMSNorm is usually not read as a standalone architecture family. It is a block inside a residual architecture.

Pre-norm Transformer form:

This is why RMSNorm appears in LLaMA-style models together with:

ComponentRole
RMSNormresidual-stream scale control
RoPErelative position behavior in attention
SwiGLUgated feed-forward nonlinearity
pre-norm layoutstable residual path
causal self-attentionautoregressive token modeling

The individual block is small, but the combination became a standard decoder-only Transformer recipe.

Evidence to Read

The paper evaluates RMSNorm against LayerNorm across sequence-model settings and reports similar performance with lower runtime overhead.

ClaimEvidence TypeWhat It SupportsCaveat
recentering can be removedLayerNorm vs RMSNorm comparisonrescaling may be enough in tested modelstask/model scale predates modern trillion-token LLMs
RMSNorm is cheaperoperation count and runtimeremoving mean subtraction reduces overheadreal gains depend on kernel fusion and hardware
pRMSNorm can approximate full RMSNormsubset statistic experimentsstatistic estimation is a design axisless common in current foundation model recipes
sequence models tolerate RMSNormRNN/Transformer-style experimentsnormalization contract transfers across architectureslater LLM adoption also depends on broader recipe

Do not read the paper as “RMSNorm always beats LayerNorm.” Read it as a block-level simplification with a clear invariance claim.

Relation to Other Architecture Notes

PaperSimilarityDifference
Layer Normalizationper-example feature-axis normalizationLayerNorm centers and scales; RMSNorm scales by RMS only
Attention Is All You NeedTransformer blocks need normalization for stabilityoriginal Transformer used LayerNorm rather than RMSNorm
LLaMAmodern decoder-only stack uses RMSNormLLaMA is a full model recipe, not only a normalization paper
Batch Normalizationnormalizes activations to stabilize trainingBatchNorm uses batch statistics and usually train/eval modes
FlashAttentionefficiency matters for common Transformer primitivesFlashAttention changes attention scheduling; RMSNorm changes normalization contract

Why This Matters

RMSNorm is easy to overlook because it is a small equation. But small blocks matter when they are repeated in every layer and every token.

For a deep decoder-only Transformer:

where is the number of layers. During training, each call also participates in backward computation. At large scale:

RMSNorm also matters for reading modern model cards and architecture tables. If a paper says only “Transformer backbone,” you still need to ask:

  • Is the block pre-norm or post-norm?
  • Is the normalizer LayerNorm or RMSNorm?
  • Does the normalizer include bias?
  • Is the final output norm separate?
  • Are normalization parameters exempted from weight decay?

Limitations

  • RMSNorm does not remove mean offsets, so it is not a drop-in conceptual replacement when centering is important.
  • Runtime gains depend on implementation quality; unfused kernels may hide or exaggerate the benefit.
  • Paper-scale experiments are much smaller than modern foundation model training.
  • pRMSNorm adds estimator choices that can complicate reproducibility.
  • In a full model, gains from RMSNorm are entangled with residual layout, optimizer, initialization, learning-rate schedule, data, and compute.

Common Misreadings

MisreadingBetter Reading
RMSNorm is just LayerNorm with a different nameit removes mean subtraction and usually the additive shift
RMSNorm explains LLaMA performanceit is one part of the LLaMA-style block recipe
faster normalization always means faster modelattention, MLP, memory bandwidth, and kernel fusion may dominate
RMSNorm is always betterit trades recentering invariance for a simpler scale contract
normalization is only an optimization detailrepeated norm placement is part of architecture design

What to Remember

RMSNorm’s core equation is:

The core conceptual move is:

For architecture reading, RMSNorm should be tracked as a first-class block whenever a paper discusses modern decoder-only Transformers, long-context models, or efficient sequence modeling.