English

Test-time Batch Normalization

Machine Learning 2022-05-23 v1 Computer Vision and Pattern Recognition

Abstract

Deep neural networks often suffer the data distribution shift between training and testing, and the batch statistics are observed to reflect the shift. In this paper, targeting of alleviating distribution shift in test time, we revisit the batch normalization (BN) in the training process and reveals two key insights benefiting test-time optimization: (i)(i) preserving the same gradient backpropagation form as training, and (ii)(ii) using dataset-level statistics for robust optimization and inference. Based on the two insights, we propose a novel test-time BN layer design, GpreBN, which is optimized during testing by minimizing Entropy loss. We verify the effectiveness of our method on two typical settings with distribution shift, i.e., domain generalization and robustness tasks. Our GpreBN significantly improves the test-time performance and achieves the state of the art results.

Keywords

Cite

@article{arxiv.2205.10210,
  title  = {Test-time Batch Normalization},
  author = {Tao Yang and Shenglong Zhou and Yuwang Wang and Yan Lu and Nanning Zheng},
  journal= {arXiv preprint arXiv:2205.10210},
  year   = {2022}
}