arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.32109cs.CL
收藏

上下文还是知识:大语言模型如何归因于自身的答案

Context or Knowledge: How LLMs Attribute Their Own Answers

Kirill Afendulev, Alexey Dontsov, Alla Chepurova, Elena Tutubalina, Anton Korznikov

AI总结:

该研究通过干预大语言模型的KV缓存发现,其答案来源报告因果依赖于回答时产生的Q+A缓存状态,引导Q+A值方向可显著改变来源报告。

摘要:

语言模型可以从提供的文档或其参数化知识中回答问题。当之后被问及答案来自何处时,是什么决定了它们的来源报告?我们通过在答案生成后、来源问题被提出前干预模型的键值(KV)缓存来研究这一问题。在包含四个模型(7B-32B)的受控事实任务中,更改或移除文档的缓存从未改变报告。相比之下,在具有相同问题和答案标记的运行之间迁移问答(Q+A)缓存会产生迁移效果:所有符合条件的报告都遵循捐赠者,而接收者的文档保持不变。在两个较小的模型上,沿在任何来源问题之前拟合的方向引导Q+A值,在固定强度下,会在四个文档条件中逆转98.9-100%的报告,而范数匹配的随机方向最多翻转1.1%。拟合方向上的键和值分量携带迁移效果:仅复制它们几乎可重现报告变化;固定它们几乎可阻止变化。在答案生成期间应用时,相同的值方向也会改变哪个来源提供答案,尽管效果更弱且取决于提示。因此,此设置中的来源报告因果依赖于回答时产生的缓存状态。我们未建立一般报告准确性或此状态的完整解释。

英文摘要:

Language models can answer a question from a supplied document or from their parametric knowledge. When later asked where the answer came from, what determines their source report? We study this by intervening on the model's key-value (KV) cache after the answer is generated and before the source question is asked. On a controlled factual task with four models (7B-32B), changing or removing the document's cache never changes the report. In contrast, transplanting the question-and-answer (Q+A) cache between runs with identical question and answer tokens transfers it: every eligible report follows the donor, while the recipient's document is unchanged. On the two smaller models, steering Q+A values along directions fitted before any source question reverses 98.9-100% of reports across four document conditions at a fixed strength, while norm-matched random directions flip at most 1.1%. The components of keys and values along fitted directions carry the transplant effect: copying them alone nearly reproduces the report change; holding them fixed nearly prevents it. Applied during answer generation, the same value directions also change which source supplies the answer, though more weakly and depending on the prompt. Source reporting in this setting thus depends causally on cached state produced while answering. We do not establish general reporting accuracy or a complete interpretation of this state.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