KDD 2025

GCoT: Chain-of-Thought Prompt Learning for Graphs

Xingtong Yu, Chang Zhou, Zhongwei Kuai, Xinming Zhang, Yuan Fang

Main figure for GCoT: Chain-of-Thought Prompt Learning for Graphs

Abstract

Chain-of-thought (CoT) prompting has achieved remarkable success in natural language processing (NLP). However, its vast potential remains largely unexplored for graphs. This raises an interesting question: How can we design CoT prompting for graphs to guide graph models to learn step by step? On one hand, unlike natural languages, graphs are non-linear and characterized by complex topological structures. On the other hand, many graphs lack textual data, making it difficult to formulate language-based CoT prompting. In this work, we propose the first CoT prompt learning framework for text-free graphs,. Specifically, we decompose the adaptation process for each downstream task into a series of inference steps, with each step consisting of prompt-based inference, ``thought'' generation, and thought-conditioned prompt learning. While the steps mimic CoT prompting in NLP, the exact mechanism differs significantly. Specifically, at each step, an input graph, along with a prompt, is first fed into a pre-trained graph encoder for prompt-based inference. We then aggregate the hidden layers of the encoder to construct a ``thought'', which captures the working state of each node in the current step. Conditioned on this thought, we learn a prompt specific to each node based on the current state. These prompts are fed into the next inference step, repeating the cycle. To evaluate and analyze the effectiveness of, we conduct comprehensive experiments on eight public datasets, which demonstrate the advantage of our approach.

Proposed method: GCoT

Benchmark Results

Tested on 8 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
actual #21 vs paper #911 890 places worse
0.9004
best reported
actual #21 vs paper #911 890 places worse
paper 0.3250 ±0.1421
paper 0.3250 ±0.1421 Δ at pub 0.5754
39
SAGE
0.8911 ±0.0012
44
GAT
actual #44 vs paper #912 868 places worse
0.8897 ±0.0014
best reported
actual #44 vs paper #912 868 places worse
paper 0.3100 ±0.1622
paper 0.3100 ±0.1622 Δ at pub 0.5790 Δ today 0.5797
278
GraphCL
actual #278 vs paper #898 620 places worse
0.8428 ±0.0091
best reported
actual #278 vs paper #898 620 places worse
paper 0.5196 ±0.0943
paper 0.5196 ±0.0943 Δ at pub 0.3232
724
MLP
0.7768
877
GCoT
0.5967 ±0.1551
This paper
884
GPF
actual #884 vs paper #884
0.5760 ±0.1388
actual #884 vs paper #884
paper 0.5760 ±0.1388
prev best: ProG: A Graph Prompt Learning Benchmark (NeurIPS 2024)

Improvement within reported uncertainty; not highlighted.

paper 0.5760 ±0.1388 Δ at pub 0.1903
892
GraphPrompt
0.5425 ±0.0938
This paper
893
DGI/InfoGraph
0.5411 ±0.0960
This paper
899
ProG
0.5059 ±0.1464
This paper
#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 #895 860 places worse
0.8080 ±0.0026
best reported
actual #35 vs paper #895 860 places worse
paper 0.2771 ±0.0874
paper 0.2771 ±0.0874 Δ at pub 0.5309
44
GCN
actual #44 vs paper #896 852 places worse
0.8033 ±0.0088
best reported
actual #44 vs paper #896 852 places worse
paper 0.2636 ±0.0903
paper 0.2636 ±0.0903 Δ at pub 0.5397
61
GraphSAGE
0.7923 ±0.0053
350
MLP
0.7289 ±0.0010
395
GraphCL
actual #395 vs paper #884 489 places worse
0.7250 ±0.0070
best reported
actual #395 vs paper #884 489 places worse
paper 0.4312 ±0.0961
paper 0.4312 ±0.0961 Δ at pub 0.2938
869
GPF
actual #869 vs paper #883 14 places worse
0.4328 ±0.0882
actual #869 vs paper #883 14 places worse
paper 0.4328 ±0.0882
prev best: ProG: A Graph Prompt Learning Benchmark (NeurIPS 2024)

Improvement within reported uncertainty; not highlighted.

paper 0.4328 ±0.0882 Δ at pub 0.1212
871
GraphPrompt
actual #871 vs paper #875 4 places worse
0.4707 ±0.0309
best reported
actual #871 vs paper #875 4 places worse
paper 0.4534 ±0.1053

Difference within reported uncertainty; not counted as underperformance.

