Language is All a Graph Needs

Ruosong Ye, Caiqi Zhang, Runhui Wang, Shuyuan Xu, Yongfeng Zhang

Main figure for Language is All a Graph Needs

Abstract

The emergence of large-scale pre-trained language models has revolutionized various AI research domains. Transformers-based Large Language Models (LLMs) have gradually replaced CNNs and RNNs to unify fields of computer vision and natural language processing. Compared with independent data samples such as images, videos or texts, graphs usually contain rich structural and relational information. Meanwhile, language, especially natural language, being one of the most expressive mediums, excels in describing complex structures. However, existing work on incorporating graph problems into the generative language modeling framework remains very limited. Considering the rising prominence of LLMs, it becomes essential to explore whether LLMs can also replace GNNs as the foundation model for graphs. In this paper, we propose InstructGLM (Instruction-finetuned Graph Language Model) with highly scalable prompts based on natural language instructions. We use natural language to describe multi-scale geometric structure of the graph and then instruction finetune an LLM to perform graph tasks, which enables Generative Graph Learning. Our method surpasses all GNN baselines on ogbn-arxiv, Cora and PubMed datasets, underscoring its effectiveness and sheds light on generative LLMs as new foundation model for graph machine learning. Our code is available at https://github.com/agiresearch/InstructGLM.

Benchmark Results

Tested on 2 datasets 7 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
16
Flan-T5-base
0.9077 ±0.0052
This paper
21
GCN
actual #21 vs paper #111 90 places worse
0.8778 ±0.0096
actual #21 vs paper #111 90 places worse
paper 0.8778 ±0.0096

Improvement within reported uncertainty; not highlighted.

paper 0.8778 ±0.0096 Δ at pub 0.0061 Δ today 0.0226
25
ACM-GCN
actual #25 vs paper #25
0.8975 ±0.0116
actual #25 vs paper #25
paper 0.8975 ±0.0116

Improvement within reported uncertainty; not highlighted.

paper 0.8975 ±0.0116 Δ at pub 0.0184
28
Snowball-V3
0.8959 ±0.0158
This paper
40
RevGAT
0.8911
This paper
39
SAGE
0.8911 ±0.0012
44
GAT
actual #44 vs paper #742 698 places worse
0.8897 ±0.0014
best reported
actual #44 vs paper #742 698 places worse
paper 0.7670 ±0.0042
paper 0.7670 ±0.0042 Δ at pub 0.1220 Δ today 0.1227
45
GCNII
actual #45 vs paper #45
0.8893 ±0.0137
actual #45 vs paper #45
paper 0.8893 ±0.0137
prev best: Orthogonal Graph Neural Networks (AAAI 2021)

Improvement within reported uncertainty; not highlighted.

paper 0.8893 ±0.0137 Δ at pub 0.0044
46
Flan-T5-large
0.8893 ±0.0106
This paper
50
FAGCN
actual #50 vs paper #50
0.8885 ±0.0136
actual #50 vs paper #50
paper 0.8885 ±0.0136
paper 0.8885 ±0.0136 Δ at pub 0.0475
57
CoarFormer
0.8869 ±0.0082
This paper
65
BernNet
0.8852 ±0.0095
This paper
113
MixHop
actual #113 vs paper #764 651 places worse
0.8761 ±0.0203
best reported
actual #113 vs paper #764 651 places worse
paper 0.7565 ±0.0131
141
GraphSAGE
actual #141 vs paper #167 26 places worse
0.8708 ±0.0085
best reported
actual #141 vs paper #167 26 places worse
paper 0.8658 ±0.0026

Difference within reported uncertainty; not counted as underperformance.

paper 0.8658 ±0.0026 Δ at pub 0.0032 Δ today 0.0050
142
Llama-7b
0.8708 ±0.0032
This paper
171
GT
0.8642 ±0.0082
This paper
205
SGC-v2
0.8548 ±0.0148
This paper
207
Geom-GCN
actual #207 vs paper #214 7 places worse
0.8540 ±0.0040
best reported
actual #207 vs paper #214 7 places worse
paper 0.8527 ±0.0148

Difference within reported uncertainty; not counted as underperformance.

paper 0.8527 ±0.0148 Δ at pub 0.0003 Δ today 0.0013
456
Graphormer
actual #456 vs paper #636 180 places worse
0.8041 ±0.0030
actual #456 vs paper #636 180 places worse
paper 0.8041 ±0.0030
724
MLP
0.7768
#ModelAccuracy ↑Paper
1
LGTL
0.9518 ±0.0011
2
MixHop (LO)
0.9513 ±0.0038
3
GraphSAGE (LO)
0.9511 ±0.0036
9
Flan-T5-large
0.9462 ±0.0013
This paper
11
Flan-T5-base
0.9445 ±0.0012
This paper
14
Llama-7b
0.9384 ±0.0025
This paper
18
GCN
actual #18 vs paper #113 95 places worse
0.9296 ±0.0015
best reported
actual #18 vs paper #113 95 places worse
paper 0.8890 ±0.0032
20
GAT
actual #20 vs paper #295 275 places worse
0.9233 ±0.0018
best reported
actual #20 vs paper #295 275 places worse
paper 0.8328 ±0.0012
28
Snowball-V3
0.9144 ±0.0059
This paper
41
ACM-GCN
actual #41 vs paper #41
0.9096 ±0.0062
actual #41 vs paper #41
paper 0.9096 ±0.0062
paper 0.9096 ±0.0062 Δ at pub 0.1426
58
GCNII
actual #58 vs paper #77 19 places worse
0.9030 ±0.0043
best reported
actual #58 vs paper #77 19 places worse
paper 0.8980 ±0.0030
69
Geom-GCN
0.9005 ±0.0014
This paper
70
MixHop
actual #70 vs paper #70
0.9004 ±0.0141
actual #70 vs paper #70
paper 0.9004 ±0.0141
paper 0.9004 ±0.0141 Δ at pub 0.0473
73
FAGCN
0.8998 ±0.0054
This paper
80
CoarFormer
0.8975 ±0.0031
This paper
93
BernNet
actual #93 vs paper #132 39 places worse
0.8933 ±0.0007
best reported
actual #93 vs paper #132 39 places worse
paper 0.8848 ±0.0041
paper 0.8848 ±0.0041 Δ at pub 0.0085
116
SAGE
0.8881 ±0.0015
118
GT
0.8875 ±0.0016
This paper
125
GraphSAGE
actual #125 vs paper #211 86 places worse
0.8864 ±0.0030
best reported
actual #125 vs paper #211 86 places worse
paper 0.8685 ±0.0011
paper 0.8685 ±0.0011 Δ at pub 0.0080 Δ today 0.0179
131
RevGAT
0.8850 ±0.0005
This paper
151
Graphormer
0.8824 ±0.0150
This paper
210
MLP
0.8690 ±0.0074
247
SGC-v2
0.8536 ±0.0052
This paper
SOTA performance (not significantly different from the best) 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 Improved at pub — later paper surpassed this result Best today — OK at publication; today's leaderboard best is elsewhere