NTFormer: A Composite Node Tokenized Graph Transformer for Node Classification

Jinsong Chen, Siyu Jiang, Kun He

Main figure for NTFormer: A Composite Node Tokenized Graph Transformer for Node Classification

Abstract

Recently, the emerging graph Transformers have made significant advancements for node classification on graphs. In most graph Transformers, a crucial step involves transforming the input graph into token sequences as the model input, enabling Transformer to effectively learn the node representations. However, we observe that existing methods only express partial graph information of nodes through single-type token generation. Consequently, they require tailored strategies to encode additional graph-specific features into the Transformer to ensure the quality of node representation learning, limiting the model flexibility to handle diverse graphs. To this end, we propose a new graph Transformer called NTFormer to address this issue. NTFormer introduces a novel token generator called Node2Par, which constructs various token sequences using different token elements for each node. This flexibility allows Node2Par to generate valuable token sequences from different perspectives, ensuring comprehensive expression of rich graph features. Benefiting from the merits of Node2Par, NTFormer only leverages a Transformer-based backbone without graph-specific modifications to learn node representations, eliminating the need for graph-specific modifications. Extensive experiments conducted on various benchmark datasets containing homophily and heterophily graphs with different scales demonstrate the superiority of NTFormer over representative graph Transformers and graph neural networks for node classification.

Proposed method: NTFormer

Benchmark Results

Tested on 7 datasets 16 baseline values reported too low Non-standard metric on 1 dataset

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

Classic

#ModelAccuracy ↑Paper
1
CNA
0.9575 ±0.0058
2
IS-GIB
0.9390 ±0.0187
3
EERM
0.9112 ±0.0145
18
NTFormer
0.8161 ±0.0075
This paper
20
APPNP
actual #20 vs paper #32 12 places worse
0.8142 ±0.0026
best reported
actual #20 vs paper #32 12 places worse
paper 0.8093 ±0.0048

Difference within reported uncertainty; not counted as underperformance.

paper 0.8093 ±0.0048 Δ at pub 0.0049
31
STAGNN
0.8105 ±0.0082
This paper
32
GPRGNN
actual #32 vs paper #32
0.8102 ±0.0071
actual #32 vs paper #32
paper 0.8102 ±0.0071
paper 0.8102 ±0.0071 Δ at pub 0.0245
40
NAGphormer
0.8057 ±0.0072
This paper
44
GCN
actual #44 vs paper #44
0.8033 ±0.0088
actual #44 vs paper #44
paper 0.8033 ±0.0088

Improvement within reported uncertainty; not highlighted.

paper 0.8033 ±0.0088 Δ at pub 0.0090
57
Specformer
0.7938 ±0.0096
This paper
60
FAGCN
0.7928 ±0.0170
This paper
61
GraphSAGE
0.7923 ±0.0053
76
NodeFormer
actual #76 vs paper #76
0.7856 ±0.0009
actual #76 vs paper #76
paper 0.7856 ±0.0009
paper 0.7856 ±0.0009 Δ at pub 0.0282
89
SGFormer
0.7798 ±0.0091
This paper
96
SGC
actual #96 vs paper #215 119 places worse
0.7765 ±0.0012
best reported
actual #96 vs paper #215 119 places worse
paper 0.7422 ±0.0019
101
ANS-GT
actual #101 vs paper #101
0.7760 ±0.0051
actual #101 vs paper #101
paper 0.7760 ±0.0051
paper 0.7760 ±0.0051 Δ at pub 0.1308
350
MLP
0.7289 ±0.0010
#ModelAccuracy ↑Paper
1
LGTL
0.9518 ±0.0011
2
MixHop (LO)
0.9513 ±0.0038
3
GraphSAGE (LO)
0.9511 ±0.0036
7
NodeFormer
actual #7 vs paper #147 140 places worse
0.8827 ±0.0004
actual #7 vs paper #147 140 places worse
paper 0.8827 ±0.0004
17
APPNP
actual #17 vs paper #125 108 places worse
0.9355 ±0.0060
best reported
actual #17 vs paper #125 108 places worse
paper 0.8860 ±0.0006
paper 0.8860 ±0.0006 Δ at pub 0.0495
18
GCN
actual #18 vs paper #220 202 places worse
0.9296 ±0.0015
best reported
actual #18 vs paper #220 202 places worse
paper 0.8669 ±0.0017
56
SGFormer
actual #56 vs paper #96 40 places worse
0.9037 ±0.0020
best reported
actual #56 vs paper #96 40 places worse
paper 0.8922 ±0.0024
64
STAGNN
0.9018 ±0.0026
This paper
73
FAGCN
actual #73 vs paper #147 74 places worse
0.8998 ±0.0054
best reported
actual #73 vs paper #147 74 places worse
paper 0.8828 ±0.0016
best at pub: Language is All a Graph Needs (2023)
paper 0.8828 ±0.0016 Δ at pub 0.0170
79
NTFormer
0.8978 ±0.0021
This paper
89
Specformer
actual #89 vs paper #89
0.8947 ±0.0048
actual #89 vs paper #89
paper 0.8947 ±0.0048
91
NAGphormer
0.8939 ±0.0013
This paper
100
ANS-GT
actual #100 vs paper #100
0.8914 ±0.0026
actual #100 vs paper #100
paper 0.8914 ±0.0026
paper 0.8914 ±0.0026 Δ at pub 0.1134
101
GPRGNN
actual #101 vs paper #163 62 places worse
0.8911 ±0.0008
best reported
actual #101 vs paper #163 62 places worse
paper 0.8782 ±0.0025
paper 0.8782 ±0.0025 Δ at pub 0.0129
116
SAGE
0.8881 ±0.0015
141
SGC
actual #141 vs paper #504 363 places worse
0.8832 ±0.0055
best reported
actual #141 vs paper #504 363 places worse
paper 0.7951 ±0.0004
paper 0.7951 ±0.0004 Δ at pub 0.0881
210
MLP
0.8690 ±0.0074
#ModelAccuracy ↑Paper
1
GraphTARIF
0.9703 ±0.0019
2
GAT
0.9669 ±0.0014
3
GAT+T
0.9660 ±0.0007
7
SAGE
0.9643 ±0.0027
8
GCN
actual #8 vs paper #71 63 places worse
0.9632 ±0.0008
best reported
actual #8 vs paper #71 63 places worse
paper 0.9467 ±0.0022
10
NTFormer
0.9617 ±0.0029
This paper
11
NAGphormer
actual #11 vs paper #15 4 places worse
0.9594 ±0.0045
actual #11 vs paper #15 4 places worse
paper 0.9594 ±0.0045

Improvement within reported uncertainty; not highlighted.

paper 0.9594 ±0.0045 Δ at pub 0.0045
18
Specformer
actual #18 vs paper #18
0.9580 ±0.0026
actual #18 vs paper #18
paper 0.9580 ±0.0026
paper 0.9580 ±0.0026 Δ at pub 0.0129
21
APPNP
actual #21 vs paper #21
0.9573 ±0.0012
actual #21 vs paper #21
paper 0.9573 ±0.0012
paper 0.9573 ±0.0012 Δ at pub 0.0141
29
SGFormer
actual #29 vs paper #202 173 places worse
0.9558 ±0.0036
best reported
actual #29 vs paper #202 173 places worse
paper 0.9313 ±0.0087
33
GPRGNN
actual #33 vs paper #47 14 places worse
0.9549 ±0.0014
best reported
actual #33 vs paper #47 14 places worse
paper 0.9522 ±0.0035

Difference within reported uncertainty; not counted as underperformance.

