Skip to main content
QUICK REVIEW

[論文レビュー] Deep Transformers without Shortcuts: Modifying Self-attention for Faithful Signal Propagation

Bobby He, James Martens|arXiv (Cornell University)|Feb 20, 2023
Neural Networks and Applications被引用数 5
ひとこと要約

本稿では、自己注意機構を戦略的な重み初期化、可学習バイアス行列、および位置依存スケーリングを用いて変更することで、スキップ接続や正規化層なしの深層バニラトランスフォーマーを訓練する手法を提案する。このアプローチにより信号の忠実な伝搬が実現され、WikiText-103およびC4で標準モデルと同等の性能を達成するが、約5倍の反復回数を要する。

ABSTRACT

Skip connections and normalisation layers form two standard architectural components that are ubiquitous for the training of Deep Neural Networks (DNNs), but whose precise roles are poorly understood. Recent approaches such as Deep Kernel Shaping have made progress towards reducing our reliance on them, using insights from wide NN kernel theory to improve signal propagation in vanilla DNNs (which we define as networks without skips or normalisation). However, these approaches are incompatible with the self-attention layers present in transformers, whose kernels are intrinsically more complicated to analyse and control. And so the question remains: is it possible to train deep vanilla transformers? We answer this question in the affirmative by designing several approaches that use combinations of parameter initialisations, bias matrices and location-dependent rescaling to achieve faithful signal propagation in vanilla transformers. Our methods address various intricacies specific to signal propagation in transformers, including the interaction with positional encoding and causal masking. In experiments on WikiText-103 and C4, our approaches enable deep transformers without normalisation to train at speeds matching their standard counterparts, and deep vanilla transformers to reach the same performance as standard ones after about 5 times more iterations.

研究の動機と目的

  • スキップ接続や正規化層なしの深層バニラトランスフォーマーが実際に訓練可能かどうかを調査すること。
  • 特にカーネル行列のランク崩壊に起因する信号劣化の問題に取り組むこと。
  • 深層トランスフォーマースタックを介した安定的かつ忠実な信号伝搬を保証するアーキテクチャ的修正を開発すること。
  • 標準トランスフォーマーと同等の速度でバニラトランスフォーマーを訓練可能としつつ、競争力のある性能を維持すること。

提案手法

  • U-SPAおよびE-SPAの2つの手法を導入し、パラメータ初期化、可学習バイアス行列、位置依存スケーリングを用いて自己注意機構を変更することで、信号の流れを安定化する。
  • 無限幅カーネル解析を用いて、注意層における信号伝搬をモデル化し、層を跨る正規化されたカーネル行列の進化を追跡する。
  • 高次元の再帰的構造を有する自己注意機構においても、初期カーネル挙動を制御するため、Deep Kernel Shaping (DKS) の技術を応用する。
  • 位置エンコーディングおよび因果マスキングを信号伝搬解析に統合し、標準トランスフォーマー部品との互換性を保証する。
  • 以前の層の活性化に依存する高次元的依存性を捉える再帰的カーネル定式化を採用する。
  • ランク崩壊を防止し、シーケンス内の位置にわたるコサイン類似度の制御を維持する初期化スキームおよびバイアス構造を設計する。
Figure 1: Normalised kernel matrices $\text{diag}(\Sigma_{l})^{-\frac{1}{2}}\cdot\Sigma_{l}\cdot\text{diag}(\Sigma_{l})^{-\frac{1}{2}}$ (which are like kernel matrices except with cosine similarities instead of inner-products) at various depths for standard attention-only vanilla transformers and tw
Figure 1: Normalised kernel matrices $\text{diag}(\Sigma_{l})^{-\frac{1}{2}}\cdot\Sigma_{l}\cdot\text{diag}(\Sigma_{l})^{-\frac{1}{2}}$ (which are like kernel matrices except with cosine similarities instead of inner-products) at various depths for standard attention-only vanilla transformers and tw

実験結果

リサーチクエスチョン

  • RQ1スキップ接続や正規化層なしの深層バニラトランスフォーマーは、効果的に訓練可能か?
  • RQ2標準のカーネル再帰手法による解析が困難な自己注意機構において、信号伝搬をどのように安定化できるか?
  • RQ3深層トランスフォーマーにおいて忠実な信号フローを実現するためのアーキテクチャ的修正は何か?
  • RQ4信号伝搬制御により、バニラトランスフォーマーの訓練速度を標準トランスフォーマーと同等にできるか?
  • RQ5提案手法は、深層アーキテクチャにおいて位置エンコーディングのインダクティブバイアスを保持または回復できるか?

主な発見

  • 提案手法、特にE-SPAは、正規化されたカーネル行列におけるランク崩壊を防止し、極めて深い層に対しても制御された信号伝搬を維持する。
  • E-SPAを用いて訓練されたバニラトランスフォーマーは、WikiText-103およびC4で標準トランスフォーマーと同等の性能を達成するが、約5倍の訓練反復回数を要する。
  • 提案手法のバニラトランスフォーマーの訓練速度は、標準トランスフォーマーと同等であり、顕著な計算オーバーヘッドがないことが示された。
  • E-SPA下での正規化されたカーネル行列は、近接するトークンペアがより高いコサイン類似度を維持する「新鮮さバイアス(recency bias)」を示し、位置エンコーディングの効果を模倣する。
  • 自己注意カーネル再帰の固有の複雑さに対処でき、低次元関数への簡略化が困難であることを示した。
  • 理論的分析により、提案された修正が非負の信号伝搬関数を保証し、無限幅極限における安定性を裏付けることが確認された。
Figure 2: Comparison of skipless transformers. Vanilla transformers are not trainable without our modifications. All curves average over 3 seeds.
Figure 2: Comparison of skipless transformers. Vanilla transformers are not trainable without our modifications. All curves average over 3 seeds.

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

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

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

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