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 View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 14 code samples harvested from 1 repository linked to this paper: 14 ran (of which 0 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 1 violated, 6 with no contract checked; 7 where Syntology's instrument failed) · 0 unverified. Where Syntology's instrument failed: 6 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: found in paper text by Syntology: 14 samples from 1 repository, 14 ran (7 with no instrument failure; 7 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

DDigimon/GraphPattern found in paper text by SyntologySyntology: 14 samples, 14 ran (7 instrument-failed) · 0 unverified 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 (of which 0 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 1 violated, 6 with no contract checked; 7 where Syntology's instrument failed) · 0 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · violated contract
6ran · our draft was wrong
1ran; the contract check could not run
6ran

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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

DDigimon/GraphPattern found in paper text by Syntology 14 samples, 14 ran (7 instrument-failed) · 0 unverified
direct_judge codes/graph_patterns.py ran · violated contract fingerprinted no licence file found · pointer only · 51b5f489ee5b257a · report fixture: signature patterns:list/1/str · returned bool · level recorded 2026-09-24
extract_communities codes/Applications/detection/utils.py ran · our draft was wrong no licence file found · pointer only · 23524ff764b0035b · report fixture: signature data:SimpleData/0/?, cls_dict:dict/0/? · returned dict · level recorded 2026-09-24
find_pattern_list codes/graph_patterns.py ran no licence file found · pointer only · 525d8f2a1f7a4535 · report fixture: signature target_graph:Graph/0/?, pattern_name:str/0/str · returned set · level recorded 2026-09-24
generate_graph in 10 papers codes/generation.py ran no licence file found · pointer only · 44163594c567339c · report fixture: signature N:int/0/int, M:int/0/int, directed:bool/0/bool, weight_func:callable/0/?, seed:int/0/int · returned Graph · level recorded 2026-09-24
get_potential_edges codes/generation.py ran; the contract check could not run (RAISES) no licence file found · pointer only · 0e50da000ac9eae9 · report fixture: signature directed:bool/0/bool, nodes:list/1/int · returned list · level recorded 2026-09-24
graph_iso_check codes/util.py ran no licence file found · pointer only · 1889ff471af424d0 · report fixture: signature g1:Graph/0/?, g2:Graph/0/? · returned bool · level recorded 2026-09-24
graph_txt codes/graph_nlp.py ran no licence file found · pointer only · 5a39f6c5a38a80c7 · report fixture: signature G:Graph/0/?, method:str/0/str, dicts:dict/0/?, nodes_feature:str/0/str · returned str · level recorded 2026-09-24
iso_list_check codes/util.py ran · our draft was wrong no licence file found · pointer only · 0b8d043c0f37374a · report fixture: signature g:Graph/0/?, g_list:list/1/Graph · returned bool · level recorded 2026-09-24
load_data in 700 papers codes/generation.py ran · our draft was wrong no licence file found · pointer only · b3be48f020d526b2 · report fixture: signature path:str/0/str · returned dict · level recorded 2026-09-24
node2atom codes/Applications/biclass/utils.py ran no licence file found · pointer only · 006194cb4d438ece · report fixture: signature node_feat:list/1/ndarray, num_nodes:int/0/int, dataset:str/0/str · returned dict · level recorded 2026-09-24
pattern_generation codes/graph_patterns.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 81617a53f5262ab7 · report fixture: signature name:str/0/str · returned Graph · level recorded 2026-09-24
sparse2dense codes/Applications/biclass/utils.py ran · our draft was wrong no licence file found · pointer only · d3462c5764646247 · report fixture: signature edge_indx:list/1/ndarray, n_nodes:int/0/int · returned ndarray · level recorded 2026-09-24
sparse2dense codes/Applications/multiclass/utils.py ran no licence file found · pointer only · 49fc388e4027af84 · report fixture: signature edge_indx:ndarray/2/int, n_nodes:int/0/int, start:int/0/int · returned ndarray · level recorded 2026-09-24
wholegraph codes/Applications/detection/utils.py ran · our draft was wrong no licence file found · pointer only · 2cf52b5aeb9c8c9c · report fixture: signature data:Data/0/? · returned DiGraph · level recorded 2026-09-24

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