arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.03172cs.CL
收藏

迷失在中间:语言模型如何使用长上下文

Lost in the Middle: How Language Models Use Long Contexts

Stanford University(斯坦福大学);University of California, Berkeley(加利福尼亚大学伯克利分校);Samaya AI(萨马亚人工智能公司)

Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, Percy Liang

AI总结:

研究语言模型在长上下文中定位信息的能力,发现相关信息位于开头或结尾时性能最佳,位于中间时显著下降,为未来评估提供了新协议。

摘要:

尽管近期的语言模型能够将长上下文作为输入,但对其利用较长上下文的程度却知之甚少。我们分析了语言模型在两项需要识别输入上下文中相关信息任务上的表现:多文档问答和键值检索。我们发现,改变相关信息的位置会导致性能显著下降,这表明当前的语言模型并不能稳健地利用长输入上下文中的信息。具体而言,我们观察到,当相关信息出现在输入上下文的开头或结尾时,性能通常最高;而当模型必须在长上下文的中间位置访问相关信息时,性能会显著下降,即使是明确的长上下文模型也是如此。我们的分析提供了对语言模型如何使用其输入上下文的更好理解,并为未来的长上下文语言模型提供了新的评估协议。

英文摘要:

While recent language models have the ability to take long contexts as input, relatively little is known about how well they use longer context. We analyze the performance of language models on two tasks that require identifying relevant information in their input contexts: multi-document question answering and key-value retrieval. We find that performance can degrade significantly when changing the position of relevant information, indicating that current language models do not robustly make use of information in long input contexts. In particular, we observe 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, 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 language models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