G1: Teaching LLMs to Reason on Graphs with Reinforcement Learning
On the map: LLM reasoning → Knowledge- and tool-augmented reasoning
Abstract (arXiv)
Although Large Language Models (LLMs) have demonstrated remarkable progress, their proficiency in graph-related tasks remains notably limited, hindering the development of truly general-purpose models. Previous attempts, including pretraining graph foundation models or employing supervised fine-tuning, often face challenges such as the scarcity of large-scale, universally represented graph data. We introduce G1, a simple yet effective approach demonstrating that Reinforcement Learning (RL) on synthetic graph-theoretic tasks can significantly scale LLMs' graph reasoning abilities. To enable RL training, we curate Erd~os, the largest graph reasoning dataset to date comprising 50 diverse graph-theoretic tasks of varying difficulty levels, 100k training data and 5k test data, all drived from real-world graphs. With RL on Erd~os, G1 obtains substantial improvements in graph reasoning, where our finetuned 3B model even outperforms Qwen2.5-72B-Instruct (24x size). RL-trained models also show strong zero-shot generalization to unseen tasks, domains, and graph encoding schemes, including other graph-theoretic benchmarks as well as real-world node classification and link prediction tasks, without compromising general reasoning abilities. Our findings offer an efficient, scalable path for building strong graph reasoners by finetuning LLMs with RL on graph-theoretic tasks, which combines the strengths of pretrained LLM capabilities with abundant, automatically generated synthetic data, suggesting that LLMs possess graph understanding abilities that RL can elicit successfully. Our implementation is open-sourced at https://github.com/PKU-ML/G1, with models and datasets hosted on Hugging Face collections https://huggingface.co/collections/PKU-ML/g1-683d659e992794fc99618cf2 for broader accessibility.
Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 20 of its 57 references that are in the map. First posted on arXiv 24 May 2025.
Builds on
20 of 57 references.
Closest ancestors · 3
Same direction, newest first
- 2025GraphOmni: A Comprehensive and Extensible Benchmark Framework for Large Language Models on Graph-theoretic Tasks17 Apr
- 2024GraphEval36K: Benchmarking Coding and Reasoning Capabilities of Large Language Models on Graph Datasets23 Jun
- 2024GraphInstruct: Empowering Large Language Models with Graph Understanding and Reasoning Capability7 Mar
Other references · 17
- 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,361
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2018How Powerful are Graph Neural Networks?cited by 4,393
- 2023Let's Verify Step by Stepcited by 3,789
- 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,848
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024OpenAI o1 System Cardcited by 1,244
- 2024Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvementcited by 1,090
- 2025SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-trainingcited by 672
- 2023Scaling Relationship on Learning Mathematical Reasoning with Large Language Modelscited by 427
5 more
- 2025When More is Less: Understanding Chain-of-Thought Length in LLMscited by 183
- 2023Talk like a Graph: Encoding Graphs for Large Language Modelscited by 176
- 2019What Can Neural Networks Reason About?cited by 159
- 2024Let Your Graph Do the Talking: Encoding Structured Data for LLMscited by 118
- 2025Exploring Graph Learning Tasks with Pure LLMs: A Comprehensive Benchmark and Investigationcited by 12
Built on by
Citing papers per year: 2025: 4; 2026: 10.
14 papers.
Sort:
By area:
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2025Lost in Serialization: Invariance and Generalization of LLM Graph Reasonerscited by 6
- 2025Benefits and Pitfalls of Reinforcement Learning for Language Model Planning: A Theoretical Perspectivecited by 4
- 2026GraphScout: Empowering Large Language Models with Intrinsic Exploration Ability for Agentic Graph Reasoningcited by 2
- 2026Finding and Reactivating Post-Trained LLMs' Hidden Safety Mechanismscited by 2
- 2025Self-Exploring Language Models for Explainable Link Forecasting on Temporal Graphs via Reinforcement Learningcited by 1
- 2026Can RL Teach Long-Horizon Reasoning to LLMs? Expressiveness Is Keycited by 1
- 2026Learning to Approximate Uniform Facility Location via Graph Neural Networkscited by 0
- 2026ClosureBench: A Constructive Benchmark for Compositional Graph Reasoningcited by 0
- 2026GRAIN: Bridging Name and Narrative Shifts in Real-World Graph Reasoning through Invariance-Rewarded Agentic RLcited by 0
- 2026Graph Evidence Is Not Enough: Diagnosing Native Decoder Use in Graph-Augmented LLMscited by 0
- 2026GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMscited by 0
- 2026GraphCert: Bootstrap Agentic Graph Reasoning with Certified Evidence Rubrics30 Sep 2026
- 2026ZeroGAR: Benchmarking the Adversarial Robustness of Zero-Shot Graph Models27 Sep 2026
- 2026GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMs10 Sep 2026
- 2026Graph Evidence Is Not Enough: Diagnosing Native Decoder Use in Graph-Augmented LLMs31 Aug 2026
- 2026GRAIN: Bridging Name and Narrative Shifts in Real-World Graph Reasoning through Invariance-Rewarded Agentic RL27 Aug 2026
- 2026ClosureBench: A Constructive Benchmark for Compositional Graph Reasoning18 Aug 2026
- 2026Can RL Teach Long-Horizon Reasoning to LLMs? Expressiveness Is Key7 May 2026
- 2026Finding and Reactivating Post-Trained LLMs' Hidden Safety Mechanisms10 Mar 2026
- 2026GraphScout: Empowering Large Language Models with Intrinsic Exploration Ability for Agentic Graph Reasoning2 Mar 2026
- 2026Learning to Approximate Uniform Facility Location via Graph Neural Networks13 Feb 2026
- 2025Lost in Serialization: Invariance and Generalization of LLM Graph Reasoners13 Nov 2025
- 2025Benefits and Pitfalls of Reinforcement Learning for Language Model Planning: A Theoretical Perspective26 Sep 2025
- 2025Lost in Serialization: Invariance and Generalization of LLM Graph Reasonerscited by 6
- 2026GraphScout: Empowering Large Language Models with Intrinsic Exploration Ability for Agentic Graph Reasoningcited by 2
- 2026Finding and Reactivating Post-Trained LLMs' Hidden Safety Mechanismscited by 2
- 2026Can RL Teach Long-Horizon Reasoning to LLMs? Expressiveness Is Keycited by 1
- 2026ClosureBench: A Constructive Benchmark for Compositional Graph Reasoningcited by 0
- 2026GRAIN: Bridging Name and Narrative Shifts in Real-World Graph Reasoning through Invariance-Rewarded Agentic RLcited by 0
- 2026GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMscited by 0
- 2026GraphCert: Bootstrap Agentic Graph Reasoning with Certified Evidence Rubricscited by 0
- 2026GraphCert: Bootstrap Agentic Graph Reasoning with Certified Evidence Rubrics30 Sep 2026
- 2026GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMs10 Sep 2026
- 2026GRAIN: Bridging Name and Narrative Shifts in Real-World Graph Reasoning through Invariance-Rewarded Agentic RL27 Aug 2026
- 2026ClosureBench: A Constructive Benchmark for Compositional Graph Reasoning18 Aug 2026
- 2026Can RL Teach Long-Horizon Reasoning to LLMs? Expressiveness Is Key7 May 2026
- 2026Finding and Reactivating Post-Trained LLMs' Hidden Safety Mechanisms10 Mar 2026
- 2026GraphScout: Empowering Large Language Models with Intrinsic Exploration Ability for Agentic Graph Reasoning2 Mar 2026
- 2025Lost in Serialization: Invariance and Generalization of LLM Graph Reasoners13 Nov 2025
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2025Benefits and Pitfalls of Reinforcement Learning for Language Model Planning: A Theoretical Perspectivecited by 4
- 2025Self-Exploring Language Models for Explainable Link Forecasting on Temporal Graphs via Reinforcement Learningcited by 1
- 2026Learning to Approximate Uniform Facility Location via Graph Neural Networkscited by 0
- 2026Graph Evidence Is Not Enough: Diagnosing Native Decoder Use in Graph-Augmented LLMscited by 0
- 2026ZeroGAR: Benchmarking the Adversarial Robustness of Zero-Shot Graph Modelscited by 0
- 2026ZeroGAR: Benchmarking the Adversarial Robustness of Zero-Shot Graph Models27 Sep 2026
- 2026Graph Evidence Is Not Enough: Diagnosing Native Decoder Use in Graph-Augmented LLMs31 Aug 2026
- 2026Learning to Approximate Uniform Facility Location via Graph Neural Networks13 Feb 2026
- 2025Benefits and Pitfalls of Reinforcement Learning for Language Model Planning: A Theoretical Perspective26 Sep 2025
- 2025Self-Exploring Language Models for Explainable Link Forecasting on Temporal Graphs via Reinforcement Learning31 Aug 2025
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
Similar, not cited
Close in wording, no citation either way
- 2025Graph-R1: Incentivizing the Zero-Shot Graph Learning Capability in LLMs via Explicit Reasoning
- 2024Can LLM Graph Reasoning Generalize beyond Pattern Memorization?
- 2025Rewarding Graph Reasoning Process makes LLMs more Generalized Reasoners
- 2024GCoder: Improving Large Language Model for Generalized Graph Problem Solving
- 2025Improving LLMs' Generalized Reasoning Abilities by Graph Problems
- 2025Less is More: Learning Graph Tasks with Just LLMs
- 2025Rethinking and Benchmarking Large Language Models for Graph Reasoning
- 2023GraphLLM: Boosting Graph Reasoning Ability of Large Language Model