ChatPaper.aiChatPaper

混合メカニズム:言語モデルが束縛されたエンティティをどのように取得するか In-Context

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

October 7, 2025
著者: Yoav Gur-Arieh, Mor Geva, Atticus Geiger
cs.AI

要旨

文脈内推論の重要な要素は、言語モデル(LM)がエンティティを後で検索できるように結合する能力です。例えば、LMは「アンはパイが好き」という文を「アン」と「パイ」を結合して表現し、「パイが好きなのは誰?」と尋ねられた際に「アン」を検索できるようにします。これまでの研究では、結合されたエンティティの短いリストにおいて、LMが位置ベースのメカニズムを用いて検索を行う強い証拠が見つかっています。このメカニズムでは、「アン」は文脈内での位置に基づいて検索されます。本研究では、このメカニズムがより複雑な設定ではうまく一般化しないことを明らかにしました。文脈内の結合エンティティの数が増えると、位置ベースのメカニズムは中間の位置でノイズが多くなり、信頼性が低下します。これを補うため、LMは位置ベースのメカニズムに加えて、語彙ベースのメカニズム(「パイ」という結合された対応物を用いて「アン」を検索)および反射的メカニズム(直接のポインタを通じて「アン」を検索)を補完的に使用することがわかりました。9つのモデルと10の結合タスクを用いた広範な実験を通じて、LMがこれらのメカニズムを組み合わせてモデルの振る舞いを駆動する一貫したパターンを明らかにしました。これらの知見を活用し、3つのメカニズムを組み合わせた因果モデルを開発し、次のトークンの分布を95%の一致率で推定することに成功しました。最後に、このモデルがエンティティグループが散りばめられたより長いオープンエンドのテキスト入力にも一般化できることを示し、より自然な設定での発見の頑健性をさらに実証しました。全体として、本研究はLMが文脈内でエンティティを結合および検索する方法についてより完全な理解を確立するものです。
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.
PDF82October 8, 2025