Skip to main content
QUICK REVIEW

[論文レビュー] PowerNorm: Rethinking Batch Normalization in Transformers

Sheng Shen, Zhewei Yao|arXiv (Cornell University)|Mar 17, 2020
Advanced Neural Network Applications参考文献 47被引用数 16
ひとこと要約

この論文は、自然言語処理(NLP)におけるバッチ正規化(BN)の不安定性を解消するため、ゼロ平均制約を緩和し、走査平均二乗平均を用いてバッチ統計を安定化させる、新しい正規化手法PowerNorm(PN)を提案する。PNは、ハイパーパramータの変更なしに、IWSLT14/WMT14で0.4/0.6 BLEUの向上、PTB/WikiText-103で5.6/3.0 PPLの改善を達成し、標準的な層正規化(LN)およびバニラBNを顕著に上回る性能を発揮する。

ABSTRACT

The standard normalization method for neural network (NN) models used in Natural Language Processing (NLP) is layer normalization (LN). This is different than batch normalization (BN), which is widely-adopted in Computer Vision. The preferred use of LN in NLP is principally due to the empirical observation that a (naive/vanilla) use of BN leads to significant performance degradation for NLP tasks; however, a thorough understanding of the underlying reasons for this is not always evident. In this paper, we perform a systematic study of NLP transformer models to understand why BN has a poor performance, as compared to LN. We find that the statistics of NLP data across the batch dimension exhibit large fluctuations throughout training. This results in instability, if BN is naively implemented. To address this, we propose Power Normalization (PN), a novel normalization scheme that resolves this issue by (i) relaxing zero-mean normalization in BN, (ii) incorporating a running quadratic mean instead of per batch statistics to stabilize fluctuations, and (iii) using an approximate backpropagation for incorporating the running statistics in the forward pass. We show theoretically, under mild assumptions, that PN leads to a smaller Lipschitz constant for the loss, compared with BN. Furthermore, we prove that the approximate backpropagation scheme leads to bounded gradients. We extensively test PN for transformers on a range of NLP tasks, and we show that it significantly outperforms both LN and BN. In particular, PN outperforms LN by 0.4/0.6 BLEU on IWSLT14/WMT14 and 5.6/3.0 PPL on PTB/WikiText-103. We make our code publicly available at \url{https://github.com/sIncerass/powernorm}.

研究の動機と目的

  • 標準的なバッチ正規化(BN)がコンピュータビジョン(CV)では成功しているのに対し、なぜ自然言語処理(NLP)では失敗するのかを調査すること。
  • NLPにおけるBNの性能劣化の根本的原因、特にバッチ統計の分散が大きいことによる不安定性を特定すること。
  • BNの利点を保ちつつ、NLPタスクにおける不安定性を克服できる正規化手法を開発すること。
  • PowerNorm(PN)がハイパーパramータチューニングなしに、複数のNLPベンチマークでBNおよび層正規化(LN)を上回ることを示すこと。

提案手法

  • ゼロ平均制約を緩和し、分散の代わりに走査平均二乗平均を用いて統計を安定化させる、変更されたBNとしてPowerNorm(PN)を提案する。
  • ゼロセンターを実施しない走査平均二乗平均のみを用いるPN-Vというバリエーションを導入し、一次の滑らかさを維持する。
  • 走査統計を順伝搬に組み込むための近似逆誤差伝搬スキームを提案し、勾配の有界性を保証する。
  • 理論的分析により、PNは弱い仮定のもとで損失関数のリプシッツ定数を小さくし、勾配が有界になることを示す。
  • 機械翻訳(IWSLT14, WMT14)および言語モデリング(PTB, WikiText-103)の実験を通じて、一貫した性能向上を実証する。
  • 表現力の分析として、埋め込み層の特異値分解(SVD)を用い、PNがより良好に条件付けられた埋め込みをもたらすことを示す。

実験結果

リサーチクエスチョン

  • RQ1なぜ標準的なバッチ正規化(BN)はコンピュータビジョン(CV)では成功しているのに対し、自然言語処理(NLP)では失敗するのか?
  • RQ2NLPにおけるBNの不安定性の原因は何か、特にバッチ統計の分散に起因するものか?
  • RQ3BNの利点を保ちつつ、NLPにおける訓練を安定化できるように変更されたBNのバリエーションを設計できるか?
  • RQ4バッチサイズの変化にかかわらず、PowerNormは層正規化(LN)およびバニラBNと比較して、性能と頑健性に優れているか?
  • RQ5SVDの分布を用いて測定した場合、PowerNormは学習された埋め込みの表現力が向上していると示せるか?

主な発見

  • NLPデータにおけるバッチ統計は、CVデータと比較して訓練全体で顕著に高い分散を示し、バニラBNの不安定性を引き起こしている。
  • PowerNorm(PN)は、IWSLT14/WMT14でLNを0.4/0.6 BLEU向上させ、PTB/WikiText-103で5.6/3.0 PPL改善を達成し、ハイパーパramータの変更なしに実現した。
  • ゼロセンターを実施しないPN-Vは、大きなバッチサイズ(例:4K)でのみLNに並ぶが、すべてのバッチサイズでPNが一貫してLNを上回る。
  • バニラBNはPTB/WikiText-103で7.5/6.3 PPLも性能を低下させる一方、PNは事前学習なしで最先端の結果を達成した。
  • 特異値解析により、PNは埋め込み層でよりゆっくりと減衰する特異値を示し、より優れた表現力を持つことを示した。
  • PNにおける近似逆誤差伝搬スキームにより、勾配が有界になることが保証され、理論的に安定な訓練に不可欠な条件を満たしている。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。