ChatPaper.aiChatPaper

注意機構の解体:効果的な言語モデリングのための設計原理の探求

Deconstructing Attention: Investigating Design Principles for Effective Language Modeling

October 13, 2025
著者: Huiyin Xue, Nafise Sadat Moosavi, Nikolaos Aletras
cs.AI

要旨

Transformer言語モデルの成功は、そのドット積アテンションメカニズムに広く帰因されており、このメカニズムはいくつかの重要な設計原則を織り交ぜています。これらの原則には、位置間での情報の混合(複数のトークン間の相互作用を可能にする)、シーケンス依存の活性化(アテンションの重みが各入力に適応する)、特定の数学的形式(ドット積類似度とソフトマックス重み付け)、およびクエリとキーを進化する隠れ状態に結合すること(現在の層に基づいたアテンションを実現する)が含まれます。しかし、これらの各原則の必要性はほとんど検証されていません。本研究では、これらの原則を選択的に緩和する制御されたバリアントを設計し、すべての層に均一に適用する場合と、一部の層のみが標準的なアテンションを保持するハイブリッドアーキテクチャにおいて、アテンションを体系的に分解します。我々の実証分析によれば、トークンを混合するメカニズムは不可欠であり、その欠如はモデルをほぼランダムな挙動に陥らせますが、正確な数学的形式やシーケンス依存性は大幅に緩和可能であり、特に一部の層でのみ保持される場合に顕著です。驚くべきことに、単独では失敗するバリアントでも、標準的なアテンションと交互に配置されることで堅牢な性能を達成し、協調効果が明らかになりました。これらの発見は、アテンションの有効性を真に支える要素についての理解を深め、性能を犠牲にすることなく言語モデルを簡素化する新たな道を開きます。
English
The success of Transformer language models is widely credited to their dot-product attention mechanism, which interweaves a set of key design principles: mixing information across positions (enabling multi-token interactions), sequence-dependent activations (where attention weights adapt to each input), a specific mathematical form (dot-product similarities plus softmax weighting), and coupling of queries and keys to evolving hidden states (grounding attention in the current layer). However, the necessity of each of these principles remains largely untested. In this work, we systematically deconstruct attention by designing controlled variants that selectively relax these principles, applied both uniformly across all layers and in hybrid architectures where only some layers retain standard attention. Our empirical analysis reveals that mechanisms for mixing tokens are indispensable, as their absence collapses models to near-random behavior, while the exact mathematical form and sequence dependency can be substantially relaxed, especially when preserved in just a subset of layers. Surprisingly, even variants that fail in isolation can achieve robust performance when interleaved with standard attention, highlighting a cooperative effect. These findings deepen our understanding of what truly underpins attention's effectiveness and open new avenues for simplifying language models without sacrificing performance.
PDF142October 15, 2025