arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2503.23306cs.CL
收藏

Focus Directions 使你的语言模型更关注相关上下文

Focus Directions Make Your Language Models Pay More Attention to Relevant Contexts

University of Massachusetts Boston(马萨诸塞大学波士顿分校);Technische Universität München(慕尼黑工业大学);Carnegie Mellon University(卡内基梅隆大学)

Youxiang Zhu, Ruochen Li, Danqing Wang, Daniel Haehn, Xiaohui Liang

AI总结:

本文发现控制LLM整体注意力的上下文头,并提出位于其键和查询激活处的focus directions,使模型在不明确指定的情况下更关注相关上下文,有效缓解长上下文任务对齐不良问题。

摘要:

长上下文大型语言模型(LLMs)容易受到无关上下文的干扰。产生干扰的原因目前仍知之甚少。在本文中,我们首先识别了上下文头(contextual heads),这是一组控制 LLM 整体注意力的特殊注意力头。然后,我们证明当上下文头未能将足够的注意力分配给相关上下文时,就会产生干扰,而通过增加对这些上下文的注意力则可以缓解此问题。我们进一步识别了位于这些头的键(key)和查询(query)激活处的 focus directions,使它们能够在不明确指定哪个上下文相关的情况下,将更多注意力分配给相关上下文。我们全面评估了 focus direction 在各种长上下文任务上的效果,发现 focus directions 有助于缓解长上下文 LLM 的任务对齐不良问题。我们相信,我们的发现能够促进关于长上下文 LLM 对齐的进一步研究。

英文摘要:

Long-context large language models (LLMs) are prone to be distracted by irrelevant contexts. The reason for distraction remains poorly understood. In this paper, we first identify the contextual heads, a special group of attention heads that control the overall attention of the LLM. Then, we demonstrate that distraction arises when contextual heads fail to allocate sufficient attention to relevant contexts and can be mitigated by increasing attention to these contexts. We further identify focus directions, located at the key and query activations of these heads, which enable them to allocate more attention to relevant contexts without explicitly specifying which context is relevant. We comprehensively evaluate the effect of focus direction on various long-context tasks and find out focus directions could help to mitigate the poor task alignment of the long-context LLMs. We believe our findings could promote further research on long-context LLM alignment.

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

↑