Detecting Hallucinations in Graph Retrieval-Augmented Generation via Attention Patterns and Semantic Alignment

Shanghao Li, Jinda Han, Yibo Wang, Yuanjie Zhu, Zihe Song +3 more
12/9/2025
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2025detecting,
  title  = {Detecting Hallucinations in Graph Retrieval-Augmented Generation via Attention Patterns and Semantic Alignment},
  author = {Shanghao Li and Jinda Han and Yibo Wang and Yuanjie Zhu and Zihe Song and Langzhou He and Kenan Kamel A Alghythee and Philip S. Yu},
  year   = {2025},
  eprint = {2512.09148},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.09148v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.09148.svg)](https://codeofpaper.com/paper/2512.09148)

Discussion