arXiv:2503.15888cs.CLcs.AI2025-03被引 45

提出可精细调节大模型依赖内部知识或外部信息的方法

Parameters vs. Context: Fine-Grained Control of Knowledge Reliance in Language Models

  • 通过熵变化检测知识冲突,用单一参数控制依赖偏好
  • 在Llama3-8B上使记忆召回率从42.1%调至9.9%-71.9%
  • 支持根据模型自信度自适应调整,适合高可靠性场景

检索增强生成(RAG)通过引入外部知识缓解大语言模型的幻觉问题。然而,当外部信息不可靠或模型内部知识过时时,参数化知识与检索上下文之间产生冲突,导致模型难以判断应依赖自身参数还是外部内容。为此,本文提出一种即插即用方法CK-PLUG,实现对知识依赖的细粒度控制。引入新的知识一致性度量‘信心增益’(Confidence Gain),通过上下文插入前后词元概率分布的熵变来检测知识冲突。随后,通过单个调优参数调整负信心增益词元的概率分布,实现偏好控制。实验表明,该方法在反事实RAG场景下能显著调节知识依赖,同时保持生成流畅性和知识准确性。例如,在Llama3-8B上,检索回复的记忆召回率(MR)可在9.9%至71.9%之间调节,而基线为42.1%。此外,CK-PLUG支持基于模型对内外知识置信度的自适应控制,在多种通用RAG任务中均实现一致性能提升。

原文摘要 · Abstract (English)

Retrieval-Augmented Generation (RAG) mitigates hallucinations in Large Language Models (LLMs) by integrating external knowledge. However, conflicts between parametric knowledge and retrieved context pose challenges, particularly when retrieved information is unreliable or the model's internal knowledge is outdated. In such cases, LLMs struggle to determine whether to rely more on their own parameters or the conflicted context. To address this, we propose **CK-PLUG**, a plug-and-play method for controlling LLMs' reliance on parametric and contextual knowledge. We introduce a novel knowledge consistency metric, Confidence Gain, which detects knowledge conflicts by measuring entropy shifts in token probability distributions after context insertion. CK-PLUG then enables fine-grained control over knowledge preference by adjusting the probability distribution of tokens with negative confidence gain through a single tuning parameter. Experiments demonstrate CK-PLUG's ability to significantly regulate knowledge reliance in counterfactual RAG scenarios while maintaining generation fluency and knowledge accuracy. For instance, on Llama3-8B, memory recall (MR) of RAG response can be adjusted within a broad range (9.9%-71.9%), compared to the baseline of 42.1%. Moreover, CK-PLUG supports adaptive control based on the model's confidence in both internal and external knowledge, achieving consistent performance improvements across various general RAG tasks. Our code is available at: $\href{https://github.com/byronBBL/CK-PLUG}{\text{this https URL}}$.

大模型知识控制RAG可靠性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。