Papers › How Do Large Language Models Understand Graph Patterns? A Benchmark for Graph Pattern...

How Do Large Language Models Understand Graph Patterns? A Benchmark for Graph Pattern Comprehension

4 Oct 2024arXiv:2410.05298archive 2025-07-28

Xinnan Dai, Haohao Qu, Yifen Shen, Bohang Zhang, Qihao Wen, Wenqi Fan, Dongsheng Li, Jiliang Tang, Caihua Shan

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 data to align with the knowledge acquired during pretraining can enhance performance; (3) The strategies employed by LLMs may differ from those used in conventional algorithms.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.05298")

Code

Syntology Ran 14 of 14 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 14 ran with no contract checked.

By repository: found in paper text by Syntology: 14 samples from 1 repository, 14 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

DDigimon/GraphPattern found in paper text by Syntology report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 14 ran; 0 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

14ran

Licence: 14 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from DDigimon/GraphPattern. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

direct_judge DDigimon/GraphPattern/codes/graph_patterns.py found in paper text by Syntology ran fingerprinted no licence file found · pointer only · 51b5f489ee5b257a · report
extract_communities DDigimon/GraphPattern/codes/Applications/detection/utils.py found in paper text by Syntology ran no licence file found · pointer only · 23524ff764b0035b · report
find_pattern_list DDigimon/GraphPattern/codes/graph_patterns.py found in paper text by Syntology ran no licence file found · pointer only · 525d8f2a1f7a4535 · report
generate_graph DDigimon/GraphPattern/codes/generation.py found in paper text by Syntology ran no licence file found · pointer only · 44163594c567339c · report
get_potential_edges DDigimon/GraphPattern/codes/generation.py found in paper text by Syntology ran no licence file found · pointer only · 0e50da000ac9eae9 · report
graph_iso_check DDigimon/GraphPattern/codes/util.py found in paper text by Syntology ran no licence file found · pointer only · 1889ff471af424d0 · report
graph_txt DDigimon/GraphPattern/codes/graph_nlp.py found in paper text by Syntology ran no licence file found · pointer only · 5a39f6c5a38a80c7 · report
iso_list_check DDigimon/GraphPattern/codes/util.py found in paper text by Syntology ran no licence file found · pointer only · 0b8d043c0f37374a · report
load_data DDigimon/GraphPattern/codes/generation.py found in paper text by Syntology ran no licence file found · pointer only · b3be48f020d526b2 · report
node2atom DDigimon/GraphPattern/codes/Applications/biclass/utils.py found in paper text by Syntology ran no licence file found · pointer only · 006194cb4d438ece · report
pattern_generation DDigimon/GraphPattern/codes/graph_patterns.py found in paper text by Syntology ran no licence file found · pointer only · 81617a53f5262ab7 · report
sparse2dense DDigimon/GraphPattern/codes/Applications/biclass/utils.py found in paper text by Syntology ran no licence file found · pointer only · d3462c5764646247 · report
sparse2dense DDigimon/GraphPattern/codes/Applications/multiclass/utils.py found in paper text by Syntology ran no licence file found · pointer only · 49fc388e4027af84 · report
wholegraph DDigimon/GraphPattern/codes/Applications/detection/utils.py found in paper text by Syntology ran no licence file found · pointer only · 2cf52b5aeb9c8c9c · report

Tasks

BenchmarkingComputational chemistry

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

ALIGN

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections