LLM as GNN: Graph Vocabulary Learning for Text-Attributed Graph Foundation Models

Xi Zhu, Haochen Xue, Ziwei Zhao, Wujiang Xu, Jingyuan Huang, Minghao Guo, Qifan Wang, Kaixiong Zhou, Imran Razzak, Yongfeng Zhang

Main figure for LLM as GNN: Graph Vocabulary Learning for Text-Attributed Graph Foundation Models

Abstract

Text-Attributed Graphs (TAGs), where each node is associated with text descriptions, are ubiquitous in real-world scenarios. They typically exhibit distinctive structure and domain-specific knowledge, motivating the development of Graph Foundation Models (GFM) that generalize across diverse graphs and tasks. Despite large efforts to integrate Large Language Models (LLMs) and Graph Neural Networks (GNNs) for TAGs, most methods suffer from decoupled architectures with two-stage alignment, limiting their synergistic potential. Even worse, existing methods assign out-of-vocabulary (OOV) tokens to graph nodes, leading to graph-specific semantics, token explosion, and incompatibility with task-oriented prompt templates, which hinders cross-graph and cross-task transferability. To address these challenges, we propose PromptGFM, a versatile GFM for TAGs grounded in graph vocabulary learning. PromptGFM comprises two key components: (a) graph understanding module, which explicitly prompts LLMs to replicate the finest GNN workflow within the text space, facilitating seamless GNN-LLM integration and elegant graph-text alignment; (b) graph inference module, which establishes a language-based graph vocabulary ensuring expressiveness, transferability, and scalability, enabling readable instructions for joint LLM fine-tuning across graphs and tasks. Extensive experiments demonstrate our superiority, especially effective transferability across diverse graphs and tasks. The code is available at.

Benchmark Results

Tested on 5 datasets 12 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
5
PromptGFM
0.9242
This paper
21
GCN
0.9004
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
35
GAT
actual #35 vs paper #103 68 places worse
0.8080 ±0.0026
best reported
actual #35 vs paper #103 68 places worse
paper 0.7730
paper 0.7730 Δ at pub 0.0350
44
GCN
0.8033 ±0.0088
76
NodeFormer
actual #76 vs paper #334 258 places worse
0.7856 ±0.0009
best reported
actual #76 vs paper #334 258 places worse
paper 0.7298
81
ENGINE
0.7846
This paper
89
SGFormer
actual #89 vs paper #246 157 places worse
0.7798 ±0.0091
best reported
actual #89 vs paper #246 157 places worse
paper 0.7376
103
RevGNN
0.7734
This paper
195
Llama3
0.7468
This paper
313
BERT
actual #313 vs paper #353 40 places worse
0.7317 ±0.0175
best reported
actual #313 vs paper #353 40 places worse
paper 0.7283

Difference within reported uncertainty; not counted as underperformance.

paper 0.7283 Δ at pub 0.0034
350
MLP
0.7289 ±0.0010
446
Sentence-BERT
0.7212
This paper
503
OFA
0.7158
This paper
659
LLaGA
0.6880
This paper
787
MLP+LLM_features
0.6442
This paper
#ModelAccuracy ↑Paper
1
GraphTARIF
0.9703 ±0.0019
2
GAT
actual #2 vs paper #524 522 places worse
0.9669 ±0.0014
best reported
actual #2 vs paper #524 522 places worse
paper 0.8238
3
GAT+T
0.9660 ±0.0007
7
SAGE
actual #7 vs paper #529 522 places worse
0.9643 ±0.0027
best reported
actual #7 vs paper #529 522 places worse
paper 0.8006
8
GCN
actual #8 vs paper #534 526 places worse
0.9632 ±0.0008
best reported
actual #8 vs paper #534 526 places worse
paper 0.7858
29
SGFormer
actual #29 vs paper #528 499 places worse
0.9558 ±0.0036
best reported
actual #29 vs paper #528 499 places worse
paper 0.8012
44
NodeFormer
actual #44 vs paper #540 496 places worse
0.9527 ±0.0022
best reported
actual #44 vs paper #540 496 places worse
paper 0.7851
56
GraphSAGE
0.9508 ±0.0026
390
MLP
0.9128 ±0.0063
500
PromptGFM
0.8661
This paper
506
LLaGA
0.8534
This paper
513
OFA
actual #513 vs paper #513
0.8446
actual #513 vs paper #513
paper 0.8446
521
ENGINE
0.8375
This paper
523
RevGNN
0.8324
This paper
530
GraphPrompter
0.8004
This paper
550
Llama3
0.7442
This paper
559
Sentence-BERT
0.6902
This paper
560
BERT
actual #560 vs paper #560
0.6882
actual #560 vs paper #560
paper 0.6882
562
MLP+LLM_features
0.6121
This paper
#ModelAccuracy ↑Paper
1
GCN
actual #1 vs paper #215 214 places worse
0.9302 ±0.0011
best reported
actual #1 vs paper #215 214 places worse
paper 0.7633
paper 0.7633 Δ at pub 0.1669
2
RSE + RGCN (70b)
0.8852 ±0.0019
3
LEMP+T
0.8825
9
SAGE
actual #9 vs paper #110 101 places worse
0.8771
best reported
actual #9 vs paper #110 101 places worse
paper 0.7956
26
MLP+LLM_features
actual #26 vs paper #273 247 places worse
0.8597
best reported
actual #26 vs paper #273 247 places worse
paper 0.6841
31
GAT
actual #31 vs paper #169 138 places worse
0.8533
best reported
actual #31 vs paper #169 138 places worse
paper 0.7821
34
PromptGFM
0.8466
This paper
54
GIN
0.8303 ±0.0021
57
SGFormer
actual #57 vs paper #214 157 places worse
0.8271 ±0.0056
best reported
actual #57 vs paper #214 157 places worse
paper 0.7656
paper 0.7656 Δ at pub 0.0615
68
ENGINE
0.8156
This paper
73
RevGNN
0.8122
This paper
74
NodeFormer
actual #74 vs paper #224 150 places worse
0.8103 ±0.0094
best reported
actual #74 vs paper #224 150 places worse
paper 0.7547
paper 0.7547 Δ at pub 0.0556
75
GraphPrompter
0.8098
This paper
79
LLaGA
0.8074
This paper
101
Llama3
0.7994
This paper
156
OFA
actual #156 vs paper #174 18 places worse
0.7855 ±0.0037
best reported
actual #156 vs paper #174 18 places worse
paper 0.7802

Difference within reported uncertainty; not counted as underperformance.

paper 0.7802 Δ today 0.0053
165
BERT
actual #165 vs paper #175 10 places worse
0.7833 ±0.0043
best reported
actual #165 vs paper #175 10 places worse
paper 0.7798

Difference within reported uncertainty; not counted as underperformance.

paper 0.7798 Δ at pub 0.0035
186
Sentence-BERT
0.7772
This paper
237
MLP
0.7469 ±0.0085
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper) Global context (other papers) Best at pub — reported result worse than the best known when published (best reported in green) Best at pub — reported value improved over the best known when published Best today — OK at publication; today's leaderboard best is elsewhere