Layer normalization
Standardises each example across its own features, then lets the model rescale and shift the result. Because it never looks across the batch, it behaves identically at batch size one — which is why transformers use it and not batch norm.
- The mean over the feature dimension of this example.
- The variance over the same dimension.
- A learned per-feature scale.
- A learned per-feature shift.