SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.16595 · 2023

Can LLMs Effectively Leverage Graph Structural Information through Prompts, and Why?

arXiv · PDF · Open in the Atlas

Code that ran

10 of 15 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2309.16595.json · badge: /api/ran/2309.16595.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
CurryTang/Graph-LLM canonical (classifier label)
classifier basis: census
8 ran · 5 no recorded run
trais-lab/llm-structured-data canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
api_endpoint_from_url Ran
ran; our contract draft was wrong, not the code
CurryTang/Graph-LLM/async_api.py
pointer only (licence: MIT); the stored copy get_code serves, from arthurizijar/kb-coder, is pointer only (licence: NONE) · get_code("0a0bc4ba8c9af478")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from arthurizijar/kb-coder, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_model_name_mapping Ran
ran; our contract draft was wrong, not the code
CurryTang/Graph-LLM/lmfinetune.py
code served (permissive licence) · get_code("e1e7a14ef324d0a0")
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 torch

ARGS = {
    'model_name': 'deberta-base'
}
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 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
get_subgraph Ran
ran; our contract draft was wrong, not the code
trais-lab/llm-structured-data/utils/utils.py
pointer only (licence: NONE) · get_code("68261186ab933f2d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, trais-lab/llm-structured-data when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

hyper_search Ran
ran; our contract draft was wrong, not the code
CurryTang/Graph-LLM/hyper.py
code served (permissive licence) · get_code("f3c0523f8aa04241")
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 torch.nn as nn
from unittest.mock import Mock

torch.manual_seed(0)

class MockTrial:
    def suggest_categorical(self, name, options):
        return options[0]

class MockEmbedding(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Embedding(10, 4)
    
    def forward(self, x):
        return self.embedding(x)

class MockGNNModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def forward(self, x):
        return self.linear(x)

class MockDataset:
    def __init__(self):
        self.num_nodes = 10
        self.num_features = 4
        self.num_classes = 3

trial = MockTrial()
embedding_type = "static"
gnn_model = MockGNNModel()
dataset = MockDataset()

ARGS = {
    'trial': trial,
    'embedding_type': embedding_type,
    'gnn_model': gnn_model,
    'dataset': dataset
}
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 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
persist_cache_to_disk Ran
ran; our contract draft was wrong, not the code
CurryTang/Graph-LLM/api.py
pointer only (licence: MIT); the stored copy get_code serves, from Leirunlin/Text-level-Graph-Attack, is pointer only (licence: NONE) · get_code("f4cc3f30e8c88187")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Leirunlin/Text-level-Graph-Attack, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pkl_and_write Ran
ran; our contract draft was wrong, not the code
CurryTang/Graph-LLM/data.py
code served (permissive licence) · get_code("e9743a63e8c74735")
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 torch
import pickle as pkl
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory for the pickle file
temp_dir = tempfile.gettempdir()
temp_path = os.path.join(temp_dir, "test_pickle.pkl")

# Create a sample object to pickle - can be any pickleable Python object
sample_obj = {
    "tensor": torch.randn(2, 4),
    "list": [1, 2, 3, 4, 5],
    "string": "test data",
    "nested": {"a": 1, "b": 2}
}

ARGS = {
    "obj": sample_obj,
    "path": temp_path
}
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 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
prompt_zero_shot Ran
ran; our contract draft was wrong, not the code
CurryTang/Graph-LLM/ego_graph.py
pointer only (licence: MIT); the stored copy get_code serves, from Leirunlin/Text-level-Graph-Attack, is pointer only (licence: NONE) · get_code("98699449238cacb8")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Leirunlin/Text-level-Graph-Attack, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ptr2index Ran
ran; our contract draft was wrong, not the code
CurryTang/Graph-LLM/data.py
code served (permissive licence) · get_code("82ab704565cc2a39")
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 Tensor, ndim 1, dtype family int, shape (7,) 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
from torch import Tensor

torch.manual_seed(0)

# ptr is expected to be a 1D tensor of pointers/offsets
# The function computes ptr[1:] - ptr[:-1] to get counts,
# then repeats indices based on those counts
# A typical use case: ptr might be [0, 2, 5, 7] representing
# ranges in a ragged tensor

ptr = torch.tensor([0, 2, 5, 7], dtype=torch.long)

ARGS = {
    "ptr": ptr
}
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 Tensor, ndim 1, dtype family int, shape (7,) — shape (7,) 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
replace_args_with_dict_values Ran
ran; our contract draft was wrong, not the code
CurryTang/Graph-LLM/args.py
pointer only (licence: MIT); the stored copy get_code serves, from currytang/llmgnn, is pointer only (licence: NONE) · get_code("ca3bd8e13278c0f7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from currytang/llmgnn, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sample_test_nodes Ran
ran, honoured the contract we drafted
trais-lab/llm-structured-data/utils/utils.py
pointer only (licence: NONE) · get_code("2a78218aa16ad624")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, trais-lab/llm-structured-data when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_embedding Not yet run
unverified (harvested, no recorded run)
CurryTang/Graph-LLM/api.py
pointer only (licence: MIT); the stored copy get_code serves, from Leirunlin/Text-level-Graph-Attack, is pointer only (licence: NONE) · get_code("ccb546755da4914b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Leirunlin/Text-level-Graph-Attack, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_model Not yet run
unverified (harvested, no recorded run)
CurryTang/Graph-LLM/models.py
code served (permissive licence) · get_code("6e6759bd8de7af1e")
How it ran

no invocation recorded.

load_yaml_file Not yet run
unverified (harvested, no recorded run)
CurryTang/Graph-LLM/api.py
code served (permissive licence) · get_code("14306190576e01d0")
How it ran

no invocation recorded.

num_tokens_consumed_from_request Not yet run
unverified (harvested, no recorded run)
CurryTang/Graph-LLM/async_api.py
pointer only (licence: MIT); the stored copy get_code serves, from Leirunlin/Text-level-Graph-Attack, is pointer only (licence: NONE) · get_code("27007d0ec4adb00b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Leirunlin/Text-level-Graph-Attack, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

to_edge_index Not yet run
unverified (harvested, no recorded run)
CurryTang/Graph-LLM/data.py
code served (permissive licence) · get_code("9fcf6a81ca26b3d1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 7 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 2 the same month, 7 later) and 8 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
num_tokens_consumed_from_request 4 other papers
1 the same month, 3 later
2309.07430 (2023-09)
Adapted Large Language Models Can Outperform Medical Experts in Clinical Text Summarization
2403.06754 (2024-03)
ALaRM: Align Language Models via Hierarchical Rewards Modeling
2405.16405 (2024-05)
Intruding with Words: Towards Understanding Graph Injection Attacks at the Text Level
and 1 more not named here
api_endpoint_from_url 3 other papers
1 the same month, 2 later
2309.04695 (2023-09)
Code-Style In-Context Learning for Knowledge-Based Question Answering
2405.07248 (2024-05)
Limited Ability of LLMs to Simulate Human Psychological Behaviours: a Psychometric Analysis
2405.16405 (2024-05)
Intruding with Words: Towards Understanding Graph Injection Attacks at the Text Level
get_embedding 1 other paper
1 later
2405.16405 (2024-05)
Intruding with Words: Towards Understanding Graph Injection Attacks at the Text Level
load_yaml_file 1 other paper
1 later
2405.16405 (2024-05)
Intruding with Words: Towards Understanding Graph Injection Attacks at the Text Level
persist_cache_to_disk 1 other paper
1 later
2405.16405 (2024-05)
Intruding with Words: Towards Understanding Graph Injection Attacks at the Text Level
prompt_zero_shot 1 other paper
1 later
2405.16405 (2024-05)
Intruding with Words: Towards Understanding Graph Injection Attacks at the Text Level
replace_args_with_dict_values 1 other paper
1 later
2310.04668 (2023-10)
Label-free Node Classification on Graphs with Large Language Models (LLMS)

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-23.

Repositories linked to this paper

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

Abstract

Large language models (LLMs) are gaining increasing attention for their capability to process graphs with rich text attributes, especially in a zero-shot fashion. Recent studies demonstrate that LLMs obtain decent text classification performance on common text-rich graph benchmarks, and the performance can be improved by appending encoded structural information as natural languages into prompts. We aim to understand why the incorporation of structural information inherent in graph data can improve the prediction performance of LLMs. First, we rule out the concern of data leakage by curating a novel leakage-free dataset and conducting a comparative analysis alongside a previously widely-used dataset. Second, as past work usually encodes the ego-graph by describing the graph structure in natural language, we ask the question: do LLMs understand the graph structure in accordance with the intent of the prompt designers? Third, we investigate why LLMs can improve their performance after incorporating structural information. Our exploration of these questions reveals that (i) there is no substantial evidence that the performance of LLMs is significantly attributed to data leakage; (ii) instead of understanding prompts as graph structures as intended by the prompt designers, LLMs tend to process prompts more as contextual paragraphs and (iii) the most efficient elements of the local neighborhood included in the prompt are phrases that are pertinent to the node label, rather than the graph structure.

For agents

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

get_harvested_code_for_paper("2309.16595")
get_code_for_paper("2309.16595")
have("2309.16595")

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

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

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

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

Connect an agent — have() is free.