論文の概要: When Attention Sink Emerges in Language Models: An Empirical View
- arxiv url: http://arxiv.org/abs/2410.10781v1
- Date: Mon, 14 Oct 2024 17:50:28 GMT
- ステータス: 処理完了
- システム内更新日: 2024-10-29 19:34:54.173897
- Title: When Attention Sink Emerges in Language Models: An Empirical View
- Title(参考訳): 言語モデルにおける注意シンクの創出 : 実証的視点
- Authors: Xiangming Gu, Tianyu Pang, Chao Du, Qian Liu, Fengzhuo Zhang, Cunxiao Du, Ye Wang, Min Lin,
- Abstract要約: 言語モデル(LM)は、意味的に重要でない場合でも、最初のトークンに注意を向ける。
この現象は、ストリーミング/ロングコンテキスト生成、KVキャッシュ最適化、推論アクセラレーション、モデル量子化などのアプリケーションで広く採用されている。
我々はまず、小さなモデルであっても様々な入力を持つLMにおいて、注意シンクが普遍的に存在することを実証した。
- 参考スコア(独自算出の注目度): 39.36282162213973
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Language Models (LMs) assign significant attention to the first token, even if it is not semantically important, which is known as attention sink. This phenomenon has been widely adopted in applications such as streaming/long context generation, KV cache optimization, inference acceleration, model quantization, and others. Despite its widespread use, a deep understanding of attention sink in LMs is still lacking. In this work, we first demonstrate that attention sinks exist universally in LMs with various inputs, even in small models. Furthermore, attention sink is observed to emerge during the LM pre-training, motivating us to investigate how optimization, data distribution, loss function, and model architecture in LM pre-training influence its emergence. We highlight that attention sink emerges after effective optimization on sufficient training data. The sink position is highly correlated with the loss function and data distribution. Most importantly, we find that attention sink acts more like key biases, storing extra attention scores, which could be non-informative and not contribute to the value computation. We also observe that this phenomenon (at least partially) stems from tokens' inner dependence on attention scores as a result of softmax normalization. After relaxing such dependence by replacing softmax attention with other attention operations, such as sigmoid attention without normalization, attention sinks do not emerge in LMs up to 1B parameters. The code is available at https://github.com/sail-sg/Attention-Sink.
- Abstract(参考訳): 言語モデル(LM)は、たとえ意味的に重要でないとしても、最初のトークンに注意を向ける。
この現象は、ストリーミング/ロングコンテキスト生成、KVキャッシュ最適化、推論アクセラレーション、モデル量子化などのアプリケーションで広く採用されている。
広く使われているにもかかわらず、LMの注意シンクの深い理解はいまだに不足している。
本研究ではまず,小型モデルにおいても様々な入力を持つLMにおいて,注目シンクが普遍的に存在することを示す。
さらに、LM事前学習中に注目シンクが出現し、LM事前学習における最適化、データ分散、損失関数、モデルアーキテクチャがその出現にどのように影響するかを調べる動機となる。
十分なトレーニングデータに対して効果的な最適化を行った後、注意シンクが出現することを強調する。
シンク位置は損失関数とデータ分布と強く相関している。
最も重要なことは、注意シンクが鍵バイアスのように振る舞うことであり、付加的な注意スコアを格納することであり、これは非形式的であり、価値計算に寄与しない可能性がある。
また、この現象は(少なくとも部分的には)トークンの注意点への内的依存がソフトマックス正規化の結果に起因することも観察した。
ソフトマックスアテンションを正規化せずにシグモイドアテンションなどの他のアテンション操作に置き換えることで、そのような依存を緩和した後、アテンションシンクは最大1BパラメータまでLMに現れない。
コードはhttps://github.com/sail-sg/Attention-Sink.comで公開されている。
関連論文リスト
- Anchor Attention, Small Cache: Code Generation with Large Language Models [15.94784908771546]
NLPの現在のプラクティスは、コード生成タスクにおいて、不正確な、あるいは幻覚を引き起こす可能性のある、スパースアテンションを使用することが多い。
本稿では,コンテキスト情報を抽出・圧縮するトークン・アンカー・アテンションを特徴とする新しいアプローチであるAnchorCoderを提案する。
モデルの性能の大部分を保ちながら、KVキャッシュの要求を大幅に削減できる(少なくとも70%)。
論文 参考訳(メタデータ) (2024-11-11T02:47:05Z) - Localized Gaussians as Self-Attention Weights for Point Clouds Correspondence [92.07601770031236]
本稿では,エンコーダのみのトランスフォーマーアーキテクチャのアテンションヘッドにおける意味的意味パターンについて検討する。
注意重みの修正はトレーニングプロセスの促進だけでなく,最適化の安定性の向上にも寄与する。
論文 参考訳(メタデータ) (2024-09-20T07:41:47Z) - Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilization [97.84156490765457]
大規模言語モデル(LLM)は、入力の中央に位置する関連する情報を取得するのに苦労する。
この現象はミドル・イン・ザ・ミドル問題として知られている。
また,中級中級中級中級中級中級中級中級中級中級中級中級中級中級中級中級中級中級健常者を対象に,長期にわたる中級中級中級中級中級健常者を対象とした。
論文 参考訳(メタデータ) (2024-06-23T04:35:42Z) - Unveiling and Harnessing Hidden Attention Sinks: Enhancing Large Language Models without Training through Attention Calibration [15.36841874118801]
我々は,大規模言語モデル(LLM)における注意シンクの存在をより深く理解することを目的としている。
本研究では,入力適応方式で推論中のハエの注意分布を自動的に最適化する訓練自由注意法(ACT)を提案する。
ACTは、Llama-30Bに適用した場合、異なるデータセット間で平均7.30%の精度向上を達成する。
論文 参考訳(メタデータ) (2024-06-22T07:00:43Z) - Simple linear attention language models balance the recall-throughput
tradeoff [40.08746299497935]
線形およびすべり窓の注意を結合したシンプルなアーキテクチャであるBASEDを提案する。
我々は、最大1.3bパラメータの言語モデルをトレーニングし、BASEDがパープレキシティにおいて最強のサブクワッドラティックモデルと一致し、実世界のリコール集約タスクにおいて6.22の精度ポイントでそれらのモデルを上回っていることを示す。
論文 参考訳(メタデータ) (2024-02-28T19:28:27Z) - Fortify the Shortest Stave in Attention: Enhancing Context Awareness of Large Language Models for Effective Tool Use [74.72150542395487]
大規模言語モデル(LLM)の注意配分における固有波形パターンは、高い文脈認識を必要とするタスクにおいて、その性能に大きな影響を及ぼす。
この問題に対処するため,Attention Buckets という新しい推論手法を提案する。
論文 参考訳(メタデータ) (2023-12-07T17:24:51Z) - Efficient Streaming Language Models with Attention Sinks [72.20260088848987]
StreamingLLMは、大規模言語モデルが微調整なしで無限のシーケンス長に一般化できる効率的なフレームワークである。
StreamingLLMはLlama-2, MPT, Falcon, Pythiaを最大400万のトークンで安定かつ効率的な言語モデリングを実現できることを示す。
論文 参考訳(メタデータ) (2023-09-29T17:59:56Z) - Revisiting Attention Weights as Explanations from an Information
Theoretic Perspective [4.499369811647602]
注意機構は、他のモデル要素と慎重に組み合わせた場合、説明をモデル化するためのショートカットとして機能する可能性があることを示す。
本研究により,注意機構は,他のモデル要素と慎重に組み合わせた場合,モデル説明のためのショートカットとして機能する可能性が示唆された。
論文 参考訳(メタデータ) (2022-10-31T12:53:20Z) - Is Sparse Attention more Interpretable? [52.85910570651047]
我々は,空間が注意力を説明可能性ツールとして活用する能力にどのように影響するかを検討する。
入力とインデックス付き中間表現の間には弱い関係しか存在しません。
この設定では、疎度を誘導することで、モデルの振る舞いを理解するためのツールとして注意が使用できることが、より確実になる可能性があることを観察する。
論文 参考訳(メタデータ) (2021-06-02T11:42:56Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。