ChatPaper.aiChatPaper

注意領域:大規模言語モデルにおける文脈的位置の重要性

Attention Basin: Why Contextual Position Matters in Large Language Models

August 7, 2025
著者: Zihao Yi, Delong Zeng, Zhenqing Ling, Haohao Luo, Zhe Xu, Wei Liu, Jian Luan, Wanxia Cao, Ying Shen
cs.AI

要旨

大規模言語モデル(LLMs)の性能は、入力情報の文脈上の位置に著しく敏感である。この位置バイアスの背後にあるメカニズムを調査するため、我々の広範な実験により、「アテンションベイスン(attention basin)」と呼ばれる一貫した現象が明らかになった。構造化された項目(例えば、検索された文書やFew-shotの例)のシーケンスが提示されると、モデルはシーケンスの最初と最後の項目に系統的に高い注意を割り当て、中間の項目を無視する傾向がある。重要なことに、我々の分析はさらに、重要な情報に高い注意を割り当てることがモデルの性能向上の鍵であることを示している。これらの洞察に基づき、我々はAttention-Driven Reranking(AttnRank)という2段階のフレームワークを導入する。このフレームワークは、(i) 小さなキャリブレーションセットを使用してモデルの内在的な位置注意の偏りを推定し、(ii) 検索された文書やFew-shotの例を並べ替えて、最も重要な内容をこれらの高注意位置に合わせるものである。AttnRankは、モデルに依存せず、トレーニング不要で、プラグアンドプレイ方式であり、計算オーバーヘッドが最小限である。マルチホップQAやFew-shotのインコンテキスト学習タスクでの実験により、AttnRankが、モデルのパラメータやトレーニング手順を変更することなく、さまざまなアーキテクチャとスケールの10の大規模言語モデルにおいて大幅な改善を達成することが実証された。
English
The performance of Large Language Models (LLMs) is significantly sensitive to the contextual position of information in the input. To investigate the mechanism behind this positional bias, our extensive experiments reveal a consistent phenomenon we term the attention basin: when presented with a sequence of structured items (e.g., retrieved documents or few-shot examples), models systematically assign higher attention to the items at the beginning and end of the sequence, while neglecting those in the middle. Crucially, our analysis further reveals that allocating higher attention to critical information is key to enhancing model performance. Based on these insights, we introduce Attention-Driven Reranking (AttnRank), a two-stage framework that (i) estimates a model's intrinsic positional attention preferences using a small calibration set, and (ii) reorders retrieved documents or few-shot examples to align the most salient content with these high-attention positions. AttnRank is a model-agnostic, training-free, and plug-and-play method with minimal computational overhead. Experiments on multi-hop QA and few-shot in-context learning tasks demonstrate that AttnRank achieves substantial improvements across 10 large language models of varying architectures and scales, without modifying model parameters or training procedures.
PDF02August 8, 2025