How Do Large Language Models Understand Graph Patterns? A Benchmark for Graph Pattern Comprehension
Xinnan Dai, Haohao Qu, Yifei Shen, Bohang Zhang, Qihao Wen, Wenqi Fan, Dongsheng Li, Jiliang Tang, Caihua Shan
Abstract
Benchmarking the capabilities and limitations of large language models (LLMs) in graph-related tasks is becoming an increasingly popular and crucial area of research. Recent studies have shown that LLMs exhibit a preliminary ability to understand graph structures and node features. However, the potential of LLMs in graph pattern mining remains largely unexplored. This is a key component in fields such as computational chemistry, biology, and social network analysis. To bridge this gap, this work introduces a comprehensive benchmark to assess LLMs' capabilities in graph pattern tasks. We have developed a benchmark that evaluates whether LLMs can understand graph patterns based on either terminological or topological descriptions. Additionally, our benchmark tests the LLMs' capacity to autonomously discover graph patterns from data. The benchmark encompasses both synthetic and real datasets, and a variety of models, with a total of 11 tasks and 7 models. Our experimental framework is designed for easy expansion to accommodate new models and datasets. Our findings reveal that: (1) LLMs have preliminary abilities to understand graph patterns, with O1-mini outperforming in the majority of tasks; (2) Formatting input graph data to align with the knowledge acquired during pretraining can enhance performance; (3) LLMs employ diverse potential algorithms to solve one task, with performance varying based on their execution capabilities. Our dataset and implementations are available at https://github.com/DDigimon/GraphPattern .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
19 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- G1: Teaching LLMs to Reason on Graphs with Reinforcement Learning cites Can Language Models Solve Graph Problems in Natural Language?
- G1: Teaching LLMs to Reason on Graphs with Reinforcement Learning cites GraphOmni: A Comprehensive and Extensible Benchmark Framework for Large Language Models on Graph-theoretic Tasks
- Benefits and Pitfalls of Reinforcement Learning for Language Model Planning: A Theoretical Perspective cites G1: Teaching LLMs to Reason on Graphs with Reinforcement Learning
- GraphOmni: A Comprehensive and Extensible Benchmark Framework for Large Language Models on Graph-theoretic Tasks cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- GraphOmni: A Comprehensive and Extensible Benchmark Framework for Large Language Models on Graph-theoretic Tasks cites Can Language Models Solve Graph Problems in Natural Language?
- GraphOmni: A Comprehensive and Extensible Benchmark Framework for Large Language Models on Graph-theoretic Tasks cites The Underappreciated Power of Vision Models for Graph Structural Understanding
- The Underappreciated Power of Vision Models for Graph Structural Understanding cites GraphOmni: A Comprehensive and Extensible Benchmark Framework for Large Language Models on Graph-theoretic Tasks
- The Underappreciated Power of Vision Models for Graph Structural Understanding cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- The Underappreciated Power of Vision Models for Graph Structural Understanding cites Can Language Models Solve Graph Problems in Natural Language?
- Reasoning by Superposition: A Theoretical Perspective on Chain of Continuous Thought cites Can Language Models Solve Graph Problems in Natural Language?
- Reasoning by Superposition: A Theoretical Perspective on Chain of Continuous Thought cites Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective
Cited by top-tier papers19
- Reasoning by Superposition: A Theoretical Perspective on Chain of Continuous ThoughtHanlin Zhu, Shibo Hao, Zhiting Hu, Jiantao Jiao et al.NeurIPS 2025 · 86 citations
- G1: Teaching LLMs to Reason on Graphs with Reinforcement LearningXiaojun Guo, Ang Li, Yifei Wang, Stefanie Jegelka et al.NeurIPS 2025 · 16 citations
- Benefits and Pitfalls of Reinforcement Learning for Language Model Planning: A Theoretical PerspectiveSiwei Wang, Yifei Shen, Haoran Sun, Shi Feng et al.ICLR 2026 · 7 citations
- The Underappreciated Power of Vision Models for Graph Structural UnderstandingXinjian Zhao, Wei Pang, Zhongkai Xue, Xiangru Jian et al.NeurIPS 2025 · 7 citations
- GraphOmni: A Comprehensive and Extensible Benchmark Framework for Large Language Models on Graph-theoretic TasksHao Xu, Xiangru Jian, Xinjian Zhao, Wei Pang et al.ICLR 2026 · 6 citations
Builds on16
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Parameterized Explainer for Graph Neural NetworkDongsheng Luo, Wei Cheng, Dongkuan Xu, Wenchao Yu et al.NeurIPS 2020 · 888 citations
- Towards Revealing the Mystery behind Chain of Thought: A Theoretical PerspectiveGuhao Feng, Bohang Zhang, Yuntian Gu, Haotian Ye et al.NeurIPS 2023 · 470 citations
- Can Language Models Solve Graph Problems in Natural Language?Heng Wang, Shangbin Feng, Tianxing He, Zhaoxuan Tan et al.NeurIPS 2023 · 420 citations
- What graph neural networks cannot learn: depth vs widthAndreas LoukasICLR 2020 · 336 citations
Related papers
- Evaluating LLMs on Large-Scale Graph Property Estimation via Random WalksSunil Kumar Maurya, Xin LiuACL 2026
- Two Steps from Hell: Compositionality on Chemical LMsVeronika Ganeeva, Kuzma Khrabrov, Artur Kadurin, Elena TutubalinaEMNLP Findings 2025
- A Graph Talks, But Who's Listening? Rethinking Evaluations for Graph-Language ModelsSoham Petkar, Hari Aakash K, Anirudh Vempati, Akshit Sinha et al.ACL Findings 2026
- MolecularIQ: Characterizing Chemical Reasoning Capabilities Through Symbolic Verification on Molecular GraphsChristoph Bartmann, Johannes Schimunek, Mykyta Ielanskyi, Philipp Seidl et al.ICLR 2026 · 5 citations
- LLM4DyG: Can Large Language Models Solve Spatial-Temporal Problems on Dynamic Graphs?Zeyang Zhang, Xin Wang, Ziwei Zhang, Haoyang Li et al.KDD 2024 · 32 citations
