arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.16008cs.CLcs.AIcs.LG
收藏

在中间找到:校准位置注意力偏差可改善长上下文利用

Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilization

University of Washington(华盛顿大学);MIT(麻省理工学院);Google Cloud AI Research(谷歌云人工智能研究院);Google DeepMind(谷歌DeepMind)

Cheng-Yu Hsieh, Yung-Sung Chuang, Chun-Liang Li, Zifeng Wang, Long T. Le, Abhishek Kumar, James Glass, Alexander Ratner, Chen-Yu Lee, Ranjay Krishna, Tomas Pfister

AI总结:

本文揭示LLMs的U形注意力偏差导致“迷失在中间”问题,并提出“在中间找到”校准机制,使模型按相关性关注中间内容,从而提升长上下文定位和RAG性能,最高超越现有方法15个百分点。

摘要:

大型语言模型(LLMs)即使经过专门训练以处理长输入上下文,仍然难以捕获位于输入中间的相关信息。这一现象被称为“迷失在中间”(lost-in-the-middle)问题。在这项工作中,我们做出了三点贡献。首先,我们着手理解导致这一现象的因素。在此过程中,我们建立了“迷失在中间”与LLMs内在注意力偏差之间的联系:LLMs表现出一种U形注意力偏差,即输入开头和结尾的token获得更高的注意力,而无论其相关性如何。其次,我们通过一种名为“在中间找到”(found-in-the-middle)的校准机制来缓解这种位置偏差,该机制使模型能够根据相关性忠实地关注上下文,即使它们位于中间。第三,我们表明“在中间找到”不仅在长上下文中定位相关信息方面取得了更好的性能,而且最终在各种任务上带来了检索增强生成(RAG)性能的提升,比现有方法高出最多15个百分点。这些发现为理解LLM注意力偏差及其潜在后果开辟了未来的研究方向。

英文摘要:

Large language models (LLMs), even when specifically trained to process long input contexts, struggle to capture relevant information located in the middle of their input. This phenomenon has been known as the lost-in-the-middle problem. In this work, we make three contributions. First, we set out to understand the factors that cause this phenomenon. In doing so, we establish a connection between lost-in-the-middle to LLMs' intrinsic attention bias: LLMs exhibit a U-shaped attention bias where the tokens at the beginning and at the end of its input receive higher attention, regardless of their relevance. Second, we mitigate this positional bias through a calibration mechanism, found-in-the-middle, that allows the model to attend to contexts faithfully according to their relevance, even though when they are in the middle. Third, we show found-in-the-middle not only achieves better performance in locating relevant information within a long context, but also eventually leads to improved retrieval-augmented generation (RAG) performance across various tasks, outperforming existing methods by up to 15 percentage points. These findings open up future directions in understanding LLM attention bias and its potential consequences.

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

↑