Skip to content

[Paper Note] Why do LLMs attend to the first token?, Federico Barbero+, COLM'25 #1860

Description

@AkihikoWatanabe

URL

Authors

  • Federico Barbero
  • Álvaro Arroyo
  • Xiangming Gu
  • Christos Perivolaropoulos
  • Michael Bronstein
  • Petar Veličkovi ć
  • Razvan Pascanu

Abstract

  • Large Language Models (LLMs) tend to attend heavily to the first token in the sequence -- creating a so-called attention sink. Many works have studied this phenomenon in detail, proposing various ways to either leverage or alleviate it. Attention sinks have been connected to quantisation difficulties, security issues, and streaming attention. Yet, while many works have provided conditions in which they occur or not, a critical question remains shallowly answered: Why do LLMs learn such patterns and how are they being used? In this work, we argue theoretically and empirically that this mechanism provides a method for LLMs to avoid over-mixing, connecting this to existing lines of work that study mathematically how information propagates in Transformers. We conduct experiments to validate our theoretical intuitions and show how choices such as context length, depth, and data packing influence the sink behaviour. We hope that this study provides a new practical perspective on why attention sinks are useful in LLMs, leading to a better understanding of the attention patterns that form during training.

Translation (by gpt-4o-mini)

  • 大規模言語モデル(LLMs)は、シーケンス内の最初のトークンに強く注意を向ける傾向があり、これを「アテンションシンク」と呼ぶ。この現象については多くの研究が行われており、活用または軽減するためのさまざまな方法が提案されている。アテンションシンクは、量子化の難しさやセキュリティの問題、ストリーミングアテンションに関連付けられている。しかし、多くの研究がそれが発生する条件を提供している一方で、重要な疑問が浅くしか答えられていない。それは、なぜLLMsがそのようなパターンを学習し、それがどのように利用されているのかということである。本研究では、このメカニズムがLLMsが過剰混合を避ける方法を提供することを理論的および実証的に主張し、情報がトランスフォーマー内でどのように伝播するかを数学的に研究する既存の研究と関連付ける。理論的直感を検証するための実験を行い、コンテキストの長さ、深さ、データのパッキングなどの選択がシンクの挙動にどのように影響するかを示すことを目指す。この研究が、なぜアテンションシンクがLLMsにおいて有用であるのかについての新たな実践的視点を提供し、トレーニング中に形成されるアテンションパターンの理解を深めることにつながることを期待している。

Summary (by gpt-4o-mini)

  • LLMsは最初のトークンに強く注意を向ける「アテンションシンク」を示し、そのメカニズムが過剰混合を避ける方法を理論的・実証的に探求。コンテキストの長さやデータのパッキングがシンクの挙動に与える影響を実験で示し、アテンションパターンの理解を深めることを目指す。

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions