[論文レビュー] ResiDual: Transformer with Dual Residual Connections
本稿では、勾配消失と表現崩壊の問題を克服するため、事前層正則化(Pre-LN)と事後層正則化(Post-LN)を組み合わせた二重残差接続を持つ、新しいTransformerアーキテクチャ、ResiDualを提案する。両方の残差パスを統合することで、ResiDualはより優れた学習安定性とモデル容量を達成し、機械翻訳ベンチマークにおいてPost-LNおよびPre-LNの両方の変種を上回り、深層モデルでは最大1.1 BLEUポイントの向上を達成する。
Transformer networks have become the preferred architecture for many tasks due to their state-of-the-art performance. However, the optimal way to implement residual connections in Transformer, which are essential for effective training, is still debated. Two widely used variants are the Post-Layer-Normalization (Post-LN) and Pre-Layer-Normalization (Pre-LN) Transformers, which apply layer normalization after each residual block's output or before each residual block's input, respectively. While both variants enjoy their advantages, they also suffer from severe limitations: Post-LN causes gradient vanishing issue that hinders training deep Transformers, and Pre-LN causes representation collapse issue that limits model capacity. In this paper, we propose ResiDual, a novel Transformer architecture with Pre-Post-LN (PPLN), which fuses the connections in Post-LN and Pre-LN together and inherits their advantages while avoids their limitations. We conduct both theoretical analyses and empirical experiments to verify the effectiveness of ResiDual. Theoretically, we prove that ResiDual has a lower bound on the gradient to avoid the vanishing issue due to the residual connection from Pre-LN. Moreover, ResiDual also has diverse model representations to avoid the collapse issue due to the residual connection from Post-LN. Empirically, ResiDual outperforms both Post-LN and Pre-LN on several machine translation benchmarks across different network depths and data sizes. Thanks to the good theoretical and empirical performance, ResiDual Transformer can serve as a foundation architecture for different AI models (e.g., large language models). Our code is available at https://github.com/microsoft/ResiDual.
研究の動機と目的
- 既存の残差接続バリエーションの限界、特にPost-LNにおける勾配消失とPre-LNにおける表現崩壊を解消すること。
- Post-LNとPre-LNの利点を活かし、それぞれの欠点を回避する統合型Transformerアーキテクチャを設計すること。
- 学習率のウォームアップに依存せずに、深層Transformerモデルの安定的かつ効果的な学習を可能にすること。
- アーキテクチャの革新を通じて、深層ネットワークにおけるモデル容量と表現多様性を向上させること。
提案手法
- Pre-LNにインspiredされた勾配安定化と、Post-LNにインspiredされた表現多様性の維持を目的とした、二重の残差接続を統合した新しいアーキテクチャ、ResiDualを提案する。
- 層正則化を各残差ブロックの前後にも適用する、Pre-Post-Layer Normalization(PPLN)を導入する。
- 二重の残差パスを採用:一つはブロックの入力から出力へのスカイプ接続(Pre-LNスタイル)、もう一つは入力から残差出力へのスカイプ接続(Post-LNスタイル)。
- 理論的に、ResiDualが勾配ノルムが有界であることを証明し、勾配消失を回避するとともに、多様な隠れ表現を維持することで崩壊を防ぐことを示す。
- 理論的分析により、二重残差機構が安定した勾配フローと豊富な表現学習を保証することを示す。
- WMTおよびOPUS-100を含む複数の機械翻訳ベンチマークで、さまざまな深さとデータサイズにおいて、実験的に手法を検証する。
実験結果
リサーチクエスチョン
- RQ1深層ネットワークにおいて、同時に勾配消失と表現崩壊を回避できるTransformerアーキテクチャを設計できるか?
- RQ2Pre-LNとPost-LNの残差接続を組み合わせることで、単独の変種よりも優れた学習安定性とモデルパフォーマンスが得られるか?
- RQ3提案された二重残差機構により、学習の際の学習率ウォームアップの必要性が低減または排除できるか?
- RQ4既存の変種(例:Post-LN や Pre-LN)と比較して、異なるネットワークの深さやデータスケールにおいて、モデルの性能はどのように変化するか?
- RQ5二重残差設計は、深層Transformerにおける表現多様性とモデル容量をどの程度向上させるか?
主な発見
- ResiDualは、全評価ベンチマークでPost-LNおよびPre-LNを上回り、E12D12設定では標準的なPre-LNと比較して0.9 BLEUポイントの向上を達成した。
- WMTデータセットでは、E18D18モデルで27.65 BLEUを達成し、Pre-LNベースラインより1.1ポイント向上した。
- OPUS-100データセットでは、18層のみで31.0 BLEU(ALLスコア)を達成し、100層のDeepNetモデルと同等の性能を示した。
- ResiDualは学習率ウォームアップなしでも正常に学習が進行したが、Post-LNはそれなしでは収束しなかったため、より優れた学習安定性を示した。
- 理論的分析により、ResiDualは勾配ノルムが有界であるため勾配消失を回避し、Post-LNと同等の表現多様性を維持していることが確認された。
- 実験的結果から、ResiDualは深さが増しても強力な性能を維持しており、より優れた一般化性能と容量活用性を示唆している。
より良い研究を、今すぐ始めましょう
論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。