GRAIL:Learning to Interact with Large Knowledge Graphs for Retrieval Augmented Reasoning

Ge Chang, Jinbo Su, Jiacheng Liu, Pengfei Yang, Yuhao Shang, Huiwen Zheng, Hongli Ma, Yan Liang, Yuanchun Li, Yunxin LiuarXiv 2025 · DOI

Introduction: The Challenge of Graph-Based Reasoning

Retrieval-Augmented Generation (RAG) has significantly enhanced Large Language Models (LLMs) by providing access to external knowledge. However, when this knowledge is structured as a Knowledge Graph (KG), traditional retrieval methods often falter. They typically fall into two traps: information gaps, where multi-hop connections are missed, or information overload, where massive subgraphs overwhelm the model's context window with irrelevant data. The core issue is a lack of interactive reasoning; current systems treat retrieval as a static search rather than an exploratory process.

The GRAIL Framework

To address these limitations, we introduce GRAIL (Graph-Retrieval Augmented Interactive Learning). GRAIL transforms graph retrieval into an interactive "detective" process where an LLM agent navigates the KG step-by-step.

The GRAIL framework: Data generation via LLM-guided exploration, two-stage training (SFT + RL), and the interactive retrieval process.

1. Interactive Action Space

The GRAIL agent operates within a defined action space:

  • Explore Entity: Retrieves all relations and neighboring nodes for a specific entity.
  • Choose Relation: Prunes the current view to focus only on relevant paths.
  • Finish: Concludes the search once sufficient information is gathered.

2. Data Synthesis and Training

Training the agent involves a sophisticated pipeline. First, high-quality reasoning trajectories are generated using GPT-4o. These trajectories undergo Shortest Path Refinement to remove redundant steps, ensuring the model learns the most efficient paths.

The model then undergoes a two-stage training process:

  • Stage 1: Supervised Fine-Tuning (SFT): Establishes basic graph comprehension.
  • Stage 2: Reinforcement Learning (RL): Utilizes Group Relative Policy Optimization (GRPO) and a Process-based Reward Model (PRM). Unlike outcome-based rewards, PRM provides feedback at every step, which is essential for mastering complex multi-hop reasoning.

Experimental Results

GRAIL was evaluated on three major benchmarks: WebQSP, Complex WebQuestions (CWQ), and MetaQA (1-hop to 3-hop).

Performance comparison of GRAIL against various baselines across WebQSP, CWQ, and MetaQA datasets.

As shown in the performance table, GRAIL consistently outperforms state-of-the-art (SOTA) baselines. Notably, on the MetaQA 2-hop task, GRAIL improved accuracy from approximately 10% to over 53% (using the Qwen-8B backbone). Across all datasets, GRAIL achieved an average accuracy improvement of 21.01%.

Key Insights

  • Efficiency through Interaction: GRAIL is remarkably data-efficient, retrieving only 11.44% of the triples compared to other retrievers like G-Retriever. By pruning irrelevant information early, it avoids the "noise" that typically degrades LLM reasoning.
  • The Power of PRM: Process-based rewards are critical. Ablation studies show that rewarding the intermediate steps of the reasoning path allows the model to solve deep multi-hop questions that outcome-only rewards cannot reach.
  • RL as a Reasoning Booster: The RL phase does more than just improve retrieval; it enhances the model's inherent logical capabilities, particularly for complex, multi-step queries.

Conclusion

GRAIL demonstrates that treating graph retrieval as an interactive, learned behavior significantly improves the reasoning capabilities of LLMs on structured data. By combining efficient exploration with process-based reinforcement learning, GRAIL sets a new standard for retrieval-augmented reasoning on large-scale knowledge graphs.

Summary updated

BibTeX
@misc{chang2025grail,
  author = {Ge Chang and Jinbo Su and Jiacheng Liu and Pengfei Yang and Yuhao Shang and Huiwen Zheng and Hongli Ma and Yan Liang and Yuanchun Li and Yunxin Liu},
  title = {{GRAIL:Learning to Interact with Large Knowledge Graphs for Retrieval Augmented Reasoning}},
  year = {2025},
  eprint = {2508.05498},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.05498},
}
Figure