使用机制分析量化检索增强生成(RAG)过程中对外部信息的依赖相对于参数化知识的程度
Quantifying reliance on external information over parametric knowledge during Retrieval Augmented Generation (RAG) using mechanistic analysis
AI总结:
本文通过因果中介分析和注意力贡献与剔除等机制分析方法,揭示了RAG中语言模型存在强烈依赖检索上下文而非参数化知识的“捷径”效应,并在大、小语言模型上均得到验证。
摘要:
检索增强生成(RAG)是一种在问答和信息检索等多种自然语言应用中广泛使用的外部上下文利用方法。然而,语言模型(LM)究竟以何种方式利用这种非参数记忆或检索到的上下文,目前尚不清楚。本文从机制层面考察了RAG流程,以强调语言模型表现出一种“捷径”效应,并且具有强烈的偏向性,即倾向于利用检索到的上下文来回答问题,而对模型先验知识的依赖极小。我们提出(a)因果中介分析,用于证明在回答问题时参数化记忆被极少利用;(b)注意力贡献与剔除分析,用于表明最后一个token的残差流并未从问题中的主语token获得信息增强,而是从RAG上下文的token中获得增强。我们发现这种显著的“捷径”行为在大语言模型(例如LlaMa)和小语言模型(例如Phi)中均成立。
英文摘要:
Retrieval Augmented Generation (RAG) is a widely used approach for leveraging external context in several natural language applications such as question answering and information retrieval. Yet, the exact nature in which a Language Model (LM) leverages this non-parametric memory or retrieved context isn't clearly understood. This paper mechanistically examines the RAG pipeline to highlight that LMs demonstrate a "shortcut'' effect and have a strong bias towards utilizing the retrieved context to answer questions, while relying minimally on model priors. We propose (a) Causal Mediation Analysis; for proving that parametric memory is minimally utilized when answering a question and (b) Attention Contributions and Knockouts for showing the last token residual stream do not get enriched from the subject token in the question, but gets enriched from tokens of RAG-context. We find this pronounced "shortcut'' behaviour to be true across both LLMs (e.g.,LlaMa) and SLMs (e.g., Phi)
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。