Normalized coordinate variance in layer normalization

ID: normalized-coordinate-variance-in-layer-normalization

The normalized coordinate variance in layer normalization is the variance across coordinates of the normalized core, with divisor equal to the number of coordinates. This is not a variance across training cases. If the input's centered coordinate variance is and layer-normalization epsilon is , the core has zero coordinate mean and variance
The calculation is given in layer-normalization epsilon. The divisor convention agrees with the implementation's correction-zero variance.[ref]
An original inverse calculation asks how large must be to attain a desired core variance . Solving the displayed relation gives
For chosen and target , we need . The two-coordinate input has that variance and normalized core , whose variance is exactly . Reaching instead requires . With fixed positive epsilon, exact unit core variance is never attained at finite .
The restriction applies to the core, before the learned affine transformation. For the first example, uniform layer-normalization gain and zero layer-normalization bias produce coordinate variance . Unequal gains or biases can change both the mean and variance. A test that assumes the full output must always have unit variance would therefore reject valid layer-normalization computations.

New to topics? Read the docs here!