机制竞争:追踪语言模型如何处理事实与反事实
Competition of Mechanisms: Tracing How Language Models Handle Facts and Counterfactuals
AI总结:
本文提出机制竞争框架,通过logit检查和注意力修改追踪LLMs中事实与反事实相关机制的相互作用及主导机制的形成过程。
摘要:
可解释性研究旨在弥合大语言模型(LLMs)的经验成功与对其内部工作机制的科学理解之间的差距。然而,现有研究大多集中于分析单一机制,例如模型如何复制或回忆事实知识。在本工作中,我们提出了一种机制竞争的表述,重点关注多个机制之间的相互作用而非单个机制,并追踪其中一个机制如何在最终预测中占据主导地位。我们使用两种可解释性方法——logit检查和注意力修改——揭示了机制在LLMs内部如何以及在何处竞争。我们的发现展示了这些机制及其竞争在各种模型组件中的痕迹,并揭示了能够有效控制某些机制强度的注意力位置。代码:https://github.com/francescortu/comp-mech。数据:https://huggingface.co/datasets/francescortu/comp-mech。
英文摘要:
Interpretability research aims to bridge the gap between empirical success and our scientific understanding of the inner workings of large language models (LLMs). However, most existing research focuses on analyzing a single mechanism, such as how models copy or recall factual knowledge. In this work, we propose a formulation of competition of mechanisms, which focuses on the interplay of multiple mechanisms instead of individual mechanisms and traces how one of them becomes dominant in the final prediction. We uncover how and where mechanisms compete within LLMs using two interpretability methods: logit inspection and attention modification. Our findings show traces of the mechanisms and their competition across various model components and reveal attention positions that effectively control the strength of certain mechanisms. Code: https://github.com/francescortu/comp-mech. Data: https://huggingface.co/datasets/francescortu/comp-mech.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。