Normalization
Layers that rescale activations: BatchNorm, LayerNorm, RMSNorm, and more.
Batch NormalizationBatch normalization is a normalization method that rescales a layer's inputs to zero mean and unit variance using the mini-batch mean and variance, then applies a learned scale and shift. It keeps training stable even with large learning rates and greatly speeds up CNN training.
Batch RenormalizationBatch Renormalization corrects the output of batch normalization with the factors r and d, which capture the gap between the mini-batch statistics and the moving averages, so that training produces the same values as inference. It reduces the accuracy loss when training with small or non-i.i.d. mini-batches.
DeepNormDeepNorm is a method for Post-LN Transformers that scales the residual by a constant α before adding it to the sublayer output and normalizing, and initializes some sublayer weights scaled down by a factor β. It keeps updates from becoming too large early in training and made it possible to train a 1,000-layer Transformer.
Dynamic Tanh (DyT)Dynamic Tanh (DyT) replaces layer normalization in Transformers with tanh(αx), an element-wise function with a learnable scalar α. Without computing any mean or variance, it matched or exceeded normalized models on many tasks across vision, language, and speech.
Filter Response Normalization (FRN)Filter Response Normalization (FRN) normalizes one channel of one sample by dividing by its mean square without subtracting the mean, and pairs it with TLU, an activation function with a learned threshold. It does not depend on batch size and outperformed batch normalization and Group Normalization on ImageNet and COCO.
Group NormalizationGroup Normalization divides the channels of a single sample into groups and normalizes each group with its mean and variance. Because it does not use the batch axis, it keeps its accuracy even in CNNs for object detection and video, where batches are small.
Instance NormalizationInstance Normalization normalizes each channel of each image using a mean and variance computed only over its spatial positions. By removing per-image contrast differences, it greatly improved the quality of image generation tasks such as style transfer.
Layer NormalizationLayer Normalization rescales the values of all units in a layer within a single sample to mean 0 and variance 1. Because it does not depend on batch size, it is widely used in Transformers and RNNs.
LayerScaleLayerScale multiplies the output of each residual block in a Transformer by learnable per-channel coefficients (a diagonal matrix initialized to small values). It keeps each block's contribution small early in training, allowing deep image Transformers to train stably.
Pre-LN vs. Post-LNIn each Transformer layer, Post-LN places Layer Normalization after the residual addition, while Pre-LN places it before the sublayer. Because Pre-LN keeps gradients uniform across layers, it trains stably and quickly without learning rate warmup.
RMSNormRMSNorm is a normalization method that drops the mean subtraction from Layer Normalization and simply divides by the root mean square (RMS) of the values. It matches Layer Normalization in performance while being cheaper to compute, and is widely used in large language models such as LLaMA.
Spectral NormalizationSpectral Normalization divides each layer's weight matrix by its largest singular value (spectral norm), limiting how much the layer can stretch its input to at most 1. By bounding the Lipschitz constant of the GAN discriminator, it stabilizes training and improves the quality of generated images.
Switchable NormalizationSwitchable Normalization normalizes activations by mixing the means and variances of instance normalization, layer normalization, and batch normalization with weights learned per layer. The mix adapts automatically to the task and batch size, and accuracy holds up even with small batches.
Weight NormalizationWeight Normalization learns each weight vector split into a "length g" and a "direction v/‖v‖". Because it uses no data statistics, it is independent of batch size and speeds up training even in RNNs, reinforcement learning, and generative models.
