RSF-GLLM: Bridging the Semantic Gap in Multi-Hop Knowledge Graph QA via Recurrent Soft-Flow and Decoupled LLM Generation
Summary
This paper introduces RSF-GLLM, a framework that decouples differentiable graph reasoning from LLM generation to address the semantic gap in multi-hop knowledge graph question answering, achieving competitive performance with superior inference efficiency.
View Cached Full Text
Cached at: 07/08/26, 04:43 AM
# RSF-GLLM: Bridging the Semantic Gap in Multi-Hop Knowledge Graph QA via Recurrent Soft-Flow and Decoupled LLM Generation
Source: [https://arxiv.org/html/2607.06527](https://arxiv.org/html/2607.06527)
###### Abstract
Multi\-hop Question Answering over Knowledge Graphs faces a critical challenge: traditional retrieve\-then\-read pipelines break differentiability, preventing the retriever from learning to bridge the semantic gap where intermediate nodes lack lexical overlap with the query\. To address this, we propose RSF\-GLLM, a framework decoupling differentiable graph reasoning from answer generation\. Our Recurrent Soft\-Flow \(RSF\) module employs a GRU\-guided query updater to propagate continuous relevance scores, utilizing a dynamic gating mechanism to traverse semantically dissimilar bridge nodes via structural cues\. We introduce flow sparsity regularization to theoretically guarantee convergence from soft probabilities to discrete reasoning paths\. These paths are extracted and textualized to fine\-tune a Large Language Model \(LLM\), ensuring generation is grounded in factual topology\. Experiments on WebQSP and CWQ demonstrate that RSF\-GLLM achieves competitive performance with superior inference efficiency compared to LLM based computationally expensive approaches\.
Machine Learning, ICML
## 1Introduction
Reasoning over structured knowledge bases to answer complex, multi\-hop queries is a fundamental challenge in artificial intelligence, essential for applications requiring high factual precision such as biomedical discovery and financial auditing\(Wang et al\.,[2021](https://arxiv.org/html/2607.06527#bib.bib34)\)\. While Large Language Models \(LLMs\) have demonstrated exceptional fluency in open\-domain tasks\(Brown et al\.,[2020](https://arxiv.org/html/2607.06527#bib.bib3)\), they frequently exhibit hallucinations and unfaithful reasoning when operating over long\-tail knowledge or complex logical chains\(Ji et al\.,[2023](https://arxiv.org/html/2607.06527#bib.bib13); Nandy & Bandyopadhyay,[2025](https://arxiv.org/html/2607.06527#bib.bib24)\)\. Consequently, Knowledge Graphs \(KGs\) remain indispensable for grounding generation in verifiable facts\(Hogan et al\.,[2021](https://arxiv.org/html/2607.06527#bib.bib10); Nandy & Bandyopadhyay,[2025](https://arxiv.org/html/2607.06527#bib.bib24)\)\. However, effective retrieval over KGs is impeded by thesemantic gap\. Consider the query:“What awards did the director of Inception win?”\. To answer this, a system must traverse from the topic entity“Inception”to the intermediate node“Christopher Nolan”\(the director\), and finally to“Academy Award”\. Crucially, the intermediate bridge entity“Christopher Nolan”shares no lexical overlap with the query terms “awards” or “win”, rendering standard similarity\-based traversal ineffective\(Sun et al\.,[2018](https://arxiv.org/html/2607.06527#bib.bib29); Xiong et al\.,[2017](https://arxiv.org/html/2607.06527#bib.bib35)\)\.
Current approaches to Knowledge Graph Question Answering \(KGQA\) effectively bifurcate into two paradigms, each utilizing distinct inductive biases yet suffering from complementary limitations\. The first category comprisesiterative subgraph retrievalmethods, such as GraftNet\(Sun et al\.,[2018](https://arxiv.org/html/2607.06527#bib.bib29)\), PullNet\(Sun et al\.,[2019](https://arxiv.org/html/2607.06527#bib.bib30)\), and NSM\(He et al\.,[2021](https://arxiv.org/html/2607.06527#bib.bib7)\)\. These architectures typically treat reasoning as a discreteRetrieve\-then\-Readprocess\(Karpukhin et al\.,[2020](https://arxiv.org/html/2607.06527#bib.bib16)\)\. However, the discrete selection of nodes at each hop breaks end\-to\-end differentiability, preventing the retriever from adapting to downstream errors\(Kim et al\.,[2023](https://arxiv.org/html/2607.06527#bib.bib17)\)\. Furthermore, rigid entity\-linking requirements often cause these models to fail when the requisitebridgenodes are semantically dissimilar to the query text\(Liang et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib19)\)\.
The second, more recent paradigm integrates thegenerative capabilities of LLMsdirectly\. Frameworks such as Graph of Thoughts\(Besta et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib2)\)and RoG\(Luo et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib20)\)attempt to improve expressivity by structuring LLM reasoning as an iterative graph traversal\. However, these agentic approaches incur prohibitive computational costs, often requiring multiple passes through billion\-parameter models to answer a single query\(Sun et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib31)\)\. Furthermore, while methods like Self\-RAG\(Asai et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib1)\)and CRAG\(Yan et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib36)\)have introduced critique\-based loops to detect hallucinations, they still struggle with thereasoning shortcutproblem: the generator frequently ignores retrieved structural constraints in favor of its pre\-trained parametric memory, compromising factual grounding\(Li et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib18); Gao et al\.,[2023](https://arxiv.org/html/2607.06527#bib.bib5)\)\.
To reconcile the structural rigor of differentiable traversal with the efficiency required for scalable deployment, we proposeRSF\-GLLM\(Recurrent Soft\-Flow Graph\-to\-LLM\)\. Unlike monolithic end\-to\-end architectures, our framework decouples reasoning from generation\. We first introduce aRecurrent Soft\-Flow \(RSF\)module, a lightweight differentiable reasoned that propagates continuous probability mass guided by a Recurrent Query Updater\(Hudson & Manning,[2019](https://arxiv.org/html/2607.06527#bib.bib11)\)\. To bridge the semantic gap, we devise aDynamic Gating Mechanismthat modulates the influence of node content versus graph topology, allowing the model to traverse semantically disjoint nodes purely via valid structural relations\. Crucially, we impose aFlow Sparsity Regularization\(Jang et al\.,[2017](https://arxiv.org/html/2607.06527#bib.bib12)\)to force these continuous distributions to converge to discrete reasoning paths, ensuring interpretability\.
Following are thecontributionswe made in this paper:
Semantic Gap in Differentiable KGQA:We identify and formalize a critical failure mode in existing differentiable multi\-hop KGQA models: the semantic gap, where enforcing semantic similarity at intermediate hops suppresses valid reasoning paths through semantically disjoint bridge entities\.
Dynamic Structure–Semantics Decoupling:We propose Recurrent Soft\-Flow \(RSF\), a differentiable graph reasoning module that introduces a dynamic gating mechanism to adaptively decouple structural propagation from semantic matching\. This enables the model to rely purely on graph topology when semantic signals are misleading, and to re\-introduce content bias only when disambiguation is required\.
Principled Sparsity for Interpretable and Faithful Reasoning Paths:We introduce an entropy\-based flow sparsity regularization and provide a theoretical analysis showing that it incentivizes convergence from soft relevance distributions to discrete, interpretable reasoning paths, enablingprovablyfaithful path extraction without sacrificing differentiability\.
Decoupled Graph\-to\-LLM Architecture for Efficient Grounded QA:We propose a two\-stage Graph\-to\-LLM framework that cleanly decouples graph reasoning from answer generation\. A lightweight differentiable graph module performs all structural inference, while a large language model is used solely as a grounded conditional generator over extracted reasoning paths—avoiding expensive agentic reasoning loops\.
Empirical Validation Across Accuracy, Robustness, and Efficiency:Extensive experiments on WebQSP and CWQ demonstrate that RSF\-GLLM achieves competitive accuracy, robust performance on semantic\-gap\-heavy queries, and orders\-of\-magnitude inference efficiency improvements over recent LLM\-centric and agentic KGQA baselines\.
Figure 1:Overall flow diagram of RSF\-GLLM
## 2Methodology
### 2\.1Problem Formulation
We formulate Multi\-Hop Question Answering \(MHQA\) over Knowledge Graphs as a path\-grounded generation task\. Let𝒢=\(𝒱,ℛ,ℰ\)\\mathcal\{G\}=\(\\mathcal\{V\},\\mathcal\{R\},\\mathcal\{E\}\)be a Knowledge Graph, where𝒱\\mathcal\{V\}is the set of entities,ℛ\\mathcal\{R\}is the set of relation types, andℰ⊆𝒱×ℛ×𝒱\\mathcal\{E\}\\subseteq\\mathcal\{V\}\\times\\mathcal\{R\}\\times\\mathcal\{V\}is the set of factual triplets\. Given a natural language queryQQ, the objective is to generate an answerAAderived from a reasoning chain within𝒢\\mathcal\{G\}\.
Unlike standard retrieval\-augmented generation \(RAG\) which retrieves unstructured text passages, we aim to discover a structural reasoning pathP=\(v0,r1,v1,…,rT,vT\)P=\(v\_\{0\},r\_\{1\},v\_\{1\},\\dots,r\_\{T\},v\_\{T\}\)withv0v\_\{0\}as a topic entity identified inQQ, such that:
1. 1\.Each step\(vt−1,rt,vt\)∈ℰ\(v\_\{t\-1\},r\_\{t\},v\_\{t\}\)\\in\\mathcal\{E\}is a valid triplet in𝒢\\mathcal\{G\}\.
2. 2\.The pathPPsemantically bridges the gap between the query intent and the answer nodevTv\_\{T\}\.
The final answerAAis generated by maximizing the probabilityP\(A∣Q,P\)P\(A\\mid Q,P\), ensuring the generation is hallucination\-free and strictly grounded in the graph topology\. We address the core challenge where intermediate nodesvtv\_\{t\}\(for0<t<T0<t<T\) may share no lexical similarity withQQ\(theSemantic Gap\), requiring a differentiable traversal mechanism that learns to propagate probability massP\(vT∣Q,𝒢\)P\(v\_\{T\}\\mid Q,\\mathcal\{G\}\)via structural cues rather than surface matching\.
Now, we discuss the details of our proposed solutionRSF\-GLLM\. As shown in Figure[1](https://arxiv.org/html/2607.06527#S1.F1), it operates in a decoupled two\-stage manner: first, we optimize a differentiable graph traverser \(RSF Module\) to identify reasoning paths; second, we fine\-tune an LLM to generate answers conditioned on the textualized paths retrieved by the RSF module\.
### 2\.2Phase 1: Anchor Identification & Initialization
Since processing the entire KG is intractable, we first identify a computational workspace\. Unlike older methods that rely on exact string matching, we use dense retrieval to handle synonyms and ambiguity\.
#### 2\.2\.1Dense Anchor Retrieval
We employ a bi\-encoder architecture \(similar to DPR\(Karpukhin et al\.,[2020](https://arxiv.org/html/2607.06527#bib.bib16)\)\)\. We pre\-compute embeddings for all entitiese∈𝒱e\\in\\mathcal\{V\}using a BERT\-based encoderEEntE\_\{Ent\}\. Given questionQQ, we encode it into𝐯Q=EQ\(Q\)\\mathbf\{v\}\_\{Q\}=E\_\{Q\}\(Q\)\. We retrieve the topic entityvtopicv\_\{topic\}via Maximum Inner Product Search \(MIPS\):
vtopic=argmaxe∈𝒱\(𝐯Q⊤EEnt\(e\)\)v\_\{topic\}=\\underset\{e\\in\\mathcal\{V\}\}\{\\text\{argmax\}\}\(\\mathbf\{v\}\_\{Q\}^\{\\top\}E\_\{Ent\}\(e\)\)\(1\)Example:ForQ=Q=“What awards did the director of Inception win?”, the model retrievesvtopic=Inceptionv\_\{topic\}=\\mathrm\{Inception\}\. We utilize a FAISS index\(Johnson et al\.,[2021](https://arxiv.org/html/2607.06527#bib.bib15)\)for efficient retrieval\.
#### 2\.2\.2Subgraph Construction
We extract theTT\-hop neighborhood aroundvtopicv\_\{topic\}to form the subgraph𝒢sub=\(𝒱sub,ℰsub\)\\mathcal\{G\}\_\{sub\}=\(\\mathcal\{V\}\_\{sub\},\\mathcal\{E\}\_\{sub\}\)\. To ensure alignment between the text question and graph nodes, we re\-initialize all node features in𝒢sub\\mathcal\{G\}\_\{sub\}using thesameencoder used for the question\.
𝐡v\(0\)=𝐖𝒱⋅EQ\(text\(v\)\),𝐞r=𝐖ℛ⋅EQ\(text\(r\)\)\\mathbf\{h\}\_\{v\}^\{\(0\)\}=\\mathbf\{W\}\_\{\\mathcal\{V\}\}\\cdot E\_\{Q\}\(\\text\{text\}\(v\)\),\\quad\\mathbf\{e\}\_\{r\}=\\mathbf\{W\}\_\{\\mathcal\{R\}\}\\cdot E\_\{Q\}\(\\text\{text\}\(r\)\)\(2\)where𝐖𝒱,𝐖ℛ\\mathbf\{W\}\_\{\\mathcal\{V\}\},\\mathbf\{W\}\_\{\\mathcal\{R\}\}are learnable projection matrices\.
### 2\.3Phase 2: Recurrent Graph Reasoning \(The RSF Module\)
This module performsTTsteps of differentiable reasoning \(t=1…Tt=1\\dots T\)\. At each step, the model updates a probability distribution over nodes \(The Flow\)\(Sun et al\.,[2018](https://arxiv.org/html/2607.06527#bib.bib29)\)and evolves the question vector \(The Intent\)\(Hudson & Manning,[2019](https://arxiv.org/html/2607.06527#bib.bib11)\)\.
Initialization:The flow𝝅\(0\)\\boldsymbol\{\\pi\}^\{\(0\)\}is a one\-hot vector atvtopicv\_\{topic\}\. The query state is𝐪0=𝐯Q\\mathbf\{q\}\_\{0\}=\\mathbf\{v\}\_\{Q\}\.
#### 2\.3\.1Step 2\.1: Dynamic Relation Attention \(The Compass\)
At steptt, the model decides which edge types are valid\. We compute an attention vector𝜷\(t\)\\boldsymbol\{\\beta\}^\{\(t\)\}over all relations using a Sigmoid activation to allow multi\-path traversal:
βr\(t\)=σ\(𝐪t−1⊤𝐖att𝐞r\)\\beta\_\{r\}^\{\(t\)\}=\\sigma\\left\(\\mathbf\{q\}\_\{t\-1\}^\{\\top\}\\mathbf\{W\}\_\{att\}\\mathbf\{e\}\_\{r\}\\right\)\(3\)Example:βdirected\_by\(1\)≈1\.0\\beta\_\{\\texttt\{directed\\\_by\}\}^\{\(1\)\}\\approx 1\.0, whileβreleased\_in\(1\)≈0\.0\\beta\_\{\\texttt\{released\\\_in\}\}^\{\(1\)\}\\approx 0\.0\.
#### 2\.3\.2Step 2\.2: Relation\-Guided Flow Propagation
This step updates the node relevance distribution by propagating flow from the previous hop\. We decompose this process into structural propagation and conditional semantic refinement\.
1\. Structural Flow Propagation\.Following standard message\-passing neural networks \(MPNNs\)\(Gilmer et al\.,[2017](https://arxiv.org/html/2607.06527#bib.bib6)\)and previous KGQA frameworks like GraftNet\(Sun et al\.,[2018](https://arxiv.org/html/2607.06527#bib.bib29)\), we first calculate the probability mass arriving at a nodevvpurely based on graph connectivity and relation validity:
Φv\(t\)=∑\(u,r,v\)∈𝒩in\(v\)πu\(t−1\)⋅βr\(t\)\\Phi\_\{v\}^\{\(t\)\}=\\sum\_\{\(u,r,v\)\\in\\mathcal\{N\}\_\{in\}\(v\)\}\\pi\_\{u\}^\{\(t\-1\)\}\\cdot\\beta\_\{r\}^\{\(t\)\}\(4\)where𝒩in\(v\)\\mathcal\{N\}\_\{in\}\(v\)denotes the incoming neighborhood\.Φv\(t\)\\Phi\_\{v\}^\{\(t\)\}represents the structural likelihood ofvvbeing the next step in the reasoning chain\.
2\. Semantic Disambiguation via Content Bias\.Structural flow alone suffers from thefan\-out dilutionproblem\(Sun et al\.,[2019](https://arxiv.org/html/2607.06527#bib.bib30)\)when multiple neighbors are connected via the same valid relation\. Consider a modified query:“Did the director of Inception also direct Interstellar?”\. At hopt=2t=2, the relationdirected\_by\-1is valid for all movies directed by Christopher Nolan\. Without node content awareness, the structural flowΦv\(t\)\\Phi\_\{v\}^\{\(t\)\}is uniformly diluted acrossInterstellar,Dunkirk, andTenet, making the correct target indistinguishable from noise\. To resolve this, we introduce a content matching scoreρv\(t\)\\rho\_\{v\}^\{\(t\)\}:
ρv\(t\)=𝐪t−1⊤𝐖node𝐡v\\rho\_\{v\}^\{\(t\)\}=\\mathbf\{q\}\_\{t\-1\}^\{\\top\}\\mathbf\{W\}\_\{node\}\\mathbf\{h\}\_\{v\}\(5\)This score measures the alignment between the node and the current query intent, allowing the model to highlight “Interstellar” specifically\.
3\. Adaptive Gating Mechanism\.Indiscriminately applying content bias is detrimental due to theSemantic Gap: intermediate reasoning nodes often share no lexical overlap with the query\. In our running example“What awards…”, the intermediate node “Christopher Nolan” does not semantically match the query word “Awards\.” Enforcing content bias here would erroneously suppress the correct bridge node\. We therefore employ a dynamic gating mechanism to modulate the influence of the content bias:
λ\(t\)=σ\(𝐰λ⊤𝐪t−1\+bλ\)\\lambda^\{\(t\)\}=\\sigma\(\\mathbf\{w\}\_\{\\lambda\}^\{\\top\}\\mathbf\{q\}\_\{t\-1\}\+b\_\{\\lambda\}\)\(6\)Here,λ\(t\)→1\\lambda^\{\(t\)\}\\to 1when the query seeks specific named entities \(resolving fan\-out\), andλ\(t\)→0\\lambda^\{\(t\)\}\\to 0when the query focuses on structural traversal \(bridging the semantic gap\)\.
4\. Probabilistic Aggregation\.We combine the structural and semantic signals into a unified probability distribution\. The aggregation models aconditionalconjunction: a node must be structurally valid, and—only ifthe gateλ\(t\)\\lambda^\{\(t\)\}is active—semantically relevant\. We implement this via summation in log\-space:
πv\(t\)=exp\(log\(Φv\(t\)\+ϵ\)\+λ\(t\)⋅ρv\(t\)\)∑z∈𝒱subexp\(log\(Φz\(t\)\+ϵ\)\+λ\(t\)⋅ρz\(t\)\)\\pi\_\{v\}^\{\(t\)\}=\\frac\{\\exp\\left\(\\log\(\\Phi\_\{v\}^\{\(t\)\}\+\\epsilon\)\+\\lambda^\{\(t\)\}\\cdot\\rho\_\{v\}^\{\(t\)\}\\right\)\}\{\\sum\_\{z\\in\\mathcal\{V\}\_\{sub\}\}\\exp\\left\(\\log\(\\Phi\_\{z\}^\{\(t\)\}\+\\epsilon\)\+\\lambda^\{\(t\)\}\\cdot\\rho\_\{z\}^\{\(t\)\}\\right\)\}\(7\)whereϵ\\epsilonis a smoothing constant\. Whenλ\(t\)≈0\\lambda^\{\(t\)\}\\approx 0, the termλ\(t\)⋅ρv\(t\)\\lambda^\{\(t\)\}\\cdot\\rho\_\{v\}^\{\(t\)\}vanishes, and the selection relies purely on structural validityΦv\(t\)\\Phi\_\{v\}^\{\(t\)\}\. Whenλ\(t\)≈1\\lambda^\{\(t\)\}\\approx 1, the selection requires both structure and content alignment\.
Remark on Re\-entrant Paths\.Contrary to acyclic traversal constraints often imposed in symbolic reasoning, RSF\-GLLM explicitly permits re\-entrant paths where flow returns to a previously visited node\. This is essential for solvingcircular filteringqueries, such as“Which movies starring Leonardo DiCaprio were directed by the director of Inception?”\. To answer this, the reasoning path must traverseInception→directed\_byNolan→directedInceptionInception\\xrightarrow\{directed\\\_by\}Nolan\\xrightarrow\{directed\}Inception, returning to the start node to verify the second constraint \(“starring DiCaprio”\)\. Strict acyclicity would discard the correct answer \(InceptionInception\) at stept=2t=2\. Instead of hard blocking, we rely on theQuery Updatemechanism \(Section[2\.3\.4](https://arxiv.org/html/2607.06527#S2.SS3.SSS4)\) to prevent redundant oscillations\.
#### 2\.3\.3Step 2\.3: Context Aggregation \(TheReadOperation\)
Once the flow distribution𝝅\(t\)\\boldsymbol\{\\pi\}^\{\(t\)\}is computed, we summarize the retrieved information into a single differentiable context vector𝐜t\\mathbf\{c\}\_\{t\}\. This operation functions as asoft readfrom the graph memory\. We compute𝐜t\\mathbf\{c\}\_\{t\}as the expected value of the node embeddings under the current flow distribution:
𝐜t=∑v∈𝒱subπv\(t\)⋅𝐡v\\mathbf\{c\}\_\{t\}=\\sum\_\{v\\in\\mathcal\{V\}\_\{sub\}\}\\pi\_\{v\}^\{\(t\)\}\\cdot\\mathbf\{h\}\_\{v\}\(8\)where𝐡v\\mathbf\{h\}\_\{v\}represents the static node embedding initialized in Phase 1\. This vector𝐜t\\mathbf\{c\}\_\{t\}effectively compresses the semantic content of theactiveregion of the graph at hopttinto a fixed\-size representation, which is then passed to the Recurrent Query Updater to determine the next reasoning step\. In our example,𝐜1≈embedding\(“Christopher Nolan”\)\\mathbf\{c\}\_\{1\}\\approx\\text\{embedding\(\`\`Christopher Nolan''\)\}\.
#### 2\.3\.4Step 2\.4: Differentiable Query Update \(TheWriteOperation\)
To enable multi\-hop reasoning, the model must handleintent shifting: resolving one constraint \(e\.g\., finding the “Director”\) and updating the query to focus on the next \(e\.g\., finding “Awards”\)\(Hudson & Manning,[2019](https://arxiv.org/html/2607.06527#bib.bib11)\)\. We model this evolution using a Gated Recurrent Unit \(GRU\) that acts as a differentiable instruction pointer\.
At each hoptt, the query vector𝐪t\\mathbf\{q\}\_\{t\}is updated based on the retrieved context𝐜t\\mathbf\{c\}\_\{t\}:
𝐪t=GRU\(𝐜t,𝐪t−1\)\\mathbf\{q\}\_\{t\}=\\text\{GRU\}\(\\mathbf\{c\}\_\{t\},\\mathbf\{q\}\_\{t\-1\}\)\(9\)where𝐜t\\mathbf\{c\}\_\{t\}serves as the input \(observation\) and𝐪t−1\\mathbf\{q\}\_\{t\-1\}as the hidden state \(intent\)\. Mathematically, the GRU’s reset gate𝐫t\\mathbf\{r\}\_\{t\}detects features in𝐜t\\mathbf\{c\}\_\{t\}that satisfy current query constraints \(e\.g\., identifying “Christopher Nolan”\), while the update gate𝐳t\\mathbf\{z\}\_\{t\}rotates the vector in semantic space to point towards the next logical hop \(“Awards”\)\. This effectively performsdifferentiable instruction subtraction, removing satisfied constraints from the query representation\.
We employ a GRU rather than a Transformer or LSTM for this module due tosample efficiencyandinductive bias\. Reasoning chains in KGQA are typically short \(T≤4T\\leq 4\)\. Transformers often require large\-scale data to learn positional dependencies that GRUs capture natively in sequential recurrence\. Furthermore, the gating mechanism of the GRU provides a robustforgettingbias, which is structurally aligned with the task of discarding resolved query parts, preventing information overload in later hops\.
### 2\.4Phase 3: Path Extraction & Textualization
A critical design choice in RSF\-GLLM is the decoupling of graph reasoning from answer generation\. It ensures that the LLM’s high\-variance autoregressive gradients do not backpropagate into the GNN, allowing the RSF module to learn stable structural priors independently of the generator’s linguistic biases\.
Path Decoding Mechanism:We employ aGreedy Backtrackingstrategy to ensure that extracted paths strictly explain the model’s most confident final predictions\. We first identify the top\-KKanswer candidates\{vT\(1\),…,vT\(K\)\}\\\{v\_\{T\}^\{\(1\)\},\\dots,v\_\{T\}^\{\(K\)\}\\\}corresponding to theKKhighest probability mass values in the final distribution𝝅\(T\)\\boldsymbol\{\\pi\}^\{\(T\)\}\.
For each candidate targetvT\(k\)v\_\{T\}^\{\(k\)\}, we reconstruct its causal reasoning chainPk=\(v0,…,vT\(k\)\)P\_\{k\}=\(v\_\{0\},\\dots,v\_\{T\}^\{\(k\)\}\)in reverse, tracing the flow from the answer back to the source\. Specifically, for a nodevtv\_\{t\}at hoptt, we select its predecessorvt−1v\_\{t\-1\}by choosing the neighbor in the previous distribution𝝅\(t−1\)\\boldsymbol\{\\pi\}^\{\(t\-1\)\}with the highest probability:
vt−1=argmaxu∈𝒩in\(vt\)πu\(t−1\)v\_\{t\-1\}=\\underset\{u\\in\\mathcal\{N\}\_\{in\}\(v\_\{t\}\)\}\{\\text\{argmax\}\}\\ \\pi\_\{u\}^\{\(t\-1\)\}\(10\)We repeat this process recursively fromt=Tt=Tdown tot=1t=1until we reach the topic entityvtopicv\_\{topic\}\(whereπ\(0\)=1\\pi^\{\(0\)\}=1\)\. This yields a set of top\-KKpaths𝒫top\\mathcal\{P\}\_\{top\}that represent the most likely structural trajectories leading to the predicted answers\.
Textualization:We convert each structured pathPkP\_\{k\}into a natural language stringSkS\_\{k\}using a template\-based linearizer\. For example:“Inception \(film\)→directed\_by\\xrightarrow\{directed\\\_by\}Christopher Nolan \(director\)→won\_award\\xrightarrow\{won\\\_award\}Academy Award\.”
This two\-stage approach prevents the high\-variance gradients of the LLM from destabilizing the structural learning of the GNN, ensuring robust optimization for both modules\. By standardizing the interface as text, the RSF module becomes a universal plugin compatible with any LLM, including proprietary black\-box models \(e\.g\., GPT\-4\) where gradient access is unavailable\. Furthermore, explicit textual paths allow for human verification of the reasoning logic prior to generation, eliminating hallucinated retrieval while significantly reducing computational costs compared to end\-to\-end inference\.
### 2\.5Phase 4: LLM Fine\-Tuning
We utilize a pre\-trained Large Language Model \(LLM\) to synthesize the final answer\. The LLM is fine\-tuned to condition its generation on the extracted paths\.
Input Construction:We concatenate the original questionQQwith the textualized reasoning pathsS1:KS\_\{1:K\}:
𝐗input\\displaystyle\\mathbf\{X\}\_\{input\}=Context:\[S1;…;SK\]Question:Q\\displaystyle=\\texttt\{Context: \}\[S\_\{1\};\\dots;S\_\{K\}\]\\quad\\texttt\{Question:\}Q𝐘output\\displaystyle\\mathbf\{Y\}\_\{output\}=Answer:A\\displaystyle=\\texttt\{Answer: \}A
Fine\-Tuning:The LLM is trained to generate the ground truth answerAAautoregressively, minimizing the negative log\-likelihood of the answer tokens\.
### 2\.6Training Protocol
We adopt a two\-stage training strategy\. This decoupling prevents thegradient noisefrom the LLM from destabilizing the graph reasoning process and allows for lighter, more efficient optimization\.
#### 2\.6\.1Stage 1: RSF Module Training
In this stage, the LLM is frozen \(or not present\)\. We train the GNN encoders, Attention weights, and Query GRU to maximize the probability of the correct answer node at the final hopTT\.
Task Loss \(ℒtask\\mathcal\{L\}\_\{task\}\):Letvansv\_\{ans\}be the ground truth answer node\. We construct a target one\-hot distribution𝐲gt∈\{0,1\}\|Vsub\|\\mathbf\{y\}\_\{gt\}\\in\\\{0,1\\\}^\{\|V\_\{sub\}\|\}where𝐲gt\[vans\]=1\\mathbf\{y\}\_\{gt\}\[v\_\{ans\}\]=1\. We minimize the KL Divergence between the predicted final flow𝝅\(T\)\\boldsymbol\{\\pi\}^\{\(T\)\}and the ground truth:
ℒtask=KL\(𝐲gt\|\|𝝅\(T\)\)=−∑v∈𝒱sub𝐲gt\[v\]log𝝅v\(T\)\\mathcal\{L\}\_\{task\}=\\text\{KL\}\(\\mathbf\{y\}\_\{gt\}\\ \|\|\\ \\boldsymbol\{\\pi\}^\{\(T\)\}\)=\-\\sum\_\{v\\in\\mathcal\{V\}\_\{sub\}\}\\mathbf\{y\}\_\{gt\}\[v\]\\log\\boldsymbol\{\\pi\}^\{\(T\)\}\_\{v\}\(11\)This is equivalent to the Cross\-Entropy loss on the final node distribution\.
Flow Sparsity Regularization \(ℒflow\\mathcal\{L\}\_\{flow\}\):A common failure mode in differentiable graph traversal isflooding, where the model minimizes risk by assigning uniform non\-zero probability to the entire subgraph\. This dilutes the context vector𝐜t\\mathbf\{c\}\_\{t\}with irrelevant noise\. To enforce focused reasoning, we minimize the entropy of the node relevance distribution𝝅\(t\)\\boldsymbol\{\\pi\}^\{\(t\)\}at each hoptt:
ℒflow=1T∑t=1T\(−∑v∈𝒱subπv\(t\)log\(πv\(t\)\+ϵ\)\)\\mathcal\{L\}\_\{flow\}=\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\\left\(\-\\sum\_\{v\\in\\mathcal\{V\}\_\{sub\}\}\\pi\_\{v\}^\{\(t\)\}\\log\(\\pi\_\{v\}^\{\(t\)\}\+\\epsilon\)\\right\)\(12\)whereϵ\\epsilonis a small constant for numerical stability\. Minimizing entropy encourages the distribution to bespiky, forcing the model to select a distinct reasoning path \(e\.g\., exclusively highlighting “Christopher Nolan”\) rather than smearing probability mass across all neighbors\. This mimics discrete logical steps while retaining differentiability\.
Total Stage 1 Loss:ℒStage1=ℒtask\+λ1ℒflow\\mathcal\{L\}\_\{Stage1\}=\\mathcal\{L\}\_\{task\}\+\\lambda\_\{1\}\\mathcal\{L\}\_\{flow\}\.
#### 2\.6\.2Stage 2: LLM Optimization
After Stage 1 converges, we freeze the RSF module\. We run the RSF module on the training set to extract the top\-KKpaths and generate the prompt𝐗input\\mathbf\{X\}\_\{input\}\. We then fine\-tune the LLM using standard Causal Language Modeling \(CLM\) loss:
ℒStage2=−∑j=1\|A\|logPθ\(aj∣a<j,𝐗input\)\\mathcal\{L\}\_\{Stage2\}=\-\\sum\_\{j=1\}^\{\|A\|\}\\log P\_\{\\theta\}\(a\_\{j\}\\mid a\_\{<j\},\\mathbf\{X\}\_\{input\}\)\(13\)
### 2\.7Theoretical Analysis
We analyze three critical theoretical properties of RSF\-GLLM: its ability to converge to crisp reasoning paths \(Sparsity\), its capacity to traverse semantically dissimilar nodes \(Expressivity\), and its capability to ensure structurally faithful reasoning\. Detailed proofs of all the theorems are provided in Appendix[A](https://arxiv.org/html/2607.06527#A1)\.
###### Theorem 2\.1\(Sparsity Convergence\)\.
The global minima of the flow sparsity lossℒflow\(𝛑\)=−∑πilogπi\\mathcal\{L\}\_\{flow\}\(\\boldsymbol\{\\pi\}\)=\-\\sum\\pi\_\{i\}\\log\\pi\_\{i\}lie exclusively at the vertices of the probability simplexΔN−1\\Delta^\{N\-1\}\.
The above property ensures that the model avoids flooding the graph with uniform probability, which would dilute the reasoning signal with noise\. Instead, the optimization landscape mathematically incentivizes the model to make decisive, unambiguous choices at each hop, mimicking discrete logical steps\.
###### Theorem 2\.2\(Semantic Gap Bridging\)\.
LetP=\(v0→r1v1→r2⋯→rKvK\)P=\(v\_\{0\}\\xrightarrow\{r\_\{1\}\}v\_\{1\}\\xrightarrow\{r\_\{2\}\}\\cdots\\xrightarrow\{r\_\{K\}\}v\_\{K\}\)be a valid reasoning path satisfying:*\(i\)*intermediate nodes possess zero semantic similarity to the question \(i\.e\.,𝐡vt⊤𝐪0≈0\\mathbf\{h\}\_\{v\_\{t\}\}^\{\\top\}\\mathbf\{q\}\_\{0\}\\approx 0for0<t<K0<t<K\), and*\(ii\)*for each hopt∈\{1,…,K\}t\\in\\\{1,\\ldots,K\\\},vtv\_\{t\}is the uniquertr\_\{t\}\-neighbor ofvt−1v\_\{t\-1\}in𝒢sub\\mathcal\{G\}\_\{sub\}\(no fan\-out\)\. There exists a parameter configuration for the Recurrent Query Updater and Relation Attention such thatπvt\(t\)≈1\\pi\_\{v\_\{t\}\}^\{\(t\)\}\\approx 1at each hopt∈\{1,…,K\}t\\in\\\{1,\\ldots,K\\\}, solely via structural propagation\.
This theorem proves that RSF\-GLLM can traverse structural bridges \(likeChristopher Nolan\) purely based on relation semantics\. This allows it to solve complex queries where the intermediate evidence has no lexical overlap with the original question, effectively bypassing thesemantic gap\.
###### Theorem 2\.3\(Guaranteed Structural Faithfulness\)\.
LetvTv\_\{T\}be a target node at hopTTwith non\-zero structural flow, i\.e\.,ΦvT\(T\)\>0\\Phi\_\{v\_\{T\}\}^\{\(T\)\}\>0\. The greedy backtracking procedure, defined byvt−1=argmaxu∈𝒩in\(vt\)πu\(t−1\)v\_\{t\-1\}=\\operatorname\{argmax\}\_\{u\\in\\mathcal\{N\}\_\{in\}\(v\_\{t\}\)\}\\pi\_\{u\}^\{\(t\-1\)\}, is guaranteed to reconstruct a continuous, valid pathP=\(v0,…,vT\)P=\(v\_\{0\},\\dots,v\_\{T\}\)connecting the source entityvtopicv\_\{topic\}tovTv\_\{T\}withinTTsteps\.
This theorem provides a critical guaranty for factual grounding\. It ensures that every answer generated by our pipeline is supported by an explicit, verifiable reasoning chain existing in the knowledge graph\. Unlike heuristic search methods that may fail to connect endpoints or LLM based approaches with the risk of hallucinations,our flow\-based backtracking mathematically ensures connectivity, thereby enforcing structural faithfulness by design\.
## 3Experiments
We evaluate RSF\-GLLM on two benchmarks requiring multi\-hop reasoning over Knowledge Graphs\. Our experiments are designed to verify: \(1\) The superiority of the decoupledGraph\-to\-LLMapproach over rigid retrievers, hallucination\-prone LLMs and extremely expensive agentic approaches; \(2\) The efficiency gains from our lightweight RSF module; and \(3\) The empirical validity of our theoretical claims and model ablations\.
### 3\.1Experimental Setup
Datasets\.We utilize two standard KGQA benchmarks:
WebQSP\(Yih et al\.,[2016](https://arxiv.org/html/2607.06527#bib.bib37)\): Contains approx\. 4,700 queries derived from Google Search\. It requires up to 2 hops of reasoning and is characterized by high semantic variety\.
CWQ \(Complex WebQuestions\)\(Talmor & Berant,[2018](https://arxiv.org/html/2607.06527#bib.bib32)\): A dataset focusing on complex, compositional queries requiring up to 4 hops\. It serves as a stress test for the Recurrent Query Updater’s ability to maintain state over long chains\.
Baselines:All baselines are listed in Table[1](https://arxiv.org/html/2607.06527#S3.T1)and discussed in Appendix[C](https://arxiv.org/html/2607.06527#A3)\. We have only selected baselines that are using open source LLMs with a similar number of model parameters as in Qwen3\-8B to have a fair comparison\. The reported numbers are mostly taken from the source papers\.
Implementation Details\.RSF\-GLLM is implemented in PyTorch using PyTorch Geometric\. Following RoG\(Luo et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib20)\), we use preprocessed WebQSP and CWQ datasets with entities pre\-linked to Freebase\. We extractKK\-hop subgraphs via BFS \(K=2K=2for WebQSP,K=4K=4for CWQ\)\. Node and relation embeddings are obtained from Qwen3\-Embedding\.\. The RSF module is trained for up to 10 epochs using AdamW \(lr=5×10−55\\times 10^\{\-5\}, weight decay 0\.01,λ1=0\.1\\lambda\_\{1\}=0\.1\)\. For the LLM reader, we use Qwen3\-8B with extracted reasoning paths\. We report Hit@1 and F1 following standard evaluation metrics\. All experiments use a single NVIDIA A100 GPU\. Baseline details are in Appendix[C](https://arxiv.org/html/2607.06527#A3)\.
Table 1:Performance comparison on WebQSP and CWQ benchmarks\. Best results are inbold, second\-best areunderlined\. The “Agentic Search” category \(shaded\) relies on computationally expensive iterative LLM calls, serving as an oracle\-style upper bound\. RSF\-GLLM uses Qwen3\-8B or LLaMa\-2\-7B as the LLM answer generator\.
### 3\.2Main Performance Results
Table[1](https://arxiv.org/html/2607.06527#S3.T1)presents the performance comparison on WebQSP and CWQ\. Our proposed RSF\-GLLM achieves state\-of\-the\-art results in Hit@1 on WebQSP and competitive performance on the complex CWQ benchmark, validating the effectiveness of decoupling differentiable graph reasoning from LLM generation\.
Comparison with State\-of\-the\-Art LLM\+KG Methods:RSF\-GLLM demonstrates robust superiority in answer accuracy \(Hit@1\) over leading baselines in theLLM \+ KGcategory\. On WebQSP, we achieve90\.45%Hit@1, significantly outperformingRoG\(85\.7%\),GNN\-RAG\(80\.6%\), andDECAF\(82\.1%\)\. RSF\-GLLM also surpassesDECAFon F1 \(79\.15% vs\. 78\.8%\), demonstrating that our framework achieves superior performance on both Hit@1 and F1 metrics simultaneously\.
Crucially, our performance is achieved with superior efficiency\. While methods likeGNN\-RAGandDECAFrequire heavy retrieval\-augmented generation pipelines or multiple LLM calls, RSF\-GLLM employs a lightweight, differentiable RSF module for path extraction\. This allows us to use asingle LLM callfor the final answer generation, drastically reducing computational overhead while maintaining high structural grounding\. For example, the average inference time per question by RSF\-GLLM was around0\.250\.25sec on both data sets on an A100 80GB machine, which is significantly faster than other competitive baselines\.
Comparison with Agentic Search \(Oracle Baselines\):TheAgentic Searchcategory \(shaded in Table[1](https://arxiv.org/html/2607.06527#S3.T1)\) treats KG traversal as a sequential decision process involving iterative LLM invocations \(e\.g\., FD\-PORT requires 50\+ calls\)\. We consider these methods as high\-costoracles\. Remarkably, RSF\-GLLM surpasses these computationally expensive frameworks on WebQSP \(90\.45% vs\. 89\.2% for FD\-PORT\)\. This indicates that our differentiable Recurrent Soft\-Flow mechanism effectively captures complex reasoning structures akin to agentic planning, but at a fraction of the latency and cost\.
Note on the WebQSP–CWQ Hit@1 gap\.The raw Hit@1 gap between WebQSP \(90\.45%\) and CWQ \(67\.39%\) partially reflects a structural property of the datasets rather than a reasoning limitation\. Under the standardKK\-hop BFS subgraph construction adopted by all retrieval\-based baselines, 19\.3% of CWQ test questions have their gold answer entityoutsidethe extracted subgraph, imposing a theoretical Hit@1 ceiling of approximately80\.7%80\.7\\%on CWQ\. WebQSP’s coverage underK=2K\{=\}2is95\.7%95\.7\\%, yielding a naturally higher ceiling\. A substantial portion of the observed cross\-dataset Hit@1 gap is therefore attributable to subgraph coverage limits, not model failure; theKK\-hop bottleneck this exposes motivates the Dynamic Beam Expansion extension discussed in Section[4](https://arxiv.org/html/2607.06527#S4)\.
Table 2:Comparison of retrieval efficiency and performance\. Efficiency columns \(Params, Time, Mem\) are measured for 1 epoch training on CWQ\.\#LLMdenotes the number of LLM calls required strictly during the path retrieval phase\. H@kkmeasures whether the ground truth answer appears in the top\-kkcandidates provided to the LLM reader\.
### 3\.3Retrieval Performance and Efficiency
Table[2](https://arxiv.org/html/2607.06527#S3.T2)presents a comprehensive evaluation of retrieval quality versus computational cost\. The results highlight distinct limitations in existing baselines that RSF\-GLLM effectively overcomes\.
Limitations of LLM\-Heavy Retrievers:Methodologies likeRoGrely on fine\-tuning large language models \(6\.7B parameters\) to generate reasoning paths directly\. Despite its massive size and computational demand \(\>\>64GB memory,∼\\sim10k seconds/epoch\), RoG performs significantly worse than our approach, achieving only 54\.1% Hit@10 compared to RSF’s 72\.1%\. This indicates that generative LLMs, while fluent, often hallucinate relations or lose track of structural constraints in purely parametric generation\. Similarly,GNN\-RAG\+RA, an agentic extension of GNN\-RAG that integrates an LLM reasoner, improves retrieval to 71\.1%\. However, this performance gain comes at the cost of extreme complexity—matching RoG’s prohibitive resource footprint and requiring slow, iterative LLM calls during retrieval\. Even with this agentic overhead, it fails to match the retrieval precision of our lightweight module\.
Limitations of Pure GNNs:At the other end of the spectrum, the standardGNN\-RAGretriever is extremely lightweight \(2\.9M parameters\) and fast\. However, its performance \(67\.0% Hit@10\) is inadequate for complex multi\-hop QA\. Relying primarily on static embedding similarity, it lacks the capacity to model the dynamic, state\-dependent reasoning required for compositional queries\.
The RSF Advantage:RSF\-GLLM occupies a uniquesweet spot\. By designing a specialized differentiable reasoner, we reduce the model size to176M parameters\(38×38\\timessmaller than RoG/GNN\-RAG\+RA\) and eliminate the need for LLM calls during retrieval\. Unlike the static GNN\-RAG, our Recurrent Soft\-Flow mechanism is expressive enough to model complex agentic\-like planning steps \(Section[E](https://arxiv.org/html/2607.06527#A5)\), allowing it to achieve state\-of\-the\-art retrieval performance \(72\.1% Hit@10\)\. This demonstrates that a structure\-aware module can outperform massive general\-purpose LLMs in graph navigation tasks while remaining efficient enough for training on consumer\-grade hardware\.
### 3\.4Ablation Study
We validate the contribution of each RSF component through systematic ablations on WebQSP \(Table[3](https://arxiv.org/html/2607.06527#S3.T3)\)\.
Table 3:Ablation study of RSF module on WebQSP\.Δ\\Deltaindicates change from the unablated RSF module performance on the Hit@10 metric\.Table 4:Effect of RSF paths vs\. QA\-pair memorization\. “No RSF” fine\-tunes the LLM on \(question, answer\) pairs only, without reasoning paths\.Table 5:Sensitivity to subgraph radiusKKon CWQ \(RSF retrieval Hit@1\)\.Content Bias\(−6\.4%\-6\.4\\%\) is the most critical component\. Without the content scoreρv\\rho\_\{v\}, the model cannot disambiguate fan\-out scenarios where multiple neighbors share the same valid relation\. When querying about a specific movie by a prolific director, structural flowΦv\\Phi\_\{v\}distributes uniformly across all films, making the correct target indistinguishable\.
Query Update\(−5\.6%\-5\.6\\%\) disables the GRU\-based intent evolution\. Without it, the query vector𝐪\\mathbf\{q\}remains frozen across hops, preventing “differentiable instruction subtraction”—the model cannot shift attention from resolving one constraint \(e\.g\., “find the director”\) to the next \(e\.g\., “find awards”\)\.
Dynamic Gate\(−2\.4%\-2\.4\\%\) validates the Semantic Gap hypothesis\. Fixingλ≡1\\lambda\\equiv 1\(see Eq\.[6](https://arxiv.org/html/2607.06527#S2.E6)\) forces content matching at every hop, suppressing valid bridge entities like “Christopher Nolan” that share no lexical overlap with query terms like “awards\.”
Flow Sparsity by settingλ1=0\\lambda\_\{1\}=0in Total Stage 1 Loss\(−3\.6%\-3\.6\\%\) prevents “flooding” where probability spreads uniformly, degrading the GRU’s ability to track reasoning progress\.
Effect ofλ1\\lambda\_\{1\}Figure[2](https://arxiv.org/html/2607.06527#S3.F2)reveals an inverted U\-curve analogous totemperature in softmax:λ1→0\\lambda\_\{1\}\\to 0yields diffuse distributions \(∼\\sim11 candidates\), whileλ1→0\.5\\lambda\_\{1\}\\to 0\.5causes premature commitment \(∼\\sim2 candidates\) where early\-hop errors propagate irrecoverably\. The optimalλ1=0\.1\\lambda\_\{1\}=0\.1achieves∼\\sim4 effective candidates, validating Theorem[2\.1](https://arxiv.org/html/2607.06527#S2.Thmtheorem1)\.
Figure 2:Effect ofλ1\\lambda\_\{1\}on Hit@1 and entropy\. Optimal atλ1=0\.1\\lambda\_\{1\}=0\.1\.More experiments on dynamic gating \(including a CWQ\-specific gate ablation in Table[6](https://arxiv.org/html/2607.06527#A4.T6)\) and case studies are presented in Appendix[D](https://arxiv.org/html/2607.06527#A4)and[E](https://arxiv.org/html/2607.06527#A5)respectively\.
Isolating RSF Path Contribution:To verify that performance gains stem from RSF\-extracted reasoning paths rather than QA\-pair memorization, we trained an identical LLM on \(question, answer\) pairs without any RSF paths \(Table[4](https://arxiv.org/html/2607.06527#S3.T4)\)\. The\+16\+16–2323pt gap across all metrics confirms that the LLM cannot recover structural and factual information from questions alone; RSF paths provide essential grounding that drives the performance improvement\.
Sensitivity to Subgraph Radius:We conducted a sensitivity study varying theKK\-hop subgraph radius on CWQ \(Table[5](https://arxiv.org/html/2607.06527#S3.T5)\)\. Results show a consistent improvement in RSF retrieval Hit@1 with increased hop budget \(44\.35% atK=1K\{=\}1to 51\.30% atK=4K\{=\}4\), highlighting the importance of multi\-hop reasoning capacity and our design choice to include self\-loops\.
## 4Conclusion and Future Work
We introduced RSF\-GLLM, a framework that decouples differentiable graph reasoning from LLM generation to bridge the semantic gap in KGQA\. Our Recurrent Soft\-Flow module employs dynamic gating and flow sparsity regularization to extract interpretable reasoning paths, avoiding the computational cost of iterative agentic loops\. Experiments demonstrate that RSF\-GLLM achieves state\-of\-the\-art retrieval accuracy and a21×21\\timesinference speedup over baselines by requiring only a single LLM call\.
Future work will address two limitations of the current pipeline through extensions naturally enabled by the decoupled RSF–LLM design\. To scale beyond the pre\-extractedKK\-hop subgraph regime—which can bottleneck recall on massive real\-world KGs—we plan to introduceDynamic Beam Expansion, a reasoning\-step\-driven traversal in which the model dynamically queries the backend graph database for the 1\-hop neighbors ofactivenodes \(πv\(t\)\>θ\\pi^\{\(t\)\}\_\{v\}\>\\theta\), guided by the Flow Sparsity regularizer to keep the active set small and by an adaptive GRU\-based halting criterion that eliminates the fixed hop countTT\. To mitigate the popularity bias of the LLM generator \(Appendix E, Failure Mode 2\), we plan to integrateContext\-Aware Contrastive Decodingat inference: by contrasting LLM predictions conditioned on the question alone \(capturing the parametric prior\) against predictions conditioned on the question together with the extracted reasoning paths, we can dynamically penalize tokens favored purely by the internal prior and amplify predictions supported by retrieved structural context\. Because RSF cleanly decouples reasoning from generation, this contrastive correction can be applied without retraining the underlying LLM\. Beyond these, we plan to extend RSF\-GLLM to temporal and multi\-modal knowledge graphs and to investigate joint RSF–LLM optimization\.
## Impact Statement
This paper presents work whose goal is to advance the field of Machine Learning, specifically in interpretable and efficient Question Answering\. Our proposed RSF\-GLLM framework explicitly addresses the critical issue of hallucination in Large Language Models by grounding generation in verifiable Knowledge Graph paths, thereby contributing to more reliable and trustworthy AI systems\. Furthermore, by decoupling reasoning from generation, our approach significantly reduces the computational resources required for multi\-hop inference compared to iterative agentic baselines, promoting more energy\-efficient and environmentally sustainable AI deployment\.
## References
- Asai et al\. \(2024\)Asai, A\., Wu, Z\., Wang, Y\., Sil, A\., and Hajishirzi, H\.Self\-RAG: Learning to retrieve, generate, and critique through self\-reflection\.In*The Twelfth International Conference on Learning Representations*, 2024\.URL[https://openreview\.net/forum?id=hSyW5go0v8](https://openreview.net/forum?id=hSyW5go0v8)\.
- Besta et al\. \(2024\)Besta, M\., Blach, N\., Kubicek, A\., Gerstenberger, R\., Podstawski, M\., Gianinazzi, L\., Gajda, J\., Lehmann, T\., Niewiadomski, H\., Nyczyk, P\., and Hoefler, T\.Graph of thoughts: Solving elaborate problems with large language models\.In*Proceedings of the AAAI Conference on Artificial Intelligence*, volume 38, pp\. 17682–17690, 2024\.doi:10\.1609/aaai\.v38i16\.29720\.
- Brown et al\. \(2020\)Brown, T\., Mann, B\., Ryder, N\., Subbiah, M\., Kaplan, J\. D\., Dhariwal, P\., Neelakantan, A\., Shyam, P\., Sastry, G\., Askell, A\., et al\.Language models are few\-shot learners\.*Advances in neural information processing systems*, 33:1877–1901, 2020\.
- Dong et al\. \(2025\)Dong, Z\., Peng, B\., Wang, Y\., Fu, J\., Wang, X\., Zhou, X\., Shan, Y\., Zhu, K\., and Chen, W\.EffiQA: Efficient question\-answering with strategic multi\-model collaboration on knowledge graphs\.In Rambow, O\., Wanner, L\., Apidianaki, M\., Al\-Khalifa, H\., Eugenio, B\. D\., and Schockaert, S\. \(eds\.\),*Proceedings of the 31st International Conference on Computational Linguistics*, pp\. 7180–7194, Abu Dhabi, UAE, January 2025\. Association for Computational Linguistics\.URL[https://aclanthology\.org/2025\.coling\-main\.479/](https://aclanthology.org/2025.coling-main.479/)\.
- Gao et al\. \(2023\)Gao, Y\., Xiong, Y\., Gao, X\., Jia, K\., Pan, J\., Bi, Y\., Dai, Y\., Sun, J\., Wang, M\., and Wang, H\.Retrieval\-augmented generation for large language models: A survey\.*arXiv preprint arXiv:2312\.10997*, 2023\.
- Gilmer et al\. \(2017\)Gilmer, J\., Schoenholz, S\. S\., Riley, P\. F\., Vinyals, O\., and Dahl, G\. E\.Neural message passing for quantum chemistry\.In*International Conference on Machine Learning*, pp\. 1263–1272\. PMLR, 2017\.
- He et al\. \(2021\)He, G\., Lan, Y\., Jiang, J\., Zhao, W\. X\., and Wen, J\.\-R\.Improving multi\-hop knowledge base question answering by learning intermediate supervision signals\.In*Proceedings of the 14th ACM International Conference on Web Search and Data Mining \(WSDM\)*, pp\. 553–561\. ACM, 2021\.doi:10\.1145/3437963\.3441753\.
- He et al\. \(2024\)He, X\., Tian, Y\., Sun, Y\., Chawla, N\. V\., Laurent, T\., LeCun, Y\., Bresson, X\., and Hooi, B\.G\-retriever: Retrieval\-augmented generation for textual graph understanding and question answering\.In*Advances in Neural Information Processing Systems*, volume 37, 2024\.URL[https://openreview\.net/forum?id=MPJ3oXtTZl](https://openreview.net/forum?id=MPJ3oXtTZl)\.
- Hernandez et al\. \(2024\)Hernandez, E\., Sharma, A\. S\., Haklay, T\., Meng, K\., Wattenberg, M\., Andreas, J\., Belinkov, Y\., and Bau, D\.Linearity of relation decoding in transformer language models\.In*The Twelfth International Conference on Learning Representations*, 2024\.URL[https://openreview\.net/forum?id=w7LU2s14kE](https://openreview.net/forum?id=w7LU2s14kE)\.
- Hogan et al\. \(2021\)Hogan, A\., Blomqvist, E\., Cochez, M\., d’Amato, C\., Melo, G\. D\., Gutierrez, C\., Kirrane, S\., Gayo, J\. E\. L\., Navigli, R\., Neumaier, S\., et al\.Knowledge graphs\.*ACM Computing Surveys \(Csur\)*, 54\(4\):1–37, 2021\.
- Hudson & Manning \(2019\)Hudson, D\. A\. and Manning, C\. D\.Learning by abstraction: The neural state machine\.In*Advances in Neural Information Processing Systems \(NeurIPS\)*, 2019\.
- Jang et al\. \(2017\)Jang, E\., Gu, S\., and Poole, B\.Categorical reparameterization with Gumbel\-softmax\.In*International Conference on Learning Representations \(ICLR\)*, 2017\.
- Ji et al\. \(2023\)Ji, Z\., Lee, N\., Frieske, R\., Yu, T\., Su, D\., Xu, Y\., Ishii, E\., Bang, Y\., Madotto, A\., and Fung, P\.Survey of hallucination in natural language generation\.*ACM Computing Surveys*, 55\(12\):1–38, 2023\.
- Jiang et al\. \(2023\)Jiang, J\., Zhou, K\., Zhao, W\. X\., and Wen, J\.\-R\.UniKGQA: Unified retrieval and reasoning for solving multi\-hop question answering over knowledge graph\.In*The Eleventh International Conference on Learning Representations*, 2023\.URL[https://openreview\.net/forum?id=Z63RvyAZ2Vh](https://openreview.net/forum?id=Z63RvyAZ2Vh)\.
- Johnson et al\. \(2021\)Johnson, J\., Douze, M\., and Jégou, H\.Billion\-scale similarity search with GPUs\.*IEEE Transactions on Big Data*, 7\(3\):535–547, 2021\.
- Karpukhin et al\. \(2020\)Karpukhin, V\., Oguz, B\., Min, S\., Lewis, P\., Wu, L\., Edunov, S\., Chen, D\., and Yih, W\.\-t\.Dense passage retrieval for open\-domain question answering\.In*Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing \(EMNLP\)*, pp\. 6769–6781, 2020\.
- Kim et al\. \(2023\)Kim, G\., Kim, S\., Jeon, B\., Park, J\., and Kang, J\.Tree of clarifications: Answering ambiguous questions with retrieval\-augmented large language models\.In*Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing*, pp\. 996–1009, 2023\.
- Li et al\. \(2024\)Li, X\., Zhao, R\., Chia, Y\. K\., Ding, B\., Joty, S\., Poria, S\., and Bing, L\.Chain\-of\-knowledge: Grounding large language models via dynamic knowledge adapting over heterogeneous sources\.In*ICLR*, 2024\.
- Liang et al\. \(2024\)Liang, K\., Meng, L\., Liu, M\., Liu, Y\., Tu, W\., Wang, S\., Zhou, S\., Liu, X\., Sun, F\., and He, K\.A survey of knowledge graph reasoning on graph types: Static, dynamic, and multi\-modal\.*IEEE Transactions on Pattern Analysis and Machine Intelligence*, 46\(12\):9456–9478, 2024\.
- Luo et al\. \(2024\)Luo, L\., Li, Y\.\-F\., Haffari, G\., and Pan, S\.Reasoning on graphs: Faithful and interpretable large language model reasoning\.In*The Twelfth International Conference on Learning Representations*, 2024\.URL[https://openreview\.net/forum?id=ZGNWW7xZ6Q](https://openreview.net/forum?id=ZGNWW7xZ6Q)\.
- Mavromatis & Karypis \(2022\)Mavromatis, C\. and Karypis, G\.ReaRev: Adaptive reasoning for question answering over knowledge graphs\.In*Findings of the Association for Computational Linguistics: EMNLP 2022*, pp\. 2447–2458, Abu Dhabi, United Arab Emirates, December 2022\. Association for Computational Linguistics\.URL[https://aclanthology\.org/2022\.findings\-emnlp\.181](https://aclanthology.org/2022.findings-emnlp.181)\.
- Mavromatis & Karypis \(2025\)Mavromatis, C\. and Karypis, G\.GNN\-RAG: Graph neural retrieval for efficient large language model reasoning on knowledge graphs\.In Che, W\., Nabende, J\., Shutova, E\., and Pilehvar, M\. T\. \(eds\.\),*Findings of the Association for Computational Linguistics: ACL 2025*, pp\. 16682–16699, Vienna, Austria, July 2025\. Association for Computational Linguistics\.ISBN 979\-8\-89176\-256\-5\.doi:10\.18653/v1/2025\.findings\-acl\.856\.URL[https://aclanthology\.org/2025\.findings\-acl\.856/](https://aclanthology.org/2025.findings-acl.856/)\.
- Miller et al\. \(2016\)Miller, A\., Fisch, A\., Dodge, J\., Karimi, A\.\-H\., Bordes, A\., and Weston, J\.Key\-value memory networks for directly reading documents\.In Su, J\., Duh, K\., and Carreras, X\. \(eds\.\),*Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing*, pp\. 1400–1409, Austin, Texas, November 2016\. Association for Computational Linguistics\.doi:10\.18653/v1/D16\-1147\.URL[https://aclanthology\.org/D16\-1147/](https://aclanthology.org/D16-1147/)\.
- Nandy & Bandyopadhyay \(2025\)Nandy, A\. and Bandyopadhyay, S\.Language models of code are few\-shot planners and reasoners for multi\-document summarization with attribution\.In*Proceedings of the AAAI Conference on Artificial Intelligence*, volume 39, pp\. 24930–24938, 2025\.
- Park et al\. \(2024\)Park, K\., Choe, Y\. J\., and Veitch, V\.The linear representation hypothesis and the geometry of large language models\.In*Proceedings of the 41st International Conference on Machine Learning*, volume 235 of*Proceedings of Machine Learning Research*, pp\. 39643–39666\. PMLR, 2024\.URL[https://proceedings\.mlr\.press/v235/park24c\.html](https://proceedings.mlr.press/v235/park24c.html)\.
- Saxena et al\. \(2020\)Saxena, A\., Tripathi, A\., and Talukdar, P\.Improving multi\-hop question answering over knowledge graphs using knowledge base embeddings\.In Jurafsky, D\., Chai, J\., Schluter, N\., and Tetreault, J\. \(eds\.\),*Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics*, pp\. 4498–4507, Online, July 2020\. Association for Computational Linguistics\.doi:10\.18653/v1/2020\.acl\-main\.412\.URL[https://aclanthology\.org/2020\.acl\-main\.412/](https://aclanthology.org/2020.acl-main.412/)\.
- Shen et al\. \(2025\)Shen, T\., Mao, R\., Wang, J\., Zhang, X\., and Cambria, E\.Flow\-guided direct preference optimization for knowledge graph reasoning with trees\.In*Proceedings of the 48th International ACM SIGIR Conference on Research and Development in Information Retrieval*, SIGIR ’25, pp\. 1165–1175, New York, NY, USA, 2025\. Association for Computing Machinery\.ISBN 9798400715921\.doi:10\.1145/3726302\.3729980\.URL[https://doi\.org/10\.1145/3726302\.3729980](https://doi.org/10.1145/3726302.3729980)\.
- Shi et al\. \(2021\)Shi, J\., Cao, S\., Hou, L\., Li, J\., and Zhang, H\.TransferNet: An effective and transparent framework for multi\-hop question answering over relation graph\.In Moens, M\.\-F\., Huang, X\., Specia, L\., and Yih, S\. W\.\-t\. \(eds\.\),*Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing*, pp\. 4149–4158, Online and Punta Cana, Dominican Republic, November 2021\. Association for Computational Linguistics\.doi:10\.18653/v1/2021\.emnlp\-main\.341\.URL[https://aclanthology\.org/2021\.emnlp\-main\.341/](https://aclanthology.org/2021.emnlp-main.341/)\.
- Sun et al\. \(2018\)Sun, H\., Dhingra, B\., Zaheer, M\., Mazaitis, K\., Salakhutdinov, R\., and Cohen, W\. W\.Open domain question answering using early fusion of knowledge bases and text\.In*Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing \(EMNLP\)*, pp\. 4231–4242, 2018\.
- Sun et al\. \(2019\)Sun, H\., Bedrax\-Weiss, T\., and Cohen, W\. W\.PullNet: Open domain question answering with iterative retrieval on knowledge bases and text\.In*Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing \(EMNLP\-IJCNLP\)*, pp\. 2380–2390, Hong Kong, China, 2019\. Association for Computational Linguistics\.
- Sun et al\. \(2024\)Sun, J\., Xu, C\., Tang, L\., Wang, S\., Lin, C\., Gong, Y\., Ni, L\. M\., Shum, H\.\-Y\., and Guo, J\.Think\-on\-graph: Deep and responsible reasoning of large language model on knowledge graph\.In*The Twelfth International Conference on Learning Representations*, 2024\.URL[https://openreview\.net/forum?id=nnVO1PvbTv](https://openreview.net/forum?id=nnVO1PvbTv)\.
- Talmor & Berant \(2018\)Talmor, A\. and Berant, J\.The web as a knowledge\-base for answering complex questions\.In*Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 \(Long Papers\)*, pp\. 641–651, 2018\.
- Wang et al\. \(2023\)Wang, K\., Duan, F\., Wang, S\., Li, P\., Xian, Y\., Yin, C\., Rong, W\., and Xiong, Z\.Knowledge\-driven cot: Exploring faithful reasoning in llms for knowledge\-intensive question answering, 2023\.URL[https://arxiv\.org/abs/2308\.13259](https://arxiv.org/abs/2308.13259)\.
- Wang et al\. \(2021\)Wang, M\., Qiu, L\., and Wang, X\.A survey on knowledge graph embeddings for link prediction\.*Symmetry*, 13\(3\):485, 2021\.
- Xiong et al\. \(2017\)Xiong, W\., Hoang, T\., and Wang, W\. Y\.Deeppath: A reinforcement learning method for knowledge graph reasoning\.In*Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing \(EMNLP\)*, pp\. 564–573, 2017\.
- Yan et al\. \(2024\)Yan, S\.\-Q\., Gu, J\.\-C\., Zhu, Y\., and Ling, Z\.\-H\.Corrective retrieval augmented generation\.*arXiv preprint arXiv:2401\.15884*, 2024\.
- Yih et al\. \(2016\)Yih, W\.\-t\., Richardson, M\., Meek, C\., Chang, M\.\-W\., and Suh, J\.The value of semantic parse labeling for knowledge base question answering\.In*Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics \(Volume 2: Short Papers\)*, pp\. 201–206, 2016\.
- Yu et al\. \(2023\)Yu, D\., Zhang, S\., Ng, P\., Zhu, H\., Li, A\. H\., Wang, J\., Hu, Y\., Wang, W\. Y\., Wang, Z\., and Xiang, B\.DecAF: Joint decoding of answers and logical forms for question answering over knowledge bases\.In*The Eleventh International Conference on Learning Representations*, 2023\.URL[https://openreview\.net/forum?id=XHc5zRPxqV9](https://openreview.net/forum?id=XHc5zRPxqV9)\.
- Zhang et al\. \(2022\)Zhang, J\., Zhang, X\., Yu, J\., Tang, J\., Tang, J\., Li, C\., and Chen, H\.Subgraph retrieval enhanced model for multi\-hop knowledge base question answering\.In Muresan, S\., Nakov, P\., and Villavicencio, A\. \(eds\.\),*Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pp\. 5773–5784, Dublin, Ireland, May 2022\. Association for Computational Linguistics\.doi:10\.18653/v1/2022\.acl\-long\.396\.URL[https://aclanthology\.org/2022\.acl\-long\.396/](https://aclanthology.org/2022.acl-long.396/)\.
## Appendix
## Appendix ATheoretical Proofs
### A\.1Proof of Theorem[2\.1](https://arxiv.org/html/2607.06527#S2.Thmtheorem1)\(Sparsity Convergence\)
Statement:The global minima of the flow sparsity lossℒflow\(𝛑\)\\mathcal\{L\}\_\{flow\}\(\\boldsymbol\{\\pi\}\)lie exclusively at the vertices of the simplexΔN−1\\Delta^\{N\-1\}\.
###### Proof\.
Let𝝅∈ℝN\\boldsymbol\{\\pi\}\\in\\mathbb\{R\}^\{N\}be the relevance distribution vector satisfying the simplex constraints:∑i=1Nπi=1\\sum\_\{i=1\}^\{N\}\\pi\_\{i\}=1andπi≥0\\pi\_\{i\}\\geq 0\. The Flow Sparsity Regularization term is defined as the entropy of the distribution:
ℒflow\(𝝅\)=H\(𝝅\)=−∑i=1Nπilogπi\\mathcal\{L\}\_\{flow\}\(\\boldsymbol\{\\pi\}\)=H\(\\boldsymbol\{\\pi\}\)=\-\\sum\_\{i=1\}^\{N\}\\pi\_\{i\}\\log\\pi\_\{i\}\(14\)To analyze the minima, we inspect the curvature of the function\. The Hessian ofℒflow\\mathcal\{L\}\_\{flow\}with respect to𝝅\\boldsymbol\{\\pi\}is a diagonal matrix with elements:
∂2ℒflow∂πi2=−1πi\\frac\{\\partial^\{2\}\\mathcal\{L\}\_\{flow\}\}\{\\partial\\pi\_\{i\}^\{2\}\}=\-\\frac\{1\}\{\\pi\_\{i\}\}\(15\)Sinceπi\>0\\pi\_\{i\}\>0in the interior of the simplex, the second derivative is strictly negative\. Thus,ℒflow\(𝝅\)\\mathcal\{L\}\_\{flow\}\(\\boldsymbol\{\\pi\}\)is astrictly concavefunction over the domain\.
A fundamental result in convex optimization states that the minimum of a strictly concave function over a convex polytope \(such as the simplexΔN−1\\Delta^\{N\-1\}\) must occur at one of the extreme points \(vertices\) of the polytope\. The vertices of the probability simplex are the standard basis vectors\{𝐞1,…,𝐞N\}\\\{\\mathbf\{e\}\_\{1\},\\dots,\\mathbf\{e\}\_\{N\}\\\}, which correspond to one\-hot distributions \(i\.e\.,πk=1\\pi\_\{k\}=1for somekk, and0otherwise\)\.
Evaluating the loss at a vertex𝐞k\\mathbf\{e\}\_\{k\}:
ℒflow\(𝐞k\)=−\(1log1\+∑j≠k0log0\)=0\\mathcal\{L\}\_\{flow\}\(\\mathbf\{e\}\_\{k\}\)=\-\(1\\log 1\+\\sum\_\{j\\neq k\}0\\log 0\)=0\(16\)\(takinglimx→0xlogx=0\\lim\_\{x\\to 0\}x\\log x=0\)\. Since entropy is non\-negativeH\(𝝅\)≥0H\(\\boldsymbol\{\\pi\}\)\\geq 0, the value0is the global minimum\. Therefore, minimizingℒflow\\mathcal\{L\}\_\{flow\}forces the model to select a single crisp path node at each hop, mimicking discrete reasoning\. ∎
### A\.2Proof of Theorem[2\.2](https://arxiv.org/html/2607.06527#S2.Thmtheorem2)\(Semantic Gap Bridging\)
Statement:LetP=\(v0→r1v1→r2⋯→rKvK\)P=\(v\_\{0\}\\xrightarrow\{r\_\{1\}\}v\_\{1\}\\xrightarrow\{r\_\{2\}\}\\cdots\\xrightarrow\{r\_\{K\}\}v\_\{K\}\)be a valid reasoning path satisfying: \(i\) intermediate nodes possess zero semantic similarity to the question \(i\.e\.,𝐡vt⊤𝐪0≈0\\mathbf\{h\}\_\{v\_\{t\}\}^\{\\top\}\\mathbf\{q\}\_\{0\}\\approx 0for0<t<K0<t<K\), and \(ii\) for each hopt∈\{1,…,K\}t\\in\\\{1,\\ldots,K\\\},vtv\_\{t\}is the uniquertr\_\{t\}\-neighbor ofvt−1v\_\{t\-1\}in𝒢sub\\mathcal\{G\}\_\{sub\}\(no fan\-out\)\. There exists a parameter configuration for the Recurrent Query Updater and Relation Attention such thatπvt\(t\)≈1\\pi\_\{v\_\{t\}\}^\{\(t\)\}\\approx 1at each hopt∈\{1,…,K\}t\\in\\\{1,\\ldots,K\\\}, solely via structural propagation\.
###### Proof\.
We provide a constructive proof by induction on the hop indextt\. Let the path beP=\(v0→r1v1→r2…→rKvK\)P=\(v\_\{0\}\\xrightarrow\{r\_\{1\}\}v\_\{1\}\\xrightarrow\{r\_\{2\}\}\\dots\\xrightarrow\{r\_\{K\}\}v\_\{K\}\), and let the Semantic Gap assumption hold:sim\(𝐡vt,𝐪0\)=0\\text\{sim\}\(\\mathbf\{h\}\_\{v\_\{t\}\},\\mathbf\{q\}\_\{0\}\)=0for allt\>0t\>0\. We aim to show that for each hopt∈\{1,…,K\}t\\in\\\{1,\\ldots,K\\\}, there exists a parameter configuration such thatπvt\(t\)≈1\\pi\_\{v\_\{t\}\}^\{\(t\)\}\\approx 1\.
Step 0: Gate Construction \(Suppressing Content Bias\)\.Setbλ≪0b\_\{\\lambda\}\\ll 0in Eq\.[6](https://arxiv.org/html/2607.06527#S2.E6)\. Thenλ\(t\)=σ\(𝐰λ⊤𝐪t−1\+bλ\)≈0\\lambda^\{\(t\)\}=\\sigma\(\\mathbf\{w\}\_\{\\lambda\}^\{\\top\}\\mathbf\{q\}\_\{t\-1\}\+b\_\{\\lambda\}\)\\approx 0for alltt, regardless of the query state\. The probabilistic aggregation \(Eq\.[7](https://arxiv.org/html/2607.06527#S2.E7)\) then simplifies\. Sinceexp\(log\(x\)\)=x\\exp\(\\log\(x\)\)=x, it reduces directly to a ratio of structural flow values:
πv\(t\)≈Φv\(t\)∑zΦz\(t\)\\pi\_\{v\}^\{\(t\)\}\\approx\\frac\{\\Phi\_\{v\}^\{\(t\)\}\}\{\\displaystyle\\sum\_\{z\}\\Phi\_\{z\}^\{\(t\)\}\}\(17\)\(the additiveϵ\\epsilonterms cancel and are negligible in the regimec→∞c\\to\\inftyestablished in Step 1\)\.
Step 1: Relation Alignment \(Existence of𝐖att\\mathbf\{W\}\_\{att\}\)\.Assume the relation embeddings\{𝐞r\}r∈ℛ\\\{\\mathbf\{e\}\_\{r\}\\\}\_\{r\\in\\mathcal\{R\}\}are linearly independent\. Their dual basis\{𝐝r\}r∈ℛ\\\{\\mathbf\{d\}\_\{r\}\\\}\_\{r\\in\\mathcal\{R\}\}then exists, satisfying𝐝r⊤𝐞r′=δrr′\\mathbf\{d\}\_\{r\}^\{\\top\}\\mathbf\{e\}\_\{r^\{\\prime\}\}=\\delta\_\{rr^\{\\prime\}\}\(Kronecker delta\)\. For a target relationrtr\_\{t\}, define the direction:
𝐟rt=c\(𝐝rt−α∑r′′≠rt𝐝r′′\),c,α\>0\\mathbf\{f\}\_\{r\_\{t\}\}=c\\\!\\left\(\\mathbf\{d\}\_\{r\_\{t\}\}\-\\alpha\\sum\_\{r^\{\\prime\\prime\}\\neq r\_\{t\}\}\\mathbf\{d\}\_\{r^\{\\prime\\prime\}\}\\right\),\\quad c,\\,\\alpha\>0\(18\)Then𝐟rt⊤𝐞rt=c\\mathbf\{f\}\_\{r\_\{t\}\}^\{\\top\}\\mathbf\{e\}\_\{r\_\{t\}\}=cand𝐟rt⊤𝐞r′′=−cα\\mathbf\{f\}\_\{r\_\{t\}\}^\{\\top\}\\mathbf\{e\}\_\{r^\{\\prime\\prime\}\}=\-c\\alphafor allr′′≠rtr^\{\\prime\\prime\}\\neq r\_\{t\}\. We fix𝐖att\\mathbf\{W\}\_\{att\}as any full\-rank matrix from the query space to the relation embedding space; its specific value does not affect the construction\. Since𝐖att\\mathbf\{W\}\_\{att\}is full\-rank, for each hop’s target direction𝐟rt\\mathbf\{f\}\_\{r\_\{t\}\}there exists a query state satisfying𝐖att⊤𝐪t−1=𝐟rt\\mathbf\{W\}\_\{att\}^\{\\top\}\\mathbf\{q\}\_\{t\-1\}=\\mathbf\{f\}\_\{r\_\{t\}\}; Step 2 below constructs GRU weights to produce these target query states at each hop\. With𝐪t−1\\mathbf\{q\}\_\{t\-1\}so positioned, the relation attention scores \(Eq\.[3](https://arxiv.org/html/2607.06527#S2.E3)\) evaluate to𝐪t−1⊤𝐖att𝐞rt=𝐟rt⊤𝐞rt=c\\mathbf\{q\}\_\{t\-1\}^\{\\top\}\\mathbf\{W\}\_\{att\}\\mathbf\{e\}\_\{r\_\{t\}\}=\\mathbf\{f\}\_\{r\_\{t\}\}^\{\\top\}\\mathbf\{e\}\_\{r\_\{t\}\}=cand𝐪t−1⊤𝐖att𝐞r′′=𝐟rt⊤𝐞r′′=−cα\\mathbf\{q\}\_\{t\-1\}^\{\\top\}\\mathbf\{W\}\_\{att\}\\mathbf\{e\}\_\{r^\{\\prime\\prime\}\}=\\mathbf\{f\}\_\{r\_\{t\}\}^\{\\top\}\\mathbf\{e\}\_\{r^\{\\prime\\prime\}\}=\-c\\alpha, yielding:
βrt\(t\)=σ\(c\)→1andβr′′\(t\)=σ\(−cα\)→0∀r′′≠rt\\beta\_\{r\_\{t\}\}^\{\(t\)\}=\\sigma\(c\)\\;\\to\\;1\\qquad\\text\{and\}\\qquad\\beta\_\{r^\{\\prime\\prime\}\}^\{\(t\)\}=\\sigma\(\-c\\alpha\)\\;\\to\\;0\\quad\\forall\\,r^\{\\prime\\prime\}\\neq r\_\{t\}\(19\)asc→∞c\\to\\infty\.
Withβrt\(t\)≈1\\beta\_\{r\_\{t\}\}^\{\(t\)\}\\approx 1andβr′′\(t\)≈0\\beta\_\{r^\{\\prime\\prime\}\}^\{\(t\)\}\\approx 0for allr′′≠rtr^\{\\prime\\prime\}\\neq r\_\{t\}, the structural flow propagation concentrates on nodes reachable fromvt−1v\_\{t\-1\}viartr\_\{t\}\. Using the inductive hypothesisπvt−1\(t−1\)≈1\\pi\_\{v\_\{t\-1\}\}^\{\(t\-1\)\}\\approx 1:
Φvt\(t\)\\displaystyle\\Phi\_\{v\_\{t\}\}^\{\(t\)\}=∑\(u,r,vt\)∈𝒩in\(vt\)πu\(t−1\)⋅βr\(t\)≈πvt−1\(t−1\)⋅βrt\(t\)≈1\\displaystyle=\\sum\_\{\(u,\\,r,\\,v\_\{t\}\)\\,\\in\\,\\mathcal\{N\}\_\{in\}\(v\_\{t\}\)\}\\pi\_\{u\}^\{\(t\-1\)\}\\cdot\\beta\_\{r\}^\{\(t\)\}\\;\\approx\\;\\pi\_\{v\_\{t\-1\}\}^\{\(t\-1\)\}\\cdot\\beta\_\{r\_\{t\}\}^\{\(t\)\}\\;\\approx\\;1\(20\)Φz\(t\)\\displaystyle\\Phi\_\{z\}^\{\(t\)\}≈0for allzreachable fromvt−1only viar′′≠rt\\displaystyle\\approx\\;0\\qquad\\text\{for all \}z\\text\{ reachable from \}v\_\{t\-1\}\\text\{ only via \}r^\{\\prime\\prime\}\\neq r\_\{t\}\(21\)By condition \(ii\) of the theorem,vtv\_\{t\}is the uniquertr\_\{t\}\-neighbor ofvt−1v\_\{t\-1\}in𝒢sub\\mathcal\{G\}\_\{sub\}, so no other node receivesΦ≈1\\Phi\\approx 1\. Substituting into the simplified softmax of Step 0, we obtainπvt\(t\)≈1\\pi\_\{v\_\{t\}\}^\{\(t\)\}\\approx 1\.
Step 2: Dynamic Update \(Existence of GRU parameters\)\.After traversing edgertr\_\{t\}, the query must update so that𝐖att⊤𝐪t=𝐟rt\+1\\mathbf\{W\}\_\{att\}^\{\\top\}\\mathbf\{q\}\_\{t\}=\\mathbf\{f\}\_\{r\_\{t\+1\}\}, aligning with the next target relationrt\+1r\_\{t\+1\}\. The update rule is𝐪t=GRU\(𝐜t,𝐪t−1\)\\mathbf\{q\}\_\{t\}=\\text\{GRU\}\(\\mathbf\{c\}\_\{t\},\\mathbf\{q\}\_\{t\-1\}\), where𝐜t=∑vπv\(t\)𝐡v≈𝐡vt\\mathbf\{c\}\_\{t\}=\\sum\_\{v\}\\pi\_\{v\}^\{\(t\)\}\\mathbf\{h\}\_\{v\}\\approx\\mathbf\{h\}\_\{v\_\{t\}\}sinceπvt\(t\)≈1\\pi\_\{v\_\{t\}\}^\{\(t\)\}\\approx 1\. Since GRUs with sufficient hidden state dimension are universal approximators of dynamical systems, there exist weights implementing a state transitionffsuch that:
𝐪t=f\(𝐪t−1,𝐡vt\)s\.t\.𝐖att⊤𝐪t=𝐟rt\+1\\mathbf\{q\}\_\{t\}=f\(\\mathbf\{q\}\_\{t\-1\},\\,\\mathbf\{h\}\_\{v\_\{t\}\}\)\\quad\\text\{s\.t\.\}\\quad\\mathbf\{W\}\_\{att\}^\{\\top\}\\mathbf\{q\}\_\{t\}=\\mathbf\{f\}\_\{r\_\{t\+1\}\}\(22\)Even when𝐡vt\\mathbf\{h\}\_\{v\_\{t\}\}shares no lexical similarity with the query, it acts as a distinct structural key: the GRU learns the state transition “currently aligned with relationrtr\_\{t\}; upon observing nodevtv\_\{t\}, realign withrt\+1r\_\{t\+1\}\.”
Conclusion\.The base caseπv0\(0\)=1\\pi\_\{v\_\{0\}\}^\{\(0\)\}=1holds by initialization\. Steps 1–2 establish the inductive step:πvt−1\(t−1\)≈1\\pi\_\{v\_\{t\-1\}\}^\{\(t\-1\)\}\\approx 1impliesπvt\(t\)≈1\\pi\_\{v\_\{t\}\}^\{\(t\)\}\\approx 1\. Therefore, at each hopt∈\{1,…,K\}t\\in\\\{1,\\ldots,K\\\}, the flow is concentrated on the correct path nodevtv\_\{t\}, confirming that the RSF architecture bridges the semantic gap using only structural cues \(relation type attentionβr\(t\)\\beta\_\{r\}^\{\(t\)\}, Eq\.[3](https://arxiv.org/html/2607.06527#S2.E3)\) and state memory \(GRU\), without relying on node\-question lexical similarity\. ∎
Remark on the linear independence assumption\.Step 1 assumes that the relation embeddings\{𝐞r\}r∈ℛ\\\{\\mathbf\{e\}\_\{r\}\\\}\_\{r\\in\\mathcal\{R\}\}are linearly independent, which guarantees the existence of a dual basis enabling simultaneous concentration \(βrt→1\\beta\_\{r\_\{t\}\}\\to 1\) and suppression \(βr′′→0\\beta\_\{r^\{\\prime\\prime\}\}\\to 0\) of relation attention scores\. In practice, this condition is generically satisfied for high\-dimensional embeddings: a set of\|ℛ\|\|\\mathcal\{R\}\|vectors inℝd\\mathbb\{R\}^\{d\}withd≫\|ℛ\|d\\gg\|\\mathcal\{R\}\|is almost surely linearly independent under any continuous distribution\. Furthermore, recent LLM probing studies show that relational structures in high\-dimensional dense representations—such as those produced by Qwen3\-Embedding—tend to emerge as approximately linearly independent subspaces\(Hernandez et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib9); Park et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib25)\)\. The theorem should therefore be read as anarchitectural\-capacityguarantee: it shows that the RSF parameterization is expressive enough to realize the required relation alignment whenever the linear independence condition is met by the underlying embedding space\.
### A\.3Proof of Theorem[2\.3](https://arxiv.org/html/2607.06527#S2.Thmtheorem3)\(Guaranteed Structural Faithfulness\)
Statement:LetvTv\_\{T\}be a target node at hopTTwith non\-zero structural flow, i\.e\.,ΦvT\(T\)\>0\\Phi\_\{v\_\{T\}\}^\{\(T\)\}\>0\. The greedy backtracking procedure, defined byvt−1=argmaxu∈𝒩in\(vt\)πu\(t−1\)v\_\{t\-1\}=\\operatorname\{argmax\}\_\{u\\in\\mathcal\{N\}\_\{in\}\(v\_\{t\}\)\}\\pi\_\{u\}^\{\(t\-1\)\}, is guaranteed to reconstruct a continuous, valid pathP=\(v0,…,vT\)P=\(v\_\{0\},\\dots,v\_\{T\}\)connecting the source entityvtopicv\_\{topic\}tovTv\_\{T\}withinTTsteps\.
###### Proof\.
Recall the structural flow propagation equation for a nodevvat hopttin the RSF module:
Φv\(t\)=∑\(u,r,v\)∈ℰπu\(t−1\)⋅βr\(t\)\\Phi\_\{v\}^\{\(t\)\}=\\sum\_\{\(u,r,v\)\\in\\mathcal\{E\}\}\\pi\_\{u\}^\{\(t\-1\)\}\\cdot\\beta\_\{r\}^\{\(t\)\}\(23\)whereπu\(t−1\)\\pi\_\{u\}^\{\(t\-1\)\}is the probability mass at predecessor nodeuu, andβr\(t\)∈\[0,1\]\\beta\_\{r\}^\{\(t\)\}\\in\[0,1\]is the relation attention score produced by the Dynamic Relation Attention module \(Eq\.[3](https://arxiv.org/html/2607.06527#S2.E3)\)\. The greedy backtracking algorithm selects the predecessor at stepttvia:
vt−1∗=argmaxu∈𝒩in\(vt\)πu\(t−1\)v\_\{t\-1\}^\{\*\}=\\underset\{u\\in\\mathcal\{N\}\_\{in\}\(v\_\{t\}\)\}\{\\operatorname\{argmax\}\}\\ \\pi\_\{u\}^\{\(t\-1\)\}\(24\)We assume the initialization𝝅\(0\)\\boldsymbol\{\\pi\}^\{\(0\)\}is a one\-hot vector at the source nodevtopicv\_\{topic\}, such thatπv\(0\)=1\\pi\_\{v\}^\{\(0\)\}=1ifv=vtopicv=v\_\{topic\}and0otherwise\.
We prove the theorem by induction on the hop indextt, proceeding backwards from the target hopTTdown to the source hop0\.
Base Assumption \(StepTT\):The premise of the theorem states that the selected target nodevTv\_\{T\}has received non\-zero structural flow:ΦvT\(T\)\>0\\Phi\_\{v\_\{T\}\}^\{\(T\)\}\>0\.
Inductive Step:Consider an arbitrary nodevtv\_\{t\}selected at hoptt\(where0<t≤T0<t\\leq T\) such that its structural flowΦvt\(t\)\>0\\Phi\_\{v\_\{t\}\}^\{\(t\)\}\>0\. By the definition of the flow summation, ifΦvt\(t\)\>0\\Phi\_\{v\_\{t\}\}^\{\(t\)\}\>0, the sum∑uπu\(t−1\)βr\(t\)\\sum\_\{u\}\\pi\_\{u\}^\{\(t\-1\)\}\\beta\_\{r\}^\{\(t\)\}is strictly positive\. Since probabilitiesπ\\piand attention scoresβ\\betaare non\-negative, this implies that the set of contributing predecessors is non\-empty\. Specifically, there exists at least one neighboru′∈𝒩in\(vt\)u^\{\\prime\}\\in\\mathcal\{N\}\_\{in\}\(v\_\{t\}\)such that:
πu′\(t−1\)⋅βr′\(t\)\>0⟹πu′\(t−1\)\>0\\pi\_\{u^\{\\prime\}\}^\{\(t\-1\)\}\\cdot\\beta\_\{r^\{\\prime\}\}^\{\(t\)\}\>0\\implies\\pi\_\{u^\{\\prime\}\}^\{\(t\-1\)\}\>0\(25\)The greedy backtracking algorithm selects the predecessorvt−1∗v\_\{t\-1\}^\{\*\}that maximizesπu\(t−1\)\\pi\_\{u\}^\{\(t\-1\)\}\. Since the set of neighbors with non\-zero probability is non\-empty \(containing at leastu′u^\{\\prime\}\), the maximum value in this set must be strictly positive:
πvt−1∗\(t−1\)≥πu′\(t−1\)\>0\\pi\_\{v\_\{t\-1\}^\{\*\}\}^\{\(t\-1\)\}\\geq\\pi\_\{u^\{\\prime\}\}^\{\(t\-1\)\}\>0\(26\)Thus, the selected predecessorvt−1∗v\_\{t\-1\}^\{\*\}has non\-zero probability mass\. Ift−1\>0t\-1\>0, this nodevt−1∗v\_\{t\-1\}^\{\*\}must have received flow from its own predecessors \(sinceπ\(t−1\)\\pi^\{\(t\-1\)\}is derived from the flowΦ\(t−1\)\\Phi^\{\(t\-1\)\}\)\. Therefore,Φvt−1∗\(t−1\)\>0\\Phi\_\{v\_\{t\-1\}^\{\*\}\}^\{\(t\-1\)\}\>0\. This establishes the inductive step: if the node attthas valid flow, the selected node att−1t\-1also has valid flow\.
Termination \(Step0\):The recursion proceeds until we reacht=0t=0, selecting a nodev0v\_\{0\}withπv0\(0\)\>0\\pi\_\{v\_\{0\}\}^\{\(0\)\}\>0\. By definition, the initial distribution𝝅\(0\)\\boldsymbol\{\\pi\}^\{\(0\)\}is a one\-hot vector peaked atvtopicv\_\{topic\}\. The only node with non\-zero probability att=0t=0isvtopicv\_\{topic\}\. Therefore, it must be thatv0=vtopicv\_\{0\}=v\_\{topic\}\.
Conclusion:The sequence of nodesP=\(v0,v1,…,vT\)P=\(v\_\{0\},v\_\{1\},\\dots,v\_\{T\}\)constructed by the backtracking procedure satisfies two conditions: 1\.v0=vtopicv\_\{0\}=v\_\{topic\}\. 2\. For every stept\>0t\>0,vt−1v\_\{t\-1\}is a valid neighbor ofvtv\_\{t\}in𝒢\\mathcal\{G\}\(specifically, the neighbor contributing maximal flow\)\.
Consequently,PPforms a valid, continuous reasoning path in the Knowledge Graph starting at the source entity and ending at the answer candidate\. ∎
## Appendix BRelated Work
We position our work within the broader landscape of Knowledge Graph Question Answering \(KGQA\), categorized into subgraph retrieval, LLM\-integrated frameworks, and agentic reasoning\.
Subgraph Retrieval and Reasoning\.Early neural approaches to KGQA formulated reasoning as a path traversal or subgraph retrieval problem\. Methods likeGraftNet\(Sun et al\.,[2018](https://arxiv.org/html/2607.06527#bib.bib29)\)andPullNet\(Sun et al\.,[2019](https://arxiv.org/html/2607.06527#bib.bib30)\)employ aRetrieve\-then\-Readparadigm, identifying a discrete subgraph via heuristic or learned retrieval before applying a GNN reader\. However, the discrete selection of nodes breaks end\-to\-end differentiability, preventing the retriever from adapting to downstream reasoning errors\. WhileNSM\(Neural State Machine\)\(He et al\.,[2021](https://arxiv.org/html/2607.06527#bib.bib7)\)introduced a differentiable instruction signal, it relies on fixed node embeddings, causing it to fail when intermediatebridgenodes lack lexical overlap with the query \(theSemantic Gap\)\.EmbedKGQA\(Saxena et al\.,[2020](https://arxiv.org/html/2607.06527#bib.bib26)\)mitigates this via latent space matching but lacks the explicit multi\-hop traversal required for complex compositional queries\.Our Contribution:RSF\-GLLM addresses the non\-differentiability of retrieval via continuous soft\-flow propagation and resolves the Semantic Gap using a novel Dynamic Gating Mechanism that prioritizes structural validity over semantic matching when necessary\.
LLM\-KG Integration\.Recent paradigms leverage the generative power of LLMs to interpret graph structures\. Frameworks likeRoG\(Reasoning on Graphs\)\(Luo et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib20)\)andGNN\-RAGgenerate reasoning paths as planning steps or retrieve graph context to augment generation\. While effective, these methods face two critical limitations: \(1\)Computational Cost:RoG requires fine\-tuning large base models \(e\.g\., LLaMA\-2\-7B\), imposing significant memory and training overheads\. \(2\)Faithfulness:As noted in recent studies\(Gao et al\.,[2023](https://arxiv.org/html/2607.06527#bib.bib5); Li et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib18)\), retrieval\-augmented LLMs are prone toreasoning shortcuts, ignoring retrieved structures in favor of parametric memory\.Our Contribution:We propose a decoupled architecture where reasoning is handled by a lightweight \(∼\\sim40ms\) GNN module\. This avoids the cost of LLM fine\-tuning for reasoning and ensures grounding by conditioning the frozen LLM strictly on extracted paths\.
Agentic and Chain\-of\-Thought Reasoning\.The state\-of\-the\-art in complex reasoning involves treating LLMs as autonomous agents\. Methods likeToG\(Think\-on\-Graph\)\(Sun et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib31)\)andGraph of Thoughts\(Besta et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib2)\)perform iterative beam search or Monte Carlo Tree Search \(MCTS\) over the KG, invoking the LLM at every hop to evaluate candidates\. While achieving high accuracy, theseagenticapproaches are prohibitively slow, often requiring 10–50\+ LLM calls per query\(Sun et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib31); Besta et al\.,[2024](https://arxiv.org/html/2607.06527#bib.bib2)\)\.Our Contribution:RSF\-GLLM achieves comparable multi\-hop reasoning depth with asingleLLM call\. By offloading the iterative search to our Recurrent Soft\-Flow module, we reduce inference latency by orders of magnitude compared to agentic baselines while maintaining theoretical guarantees on path sparsity and validity\.
## Appendix CBaselines
We evaluate our proposed method against five categories of state\-of\-the\-art baselines, ranging from pure parametric reasoning to specialized graph\-agent frameworks\.
1. 1\.Embedding\-based Methods:This category includes traditional neural approaches that learn to propagate signals or match questions in a latent embedding space\. We compare againstKV\-Mem, which uses key\-value memory networks for reading documents;EmbedKGQA, which leverages knowledge graph embeddings for link prediction;NSM\(Neural State Machine\), which simulates sequential reasoning steps; andTransferNet, which utilizes a differentiable framework to propagate attention scores across graph relations\.
2. 2\.Graph Retrieval Methods:These frameworks focus on identifying question\-relevant subgraphs or using neural traversals to narrow the search space\. This category includesGraftNet, which uses static embedding matching;PullNet, which iteratively retrieves relevant subgraphs;SR\+NSM, a stepwise neural reasoner with subgraph retrieval;ReaRev, which adaptively revises reasoning instructions based on graph feedback; andUniKGQA, a unified architecture for retrieval and reasoning\.
3. 3\.LLM Reasoning:These methods evaluate the parametric knowledge of Large Language Models \(LLMs\) without providing external Knowledge Graph \(KG\) context\. We evaluateQwen3\-8BandLLaMA3\.1\-8Busing zero\-shot prompting to establish a baseline for pure LLM reasoning capability\.
4. 4\.LLM \+ KG Integration:These methods leverage the reasoning power of LLMs by augmenting their context with retrieved KG facts\. We compare againstKD\-CoT, an interactive framework for faithful reasoning;DECAF, which jointly decodes answers and logical forms using Fusion\-in\-Decoder;RoG, which generates grounded reasoning plans;G\-Retriever, a retrieval\-augmented generation method for graphs; andGNN\-RAG, which uses Graph Neural Networks to retrieve paths for LLM reasoning\.
5. 5\.Agentic Search Frameworks:The most recent frontier treats the LLM as an autonomous agent that explores the KG through sequential decision\-making\. This includesEffiQA, which employs strategic multi\-model collaboration for efficient QA, andFD\-PORT, which utilizes Monte Carlo Tree Search \(MCTS\) and flow\-guided optimization to navigate complex multi\-hop reasoning paths\.
## Appendix DDynamic Gating Analysis
To empirically validate the semantic gap bridging hypothesis \(Theorem[2\.2](https://arxiv.org/html/2607.06527#S2.Thmtheorem2)\), we analyze the evolution of the dynamic gating weightλ\(t\)\\lambda^\{\(t\)\}across reasoning hops\. Recall thatλ\(t\)→0\\lambda^\{\(t\)\}\\to 0indicates structure\-focused propagation \(traversing via graph topology\), whileλ\(t\)→1\\lambda^\{\(t\)\}\\to 1indicates content\-focused selection \(matching node semantics to the query\)\.
Figure[3](https://arxiv.org/html/2607.06527#A4.F3)presents the meanλ\(t\)\\lambda^\{\(t\)\}values aggregated across all 4\-hop questions in the CWQ test set\. The results reveal an interesting pattern that validates our theoretical framework\.
Figure 3:Evolution of dynamic gating weightλ\(t\)\\lambda^\{\(t\)\}across reasoning hops on CWQ 4\-hop questions\. Error bars indicate standard deviation\. The monotonic increase from structure\-focused \(λ≈0\.48\\lambda\\approx 0\.48\) to content\-focused \(λ≈0\.89\\lambda\\approx 0\.89\) validates the semantic gap bridging hypothesis\.Interpretation\.The learned gating schedule demonstrates an adaptive transition from structure\-focused to content\-focused reasoning\. At earlier hops,λ\\lambdaremains low \(≈0\.48\\approx 0\.48\), indicating that the model prioritizes graph topology over semantic matching\. This is precisely the behavior required to bridge the semantic gap: when traversing from a topic entity like “Inception” to an intermediate node like “Christopher Nolan,” lexical similarity to query terms such as “awards” would be misleading, so the model relies on valid relation types to guide propagation\. As reasoning progresses,λ\\lambdaincreases steadily, reflecting the model’s growing confidence in using content signals for disambiguation—particularly important in fan\-out scenarios where multiple neighbors share the same valid relation\. At later hops \(λ≈0\.89\\lambda\\approx 0\.89\), content matching dominates, ensuring the final answer aligns semantically with the original query intent\. This monotonic increase emerges naturally from end\-to\-end training without explicit supervision onλ\\lambdavalues, demonstrating that RSF learns to adaptively balance structure and semantics based on the reasoning stage\.
We also remark that individual case by case analysis reveals that we notice samples withλ\\lambda<<0\.5 in the final hop, notably when the answer node itself is a generic entity \(eg\. “National Language”\)\.
CWQ Gate Ablation\.To isolate the dynamic gate’s effect on the harder CWQ benchmark, we trained RSF from scratch without the dynamic gate \(λ≡1\\lambda\\equiv 1\)\. Table[6](https://arxiv.org/html/2607.06527#A4.T6)reports the results\. The gate provides a consistent benefit across all retrieval metrics, with the largest impact on H@1 \(−4\.0\-4\.0pt\), substantially larger than the−2\.4\-2\.4pt H@10 drop observed on WebQSP \(Table[3](https://arxiv.org/html/2607.06527#S3.T3)\)\. This confirms that CWQ’s more complex compositional queries expose the gate’s value more clearly\. We note that CWQ does not provide explicit hop\-depth annotations—questions are categorized by composition type, not reasoning depth—so a hop\-stratified breakdown is not available from the dataset\.
Table 6:Dynamic gate ablation on CWQ retrieval\. Removing the gate \(λ≡1\\lambda\\equiv 1\) causes a larger H@1 drop \(−4\.0\-4\.0pt\) than on WebQSP \(−2\.4\-2\.4pt H@10, Table[3](https://arxiv.org/html/2607.06527#S3.T3)\), confirming the gate’s value scales with query complexity\.
## Appendix EQualitative Analysis of Reasoning Chains
To provide deeper insight into RSF\-GLLM’s reasoning behavior, we present representative examples of successful and failed predictions from the CWQ and WebQSP test sets\. These examples illustrate the model’s ability to perform complex multi\-hop reasoning while also revealing systematic failure modes\.
### E\.1Successful Multi\-Hop Reasoning
The following examples demonstrate RSF\-GLLM’s ability to correctly navigate 3–4 hop reasoning chains, including cases requiring traversal through semantically dissimilar intermediate nodes\.
Example 1: Geographic→\\rightarrowPolitical Inference \(CWQ, 4\-hop\)Question:“What type of government is used in the country with Northern District?”Topic Entity:Northern DistrictGround Truth:Parliamentary SystemPrediction:Parliamentary SystemF1:1\.00Northern District→administrative\_division\.country\\xrightarrow\{\\texttt\{administrative\\\_division\.country\}\}Israel→governmental\_jurisdiction\.governing\_officials\\xrightarrow\{\\texttt\{governmental\\\_jurisdiction\.governing\\\_officials\}\}\[position\_m\.0j\_m3\_b\]→government\_position\_held\.jurisdiction\_of\_office\\xrightarrow\{\\texttt\{government\\\_position\\\_held\.jurisdiction\\\_of\\\_office\}\}Israel→location\.country\.form\_of\_government\\xrightarrow\{\\texttt\{location\.country\.form\\\_of\\\_government\}\}Parliamentary SystemAnalysis:This example demonstrates clean 4\-hop reasoning through geographic and political knowledge\. Starting from an obscure administrative district, the model correctly identifies Israel as the parent country, navigates through government official positions \(CVT nodes\), and extracts the governmental structure\.
Example 2: Multi\-Answer Language Retrieval \(CWQ, 4\-hop\)Question:“The people from the country that contains Nord\-Ouest Department speak what languages today?”Topic Entity:Nord\-Ouest DepartmentGround Truth:Haitian Creole\|\|FrenchPrediction:French, Haitian CreoleF1:1\.00Path 1: Nord\-Ouest Department→country\\xrightarrow\{\\texttt\{country\}\}Haiti→governing\_officials\\xrightarrow\{\\texttt\{governing\\\_officials\}\}\[m\.010g48js\]→jurisdiction\_of\_office\\xrightarrow\{\\texttt\{jurisdiction\\\_of\\\_office\}\}Haiti→official\_language\\xrightarrow\{\\texttt\{official\\\_language\}\}FrenchPath 2: Nord\-Ouest Department→country\\xrightarrow\{\\texttt\{country\}\}Haiti→governing\_officials\\xrightarrow\{\\texttt\{governing\\\_officials\}\}\[m\.010g48js\]→jurisdiction\_of\_office\\xrightarrow\{\\texttt\{jurisdiction\\\_of\\\_office\}\}Haiti→official\_language\\xrightarrow\{\\texttt\{official\\\_language\}\}Haitian CreoleAnalysis:This example showcases RSF’s ability to retrievemultiple correct answersthrough parallel reasoning paths\. Both official languages of Haiti are successfully identified via paths that share the first three hops but diverge at the final relation\. The flow sparsity regularization allows the model to maintain multiple high\-probability candidates when the question semantics warrant it, rather than collapsing to a single answer prematurely\.
Example 3: Historical Multi\-Answer Question \(WebQSP, 3\-hop\)Question:“What else did Ben Franklin invent?”Topic Entity:Benjamin FranklinGround Truth:Lightning rod\|\|Glass harmonica\|\|Bifocals\|\|Franklin stovePrediction:Franklin stove, Glass harmonica, Bifocals, Lightning rodF1:1\.00Benjamin Franklin→image\.appears\_in\_topic\\xrightarrow\{\\texttt\{image\.appears\\\_in\\\_topic\}\}Benjamin Franklin→image\.appears\_in\_topic\\xrightarrow\{\\texttt\{image\.appears\\\_in\\\_topic\}\}Benjamin Franklin→law\.inventor\.inventions\\xrightarrow\{\\texttt\{law\.inventor\.inventions\}\}\[All 4 inventions retrieved\]Analysis:Despite the seemingly redundant intermediate hops through image relations, RSF correctly identifies all four inventions\. This demonstrates robustness to noisy paths in the KG—the model learns that certain relation types \(e\.g\.,image\.appears\_in\_topic\) act as identity connectors and successfully propagates flow through them to reach the targetinventionsrelation\.
Example 4: Political Succession \(WebQSP, 3\-hop\)Question:“Who was vice president after Kennedy died?”Topic Entity:John F\. KennedyGround Truth:Lyndon B\. JohnsonPrediction:Lyndon B\. JohnsonF1:1\.00John F\. Kennedy→common\.topic\.webpage\\xrightarrow\{\\texttt\{common\.topic\.webpage\}\}\[m\.0b48xzc\]→common\.webpage\.topic\\xrightarrow\{\\texttt\{common\.webpage\.topic\}\}John F\. Kennedy→government\.us\_president\.vice\_president\\xrightarrow\{\\texttt\{government\.us\\\_president\.vice\\\_president\}\}Lyndon B\. JohnsonAnalysis:The question contains implicit temporal reasoning \(“after Kennedy died”\), which the model handles by recognizing that JFK’s vice president at the time of death would succeed him\. The intermediate webpage node serves as a structural bridge, and the final hop directly extracts the vice\-presidential relationship\.
Example 5: Implicit Religious Context \(CWQ, 4\-hop\)Question:“What is the predominant religion where the leader is Ovadia Yosef?”Topic Entity:Ovadia YosefGround Truth:JudaismPrediction:JudaismF1:1\.00Ovadia Yosef→STAY\\xrightarrow\{\\texttt\{STAY\}\}Ovadia Yosef→people\.person\.religion\\xrightarrow\{\\texttt\{people\.person\.religion\}\}Judaism→religion\.founding\_figures\\xrightarrow\{\\texttt\{religion\.founding\\\_figures\}\}Abraham→religion\.founding\_figure\.religion\_founded\\xrightarrow\{\\texttt\{religion\.founding\\\_figure\.religion\\\_founded\}\}JudaismAnalysis:This example demonstrates handling of implicit constraints\. The phrase “where the leader is” does not explicitly mention religious leadership, yet the model correctly infers that Ovadia Yosef’s domain of leadership is religious\. The reasoning path exhibits a cyclic structure \(Judaism→\\rightarrowAbraham→\\rightarrowJudaism\), showing that RSF can handle re\-entrant paths as discussed in Section 2\.2\.
### E\.2Failure Mode Analysis
We identify three systematic failure modes through analysis of incorrect predictions\. Understanding these limitations is crucial for guiding future improvements\.
Failure Mode 1: Answer Entity Not in Subgraph \(WebQSP\)Question:“Who plays Ken Barlow in Coronation Street?”Topic Entity:Coronation StreetGround Truth:William RoachePrediction:“The provided reasoning paths do not contain information about the actor…”F1:0\.00Subgraph Reachability:No — Answer entity not present in extracted subgraph\.Path 1: Coronation Street→program\_creator\\xrightarrow\{\\texttt\{program\\\_creator\}\}Tony Warren→film\.actor\.film\\xrightarrow\{\\texttt\{film\.actor\.film\}\}\[m\.0h0\_mvx\]→performance\.actor\\xrightarrow\{\\texttt\{performance\.actor\}\}Tony WarrenPath 8: Coronation Street→program\_creator\\xrightarrow\{\\texttt\{program\\\_creator\}\}Tony Warren→fictional\_characters\_created\\xrightarrow\{\\texttt\{fictional\\\_characters\\\_created\}\}Ken Barlow→STAY\\xrightarrow\{\\texttt\{STAY\}\}Ken BarlowAnalysis:The answer entityWilliam Roacheis not present in the extracted subgraph\. While the character “Ken Barlow” appears in Path 8, the actor\-character relationship lies beyond theKK\-hop extraction radius\.
Failure Mode 2: LLM Selects Wrong Candidate from Multiple Options \(CWQ\)Question:“Which man is the leader of the country that uses ‘Libya, Libya, Libya’ as its national anthem?”Topic Entity:Prime Minister of LibyaGround Truth:Abdullah al\-ThaniPrediction:Muammar GaddafiF1:0\.00Subgraph Reachability:Yes — Correct answer is present in reasoning paths\.Path 1: Prime Minister of Libya→office\_holders\\xrightarrow\{\\texttt\{office\\\_holders\}\}\[m\.011n4mp5\]→office\_holder\\xrightarrow\{\\texttt\{office\\\_holder\}\}Abdullah al\-Thani→positions\_held\\xrightarrow\{\\texttt\{positions\\\_held\}\}\.\.\.Path 3: Prime Minister of Libya→office\_holders\\xrightarrow\{\\texttt\{office\\\_holders\}\}\[m\.07lt4tb\]→office\_holder\\xrightarrow\{\\texttt\{office\\\_holder\}\}Muammar Gaddafi→positions\_held\\xrightarrow\{\\texttt\{positions\\\_held\}\}\.\.\.Path 4: Prime Minister of Libya→office\_holders\\xrightarrow\{\\texttt\{office\\\_holders\}\}\[m\.0h89fd8\]→office\_holder\\xrightarrow\{\\texttt\{office\\\_holder\}\}Mahmoud Jibril→positions\_held\\xrightarrow\{\\texttt\{positions\\\_held\}\}\.\.\.Analysis:The reasoning paths correctly contain the ground truth answer \(Abdullah al\-Thani in Path 1\), but also contain multiple other Libyan leaders\. The LLM incorrectly selected Gaddafi due to popularity bias in its parametric knowledge\. The KG lacks temporal annotations to disambiguate which leader is “current\.”
Failure Mode 3: Entity Alias Mismatch \(CWQ\)Question:“What was the name of the team that won the 2008 FIFA Club World Cup Final championship?”Topic Entity:2008 FIFA Club World Cup FinalGround Truth:Newton Heath L&YR F\.C\.Prediction:Manchester United F\.C\.F1:0\.00Path 1: 2008 FIFA Club World Cup Final→sports\_championship\_event\.champion\\xrightarrow\{\\texttt\{sports\\\_championship\\\_event\.champion\}\}Manchester United F\.C\.→STAY\\xrightarrow\{\\texttt\{STAY\}\}Manchester United F\.C\. \.\.\.Path 2: 2008 FIFA Club World Cup Final→champion\\xrightarrow\{\\texttt\{champion\}\}Manchester United F\.C\.→sports\_team\.venue\\xrightarrow\{\\texttt\{sports\\\_team\.venue\}\}\[m\.0n4ykf9\]→team\\xrightarrow\{\\texttt\{team\}\}Manchester United F\.C\.Analysis:All reasoning paths correctly lead to “Manchester United F\.C\.,” and the LLM correctly outputs this entity\. However, the ground truth annotation uses “Newton Heath L&YR F\.C\.”—the historical name of Manchester United from 1878–1902\. This is a dataset annotation artifact rather than a model failure; the prediction is factually correct but receives F1 of 0\.00 due to string mismatch with an outdated alias\. To mitigate such issues in production environments, we propose integrating an alias aware entity linker that normalizes both KG output and ground truth annotations to a unique uuid, ensuring the model is not penalized for nomenclature differences\.
### E\.3Summary of Failure Modes
Table[7](https://arxiv.org/html/2607.06527#A5.T7)summarizes the three identified failure modes with their characteristics\.
Table 7:Summary of systematic failure modes identified in qualitative analysis\.These qualitative examples validate that RSF\-GLLM successfully performs complex multi\-hop reasoning across diverse question types, while also revealing that remaining errors often stem from retrieval coverage limitations or LLM\-side biases rather than fundamental reasoning failures in the RSF module\.
## Appendix FImplementation Details and Reproducibility
We provide comprehensive implementation details to facilitate reproducibility of our results\.
### F\.1Compute Resources
All experiments were conducted on a single NVIDIA A100 GPU with 80GB HBM2e memory\. No distributed training or multi\-GPU setups were required, demonstrating the efficiency of our decoupled architecture\.
### F\.2Stage 1: RSF Module Training
Architecture\.The RSF module consists of: \(i\) a projection layer mapping Qwen3 embeddings to lower hidden states, \(ii\) a GRU for query updating, \(iii\) attention layers for relation scoring and content bias, and \(iv\) a gating MLP with a single linear layer followed by sigmoid activation\.
Embeddings\.Node and relation embeddings are obtained using Qwen3\-Embedding\. Embeddings are pre\-computed and cached for all entities and relations in the Freebase subset used by WebQSP and CWQ\. Entity names and relation texts are used as input text\.
Optimization\.We use AdamW optimizer with learning rate5×10−55\\times 10^\{\-5\}, weight decay0\.010\.01, and linear warmup over the first 10% of training steps\. Training runs for 10 epochs with early stopping based on validation Hit@1 \(patience = 3 epochs\)\. Batch size is 16 for WebQSP and 8 for CWQ \(due to larger subgraphs\)\. Gradient clipping is applied with max norm 1\.0\.
Hyperparameters\.The flow sparsity coefficientλ1=0\.1\\lambda\_\{1\}=0\.1was selected via grid search over\{0\.01,0\.05,0\.1,0\.2,0\.5\}\\\{0\.01,0\.05,0\.1,0\.2,0\.5\\\}\. The number of reasoning hopsTTis set to 2 for WebQSP and 4 for CWQ, matching the dataset characteristics\. The smoothing constantϵ=10−8\\epsilon=10^\{\-8\}is used for numerical stability\.
Subgraph Extraction\.We performKK\-hop BFS from the topic entity \(K=2K=2for WebQSP,K=4K=4for CWQ\)\.
### F\.3Stage 2: LLM Fine\-Tuning
Base Model\.We report results with two answer\-generation backbones:LLaMA\-2\-7BandQwen3\-8B\. LLaMA\-2\-7B is included to enable an apples\-to\-apples comparison with prior LLM\+KG baselines \(e\.g\., RoG, GNN\-RAG, GNN\-RAG\+RA\), which use the same backbone\. Qwen3\-8B is reported as a stronger contemporary alternative of comparable parameter scale\. Both backbones are trained and evaluated under identical hyperparameters and the same RSF\-extracted reasoning paths; no other component of the pipeline changes between the two runs\.
Fine\-Tuning\.We apply full parameter fine\-tuning for both backbones, using a single combined checkpoint evaluated on both WebQSP and CWQ to match the protocol used by the LLaMA\-2\-7B baselines\.
Optimization\.We fine\-tune using AdamW with learning rate2×10−42\\times 10^\{\-4\}, cosine learning rate schedule, and batch size 1\. Training runs for 3 epochs\. Maximum sequence length is 2048 tokens\.
### F\.4Evaluation Metrics
We follow standard KGQA evaluation protocols\.Hit@1measures exact match accuracy—whether the top\-1 predicted answer matches any gold answer\.F1computes token\-level overlap between the predicted answer string and gold answers, averaged across all test samples\.Similar Articles
I built an open-source Knowledge Graph pipeline with hybrid retrieval to improve LLM multi-hop reasoning [P]
An open-source full-stack pipeline that constructs a Knowledge Graph from raw text, uses hybrid search (dense + sparse + graph traversal) to solve multi-hop reasoning problems in LLMs, and re-ranks results with Reciprocal Rank Fusion and a Cross-Encoder.
Travel-Oriented Reasoning Large Language Model via Domain-Specific Knowledge Graphs
This paper proposes a modular pipeline that uses a domain-specific knowledge graph to generate multi-hop QA pairs and fine-tune a reasoning LLM (Qwen3-4B) for the travel domain, achieving 82.4% exact match accuracy, significantly outperforming the baseline.
Stepwise Reasoning Enhancement for LLMs via External Subgraph Generation
This paper proposes SGR, a framework that enhances LLM stepwise reasoning by integrating external knowledge graphs through query-relevant subgraph generation, combining Cypher-based reasoning with collaborative reasoning integration. Experiments on CWQ, WebQSP, GrailQA, and KQA Pro show improved reasoning accuracy over standard prompting and knowledge-enhanced baselines.
SGR: A Stepwise Reasoning Framework for LLMs with External Subgraph Generation
Introduces SGR, a stepwise reasoning framework that enhances LLM reasoning by generating query-specific subgraphs from external knowledge bases, improving accuracy and factual reliability.
Latent Bridges for Multi-Table Question Answering
GRAB uses a GNN encoder to convert relational tables into latent tokens for frozen LLMs, achieving significant performance gains in multi-table question answering.