真ん中で迷子になる:言語モデルが長い文脈をどう使うか
Lost in the Middle: How Language Models Use Long Contexts
July 6, 2023
著者: Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, Percy Liang
cs.AI
要旨
近年の言語モデルは長いコンテキストを入力として受け取る能力を持っているが、言語モデルが長いコンテキストをどの程度うまく活用しているかについては、比較的知見が少ない。本研究では、入力コンテキスト内の関連情報を特定する必要がある2つのタスク(複数文書の質問応答とキー・バリュー検索)における言語モデルの性能を分析する。その結果、関連情報が入力コンテキストの最初または最後に現れる場合に性能が最も高く、長いコンテキストの途中にある関連情報にアクセスする必要がある場合には性能が著しく低下することがわかった。さらに、明示的に長いコンテキストを扱うように設計されたモデルであっても、入力コンテキストが長くなるにつれて性能が大幅に低下することが確認された。本分析は、言語モデルが入力コンテキストをどのように利用しているかをより深く理解するための洞察を提供し、将来の長文コンテキストモデルに対する新しい評価プロトコルを提案するものである。
English
While recent language models have the ability to take long contexts as input,
relatively little is known about how well the language models use longer
context. We analyze language model performance on two tasks that require
identifying relevant information within their input contexts: multi-document
question answering and key-value retrieval. We find that performance is often
highest when relevant information occurs at the beginning or end of the input
context, and significantly degrades when models must access relevant
information in the middle of long contexts. Furthermore, performance
substantially decreases as the input context grows longer, even for explicitly
long-context models. Our analysis provides a better understanding of how
language models use their input context and provides new evaluation protocols
for future long-context models.