ChatPaper.aiChatPaper

혼합 메커니즘: 언어 모델이 바운드 엔티티를 어떻게 검색하는가 인-컨텍스트

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

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

초록

컨텍스트 내 추론의 핵심 요소는 언어 모델(LM)이 엔티티를 바인딩하여 나중에 검색할 수 있는 능력입니다. 예를 들어, LM은 "Ann loves pie"를 표현하기 위해 "Ann"을 "pie"에 바인딩함으로써, "누가 파이를 좋아하나요?"라는 질문에 "Ann"을 검색할 수 있습니다. 이전 연구에서는 바인딩된 엔티티의 짧은 목록을 대상으로 LM이 위치 기반 메커니즘을 통해 이러한 검색을 구현한다는 강력한 증거를 발견했습니다. 여기서 "Ann"은 컨텍스트 내 위치를 기반으로 검색됩니다. 본 연구에서는 이러한 메커니즘이 더 복잡한 설정으로 일반화되지 않음을 발견했습니다. 컨텍스트 내 바인딩된 엔티티의 수가 증가함에 따라, 위치 기반 메커니즘은 중간 위치에서 노이즈가 발생하고 신뢰성이 떨어집니다. 이를 보완하기 위해 LM은 위치 기반 메커니즘을 어휘 기반 메커니즘(바인딩된 대응물인 "pie"를 사용해 "Ann"을 검색)과 반사적 메커니즘(직접 포인터를 통해 "Ann"을 검색)으로 보강하는 것으로 나타났습니다. 9개의 모델과 10개의 바인딩 작업에 대한 광범위한 실험을 통해, LM이 이러한 메커니즘을 혼합하여 모델 동작을 이끌어내는 일관된 패턴을 발견했습니다. 이러한 통찰을 활용하여 세 가지 메커니즘을 모두 결합한 인과 모델을 개발했으며, 이 모델은 다음 토큰 분포를 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