RMSNorm Scaling
Normalize feature scale without removing the mean and compare the resulting invariances.
Free theory articleNormalize feature scale without removing the mean and compare the resulting invariances.
Concept & interpretation
Root Mean Square Normalization (RMSNorm) is a feature normalization technique that simplifies Layer Normalization by removing the mean-centering operation. It normalizes features directly using their root mean square. While mathematically simpler and computationally cheaper, RMSNorm is not completely scale-invariant if epsilon is non-zero, and it does not guarantee a zero-mean output.
Experiment
Use the RMSNorm Scaling module to observe how RMSNorm and LayerNorm behave under different input vectors and parameter settings.
- Set the Vector control to
Mixed, Epsilon to1e-06, Gain to1, and Coordinate to0. Observe the calculated outputs match the worked example. - Change the Vector control to
Offset(which adds 10 to each element of the Mixed vector). Notice how the LayerNorm output remains identical because it recenters the data, while the RMSNorm output changes significantly. - Change the Gain control to
2. Observe that all outputs scale proportionally. - Change the Vector control to
Zeroand Epsilon to0. Note that both normalization techniques result in undefined behavior (division by zero). - Change the Vector control to
Constantand keep Epsilon at0. Observe that RMSNorm is well-defined and outputs 1, while LayerNorm remains undefined because the variance is zero.