アテンションの再考:Transformerのアテンションレイヤーに対する代替としての浅いフィードフォワードニューラルネットワークの探索
Rethinking Attention: Exploring Shallow Feed-Forward Neural Networks as an Alternative to Attention Layers in Transformers
November 17, 2023
著者: Vukasin Bozic, Danilo Dordervic, Daniele Coppola, Joseph Thommes
cs.AI
要旨
本研究では、シーケンス間変換タスクにおける最先端アーキテクチャであるTransformerモデルのアテンションメカニズムの挙動を模倣するために、標準的な浅層フィードフォワードネットワークを使用する効果を分析します。Transformerのアテンションメカニズムの主要な要素を、知識蒸留を用いて元のコンポーネントから学習した単純なフィードフォワードネットワークに置き換えます。IWSLT2017データセットで実施した実験により、これらの「アテンションレスTransformer」が元のアーキテクチャと同等の性能を発揮できることが明らかになりました。厳密なアブレーション研究と、さまざまな置換ネットワークの種類やサイズを実験することで、本アプローチの実現可能性を裏付ける知見を提供します。これにより、浅層フィードフォワードネットワークがアテンションメカニズムを模倣する適応性が明らかになるだけでなく、シーケンス間変換タスクにおける複雑なアーキテクチャを効率化する可能性も示唆されます。
English
This work presents an analysis of the effectiveness of using standard shallow
feed-forward networks to mimic the behavior of the attention mechanism in the
original Transformer model, a state-of-the-art architecture for
sequence-to-sequence tasks. We substitute key elements of the attention
mechanism in the Transformer with simple feed-forward networks, trained using
the original components via knowledge distillation. Our experiments, conducted
on the IWSLT2017 dataset, reveal the capacity of these "attentionless
Transformers" to rival the performance of the original architecture. Through
rigorous ablation studies, and experimenting with various replacement network
types and sizes, we offer insights that support the viability of our approach.
This not only sheds light on the adaptability of shallow feed-forward networks
in emulating attention mechanisms but also underscores their potential to
streamline complex architectures for sequence-to-sequence tasks.