Layer Normalization (2016) › The Problem
History of Language AIAll chapters Layer Normalization (2016) › The ProblemOne section · Sections in this chapter2 / 7 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
The success of batch normalization in training deep convolutional networks had created significant enthusiasm about applying similar techniques to recurrent neural networks. Researchers hoped that normalizing activations in RNNs would provide the same benefits seen in CNNs: faster training, higher learning rates, and more stable gradients. However, attempts to apply batch normalization directly to recurrent networks revealed fundamental incompatibilities between the technique and the nature of sequence modeling.
Batch normalization computes statistics across the batch dimension, meaning it normalizes each feature across all samples in a batch. For a batch of images, this works well because each sample has the same structure: the same number of pixels, the same spatial dimensions, and the same feature maps. However, sequence data presents a fundamentally different challenge. Sequences can vary dramatically in length, from short phrases of a few words to long documents spanning thousands of tokens. When processing variable-length sequences, padding or truncation is necessary, creating artificial boundaries that distort batch statistics.
The problems became more severe when working with small batch sizes, which are common in sequence modeling tasks. Language models and sequence-to-sequence models often require processing long sequences, making it computationally expensive to use large batches. With small batches, the batch statistics used for normalization become noisy and unstable. The mean and variance computed over just a few samples provide unreliable estimates, leading to inconsistent normalization that can hurt rather than help training stability.
Another critical issue arose with online learning and inference scenarios. Batch normalization requires statistics computed over a batch of examples, but during inference, particularly in real-time applications, it's common to process single examples one at a time. While batch normalization uses running statistics computed during training, these can still be problematic when the inference distribution differs from the training distribution, or when processing sequences that are longer than those seen during training. RNNs are frequently deployed in settings where they process one sequence at a time, making batch normalization's batch-dependence a practical limitation.
Recurrent networks also have a temporal dimension that batch normalization struggles to handle naturally. Batch normalization operates at each time step independently, normalizing across the batch dimension. However, the dynamics of RNNs involve dependencies across time steps, and the normalization statistics at one time step can be affected by the sequence length and the particular samples in the batch. This creates interactions between the temporal dynamics and the batch statistics that can destabilize training, particularly for longer sequences or when sequences in a batch have different lengths.
These limitations were becoming particularly problematic as the field moved toward more sophisticated sequence models. Attention mechanisms, sequence-to-sequence architectures for machine translation, and language modeling tasks all required stable, reliable normalization that could work across different sequence lengths and batch sizes. The field needed a normalization technique that preserved the benefits of batch normalization (reduced internal covariate shift, better gradient flow, and higher learning rates) without the batch-dependent limitations.