KGRAG-Ex: Explainable Retrieval-Augmented Generation with Knowledge Graph-based Perturbations

Georgios Balanos, Evangelos Chasanis, Konstantinos Skianis, Evaggelia PitouraarXiv 2025 · DOI

Introduction

Large Language Models (LLMs) have revolutionized natural language processing but remain prone to hallucinations. Retrieval-Augmented Generation (RAG) mitigates this by grounding outputs in external documents. However, RAG systems often operate as "black boxes," making it difficult to discern which specific facts or relationships within a retrieved context drove a particular response. KGRAG-Ex (Knowledge Graph-based Explainable RAG) addresses this by utilizing structured Knowledge Graphs (KGs) to identify the "load-bearing" components of an LLM's reasoning.

Methodology

The KGRAG-Ex framework transforms unstructured text into a structured logical format to enable systematic auditing of model decisions. The pipeline consists of four primary stages:

  1. KG Construction: Documents are segmented into chunks, and an LLM extracts (Entity, Relation, Entity) triplets.
  2. Graph-Based Retrieval: For a given query, the system identifies relevant entities and computes the shortest paths between them within the KG.
  3. Pseudo-Paragraph Generation: These paths are converted back into natural language "pseudo-paragraphs" to serve as context for the LLM.
  4. Explanation via Perturbation: The system systematically removes nodes, edges, or sub-paths (triplets) and re-evaluates the query to identify influential components.
The KGRAG-Ex pipeline: from query to explainable response.

Interpretability through Perturbation

Unlike traditional "text-level perturbation" methods that delete arbitrary words or sentences, KGRAG-Ex perturbs the underlying logic. By removing a specific entity (node) or relationship (edge), the system can observe shifts in the model's output. If the answer changes upon removal, that component is flagged as highly influential. This structured approach allows the system to generate human-readable explanations and technical insights regarding the reasoning path.

Demonstration of node, edge, and subpath perturbations and the resulting system insights.

Key Results and Insights

The researchers evaluated KGRAG-Ex using medical datasets such as StatPearls, MedMCQA, and MMLU. Key findings include:

  • Efficiency: KGRAG-Ex reduced LLM calls by approximately 68% and token consumption by 45% compared to existing text-level explanation frameworks.
  • Sensitivity: Sub-path (triplet) removal proved to be the most effective perturbation method for inducing significant shifts in model output.
  • Semantic Influence: In medical contexts, entities labeled as Disease, Symptom, or Body Part were found to be the most critical reasoning pillars.
  • Positional Bias: Perturbations at the beginning of a reasoning path (closer to the query entities) had a disproportionately high impact on the final answer.

Conclusion

KGRAG-Ex provides a transparent and computationally efficient method for auditing RAG systems. By linking every KG triplet to a specific source file and chunk ID, the framework ensures that AI-generated answers are not only accurate but also fully traceable. Future work will explore scaling the KG across multiple domains and investigating the impact of additive perturbations.

Summary updated

BibTeX
@misc{balanos2025kgrag,
  author = {Georgios Balanos and Evangelos Chasanis and Konstantinos Skianis and Evaggelia Pitoura},
  title = {{KGRAG-Ex: Explainable Retrieval-Augmented Generation with Knowledge Graph-based Perturbations}},
  year = {2025},
  eprint = {2507.08443},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.08443},
}
Figure