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

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

28 Sep 2023arXiv:2309.16595archive 2025-07-28

Jin Huang, Xingjian Zhang, Qiaozhu Mei, Jiaqi Ma

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.

PaperPDFCodeCode 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="2309.16595")

Code

Syntology Ran 10 of 15 code samples harvested from 2 repositories linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · our draft was wrong; 7 ran with no contract checked.

By repository: official repository: 2 samples from 1 repository, 2 ran; community (archive-listed): 13 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

trais-lab/llm-structured-data officialmentioned in papermentioned on GitHubpytorch report
CurryTang/Graph-LLM mentioned on GitHubpytorchMIT 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

15 samples harvested; 10 ran; 1 honoured the contract we drafted; 5 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.

1ran · honoured contract
2ran · our draft was wrong
7ran
5unverified

Licence: 2 of the 15 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

get_subgraph trais-lab/llm-structured-data/utils/utils.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 68261186ab933f2d · report
sample_test_nodes trais-lab/llm-structured-data/utils/utils.py official repository ran · honoured contract no licence file found · pointer only · 2a78218aa16ad624 · report
api_endpoint_from_url CurryTang/Graph-LLM/async_api.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 0a0bc4ba8c9af478 · report
get_model_name_mapping CurryTang/Graph-LLM/lmfinetune.py community (archive-listed) ran MIT (permissive) · e1e7a14ef324d0a0 · report
hyper_search CurryTang/Graph-LLM/hyper.py community (archive-listed) ran MIT (permissive) · f3c0523f8aa04241 · report
persist_cache_to_disk CurryTang/Graph-LLM/api.py community (archive-listed) ran MIT (permissive) · f4cc3f30e8c88187 · report
pkl_and_write CurryTang/Graph-LLM/data.py community (archive-listed) ran MIT (permissive) · e9743a63e8c74735 · report
prompt_zero_shot CurryTang/Graph-LLM/ego_graph.py community (archive-listed) ran MIT (permissive) · 98699449238cacb8 · report
ptr2index CurryTang/Graph-LLM/data.py community (archive-listed) ran MIT (permissive) · 82ab704565cc2a39 · report
replace_args_with_dict_values CurryTang/Graph-LLM/args.py community (archive-listed) ran MIT (permissive) · ca3bd8e13278c0f7 · report
get_embedding CurryTang/Graph-LLM/api.py community (archive-listed) unverified MIT (permissive) · ccb546755da4914b · report
get_model CurryTang/Graph-LLM/models.py community (archive-listed) unverified MIT (permissive) · 6e6759bd8de7af1e · report
load_yaml_file CurryTang/Graph-LLM/api.py community (archive-listed) unverified MIT (permissive) · 14306190576e01d0 · report
num_tokens_consumed_from_request CurryTang/Graph-LLM/async_api.py community (archive-listed) unverified MIT (permissive) · 27007d0ec4adb00b · report
to_edge_index CurryTang/Graph-LLM/data.py community (archive-listed) unverified MIT (permissive) · 9fcf6a81ca26b3d1 · report

Tasks

Graph LearningNode ClassificationText ClassificationText-To-SQLtext-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Text-To-SQL BIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation) GPT-4 (Baseline) Execution Accuracy % (Dev) 46.35 #31 of 41 Archive leaderboard report
Text-To-SQL BIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation) GPT-4 (Baseline) Execution Accuracy % (Test) 54.89 #31 of 41 Archive leaderboard report
Text-To-SQL BIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation) Claude-2 (Baseline) Execution Accuracy % (Dev) 42.70 #32 of 41 Archive leaderboard report
Text-To-SQL BIRD (BIg Bench for LaRge-scale Database Grounded Text-to-SQL Evaluation) Claude-2 (Baseline) Execution Accuracy % (Test) 49.02 #32 of 41 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

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