paper 0.4534 ±0.1053 Δ today 0.0173
873
GCoT
0.4621 ±0.0878
This paper
878
DGI/InfoGraph
0.4500 ±0.0919
This paper
884
ProG
0.4317 ±0.0849
This paper
#ModelAccuracy ↑Paper
1
LGTL
0.9518 ±0.0011
2
MixHop (LO)
0.9513 ±0.0038
3
GraphSAGE (LO)
0.9511 ±0.0036
18
GCN
actual #18 vs paper #871 853 places worse
0.9296 ±0.0015
best reported
actual #18 vs paper #871 853 places worse
paper 0.5218 ±0.0870
20
GAT
actual #20 vs paper #871 851 places worse
0.9233 ±0.0018
best reported
actual #20 vs paper #871 851 places worse
paper 0.5002 ±0.0888
116
SAGE
0.8881 ±0.0015
210
MLP
0.8690 ±0.0074
331
GraphCL
actual #331 vs paper #874 543 places worse
0.8196 ±0.0073
best reported
actual #331 vs paper #874 543 places worse
paper 0.4680 ±0.0904
paper 0.4680 ±0.0904 Δ at pub 0.3516
863
GCoT
0.6443 ±0.0996
This paper
865
GraphPrompt
0.6311 ±0.1001
This paper
866
ProG
0.6307 ±0.1196
This paper
870
GPF
actual #870 vs paper #870
0.5716 ±0.1099
actual #870 vs paper #870
paper 0.5716 ±0.1099

Improvement within reported uncertainty; not highlighted.

paper 0.5716 ±0.1099 Δ at pub 0.1496
873
DGI/InfoGraph
0.4746 ±0.1219
This paper

TU Dortmund

#ModelAccuracy ↑Paper
1
MSH-GNN
0.9410 ±0.0330
2
GRDL
0.8260 ±0.0120
3
GMN
0.8225
32
GIN
0.7880 ±0.0410
49
GAT
actual #49 vs paper #520 471 places worse
0.7800 ±0.0300
best reported
actual #49 vs paper #520 471 places worse
paper 0.4039 ±0.0004
148
GCN
actual #148 vs paper #520 372 places worse
0.7600 ±0.0320
best reported
actual #148 vs paper #520 372 places worse
paper 0.4028 ±0.0003
149
MLP
0.7600 ±0.0320
265
GraphCL
actual #265 vs paper #516 251 places worse
0.7489 ±0.0065
best reported
actual #265 vs paper #516 251 places worse
paper 0.5381 ±0.0897
paper 0.5381 ±0.0897 Δ at pub 0.2108
491
GPF
actual #491 vs paper #516 25 places worse
0.6391 ±0.0326
best reported
actual #491 vs paper #516 25 places worse
paper 0.5458 ±0.0870
best at pub: ProG: A Graph Prompt Learning Benchmark (NeurIPS 2024)

Difference within reported uncertainty; not counted as underperformance.

paper 0.5458 ±0.0870 Δ at pub 0.0933
516
GCoT
0.5624 ±0.0860
This paper
517
GraphPrompt
0.5380 ±0.0793
This paper
519
ProG
0.5273 ±0.0657
This paper
520
DGI/InfoGraph
0.5251 ±0.1029
This paper

Heterophilic Graphs

#ModelAccuracy ↑Paper
1
Hetero-S (GAT 8-layer)
0.8693
2
Dir-GNN+CNA
0.8586 ±0.0180
3
GAT
0.8560
52
GCN
0.7033
134
DGI
actual #134 vs paper #288 154 places worse
0.6027 ±0.0070
best reported
actual #134 vs paper #288 154 places worse
paper 0.1933 ±0.0457
paper 0.1933 ±0.0457 Δ at pub 0.4094 Δ today 0.4094
169
MLP
0.5429
276
GraphPrompt
actual #276 vs paper #284 8 places worse
0.2828 ±0.0438
best reported
actual #276 vs paper #284 8 places worse
paper 0.2536 ±0.0399

Difference within reported uncertainty; not counted as underperformance.

paper 0.2536 ±0.0399 Δ today 0.0292
277
GCoT
0.2796 ±0.0389
This paper
278
GraphCL
0.2716 ±0.0431
This paper
282
GPF
0.2612 ±0.0375
This paper
283
ProG
0.2590 ±0.0395
This paper
#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
63
GCN
0.8310 ±0.0320
186
DGI
actual #186 vs paper #225 39 places worse
0.5541
best reported
actual #186 vs paper #225 39 places worse
paper 0.2804 ±0.0647
221
GCoT
0.3280 ±0.1159
This paper
222
GPF
0.3218 ±0.1136
This paper
223
GraphPrompt
0.3148 ±0.0518
This paper
224
GraphCL
0.2985 ±0.0846
This paper
225
ProG
0.2899 ±0.1114
This paper

GNNBenchmark

#ModelAccuracy ↑Paper
1
GRPE-Small
0.8159 ±0.0019
2
TANGO-GPS
0.8011 ±0.0014
3
GRIT
0.8003 ±0.0028
54
GatedGCN
0.7608 ±0.0020
70
GCN
0.6903 ±0.0137
106
GCoT
0.2754
This paper
109
GPF
0.2427
This paper
110
GraphCL
0.2382
This paper
111
GraphPrompt
0.2218
This paper
113
DGI
0.2127
This paper
114
MLP
0.2097 ±0.0000
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)