Abstract
Batch Normalization (BN) is a cornerstone of modern deep learning, yet its performance degrades significantly when training with small minibatches. This paper identifies a fundamental "training-evaluation discrepancy": during training, a sample is normalized using statistics that include itself, whereas during evaluation, it is normalized using a global average. We propose EvalNorm, a method to estimate corrected evaluation statistics that better match the training distribution. EvalNorm requires no changes to the training process or model architecture and can be applied post-hoc to pre-trained models. Experimental results demonstrate substantial gains, including up to a 7-point improvement in object detection tasks and a 6.18% Top-1 accuracy boost on ImageNet for small batch sizes.
Introduction
Batch Normalization (BN) has enabled the training of very deep networks by stabilizing internal covariate shift. However, BN's effectiveness is tied to the minibatch size. In scenarios where memory is a bottleneck—such as high-resolution object detection or training extremely deep architectures—researchers are often limited to small batch sizes (e.g., 1-2 samples per GPU). In these regimes, BN's performance "craters," leading to poor generalization.
The Training-Evaluation Discrepancy
The core issue identified by the authors is a structural bias in how statistics are calculated. During training, a sample $x_i$ contributes to the mean and variance of its own minibatch. Consequently, the sample is partially "normalized by itself." At evaluation time, standard practice uses an Exponential Moving Average (EMA) of training statistics. This global average lacks the specific contribution of the test sample, leading to a mismatch in activation distributions between training and inference.
The EvalNorm Method
EvalNorm (EN) corrects the inference-time statistics to account for the "self-normalization" bias. The authors demonstrate that minibatch statistics are essentially an interpolation between an individual sample’s statistics and those of the rest of the batch.
To bridge the gap, EvalNorm introduces two correction parameters, $\hat{\alpha}$ and $\hat{\beta}$, which represent the weight of the individual sample's contribution to the mean and variance, respectively. These parameters can be estimated by minimizing an auxiliary loss ($L_{aux}$) that aligns evaluation-time activations with training-time activations. Importantly, this process uses a stop_gradient operation, ensuring that only the statistics calculation is modified, leaving the network's weights untouched. For a simpler implementation, the authors provide a "rule of thumb" heuristic where $\alpha = \beta = 1/B^2$ (for batch size $B$), which provides immediate gains without explicit estimation.
Experimental Results
The authors evaluated EvalNorm across CIFAR-10/100, ImageNet, and COCO datasets.
Classification Performance
On ImageNet with a batch size of 2, EvalNorm improved ResNet-50 Top-1 accuracy by 6.18% over standard BN. On CIFAR datasets, EvalNorm consistently outperformed both standard EMA and Batch Renormalization (Renorm) across various small batch sizes.
Object Detection
Object detection is a primary use case for EvalNorm due to the high resolution of images necessitating small minibatches. In Faster R-CNN experiments on the COCO dataset, EvalNorm provided absolute Average Precision (AP) gains ranging from 1.5 to 7.0 points.
Conclusion
EvalNorm addresses the small-batch BN problem by identifying and correcting the training-evaluation discrepancy. Its primary advantage is its "post-hoc" nature: it can boost the performance of existing models trained with small batches without requiring retraining or architectural modifications. While it does not solve the training instability of small-batch BN, it makes the resulting models significantly more effective for downstream tasks.
Summary updated