S-Path-RAG: Semantic-Aware Shortest-Path Retrieval Augmented Generation for Multi-Hop Knowledge Graph Question Answering

Rong Fu, Yemin Wang, Tianxiang Xu, Yongtai Liu, Weizhi Tang, Wangyu Wu, Xiaowen Ma, Simon Fong · 2026

Read S-Path-RAG: Semantic-Aware Shortest-Path Retrieval Augmented Generation for Multi-Hop Knowledge Graph Question Answering by Rong Fu, Yemin Wang, Tianxiang Xu, Yongtai Liu, Weizhi Tang, Wangyu Wu, Xiaowen Ma, Simon Fong (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-23512.txt.

Introduction

Fu and seven co-authors present S-Path-RAG, a retrieval system for multi-hop questions over knowledge graphs. One-shot text retrieval often floods the model with loose evidence. Their system lists candidate paths scored by meaning and graph shape. A learned scorer, a contrastive path encoder, and a light verifier pick the best paths. A soft blend of path codes then feeds the language model by cross-attention. A dialogue loop lets the model ask for graph edits when unsure. Gains show in accuracy, evidence coverage, and cost.

Catalog record

CREATORRong Fu, Yemin Wang, Tianxiang Xu, Yongtai Liu, Weizhi Tang, Wangyu Wu, Xiaowen Ma, Simon Fong
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE49269
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2603.23512

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

S-Path-RAG: Semantic-Aware Shortest-Path Retrieval Augmented Generation for Multi-Hop Knowledge Graph Question Answering Rong Fu, Yemin Wang, Tianxiang Xu, Yongtai Liu, Weizhi Tang, Wangyu Wu, Xiaowen Ma, Simon Fong Abstract We present S-Path-RAG, a semantic-aware shortest-path Retrieval-Augmented Generation framework designed to improve multi-hop question answering over large knowledge graphs. S-Path-RAG departs from one-shot, text-heavy retrieval by enumerating bounded-length, semantically weighted candidate paths using a hybrid weighted k k -shortest, beam, and constrained random-walk strategy, learning a differentiable path scorer together with a contrastive path encoder and lightweight verifier, and injecting a compact soft mixture of selected path latents into a language model via cross-attention. The system runs inside an iterative Neural-Socratic Graph Dialogue loop in which concise diagnostic messages produced by the language model are mapped to targeted graph edits or seed expansions, enabling adaptive retrieval when the model expresses uncertainty. This combination yields a retrieval mechanism that is both token-efficient and topology-aware while preserving interpretable path-level traces for diagnostics and intervention. We validate S-Path-RAG on standard multi-hop KGQA benchmarks and through ablations and diagnostic analyses. The results demonstrate consistent improvements in answer accuracy, evidence coverage, and end-to-end efficiency compared to strong graph- and LLM-based baselines. We further analyze trade-offs between semantic weighting, verifier filtering, and iterative updates, and report practical recommendations for deployment under constrained compute and token budgets. Keywords Semantic-aware retrieval, Retrieval-Augmented Generation, Knowledge Graph Question Answering, Path-based retrieval, Graph neural networks, Cross-attention injection, Iterative retrieval, Soft latent injection 1 Introduction Large language models (LLMs) have advanced the state of the art across many natural language tasks by learning broad semantic priors from large-scale pretraining corpora [ 47 , 21 , 52 ] . Despite their impressive linguistic capabilities, LLMs remain challenged by factual consistency and structured, multi-step reasoning: they are prone to hallucinations and cannot, on their own, reliably traverse large structured knowledge sources to produce fully grounded answers [ 32 , 3 ] . Knowledge graphs (KGs) store human-curated facts and multi-hop relations in an updatable, structured format and therefore serve as a natural external memory for grounding LLM generation in knowledge-intensive tasks such as question answering (KGQA). Retrieval-augmented generation (RAG) mitigates hallucinations by enriching the model context with retrieved evidence, but the overall effectiveness of RAG depends fundamentally on the quality of the retriever: for KGQA the retriever must surface multi-hop, relational evidence from very large graphs while avoiding spurious facts that can mislead the generator [ 58 , 32 , 29 , 59 ] . Recent work has pursued multiple directions to bridge LLMs and KGs; representative efforts include graph-aware neural retrieval for LLM reasoning, extracting and following relation paths for LLMs, graph instruction tuning, and agentic deep-search workflows for graph retrieval-augmented generation [ 29 , 59 , 44 , 54 ] . Existing retrieval strategies for KG-aware RAG can be grouped into two main paradigms. One paradigm depends on the language model itself to propose relation paths or candidate facts: this LLM-driven retrieval can be effective for semantically simple queries but often fails to capture the deep topological evidence required by complex multi-hop questions and can become expensive when many LLM calls are needed [ 59 , 54 ] . The other paradigm leverages graph-oriented models, principally graph neural networks (GNNs), to reason over subgraphs and surface structurally relevant nodes and paths; while GNNs are strong at topology-aware, multi-hop search, they lack the fine-grained natural language understanding necessary to disambiguate semantically similar candidate paths [ 29 , 8 , 13 ] . Hybrid approaches combine these strengths by using graph algorithms or learned GNNs to produce candidate paths and then presenting those candidates to an LLM, or by injecting graph latents directly into LLMs [ 44 , 3 , 6 ] . Although such hybrids often increase faithfulness and multi-hop coverage, several limitations persist: many systems perform one-shot retrieval and therefore cannot iteratively refine evidence when the LLM signals uncertainty [ 58 , 54 ] ; path enumeration is often agnostic to semantic alignment with the query, producing long textual lists that waste token budget or introduce distracting noise [ 59 , 21 ] ; and the interface between retrieved graph structures and LLMs is frequently ad hoc (raw textual verbalization or coarse latents), which complicates end-to-end optimization and reduces interpretability [ 28 , 9 ] . To address these limitations, we introduce S-Path-RAG , a semantic-aware shortest-path retrieval augmented generation framework for multi-hop KGQA. Specifically, S-Path-RAG departs from one-shot, text-heavy retrieval in four complementary ways. First, it explicitly enumerates bounded-length candidate paths using a hybrid retrieval strategy that combines weighted k -shortest path search, beam search, and constrained random walks; this strategy ranks paths by a mixture of structural plausibility, relation priors and learned semantic alignment to the natural-language query. Second, S-Path-RAG trains a differentiable path scorer and a contrastive path encoder together with a lightweight verifier so that paths which are plausible to an LLM but unsupported by the KG receive lower weight. Third, instead of verbalizing long path lists, the system forms a compact soft mixture of selected path latents and injects this latent context into the LLM via cross-attention, allowing the language model to reason over concise structured evidence while keeping token usage low. Fourth, S-Path-RAG operates inside an iterative, LLM-guided retrieval loop (which we call a Neural-Socratic Graph Dialogue) in which diagnostic messages from the LLM are mapped to targeted graph edits or seed expansions and applied as soft-to-discrete graph updates when beneficial. Our technical contributions are as follows. We propose a semantic-aware shortest-path enumeration method that integrates structural costs, relation priors, and learned semantic matching to rank bounded-length paths for knowledge graph question answering (KGQA) retrieval. To improve answer faithfulness without incurring excessive large language model (LLM) calls, we develop a differentiable path scoring and verification pipeline that jointly trains a contrastive path encoder and a verifier to suppress LLM-plausible false positives. We further introduce soft latent path injection via cross-attention, allowing the LLM to attend to compact path representations instead of long verbalizations. To support this mechanism, we define alignment objectives and conduct causal intervention analyses to verify and enhance the utilization of injected latents. Additionally, we design an iterative diagnostic-to-edit mechanism, termed Neural-Socratic Graph Dialogue, which translates LLM diagnostics into precise graph updates and seed expansions, enabling adaptive retrieval guided by model uncertainty. Finally, we validate S-Path-RAG on standard multi-hop KGQA benchmarks and present comprehensive ablations and diagnostics that isolate the benefits of semantic weighting, verifier filtering, injection alignment, and iterative updates, demonstrating consistent improvements in accuracy, coverage, and efficiency over strong baselines. 2 Related Work This work lies at the intersection of Retrieval-Augmented Generation (RAG), graph-based reasoning, and large language model (LLM) augmentation. We review the most relevant directions and highlight how S-Path-RAG differs from and complements prior efforts. 2.1 Retrieval-augmented generation for KGQA RAG techniques ground LLM outputs in external knowledge and have been successfully applied to open-domain QA and specialized domains. Early RAG formulations demonstrated that augmenting generation with retrieved documents improves factuality and breadth; recent work extends this idea by replacing or complementing flat text retrieval with structured graph retrieval for tasks such as customer support and domain-specific QA [ 53 , 23 , 27 , 33 ] . Graph-extended RAG variants

Read the complete text