通过注意力模式与语义对齐检测图检索增强生成中的幻觉
Detecting Hallucinations in Graph Retrieval-Augmented Generation via Attention Patterns and Semantic Alignment
- 提出路径依赖度和语义对齐度两个轻量级可解释指标
- 高路径依赖度与低语义对齐度对应知识幻觉现象
- GGA检测器在AUC和F1上优于现有方法,适合可靠性评估
基于图的检索增强生成(GraphRAG)通过从知识图谱中检索线性子图来增强大语言模型(LLM)的外部知识。然而,LLM难以理解输入中的关系与拓扑信息,导致生成内容与检索知识不一致,产生幻觉。为分析LLM在生成过程中如何关注和保留结构化知识,我们提出两个轻量级可解释性度量:路径依赖度(PRD),衡量对最短路径三元组的过度依赖;语义对齐度(SAS),评估模型内部表示与检索知识的一致性。在基于知识的问答任务上的实证分析表明,高PRD和低SAS分数对应于过度依赖显著路径和语义基础薄弱的失败模式。我们进一步构建了一个轻量级后处理幻觉检测器Graph Grounding and Alignment(GGA),在AUC和F1指标上均优于强基线的语义与置信度方法。本工作通过机制可解释性揭示了结构局限性如何引发幻觉,为未来更可靠的GraphRAG系统设计提供指导。
原文摘要 · Abstract (English)
Graph-based Retrieval-Augmented Generation (GraphRAG) enhances Large Language Models (LLMs) by incorporating external knowledge from linearized subgraphs retrieved from knowledge graphs. However, LLMs struggle to interpret the relational and topological information in these inputs, resulting in hallucinations that are inconsistent with the retrieved knowledge. To analyze how LLMs attend to and retain structured knowledge during generation, we propose two lightweight interpretability metrics: Path Reliance Degree (PRD), which measures over-reliance on shortest-path triples, and Semantic Alignment Score (SAS), which assesses how well the model's internal representations align with the retrieved knowledge. Through empirical analysis on a knowledge-based QA task, we identify failure patterns associated with over-reliance on salient paths and weak semantic grounding, as indicated by high PRD and low SAS scores. We further develop a lightweight post-hoc hallucination detector, Graph Grounding and Alignment (GGA), which outperforms strong semantic and confidence-based baselines across AUC and F1. By grounding hallucination analysis in mechanistic interpretability, our work offers insights into how structural limitations in LLMs contribute to hallucinations, informing the design of more reliable GraphRAG systems in the future.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。