mlsanityData to 7 Oct 2026

Understanding the Failure of Batch Normalization for Transformers in NLP

arXiv 2210.05153 ↗First posted 11 Oct 2022cs.CL cs.LGcited by 12

Not on the map. Why?

Abstract (arXiv)

Batch Normalization (BN) is a core and prevalent technique in accelerating the training of deep neural networks and improving the generalization on Computer Vision (CV) tasks. However, it fails to defend its position in Natural Language Processing (NLP), which is dominated by Layer Normalization (LN). In this paper, we are trying to answer why BN usually performs worse than LN in NLP tasks with Transformer models. We find that the inconsistency between training and inference of BN is the leading cause that results in the failure of BN in NLP. We define Training Inference Discrepancy (TID) to quantitatively measure this inconsistency and reveal that TID can indicate BN's performance, supported by extensive experiments, including image classification, neural machine translation, language modeling, sequence labeling, and text classification tasks. We find that BN can obtain much better test performance than LN when TID keeps small through training. To suppress the explosion of TID, we propose Regularized BN (RBN) that adds a simple regularization term to narrow the gap between batch statistics and population statistics of BN. RBN improves the performance of BN consistently and outperforms or is on par with LN on 17 out of 20 settings, involving ten datasets and two common variants of Transformer Our code is available at https://github.com/wjxts/RegularizedBN.

Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 41 of its 67 references that are in the map. First posted on arXiv 11 Oct 2022.

Builds on

41 of 67 references.

References · 41

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 6,979
  5. 2016Layer Normalizationcited by 5,579
  6. 2016Pointer Sentinel Mixture Modelscited by 2,992
  7. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
  8. 2018Group Normalizationcited by 1,514
  9. 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,486
  10. 2019Root Mean Square Layer Normalizationcited by 1,425
  11. 2018Averaging Weights Leads to Wider Optima and Better Generalizationcited by 1,194
  12. 2020On Layer Normalization in the Transformer Architecturecited by 906
29 more
  1. 2015Optimizing Neural Networks with Kronecker-factored Approximate Curvaturecited by 776
  2. 2015Train faster, generalize better: Stability of stochastic gradient descentcited by 547
  3. 2015Bidirectional LSTM-CRF Models for Sequence Taggingcited by 544
  4. 2020Improving robustness against common corruptions by covariate shift adaptationcited by 427
  5. 2018How Does Batch Normalization Help Optimization?cited by 355
  6. 2016Revisiting Batch Normalization For Practical Domain Adaptationcited by 285
  7. 2020Evaluating Prediction-Time Batch Normalization for Robustness under Covariate Shiftcited by 235
  8. 2019Understanding and Improving Layer Normalizationcited by 213
  9. 2018Understanding Batch Normalizationcited by 157
  10. 2017Batch Renormalization: Towards Reducing Minibatch Dependence in Batch-Normalized Modelscited by 127
  11. 2019Iterative Normalization: Beyond Standardization towards Efficient Whiteningcited by 92
  12. 2019A Tensorized Transformer for Language Modelingcited by 85
  13. 2020Gradient Centralization: A New Optimization Technique for Deep Neural Networkscited by 82
  14. 2018Chinese NER Using Lattice LSTMcited by 81
  15. 2019TENER: Adapting Transformer Encoder for Named Entity Recognitioncited by 69
  16. 2018Towards Understanding Regularization in Batch Normalizationcited by 56
  17. 2020Revisiting Batch Normalization for Improving Corruption Robustnesscited by 55
  18. 2021Rethinking "Batch" in BatchNormcited by 44
  19. 2018Understanding the Disharmony between Dropout and Batch Normalization by Variance Shiftcited by 36
  20. 2018Differentiable Learning-to-Normalize via Switchable Normalizationcited by 33
  21. 2019Online Normalization for Training Neural Networkscited by 29
  22. 2019Four Things Everyone Should Know to Improve Batch Normalizationcited by 28
  23. 2021Batch Normalization Orthogonalizes Representations in Deep Random Networkscited by 28
  24. 2019EvalNorm: Estimating Batch Normalization Statistics for Evaluationcited by 20
  25. 2020Cross-Iteration Batch Normalizationcited by 20
  26. 2020Towards Stabilizing Batch Statistics in Backward Propagation of Batch Normalizationcited by 19
  27. 2022Delving into the Estimation Shift of Batch Normalization in a Networkcited by 7
  28. 2020Layer-wise Conditioning Analysis in Exploring the Learning Dynamics of DNNscited by 4
  29. 2021More Identifiable yet Equally Performant Transformers for Text Classificationcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 2; 2024: 6; 2025: 2; 2026: 2.

12 papers.