arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.06182cs.CL
收藏

混合机制:语言模型如何在上下文中检索绑定实体

Mixing Mechanisms: How Language Models Retrieve Bound Entities In-Context

Blavatnik School of Computer Science and AI, Tel Aviv University(塔尔瓦大学Blavatnik计算机科学与人工智能学院);Pr(Ai) 2 R Group(Pr(Ai) 2 R小组);Goodfire

Yoav Gur-Arieh, Mor Geva, Atticus Geiger

AI总结:

本文研究了语言模型在上下文中绑定并检索实体的三种机制(位置机制、词汇机制和反射机制),通过九种模型和十项绑定任务的实验揭示了它们的混合模式,并构建了一个因果模型以95%的一致性估计下一词分布。

摘要:

上下文推理的一个关键组成部分是语言模型(LMs)绑定实体以便后续检索的能力。例如,一个LM可能通过将“Ann”绑定到“pie”来表示“Ann loves pie”,从而在回答“谁喜欢pie?”时检索到“Ann”。先前关于短列表绑定实体的研究发现了强有力的证据,表明LMs通过一种位置机制实现这种检索,即根据“Ann”在上下文中的位置来检索它。在这项工作中,我们发现这种机制在更复杂的设置中泛化能力较差;随着上下文中绑定实体数量的增加,位置机制在中间位置变得嘈杂且不可靠。为了弥补这一点,我们发现LMs用词汇机制(通过其绑定对应物“pie”检索“Ann”)和反射机制(通过直接指针检索“Ann”)来补充位置机制。通过对九种模型和十项绑定任务的广泛实验,我们揭示了LMs如何混合这些机制以驱动模型行为的一致模式。我们利用这些见解开发了一个结合所有三种机制的因果模型,该模型以95%的一致性估计下一词分布。最后,我们展示了我们的模型能够泛化到与实体组交错的长得多的开放文本输入,进一步证明了我们的发现在更自然环境中的鲁棒性。总体而言,我们的研究建立了关于LMs如何在上下文中绑定和检索实体的更完整图景。

英文摘要:

A key component of in-context reasoning is the ability of language models (LMs) to bind entities for later retrieval. For example, an LM might represent "Ann loves pie" by binding "Ann" to "pie", allowing it to later retrieve "Ann" when asked "Who loves pie?" Prior research on short lists of bound entities found strong evidence that LMs implement such retrieval via a positional mechanism, where "Ann" is retrieved based on its position in context. In this work, we find that this mechanism generalizes poorly to more complex settings; as the number of bound entities in context increases, the positional mechanism becomes noisy and unreliable in middle positions. To compensate for this, we find that LMs supplement the positional mechanism with a lexical mechanism (retrieving "Ann" using its bound counterpart "pie") and a reflexive mechanism (retrieving "Ann" through a direct pointer). Through extensive experiments on nine models and ten binding tasks, we uncover a consistent pattern in how LMs mix these mechanisms to drive model behavior. We leverage these insights to develop a causal model combining all three mechanisms that estimates next token distributions with 95% agreement. Finally, we show that our model generalizes to substantially longer inputs of open-ended text interleaved with entity groups, further demonstrating the robustness of our findings in more natural settings. Overall, our study establishes a more complete picture of how LMs bind and retrieve entities in-context.

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

↑