Manuscript Offprint

arXiv:2608.25123

SelfGraphRAG: Bridging the Supervision Gap in Graph-Based RAG with Synthetic QA Generation

Ben Lagnese, Manas Gaur

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Ben Lagnese and Manas Gaur

University of Maryland, Baltimore County (UMBC), Baltimore, MD, USA

{blagnese, mgaur}@umbc.edu

https://kai2.umbc.edu

Abstract. Retrieval-augmented generation (RAG) enhances large language models by incorporating external knowledge without retraining, yet existing approaches fail to fully exploit relational structure in knowledge graphs. While graph-based RAG captures entity relationships, its effectiveness is limited by the lack of labeled data needed for supervised graph retrieval. We study whether synthetic supervision derived from the graph itself can enable effective learning of query-conditioned subgraph retrieval. We propose SelfGraphRAG, a framework that generates question–answer pairs from knowledge graph structures to induce training signals for a graph retrieval model. We hypothesize that multi-hop and neighborhood-based synthetic queries encode sufficient relational constraints to approximate real task distributions. Empirical results across multi-hop and classification benchmarks demonstrate that models trained with such synthetic supervision improve retrieval precision and reasoning performance over embedding-based baselines. These findings suggest that graph-structured data can serve as a self-contained source of supervision, enabling scalable learning of structured retrieval without manual annotation.

1 Introduction

Large language models (LLMs) have demonstrated remarkable language understanding and generation capabilities, yet they remain fundamentally limited by their parameterized knowledge; they cannot efficiently incorporate new information, are prone to hallucination, and have fixed context windows that cannot accommodate large private corpora [10]. Retrieval-augmented generation (RAG) addresses these limitations by indexing an external knowledge base and supplying relevant context at inference time, improving both accuracy and transparency [10][4]. Standard RAG, however, operates on flat document chunks. This representation is ill-suited for questions that require reasoning across entity relationships, precisely the queries that arise in complex, knowledge-intensive domains. A natural remedy is to extract a knowledge graph from the corpus during indexing, making entity relationships explicitly retrievable [2][4]. Entity-level strategies retrieve local neighborhoods of topic nodes and pass the surrounding edges as context, while corpus-level strategies partition the graph into communities, summarize each community with an LLM, and produce global answers. Both approaches, however, are limited: entity-level retrieval relies on embedding similarity with fixed hop sizes, risking both redundancy and incomplete multi-hop coverage; corpus-level summarization sacrifices the granularity of individual triples, degrading answer precision.

B. Lagnese and M. Gaur

Graph retrieval models, which learn to score and extract task-relevant subgraphs from a knowledge graph, can overcome these limitations, but they introduce a new requirement: a question-answer dataset labeled against the target graph for supervised training [8][11]. When an LLM constructs the graph from private documents, no such labeled data exists. This creates a fundamental gap between the expressiveness of graph retrieval models and their practical applicability to knowledge-graph-augmented RAG pipelines.

We propose SelfGraphRAG, a pipeline that closes this gap through synthetic data generation. Given an automatically extracted knowledge graph, SelfGraphRAG prompts an LLM to construct two complementary types of question-answer pairs: multi-hop questions that require reasoning across non-adjacent nodes, and node-summarization questions that require integrating evidence from a node's immediate neighborhood, to produce a labeled training set. We then train a graph retrieval model on this synthetic corpus and use it for inference, replacing the embedding-based similarity retrieval used in standard graph RAG methods. SelfGraphRAG's contributions are threefold. First, we demonstrate that synthetic QA generation from extracted knowledge graphs produces a training signal sufficient to outperform both standard RAG and LightRAG on multi-hop and classification benchmarks. Second, we show that the inference-time gain is achieved with a compact, locally runnable model stack, without reliance on proprietary APIs. Third, we provide a reusable pipeline that can be applied to any domain with unlabeled document corpora and prohibitively expensive annotation.

References (20)