Graph-R1: Incentivizing the Zero-Shot Graph Learning Capability in LLMs via Explicit Reasoning

Yicong Wu, Guangyue Lu, Yuan Zuo, Huarong Zhang, Junjie Wu · DOI

Abstract

Graph-R1 is a novel GNN-free framework that enables Large Language Models (LLMs) to perform zero-shot graph learning by transforming graph structures into textual reasoning problems. By utilizing a "reason-then-predict" paradigm, Graph-R1 bypasses the need for traditional Graph Neural Networks (GNNs). The framework employs a two-phase training process involving Supervised Fine-Tuning (SFT) on reasoning traces and Reinforcement Learning (RL) via Group Relative Policy Optimization (GRPO). Experimental results demonstrate that Graph-R1 achieves state-of-the-art performance across diverse graph tasks, often outperforming much larger models and specialized GNN-LLM hybrids.

Introduction

Traditionally, Graph Neural Networks (GNNs) have been the gold standard for graph-based machine learning. However, GNNs often suffer from rigidity, as they are typically tied to fixed label sets and struggle to generalize to unseen domains without expensive retraining. Conversely, Large Language Models (LLMs) possess exceptional generalization capabilities but lack the structural inductive bias necessary to process graph data effectively when it is flattened into text. Graph-R1 addresses this gap by incentivizing explicit reasoning about graph topology and semantics, allowing LLMs to "see" connections through structured thought.

Methods

The Graph-R1 framework consists of three primary components:

  1. Graph-to-Text Linearization: Subgraphs are converted into natural language descriptions, including node attributes and edge lists. To maintain efficiency, an LLM (DeepSeek-V3) is used to summarize verbose node text.
  2. Two-Phase Training: The model first undergoes full-parameter SFT on a curated dataset of 10,000 graph reasoning examples to teach explicit Chain-of-Thought (CoT) traces. This is followed by RL using GRPO—the same algorithm used in DeepSeek-R1—to reward logical coherence and correct predictions.
  3. The Rethink Template: A structured prompting strategy guides the model through structural analysis (<structure>), semantic interpretation (<semantic>), candidate generation (<comprehensive>), and a final self-correction phase (<rethink>).
Graph-R1 Framework Overview

Results and Discussion

Graph-R1 was evaluated on a wide range of tasks, including node classification, link prediction, and zero-shot regression. The model achieved superior performance in 8 out of 10 experimental settings, outperforming specialized LLM-GNN hybrids like GOFA and UniGraph.

Performance comparison of Graph-R1 against baseline and hybrid models

Key Findings

  • Superior Link Prediction: On the FB15K237 dataset, Graph-R1 reached 75.17% accuracy, more than doubling the performance of the base DeepSeek-R1-Distill model (34.00%).
  • Cross-Task Generalization: In zero-shot regression tests for molecular solubility (ESOL), Graph-R1 achieved a Mean Absolute Error (MAE) of 1.72, significantly better than GOFA (4.93) and LLaGA (7.39).
  • Efficiency of Scale: A 14B distilled model (Graph-R1) outperformed its 671B teacher (DeepSeek-R1) on several benchmarks, indicating that specialized reasoning training is more effective for graph tasks than sheer model scale.

Conclusion

Graph-R1 demonstrates that explicit, multi-step reasoning can effectively substitute for specialized graph architectures in LLMs. By training models to "think" through graph structures and self-correct via a rethinking phase, Graph-R1 achieves high zero-shot performance and robust generalization. Future research will focus on addressing context window limitations for larger graphs and improving the computational efficiency of LLM-based graph reasoning.

Summary updated

BibTeX
@misc{wu2025graph,
  author = {Yicong Wu and Guangyue Lu and Yuan Zuo and Huarong Zhang and Junjie Wu},
  title = {{Graph-R1: Incentivizing the Zero-Shot Graph Learning Capability in LLMs via Explicit Reasoning}},
  year = {2025},
  eprint = {2508.17387},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.17387},
}
Figure