Batch Normalization (BN) has become a standard component in deep learning, enabling the training of very deep networks. However, BN suffers from two primary limitations: instability when training with small mini-batches and a performance discrepancy between training and inference modes. In this work, researchers propose Memorized Batch Normalization (MBN) and a Double-Forward Propagation (DFP) scheme to address these challenges.
The Limitations of Standard Batch Normalization
Standard BN normalizes activations using the mean and variance of the current mini-batch. This approach encounters two major hurdles:
- Small Batch Instability: With small batch sizes (e.g., $n=2, 4, 8$), the stochastic estimates of mean and variance become noisy, leading to unstable training and degraded final performance.
- The Representation Gap: During training, BN uses batch-specific statistics. During inference, it switches to a global moving average. This inconsistency means the model is evaluated differently than it was trained, often leading to a "representation gap" where testing performance lags behind training potential.
Proposed Methodology
Memorized Batch Normalization (MBN)
MBN addresses the small-batch problem by maintaining a "memory" of statistics from the $k$ most recent mini-batches. Instead of relying solely on the current batch, MBN computes weighted statistics across this temporal window. A key technical contribution is the inclusion of a correction term in the variance calculation that accounts for the shift in means between different batches, ensuring a robust and accurate estimate.
Double-Forward Propagation (DFP)
To solve the training-inference gap, the authors introduce DFP. In a standard training step, weights are updated via backpropagation. However, these updates immediately make the previously calculated batch statistics "stale." DFP introduces a second forward pass after the weight update. This pass is dedicated to updating the MBN memory with "fresh" statistics calculated using the new weights. While this adds approximately 30% to training time, it significantly improves model stability and final accuracy.
Experimental Results
The researchers evaluated MBN across several benchmarks, including CIFAR-10, CIFAR-100, and ImageNet, using architectures like VGG-16 and various ResNets.
Performance on Small Batches
MBN demonstrates significant gains in low-resource scenarios. For instance, on ResNet-56 with a batch size of 8, MBN achieved a 15.37% error rate, a substantial improvement over standard BN's 19.64%.
Architectural Robustness and Consistency
As shown in the comparative analysis across different models, MBN consistently narrows the gap between training and testing error. By ensuring that the statistics used during training are more representative of the global distribution (via memory) and perfectly aligned with current weights (via DFP), the model generalizes better to unseen data.
Conclusion
Memorized Batch Normalization, coupled with Double-Forward Propagation, provides a robust solution to the inherent weaknesses of standard BN. By leveraging temporal statistics and ensuring they remain synchronized with model updates, MBN enables effective training with small batches and eliminates the performance drop typically seen during the transition from training to inference.
Summary updated