从RAG到丰富参数:探究语言模型在事实查询中如何利用外部知识而非参数化信息
From RAGs to rich parameters: Probing how language models utilize external knowledge over parametric information for factual queries
AI总结:
该研究通过因果中介分析、注意力贡献与敲除方法,探究RAG机制下语言模型的知识利用行为,发现模型强烈偏向依赖上下文信息、极少使用参数记忆,该捷径行为在LLaMa和Phi系列模型中均存在。
摘要:
检索增强生成(Retrieval Augmented Generation, RAG)通过外部上下文增强语言模型对用户提示的响应推理能力。该方法因在搜索、问答和聊天机器人等各类语言模型应用中的实用性而日益流行,但其具体作用机制尚未被清晰理解。本文对RAG流水线展开机制层面的研究,揭示语言模型存在走捷径的行为,强烈偏向仅利用上下文信息回答问题,对自身参数化记忆的依赖程度极低。我们通过两类方法探究语言模型的这一机制行为:(i)因果中介分析(Causal Mediation Analysis),证明回答问题时参数化记忆的利用率极低;(ii)注意力贡献与敲除(Attention Contributions and Knockouts),证明最后一个token的残差流并未从问题中的主体token获得信息增强,而是从上下文中的其他信息性token获得增强。研究发现,这种显著的捷径行为在LLaMa和Phi系列模型中均存在。
英文摘要:
Retrieval Augmented Generation (RAG) enriches the ability of language models to reason using external context to augment responses for a given user prompt. This approach has risen in popularity due to practical applications in various applications of language models in search, question/answering, and chat-bots. However, the exact nature of how this approach works isn't clearly understood. In this paper, we mechanistically examine the RAG pipeline to highlight that language models take shortcut and have a strong bias towards utilizing only the context information to answer the question, while relying minimally on their parametric memory. We probe this mechanistic behavior in language models with: (i) Causal Mediation Analysis to show that the parametric memory is minimally utilized when answering a question and (ii) Attention Contributions and Knockouts to show that the last token residual stream do not get enriched from the subject token in the question, but gets enriched from other informative tokens in the context. We find this pronounced shortcut behaviour true across both LLaMa and Phi family of models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。