Graph-R1: Towards Agentic GraphRAG Framework via End-to-end Reinforcement Learning

Haoran Luo, Haihong E, Guanting Chen, Qika Lin, Yikai Guo, Fangzhi Xu, Zemin Kuang, Meina Song, Xiaobao Wu, Yifan Zhu, Luu Anh Tuan

TL;DR

Graph-R1 is the first agentic GraphRAG framework that optimizes the retrieval process via end-to-end reinforcement learning (RL). By framing retrieval as a multi-turn interaction over a lightweight knowledge hypergraph, it bridges the gap between structured knowledge and natural language generation, achieving massive gains in both reasoning accuracy and retrieval efficiency.

What Problem Does This Paper Address?

Standard Retrieval-Augmented Generation (RAG) helps language models avoid hallucinations by fetching external documents. However, it typically relies on flat text chunks, completely missing the rich, interconnected relationships between entities.

While "GraphRAG" approaches solve this by structuring knowledge as entity-relation graphs, they introduce new headaches:

  1. High Construction Costs: Building dense knowledge graphs using LLMs is computationally expensive.
  2. Rigid Retrieval: Most methods rely on a single, fixed retrieval step, which fails on complex, multi-hop queries.
  3. Context Bloat: They depend heavily on long-context reasoning and meticulous prompt engineering to synthesize answers from the retrieved graph.

Graph-R1 addresses these bottlenecks by making the graph retrieval process dynamic, agentic, and directly optimized for the final answer via reinforcement learning.

Methods

Graph-R1 introduces a three-pronged approach to agentic retrieval:

  1. Lightweight Knowledge Hypergraph Construction: Instead of traditional, expensive binary graphs (Entity A $\rightarrow$ Relation $\rightarrow$ Entity B), Graph-R1 extracts n-ary relational facts. It groups multiple related entities and their textual context into a single "hyperedge," bypassing heavy confidence-score calculations to keep construction cheap and fast.
  2. Multi-Turn Agentic Interaction: The retrieval process is modeled as an iterative loop between the LLM agent and the hypergraph environment. At each step, the agent executes a structured "think-retrieve-rethink-generate" loop. It can choose to keep thinking, generate a new graph query, or terminate and output the final answer.
  3. End-to-End RL via GRPO: The authors leverage Group Relative Policy Optimization (GRPO)—the same math behind DeepSeek-R1—to train the model. The reward function is entirely outcome-driven, combining a format reward (enforcing that the model follows the structured thinking/querying layout) and an answer reward (token-level F1 score against the ground truth).
Figure 3. Overview of the Graph-R1 framework: an RL-enhanced reasoning trajectory over knowledge hypergraph, where the agent iteratively decides to think, query from graph environment, retrieve n-ary facts as candidate knowledge, and answer the user question.

Datasets

The authors evaluated Graph-R1 across six standard RAG benchmarks:

  • Multi-hop QA: 2WikiMultiHopQA, HotpotQA, and Musique.
  • Single-hop / Open-domain QA: Natural Questions (NQ), PopQA, and TriviaQA.

To test out-of-domain (OOD) generalization, they also evaluated the framework on five specialized vertical domains: Medicine, Agriculture, Computer Science, Legal, and a Mixed domain.

Key Insights and Ideas

  • RL is the Missing Link for Graphs: Interestingly, prompt-only GraphRAG methods often underperform standard chunk-based RAG because LLMs struggle to naturally navigate graph structures via prompts alone. Reinforcement learning explicitly teaches the model how to traverse and exploit these structural signals.
  • Hypergraphs Provide a Higher Ceiling: Structuring knowledge as a hypergraph provides a fundamentally richer representation for RL agents than flat text chunks, allowing the model to hit a much higher performance ceiling.
  • Concise Thinking Emerges Naturally: Under RL optimization, the agent naturally learns a "tendency toward more concise thinking." It generates shorter responses per turn but utilizes more interaction turns, leading to more stable and accurate retrieval without bloating the context window.

Key Results

  • State-of-the-Art Accuracy: Using Qwen2.5-7B-Instruct as a base, Graph-R1 achieved an average F1 score of 57.8% across the six standard benchmarks, dramatically outperforming StandardRAG (32.0%) and the chunk-based RL method Search-R1 (46.2%).
Figure 2. Comparison of F1 scores across RAG benchmarks. Using a graph as the knowledge environment enables RL to achieve a higher performance ceiling compared to chunk-based knowledge. Graph-structured knowledge boosts accuracy by richer representation.
  • Drastic Cost Reductions: Graph-R1 cut knowledge construction costs down to **$2.81 per 1M tokens** (compared to $4.14 for HyperGraphRAG).
  • Fast and Cheap Deployment: It achieved a swift response time of 7.0 seconds per query with a generation cost of $0 during deployment, highlighting its readiness for real-world applications.
  • Robust OOD Generalization: In zero-shot cross-domain tests on highly specialized fields like Medicine and CS, Graph-R1 consistently beat chunk-based baselines, proving that hypergraph inductive biases transfer robustly without domain-specific training.

Limitations and Future Work

The authors noted an unexpected quirk when training on models that are already heavily optimized with RL out-of-the-box (such as Qwen3-4B). In these cases, the model tended to over-rely on its own internal parametric reasoning rather than actively querying the external hypergraph environment, which slightly lowered its overall performance ceiling.

Future work will focus on refining the reward mechanisms to better balance internal model reasoning with external graph exploration, as well as scaling the framework to even larger base models.

Summary updated

Abstract

Retrieval-Augmented Generation (RAG) mitigates hallucination in LLMs by incorporating external knowledge, but relies on chunk-based retrieval that lacks structural semantics. GraphRAG methods improve RAG by modeling knowledge as entity-relation graphs, but still face challenges in high construction cost, fixed one-time retrieval, and reliance on long-context reasoning and prompt design. To address these challenges, we propose Graph-R1, the first agentic GraphRAG framework via end-to-end reinforcement learning (RL). It introduces lightweight knowledge hypergraph construction, models retrieval as a multi-turn agent-environment interaction, and optimizes the agent process via an end-to-end reward mechanism. Experiments on standard RAG datasets show that Graph-R1 outperforms traditional GraphRAG and RL-enhanced RAG methods in reasoning accuracy, retrieval efficiency, and generation quality. Our software and data are publicly available at https://github.com/LHRLAB/Graph-R1.
BibTeX
@inproceedings{luo2026graph,
  author = {Haoran Luo and Haihong E and Guanting Chen and Qika Lin and Yikai Guo and Fangzhi Xu and Zemin Kuang and Meina Song and Xiaobao Wu and Yifan Zhu and Luu Anh Tuan},
  title = {{Graph-R1: Towards Agentic GraphRAG Framework via End-to-end Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=YXnFGsSkCC},
}
Figure