揭秘大模型如何决定是否引用来源,发现引用机制是分散的协同网络。
How Do LLMs Cite? A Mechanistic Interpretation of Attribution in Retrieval-Augmented Generation

- 通过激活修补法定位引用决策的关键神经组件
- 修复90%漏引,消除69%错引,且不影响答案准确率
- 揭示引用行为与真实推理可能脱节,警示虚假可信风险
检索增强生成(RAG)旨在通过外部文档增强大语言模型输出的可信度,常采用内联引用以确保可验证性。然而,这些引用的真实性——即模型是否真正基于源文档生成回答——仍是一个未经验证的关键假设。本文首次对大型语言模型在回答事实性问题时决定是否添加内联引用的机制进行了系统解析。基于PopQA数据集,在控制实验环境下使用Llama-3.1-8B-Instruct模型,采用激活修补方法,我们发现引用机制并非单一局部组件,而是一个分布式的、多阶段的‘归因集成’结构,由多个注意力头和MLP层协同完成。放大或抑制这些关键组件后,可在不损害答案准确率的前提下,修复超过90%的漏引,并消除69%的误引。尽管在多文档热点问题问答(HotpotQA)上的提升有限,但相同组件集合仍能按预期方向调节引用率,表明该机制具有跨数据集普适性。结果揭示模型表面推理与内部计算路径之间可能存在脱节,提示内联引用可能制造虚假可信感。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) aims to enhance the trustworthiness of Large Language Models (LLMs) by grounding their outputs in external documents, often using inline citations for verifiability. However, the faithfulness of these citations -- whether the model genuinely uses a source to generate an answer -- remains a critical, unverified assumption. This paper offers the first mechanistic account of how a large language model decides whether to attach an inline citation while answering a factoid question. Using the Llama-3.1-8B-Instruct model in a controlled experimental environment based on the PopQA dataset, we employ an activation patching approach. We map the underlying mechanism responsible for citation, discovering that it is not a single, localized component but a distributed, multi-stage "attributional ensemble" of attention heads and MLP layers. We show that amplifying or attenuating only those critical heads and MLPs repairs over 90% of missed citations and eliminates 69% of spurious ones on PopQA without harming answer accuracy. Although gains on the multi-document HotpotQA benchmark are modest, the same component set still moves citation rates in the intended direction, indicating that the underlying mechanism is not dataset-specific. The results reveal a potential disconnect between the model's apparent reasoning and its internal computational pathway, suggesting that inline citations can create a false sense of security.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。