Investigating the Role of Feed-Forward Networks in Transformers Using Parallel Attention and Feed-Forward Net Design

要約

この論文では、並列アテンションおよびフィードフォワード ネット設計 (PAF) アーキテクチャを利用し、シリーズ アテンションおよびフィードフォワード ネット設計 (SAF) の対応物と比較することにより、変圧器モデルにおけるフィードフォワード ネットワーク (FFN) の重要な役割を調査します。

PAF の有効性の中心となるのは、レイヤー内の FFN ブロックとアテンション ブロックに関する 2 つの主な仮定です。1) FFN ブロックの主な機能は、トークン埋め込み間の等方性を維持し、その劣化を防ぐことです。2) 計算された残差ノルム
アテンション ブロック内の は、入力トークン埋め込みノルムより大幅に小さくなります。
これらの仮定を経験的に検証するために、2 つの大規模な言語モデル (RoBERTa-large と bert-large-uncased) の PAF バリアントをトレーニングします。
私たちの結果は、両方の仮定が PAF 設計に当てはまることを示しています。
この研究は、変圧器アーキテクチャにおける FFN と自己注意メカニズムの間の役割と相互作用のより深い理解に貢献します。

要約(オリジナル)

This paper investigates the key role of Feed-Forward Networks (FFNs) in transformer models by utilizing the Parallel Attention and Feed-Forward Net Design (PAF) architecture, and comparing it to their Series Attention and Feed-Forward Net Design (SAF) counterparts. Central to the effectiveness of PAF are two main assumptions regarding the FFN block and the attention block within a layer: 1) the primary function of the FFN block is to maintain isotropy among token embeddings and prevent their degeneration, and 2) the residual norm computed in the attention block is substantially smaller than the input token embedding norm. To empirically validate these assumptions, we train PAF variants of two large language models (RoBERTa-large and bert-large-uncased). Our results demonstrate that both assumptions hold true in the PAF design. This study contributes to a deeper understanding of the roles and interactions between FFNs and self-attention mechanisms in transformer architectures.

arxiv情報

著者 Shashank Sonkar,Richard G. Baraniuk
発行日 2023-05-25 17:01:13+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク