arXiv:2510.06182cs.CL2025-10中稿 · ICLR被引 18

揭示大模型在上下文里绑定与召回实体的三种混合机制。

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

  • 发现模型依赖位置、词汇和自指三种机制混合检索实体。
  • 在多实体场景中,仅靠位置机制会失效,需辅以其他机制。
  • 适用于理解大模型推理过程的研究者,尤其关注上下文学习者。

上下文推理的关键在于语言模型(LMs)对实体的绑定与后续召回能力。例如,模型可能将“Ann爱派”绑定为“Ann”指向“pie”,从而在被问及“谁爱派?”时召回“Ann”。先前研究显示,在短列表中,模型主要通过位置机制实现召回。本研究发现,当上下文中绑定实体增多时,位置机制在中间位置变得噪声大且不可靠。为此,模型补充了词汇机制(通过绑定词“pie”召回“Ann”)和自指机制(通过直接指针召回)。通过对九个模型和十个绑定任务的广泛实验,我们发现模型始终以特定方式混合这三种机制驱动行为。基于此,我们构建了一个融合三机制的因果模型,其预测下一词分布与真实行为有95%一致。该模型还成功推广至更长的开放式文本输入,验证了发现的鲁棒性。本研究全面揭示了语言模型在上下文中绑定与召回实体的动态机制。

原文摘要 · Abstract (English)

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.

上下文学习实体绑定语言模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。