arXiv:2505.16415cs.CLcs.AI2025-05中稿 · ICLR被引 9

提出新方法精准定位生成内容来源,无需微调且计算高效。

Attributing Response to Context: A Jensen-Shannon Divergence Driven Mechanistic Study of Context Attribution in Retrieval-Augmented Generation

  • 用杰恩森-肖恩离散度衡量上下文重要性,无需微调或梯度计算。
  • 在多个数据集上准确率优于旧方法,计算速度提升显著。
  • 揭示了注意力头和MLP层在内容归因中的作用,助理解RAG机制。

检索增强生成(RAG)通过结合大语言模型(LLM)与外部上下文,提升了生成结果的准确性和可靠性。然而,如何可靠地将生成内容归因于特定上下文片段仍具挑战,现有方法通常计算开销大,需大量微调或人工标注。本文提出一种基于杰恩森-肖恩离散度(Jensen-Shannon Divergence)的响应归因方法(ARC-JSD),可在不进行额外微调、无需梯度计算或代理建模的情况下,高效准确地识别关键上下文句。在多种RAG基准测试(如TyDi QA、Hotpot QA、Musique)上,使用不同规模的指令微调LLM进行评估,结果显示其准确率更高,计算效率显著优于此前基于代理的方法。此外,机制分析揭示了负责上下文归因的具体注意力头和多层感知机(MLP)层,为理解RAG模型内部运作及行为提供了宝贵洞察。代码已公开于https://github.com/ruizheliUOA/ARC_JSD。

原文摘要 · Abstract (English)

Retrieval-Augmented Generation (RAG) leverages large language models (LLMs) combined with external contexts to enhance the accuracy and reliability of generated responses. However, reliably attributing generated content to specific context segments, context attribution, remains challenging due to the computationally intensive nature of current methods, which often require extensive fine-tuning or human annotation. In this work, we introduce a novel Jensen-Shannon Divergence driven method to Attribute Response to Context (ARC-JSD), enabling efficient and accurate identification of essential context sentences without additional fine-tuning, gradient-calculation or surrogate modelling. Evaluations on a wide range of RAG benchmarks, such as TyDi QA, Hotpot QA, and Musique, using instruction-tuned LLMs in different scales demonstrate superior accuracy and significant computational efficiency improvements compared to the previous surrogate-based method. Furthermore, our mechanistic analysis reveals specific attention heads and multilayer perceptron (MLP) layers responsible for context attribution, providing valuable insights into the internal workings of RAG models and how they affect RAG behaviours. Our code is available at https://github.com/ruizheliUOA/ARC_JSD.

RAG归因分析注意力机制高效计算

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