arXiv:2508.19614cs.CLcs.AI2025-08

通过分层融合解码,让大模型更好利用外部知识。

LFD: Layer Fused Decoding to Exploit External Knowledge in Retrieval-Augmented Generation

  • 在中间层融合外部知识表示,提升信息利用效率。
  • 实验显示该方法显著增强检索内容的利用率,代价极低。
  • 适合需要精准调用外部知识的场景,如问答与摘要。

检索增强生成(RAG)将外部知识注入大语言模型(LLM),提升其下游任务适应性并支持信息更新。近期实证发现,向检索到的相关文档中引入噪声反而有助于模型更有效地利用外部知识,提升生成质量。尽管反直觉且难落地,这一现象为研究模型如何整合外部知识提供了精细控制与严格分析的可能。本文据此提出分层功能划分:浅层专注局部上下文建模,中层聚焦长程外部事实知识整合,深层则主要依赖参数化内部知识。基于此,我们提出层融合解码(LFD),直接将中间层表征与最终层解码输出结合,充分挖掘外部事实知识。为确定最优中间层,引入内部知识得分(IKS)准则,选择后半段层数中IKS最低者。多基准测试结果表明,LFD能以极小代价显著提升RAG系统对检索内容的利用效率。

原文摘要 · Abstract (English)

Retrieval-augmented generation (RAG) incorporates external knowledge into large language models (LLMs), improving their adaptability to downstream tasks and enabling information updates. Surprisingly, recent empirical evidence demonstrates that injecting noise into retrieved relevant documents paradoxically facilitates exploitation of external knowledge and improves generation quality. Although counterintuitive and challenging to apply in practice, this phenomenon enables granular control and rigorous analysis of how LLMs integrate external knowledge. Therefore, in this paper, we intervene on noise injection and establish a layer-specific functional demarcation within the LLM: shallow layers specialize in local context modeling, intermediate layers focus on integrating long-range external factual knowledge, and deeper layers primarily rely on parametric internal knowledge. Building on this insight, we propose Layer Fused Decoding (LFD), a simple decoding strategy that directly combines representations from an intermediate layer with final-layer decoding outputs to fully exploit the external factual knowledge. To identify the optimal intermediate layer, we introduce an internal knowledge score (IKS) criterion that selects the layer with the lowest IKS value in the latter half of layers. Experimental results across multiple benchmarks demonstrate that LFD helps RAG systems more effectively surface retrieved context knowledge with minimal cost.

检索增强分层融合知识利用大模型

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