[Paper Review] Cross-Iteration Batch Normalization
This paper proposes Cross-Iteration Batch Normalization (CBN), a method that improves batch normalization in small mini-batch regimes by compensating for weight changes across iterations using first-order Taylor approximations, enabling accurate statistics estimation from past activations. CBN achieves performance comparable to SyncBN with minimal computational overhead, outperforming standard BN and naive cross-iteration averaging on ImageNet and COCO.
A well-known issue of Batch Normalization is its significantly reduced effectiveness in the case of small mini-batch sizes. When a mini-batch contains few examples, the statistics upon which the normalization is defined cannot be reliably estimated from it during a training iteration. To address this problem, we present Cross-Iteration Batch Normalization (CBN), in which examples from multiple recent iterations are jointly utilized to enhance estimation quality. A challenge of computing statistics over multiple iterations is that the network activations from different iterations are not comparable to each other due to changes in network weights. We thus compensate for the network weight changes via a proposed technique based on Taylor polynomials, so that the statistics can be accurately estimated and batch normalization can be effectively applied. On object detection and image classification with small mini-batch sizes, CBN is found to outperform the original batch normalization and a direct calculation of statistics over previous iterations without the proposed compensation technique. Code is available at https://github.com/Howal/Cross-iterationBatchNorm .
Motivation & Objective
- Address the well-known performance drop of Batch Normalization (BN) in small mini-batch settings due to unreliable statistics estimation.
- Overcome the challenge of non-comparable activations across iterations caused by weight updates during training.
- Improve statistical estimation quality by leveraging examples from multiple recent iterations without requiring synchronized batch processing.
- Develop a lightweight, efficient method that maintains fast inference speed while matching or exceeding the performance of SyncBN.
- Demonstrate that temporal aggregation of statistics, when properly compensated, can effectively stabilize training in low-batch regimes.
Proposed method
- Propose Cross-Iteration Batch Normalization (CBN), which computes batch statistics over a window of recent training iterations instead of just the current one.
- Compensate for distribution shifts caused by weight changes between iterations using a first-order Taylor polynomial expansion of the statistics with respect to network weights.
- Approximate the mean and variance of past activations at the current network weights using gradients of the statistics w.r.t. the weights.
- Average the compensated statistics from previous iterations with the current iteration’s statistics to form a more robust estimate.
- Use pre-computed statistics from prior iterations to avoid redundant computation, maintaining low inference overhead.
- Implement the method efficiently by storing only necessary statistics, gradients, and weight states from previous iterations.
Experimental results
Research questions
- RQ1Can cross-iteration statistics improve batch normalization performance in small-batch training when network weights change between iterations?
- RQ2How can the distribution shift between activations from different training iterations be corrected to enable reliable statistical estimation?
- RQ3Does a first-order Taylor approximation of statistics w.r.t. network weights provide sufficient compensation for weight changes in practice?
- RQ4How does CBN compare to existing normalization techniques like GN, SyncBN, and BN in terms of accuracy and efficiency on image classification and object detection tasks?
- RQ5Can CBN achieve performance close to SyncBN without requiring inter-GPU synchronization or incurring significant computational cost?
Key findings
- CBN achieves a top-1 accuracy of 70.0% on ImageNet with a batch size of 4 per GPU, significantly outperforming standard BN (65.1%) and Naive CBN (66.8%).
- With a 3-iteration temporal window and first-order Taylor compensation, CBN improves accuracy by 3.2% over Naive CBN and 4.9% over standard BN at batch size 4.
- CBN achieves performance comparable to SyncBN, which uses large-scale synchronized batches across multiple GPUs, on both ImageNet and COCO object detection.
- The method incurs only 7% extra memory and 11% higher FLOPs compared to BN, with training speed close to BN and GN, and inference speed equal to BN.
- Second-order Taylor compensation does not improve performance over first-order, indicating that first-order approximation is sufficient for effective compensation.
- Using more than one layer for compensation does not improve accuracy and increases computational cost, so one-layer compensation is used by default in practice.
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.