Learning Efficient and Generalizable Graph Retriever for Knowledge-Graph Question Answering

Tianjun Yao, Haoxuan Li, Zhiqiang Shen, Pan Li, Tongliang Liu, Kun Zhang

TL;DR

RAPL introduces a lightweight and highly generalizable graph retriever for Knowledge Graph Question Answering (KGQA) by combining LLM-rationalized training labels with a novel line-graph transformation. This framework allows standard Graph Neural Networks (GNNs) to capture complex triple-level interactions, enabling smaller open-source language models to match the reasoning performance of proprietary giants like GPT-4o while drastically improving cross-dataset generalization.

What Problem Does This Paper Address?

Retrieval-Augmented Generation (RAG) helps mitigate Large Language Model (LLM) hallucinations by grounding answers in external knowledge. While text-based RAG is common, Knowledge Graphs (KGs)—which store facts as structured triples like (subject, relation, object)—offer a more compact, interpretable alternative for complex reasoning tasks.

Current KGQA systems often use a "retrieve-then-reason" paradigm where a graph retriever extracts relevant facts, and an LLM reasons over them. However, existing graph retrievers face two major bottlenecks:

  1. Noisy Supervision: They rely on simple heuristics, like the shortest path between entities, to label training data. However, the shortest path isn't always the logically rational path. For example, a question about a musician's acting career might be incorrectly trained on a shortest path that traverses purely musical collaborations.
  2. Limited Expressive Capacity: Traditional GNNs update entity representations while keeping relation embeddings static, failing to capture fine-grained interactions between full triples.

Methods

The authors propose RAPL (Rationalized Annotator, Path-based reasoning, and Line graph transformation) to address these limitations through three core components:

  • Rationalized Label Supervision: Instead of blindly trusting shortest paths, RAPL uses a two-stage labeling strategy. It first generates a candidate pool of paths and then uses a powerful LLM (like GPT-4o) as a "rationalizer" to select paths that are causally relevant to the question intent.
  • Model-Agnostic Line Graph Transformation: To capture rich inter-triple dependencies, RAPL transforms the directed KG into a directed line graph ($l(G)$). In this inverted structure, the original edges (triples) become nodes, and connections are drawn where triples share an entity. This allows standard GNNs to perform message passing directly between facts, updating triple semantics dynamically.
  • Path-Based Reasoning with Look-Ahead Embeddings: RAPL models retrieval as a sequential path-selection process on the line graph, utilizing a dedicated STOP node to dynamically determine when enough information has been gathered. It also introduces a bidirectional message-passing mechanism so that early nodes in a path can "look ahead" and incorporate context from subsequent nodes.
Figure 1: Overall framework of RAPL. The generalization ability of RAPL arises from the label rationalizer, line graph transformation, and the path-based reasoning paradigm.

Datasets

The framework was evaluated on two widely used multi-hop KGQA benchmarks, both utilizing Freebase as the underlying knowledge graph:

  • WebQSP: A dataset emphasizing simpler, mostly single-hop and two-hop questions.
  • CWQ (Complex WebQuestions): A more challenging benchmark containing multi-hop questions requiring up to four hops of inference.

Key Insights and Ideas

  • Shortest $\neq$ Smartest: Filtering heuristic paths through an LLM annotator provides a significantly cleaner training signal. Teaching a lightweight retriever to recognize causal rationality drastically boosts its ability to generalize to unseen questions.
  • Flipping the Graph Architecture: Turning edges into nodes via line graph transformation solves a fundamental limitation of standard GNNs. It forces the model to explicitly compute intra- and inter-triple interactions, which is vital for fine-grained relational reasoning.
  • Structure Matters to Smaller Models: Providing downstream LLMs with highly structured, coherent reasoning paths rather than a disorganized bag of triples significantly reduces the cognitive load on the reasoner. This formatting choice disproportionately benefits smaller models.
Figure 2: Impact of path-formatted in- puts on reasoning performance.

Key Results

  • Performance Boost: RAPL outperforms state-of-the-art methods by 2.66% to 20.34% when paired with moderate-scale LLM reasoners.
  • Closing the Capability Gap: On the complex CWQ dataset, RAPL reduces the performance gap between a small model (Llama-3.1-8B) and a massive model (GPT-4o) from 14.78% (using previous state-of-the-art SubgraphRAG) to just 2.22%.
  • Exceptional Generalizability: In cross-dataset evaluations (training on WebQSP and testing on CWQ), RAPL experienced only a 3.1% drop in Macro-F1, compared to a massive 17.4% drop seen in competing methods.
  • Efficiency Gains: RAPL achieves these results more efficiently, retrieving fewer than 50 triples on average by successfully learning when to stop searching.

Limitations and Future Work

The authors note two primary limitations:

  1. Lack of Hybrid Retrieval: RAPL focuses purely on structural and relational inductive biases from the graph. It does not currently combine forces with text-based retrievers, which could offer complementary semantic flexibility.
  2. Dependence on KG Quality: The framework assumes the underlying Knowledge Graph is well-formed and accurate. It does not explicitly handle missing entities, corrupted relations, or structural errors inherent in real-world KGs.

Summary updated

BibTeX
@misc{yao2025learning,
  author = {Tianjun Yao and Haoxuan Li and Zhiqiang Shen and Pan Li and Tongliang Liu and Kun Zhang},
  title = {{Learning Efficient and Generalizable Graph Retriever for Knowledge-Graph Question Answering}},
  year = {2025},
  eprint = {2506.09645},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.09645},
}
Figure