paper 0.9522 ±0.0035 Δ at pub 0.0027
44
NodeFormer
actual #44 vs paper #86 42 places worse
0.9527 ±0.0022
best reported
actual #44 vs paper #86 42 places worse
paper 0.9430 ±0.0055
paper 0.9430 ±0.0055 Δ at pub 0.0097 Δ today 0.0097
50
SGC
actual #50 vs paper #164 114 places worse
0.9511 ±0.0009
best reported
actual #50 vs paper #164 114 places worse
paper 0.9340 ±0.0023
paper 0.9340 ±0.0023 Δ at pub 0.0171
60
ANS-GT
actual #60 vs paper #60
0.9498 ±0.0043
actual #60 vs paper #60
paper 0.9498 ±0.0043
paper 0.9498 ±0.0043 Δ at pub 0.1457
66
FAGCN
actual #66 vs paper #74 8 places worse
0.9489 ±0.0048
best reported
actual #66 vs paper #74 8 places worse
paper 0.9451 ±0.0044

Difference within reported uncertainty; not counted as underperformance.

paper 0.9451 ±0.0044 Δ at pub 0.0038
78
STAGNN
0.9447 ±0.0073
This paper
390
MLP
0.9128 ±0.0063
#ModelAccuracy ↑Paper
1
GraphTARIF
0.9461 ±0.0017
2
GCN
actual #2 vs paper #132 130 places worse
0.9412 ±0.0008
best reported
actual #2 vs paper #132 130 places worse
paper 0.8959 ±0.0007
paper 0.8959 ±0.0007 Δ at pub 0.0013 Δ today 0.0453
3
GAT
0.9398 ±0.0022
8
SAGE
0.9351 ±0.0006
18
SGFormer
actual #18 vs paper #329 311 places worse
0.9242 ±0.0066
best reported
actual #18 vs paper #329 311 places worse
paper 0.8440 ±0.0082
39
NTFormer
0.9169 ±0.0032
This paper
38
NAGphormer
actual #38 vs paper #46 8 places worse
0.9169 ±0.0030
best reported
actual #38 vs paper #46 8 places worse
paper 0.9118 ±0.0036

Difference within reported uncertainty; not counted as underperformance.

paper 0.9118 ±0.0036 Δ at pub 0.0004 Δ today 0.0051
48
NodeFormer
actual #48 vs paper #204 156 places worse
0.9112 ±0.0043
best reported
actual #48 vs paper #204 156 places worse
paper 0.8811 ±0.0029
paper 0.8811 ±0.0029 Δ at pub 0.0301
49
Specformer
actual #49 vs paper #49
0.9109 ±0.0027
actual #49 vs paper #49
paper 0.9109 ±0.0027

Improvement within reported uncertainty; not highlighted.

paper 0.9109 ±0.0027 Δ at pub 0.0007
58
APPNP
actual #58 vs paper #58
0.9093 ±0.0018
actual #58 vs paper #58
paper 0.9093 ±0.0018
paper 0.9093 ±0.0018 Δ at pub 0.0075
72
GPRGNN
actual #72 vs paper #72
0.9050 ±0.0091
actual #72 vs paper #72
paper 0.9050 ±0.0091

Improvement within reported uncertainty; not highlighted.

paper 0.9050 ±0.0091 Δ at pub 0.0118
82
SGC
actual #82 vs paper #153 71 places worse
0.9022 ±0.0021
best reported
actual #82 vs paper #153 71 places worse
paper 0.8909 ±0.0010
paper 0.8909 ±0.0010 Δ at pub 0.0113
87
ANS-GT
0.9017 ±0.0044
This paper
126
FAGCN
actual #126 vs paper #387 261 places worse
0.8968 ±0.0097
best reported
actual #126 vs paper #387 261 places worse
paper 0.8277 ±0.0119
paper 0.8277 ±0.0119 Δ at pub 0.0691
193
STAGNN
0.8837 ±0.0178
This paper
320
MLP
0.8463

