Normalization in Neural Networks

Normalization is an optimization method in neural networks that stabilizes training by controlling the scale and distribution of activations or inputs. It does not directly reduce model capacity (i.e., it is not a regularizer), but instead acts as a reparameterization of the network that improves gradient flow, reduces sensitivity to initialization, and accelerates convergence.

Given a vector , normalization computes:

where the set depends on the normalization type. Then, , such that the learned affine transform restores representational flexibility.

Normalization techniques differ in where the mean and variance are computed:

  • BatchNorm uses mini-batch statistics during training, and running averages at inference. It is performed across the batch dimension for each feature, such that

    Although BatchNorm speeds up training, makes MLPs and CNNs less sensitive to initialization, and adds mild regularization due to batch noise, it performs poorly in sequence models since batch dependence is undesirable.
    ‎
  • LayerNorm is independent of batch size, and is executed within a single sample, such that

    It is stable for variable batch sizes and has no regularization effect, and therefore is preferred across sequence models.