[Paper Review] Towards Stabilizing Batch Statistics in Backward Propagation of Batch Normalization
This paper proposes Moving Average Batch Normalization (MABN), a novel normalization method that stabilizes batch statistics during backward propagation by replacing them with moving averages, enabling full performance recovery of vanilla Batch Normalization in small-batch settings without introducing nonlinear operations in inference. MABN achieves performance on par with standard BN even at batch size 1 or 2, matching SyncBN on COCO and ImageNet while maintaining inference efficiency.
Batch Normalization (BN) is one of the most widely used techniques in Deep Learning field. But its performance can awfully degrade with insufficient batch size. This weakness limits the usage of BN on many computer vision tasks like detection or segmentation, where batch size is usually small due to the constraint of memory consumption. Therefore many modified normalization techniques have been proposed, which either fail to restore the performance of BN completely, or have to introduce additional nonlinear operations in inference procedure and increase huge consumption. In this paper, we reveal that there are two extra batch statistics involved in backward propagation of BN, on which has never been well discussed before. The extra batch statistics associated with gradients also can severely affect the training of deep neural network. Based on our analysis, we propose a novel normalization method, named Moving Average Batch Normalization (MABN). MABN can completely restore the performance of vanilla BN in small batch cases, without introducing any additional nonlinear operations in inference procedure. We prove the benefits of MABN by both theoretical analysis and experiments. Our experiments demonstrate the effectiveness of MABN in multiple computer vision tasks including ImageNet and COCO. The code has been released in https://github.com/megvii-model/MABN.
Motivation & Objective
- To address the instability of Batch Normalization (BN) in small-batch training, especially in vision tasks like detection and segmentation where batch size is constrained by memory.
- To identify and analyze two previously overlooked batch statistics in the backward pass of BN that contribute to training instability.
- To develop a normalization method that restores the performance of vanilla BN in small-batch scenarios without adding nonlinear operations during inference.
- To provide theoretical justification and empirical validation for the proposed method across multiple vision benchmarks.
Proposed method
- The method introduces two distinct moving average statistics: Exponential Moving Average Statistics (EMAS) in forward pass and Smoothed Moving Average Statistics (SMAS) in backward pass.
- EMAS replaces batch statistics in forward propagation to stabilize feature normalization using a momentum-based update of running statistics.
- SMAS replaces batch statistics in backward propagation to stabilize gradient computation, with a modified normalization form to prevent training collapse.
- The normalization form is restructured to reduce the number of batch statistics and centralize convolutional kernel weights to improve stability.
- A renormalization strategy is applied to maintain gradient consistency and prevent divergence during training with small batches.
- The method uses a momentum-based update rule for moving statistics, with hyperparameters tuned for stability and convergence.
Experimental results
Research questions
- RQ1Why does Batch Normalization fail in small-batch training despite its success in large-batch settings?
- RQ2What are the previously overlooked batch statistics involved in the backward pass of Batch Normalization, and how do they affect training stability?
- RQ3Can the performance of vanilla Batch Normalization be fully restored in small-batch scenarios without introducing nonlinear operations in inference?
- RQ4Is there a way to stabilize both forward and backward pass statistics using moving averages while preserving the linear nature of BN for efficient inference?
Key findings
- MABN achieves a top-1 validation error of 23.58% on ImageNet with ResNet-50 using a batch size of 2, matching the performance of standard BN at larger batch sizes.
- On COCO instance segmentation, MABN achieves an AP^{bbox} of 34.85 and AP^{mask} of 31.61, comparable to SyncBN and significantly outperforming vanilla BN and BRN.
- The ablation study confirms that combining EMAS in forward pass and SMAS in backward pass is essential, as removing either component results in a significant performance drop.
- MABN maintains inference speed identical to vanilla BN, unlike instance normalization methods that double inference time due to nonlinear operations.
- Training with MABN converges stably even at batch size 1, while direct use of moving averages in the backward pass fails due to gradient instability.
- Theoretical analysis shows that the modified normalization form used in MABN is more stable than the vanilla BN form, especially in small-batch regimes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.