Reddit

Global leaderboard →
Non-default metric. This paper reports Accuracy; the dataset default is F1. Values below use Accuracy only.

Sorted by Accuracy. Highlighted rows are from other papers.

#ModelAccuracy ↑Paper
1
GAP-EDP
0.9870 ±0.0003
2
NE-ASGCN
0.9758 ±0.0027
3
HSGT
0.9730 ±0.0024
21
GraphSAGE
0.9653 ±0.0011
56
ANS-GT
actual #56 vs paper #91 35 places worse
0.9530 ±0.0081
best reported
actual #56 vs paper #91 35 places worse
paper 0.9327 ±0.0022
paper 0.9327 ±0.0022 Δ at pub 0.0203
83
NTFormer
0.9375 ±0.0026
This paper
84
NAGphormer
actual #84 vs paper #87 3 places worse
0.9374 ±0.0006
best reported
actual #84 vs paper #87 3 places worse
paper 0.9358 ±0.0005
126
SGFormer
0.8963 ±0.0026
This paper
132
NodeFormer
0.8897 ±0.0032
This paper
147
MLP
0.8240 ±0.0010

Heterophily Benchmark

#ModelAccuracy ↑Paper
1
Dir-Poly
0.9451 ±0.0022
2
D-CDE
0.9387 ±0.0041
3
LargeScaleNet
0.9358 ±0.0024
26
GraphSAGE
0.9106 ±0.0027
77
GCN
actual #77 vs paper #163 86 places worse
0.8272 ±0.0082
best reported
actual #77 vs paper #163 86 places worse
paper 0.6082 ±0.0014
paper 0.6082 ±0.0014 Δ at pub 0.1287 Δ today 0.2190
90
SGFormer
actual #90 vs paper #141 51 places worse
0.8001 ±0.0044
best reported
actual #90 vs paper #141 51 places worse
paper 0.6539 ±0.0078
100
NTFormer
0.7839 ±0.0111
This paper
106
STAGNN
0.7671 ±0.0033
This paper
108
FAGCN
actual #108 vs paper #108
0.7571 ±0.0139
actual #108 vs paper #108
paper 0.7571 ±0.0139
paper 0.7571 ±0.0139 Δ at pub 0.0518
109
NodeFormer
actual #109 vs paper #171 62 places worse
0.7483 ±0.0081
best reported
actual #109 vs paper #171 62 places worse
paper 0.5837 ±0.0119
112
NAGphormer
actual #112 vs paper #112
0.7434 ±0.0077
best reported
actual #112 vs paper #112
paper 0.7432 ±0.0065

Difference within reported uncertainty; not counted as underperformance.

paper 0.7432 ±0.0065 Δ at pub 0.0002 Δ today 0.0002
125
ANS-GT
0.6964 ±0.0116
This paper
133
GPRGNN
0.6704 ±0.0092
This paper
135
MLP
0.6665 ±0.0047
159
Specformer
0.6273 ±0.0196
This paper
188
APPNP
0.5184 ±0.0018
This paper
200
SGC
0.4033 ±0.0034
This paper

Other Graph Benchmarks

#ModelAccuracy ↑Paper
1
MA-GCL
0.8883 ±0.0030
2
CCA-SSG
0.8842 ±0.0030
3
ARIEL
0.8827 ±0.0020
10
GCN
0.8651 ±0.0050
16
NTFormer
0.7803 ±0.0044
This paper
17
NAGphormer
actual #17 vs paper #17
0.7798 ±0.0016
best reported
actual #17 vs paper #17
paper 0.7743 ±0.0024
19
ANS-GT
0.7632 ±0.0038
This paper
22
SGFormer
0.7422 ±0.0036
This paper
24
NodeFormer
0.7156 ±0.0042
This paper
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 Improved at pub — later paper surpassed this result Best today — OK at publication; today's leaderboard best is elsewhere