GraphText: Graph Reasoning in Text Space

Jianan Zhao, Le Zhuo, Yikang Shen, Meng Qu, Kai Liu, Michael M. Bronstein, Zhaocheng Zhu, Jian Tang

Main figure for GraphText: Graph Reasoning in Text Space

Abstract

Large Language Models (LLMs) have gained the ability to assimilate human knowledge and facilitate natural language interactions with both humans and other LLMs. However, despite their impressive achievements, LLMs have not made significant advancements in the realm of graph machine learning. This limitation arises because graphs encapsulate distinct relational data, making it challenging to transform them into natural language that LLMs understand. In this paper, we bridge this gap with a novel framework, GraphText, that translates graphs to natural language. GraphText derives a graph-syntax tree for each graph that encapsulates both the node attributes and inter-node relationships. Traversal of the tree yields a graph text sequence, which is then processed by an LLM to treat graph tasks as text generation tasks. Notably, GraphText offers multiple advantages. It introduces training-free graph reasoning: even without training on graph data, GraphText with ChatGPT can achieve on par with, or even surpassing, the performance of supervised-trained graph neural networks through in-context learning (ICL). Furthermore, GraphText paves the way for interactive graph reasoning, allowing both humans and LLMs to communicate with the model seamlessly using natural language. These capabilities underscore the vast, yet-to-be-explored potential of LLMs in the domain of graph machine learning.

Benchmark Results

Tested on 5 datasets 14 baseline values reported too low

Tables show presented results in global context (best 3 papers + GCN + MLP).

Classic

#ModelAccuracy ↑Paper
1
GraphSAGE+CNA
0.9418 ±0.0033
2
GCN+CNA
0.9366 ±0.0048
3
TransformerConv
0.9350 ±0.0058
21
GCN
0.9004
45
GCNII
actual #45 vs paper #589 544 places worse
0.8893 ±0.0137
best reported
actual #45 vs paper #589 544 places worse
paper 0.8120
best at pub: Language is All a Graph Needs (2023)
paper 0.8120 Δ at pub 0.0773 Δ today 0.0773
303
GATv2
actual #303 vs paper #486 183 places worse
0.8406 ±0.0083
best reported
actual #303 vs paper #486 183 places worse
paper 0.8230
724
MLP
0.7768
#ModelAccuracy ↑Paper
1
CNA
0.9575 ±0.0058
2
IS-GIB
0.9390 ±0.0187
3
EERM
0.9112 ±0.0145
36
GCNII
actual #36 vs paper #630 594 places worse
0.8076 ±0.0030
best reported
actual #36 vs paper #630 594 places worse
paper 0.6980
paper 0.6980 Δ at pub 0.1096
44
GCN
0.8033 ±0.0088
350
MLP
0.7289 ±0.0010
585
GATv2
actual #585 vs paper #624 39 places worse
0.7060
best reported
actual #585 vs paper #624 39 places worse
paper 0.6990

Heterophilic Graphs

#ModelAccuracy ↑Paper
1
P^2GNN
0.9672 ±0.0147
2
DoG
0.9660 ±0.0210
3
GPF-plus
0.9583 ±0.0419
34
MLP
0.9230 ±0.0070
53
GraphSAGE
0.9000 ±0.0365
70
GCNII
actual #70 vs paper #553 483 places worse
0.8918 ±0.0443
best reported
actual #70 vs paper #553 483 places worse
paper 0.5680
paper 0.5680 Δ at pub 0.2366 Δ today 0.3238
211
GAT
actual #211 vs paper #574 363 places worse
0.8162 ±0.0645
best reported
actual #211 vs paper #574 363 places worse
paper 0.5410
257
GCN
actual #257 vs paper #510 253 places worse
0.7933 ±0.0447
best reported
actual #257 vs paper #510 253 places worse
paper 0.5950
best today: Graph Wave Networks (WWW 2025)
paper 0.5950 Δ at pub 0.1890 Δ today 0.1983
258
GATv2
actual #258 vs paper #471 213 places worse
0.7929 ±0.0403
best reported
actual #258 vs paper #471 213 places worse
paper 0.6220
paper 0.6220 Δ at pub 0.1709
#ModelAccuracy ↑Paper
1
P^2GNN
0.9541 ±0.0272
2
ACM-GCN
0.9480 ±0.0380
3
RF-GCN
0.9429
24
MLP
0.9136 ±0.0070
35
GCNII
actual #35 vs paper #553 518 places worse
0.8918 ±0.0396
best reported
actual #35 vs paper #553 518 places worse
paper 0.4050
paper 0.4050 Δ at pub 0.4376 Δ today 0.4868
138
SAGE
0.8269
158
GAT
actual #158 vs paper #524 366 places worse
0.8190 ±0.0540
best reported
actual #158 vs paper #524 366 places worse
paper 0.4590
paper 0.4590 Δ at pub 0.3600
170
GCN
actual #170 vs paper #558 388 places worse
0.8082 ±0.0360
best reported
actual #170 vs paper #558 388 places worse
paper 0.3780
paper 0.3780 Δ at pub 0.4140 Δ today 0.4302
177
GATv2
actual #177 vs paper #538 361 places worse
0.8033 ±0.0333
best reported
actual #177 vs paper #538 361 places worse
paper 0.4320
paper 0.4320 Δ at pub 0.3713
#ModelAccuracy ↑Paper
1
DMD++
0.9190 ±0.0260
2
F-GREAD-BS
0.9059 ±0.0380
3
APPNP
0.9010 ±0.0350
37
MLP
0.8629 ±0.0450
53
GAT
actual #53 vs paper #213 160 places worse
0.8430 ±0.0370
best reported
actual #53 vs paper #213 160 places worse
paper 0.4900
paper 0.4900 Δ at pub 0.3530
63
GCN
actual #63 vs paper #213 150 places worse
0.8310 ±0.0320
best reported
actual #63 vs paper #213 150 places worse
paper 0.4900
paper 0.4900 Δ at pub 0.3410
69
GraphSAGE
0.8118 ±0.0556
75
GCNII
actual #75 vs paper #206 131 places worse
0.8039 ±0.0340
best reported
actual #75 vs paper #206 131 places worse
paper 0.5100
paper 0.5100 Δ at pub 0.2939 Δ today 0.2939
84
GATv2
actual #84 vs paper #196 112 places worse
0.7910 ±0.0200
best reported
actual #84 vs paper #196 112 places worse
paper 0.5290
paper 0.5290 Δ today 0.2620
SOTA performance (not significantly different from the best) Global context (other papers) Best at pub — reported result worse than the best known when published (best reported in green) Best today — OK at publication; today's leaderboard best is elsewhere