SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.19667 · NeurIPS · 2024

Can Large Language Models Analyze Graphs like Professionals? A Benchmark, Datasets and Models

Chen Qian, Xin Li, Maosong Sun, Zhiyuan Liu, Chuan Shi, Cheng Yang, Weize Chen, Haopeng Li, Qizhi Chu, Zhaojun Sun, Ran Li, Yiwei Wei

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2409.19667.json · badge: /api/ran/2409.19667.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
bupt-gamma/graphteam community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
check_bool Ran
ran, violated the contract we drafted
bupt-gamma/graphteam/multi-agents-4-graph-analysis/GraphTeam/graphteam/chat_chain.py
code served (permissive licence) · get_code("74593dd3a030965d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "s": "true"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_code Ran
ran on a synthesized input
bupt-gamma/graphteam/multi-agents-4-graph-analysis/GraphTeam/camel/agents.py
code served (permissive licence) · get_code("77d746c4da984457")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def extract_code(text):
    text = str(text)
    matches = re.findall('```[ \\t]*[Pp]ython[ \\t]*(.*?)```', text, re.DOTALL)
    filtered_matches = [match for match in matches if not re.search('\\bpip install\\b', match)]
    code = '\n'.join(filtered_matches)
    if code == '':
        return text
    else:
        return code

# Test case 1: text with python code blocks
test_text_1 = """
Here is some code:

print("hello")
x = 42

And more text.
Python
y = x + 1

"""

# Test case 2: text with pip install (should be filtered out)
test_text_2 = """

pip install numpy
import numpy as np

Some other text with code:

z = 100

"""

# Test case 3: plain text with no code blocks
test_text_3 = "Just plain text, no code blocks here."

# Test case 4: various whitespace patterns
test_text_4 = """
  python  
result = 5 * 5

Some more text:
 PYTHON
def foo():
    pass

"""

ARGS = {
    "text": test_text_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_detailed_info_by_ids Ran
ran on a synthesized input
bupt-gamma/graphteam/multi-agents-4-graph-analysis/GraphTeam/memory/get_result_from_memory.py
code served (permissive licence) · get_code("92b2c63686261b0f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects:
# - ids: a collection of string IDs to search for
# - detailed_data: a list of dicts, each with an 'id' key

ids = {'1', '3', '5'}

detailed_data = [
    {'id': 1, 'name': 'item_1', 'value': 100},
    {'id': 2, 'name': 'item_2', 'value': 200},
    {'id': 3, 'name': 'item_3', 'value': 300},
    {'id': 4, 'name': 'item_4', 'value': 400},
    {'id': 5, 'name': 'item_5', 'value': 500},
]

ARGS = {
    'ids': ids,
    'detailed_data': detailed_data,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_raw_text_to_dict_memory Ran
ran on a synthesized input
bupt-gamma/graphteam/multi-agents-4-graph-analysis/GraphTeam/memory/get_result_from_memory.py
code served (permissive licence) · get_code("c1e532b07878a081")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Analyze the function: parse_raw_text_to_dict_memory
# - Takes raw_text as parameter
# - Processes it line by line with splitlines()
# - Looks for lines starting with 'id'
# - Builds a dictionary with 'id' as key
# - Returns the dictionary

# Construct a valid raw_text argument
raw_text = """id 12345
some other line
id 67890
another line
id test_id_value"""

ARGS = {
    "raw_text": raw_text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
select_by_accuracy Ran
ran on a synthesized input
bupt-gamma/graphteam/multi-agents-4-graph-analysis/GraphTeam/memory/get_result_from_memory.py
code served (permissive licence) · get_code("4c6ca6aa6f4fd281")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random

def select_by_accuracy(items):
    if not items:
        return None
    sorted_items = sorted(items, key=lambda x: x.get('accuracy', 0), reverse=True)
    if len(sorted_items) > 1 and sorted_items[0]['accuracy'] == sorted_items[1]['accuracy']:
        return random.choice(sorted_items)
    else:
        return sorted_items[0]

# Setup code to construct valid arguments
random.seed(0)

# Test case 1: Multiple items with different accuracies
items_different = [
    {'accuracy': 0.85, 'name': 'model_a'},
    {'accuracy': 0.92, 'name': 'model_b'},
    {'accuracy': 0.78, 'name': 'model_c'},
]

# Test case 2: Multiple items with tied highest accuracy
items_tied = [
    {'accuracy': 0.90, 'name': 'model_x'},
    {'accuracy': 0.90, 'name': 'model_y'},
    {'accuracy': 0.85, 'name': 'model_z'},
]

# Test case 3: Single item
items_single = [
    {'accuracy': 0.88, 'name': 'model_solo'},
]

# Test case 4: Empty list
items_empty = []

# Test case 5: Items without accuracy key (defaults to 0)
items_no_accuracy = [
    {'name': 'model_1'},
    {'accuracy': 0.75, 'name': 'model_2'},
]

ARGS = {
    'items': items_different
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
check_bool 1 other paper
1 dated earlier
2403.08604 (2024-03)
Prompting Large Language Models to Tackle the Full Software Development Lifecycle: A Case Study

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The need to analyze graphs is ubiquitous across various fields, from social networks to biological research and recommendation systems. Therefore, enabling the ability of large language models (LLMs) to process graphs is an important step toward more advanced general intelligence. However, current LLM benchmarks on graph analysis require models to directly reason over the prompts describing graph topology, and are thus limited to small graphs with only a few dozens of nodes. In contrast, human experts typically write programs based on popular libraries for task solving, and can thus handle graphs with different scales. To this end, a question naturally arises: can LLMs analyze graphs like professionals? In this paper, we introduce ProGraph, a manually crafted benchmark containing 3 categories of graph tasks. The benchmark expects solutions based on programming instead of directly reasoning over raw inputs. Our findings reveal that the performance of current LLMs is unsatisfactory, with the best model achieving only 36% accuracy. To bridge this gap, we propose LLM4Graph datasets, which include crawled documents and auto-generated codes based on 6 widely used graph libraries. By augmenting closed-source LLMs with document retrieval and fine-tuning open-source ones on the codes, we show 11-32% absolute improvements in their accuracies. Our results underscore that the capabilities of LLMs in handling structured data are still under-explored, and show the effectiveness of LLM4Graph in enhancing LLMs' proficiency of graph analysis. The benchmark, datasets and enhanced open-source models are available at https://github.com/BUPT-GAMMA/ProGraph.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2409.19667")
get_code_for_paper("2409.19667")
have("2409.19667")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2409.19667.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2409.19667.svg)](https://syntology.ai/paper/2409.19667)

Connect an agent — have() is free.