Graph Masked Autoencoders with Transformers

Sixiao Zhang, Hongxu Chen, Haoran Yang, Xiangguo Sun, Philip S. Yu, Guandong Xu

Main figure for Graph Masked Autoencoders with Transformers

Abstract

Recently, transformers have shown promising performance in learning graph representations. However, there are still some challenges when applying transformers to real-world scenarios due to the fact that deep transformers are hard to train from scratch and the quadratic memory consumption w.r.t. the number of nodes. In this paper, we propose Graph Masked Autoencoders (GMAEs), a self-supervised transformer-based model for learning graph representations. To address the above two challenges, we adopt the masking mechanism and the asymmetric encoder-decoder design. Specifically, GMAE takes partially masked graphs as input, and reconstructs the features of the masked nodes. The encoder and decoder are asymmetric, where the encoder is a deep transformer and the decoder is a shallow transformer. The masking mechanism and the asymmetric design make GMAE a memory-efficient model compared with conventional transformers. We show that, when serving as a conventional self-supervised graph representation model, GMAE achieves state-of-the-art performance on both the graph classification task and the node classification task under common downstream evaluation protocols. We also show that, compared with training in an end-to-end manner from scratch, we can achieve comparable performance after pre-training and fine-tuning using GMAE while simplifying the training process.

Proposed method: GMAE

Benchmark Results

Tested on 8 datasets 8 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
156
MVGRL
actual #156 vs paper #616 460 places worse
0.8680 ±0.0050
best reported
actual #156 vs paper #616 460 places worse
paper 0.8086 ±0.0025
paper 0.8086 ±0.0025 Δ at pub 0.0264 Δ today 0.0594
177
DGI
actual #177 vs paper #631 454 places worse
0.8630 ±0.0020
best reported
actual #177 vs paper #631 454 places worse
paper 0.8052 ±0.0015
paper 0.8052 ±0.0015 Δ at pub 0.0178 Δ today 0.0578
415
GCA
actual #415 vs paper #710 295 places worse
0.7822 ±0.0058
actual #415 vs paper #710 295 places worse
paper 0.7822 ±0.0058
prev best: Contrastive Laplacian Eigenmaps (NeurIPS 2022)

Improvement within reported uncertainty; not highlighted.

paper 0.7822 ±0.0058 Δ at pub 0.0242 Δ today 0.0488
598
GMAE
0.8114 ±0.0072
This paper
654
GAE
0.8011 ±0.0022
This paper
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
44
GCN
0.8033 ±0.0088
66
DGI
actual #66 vs paper #519 453 places worse
0.7890 ±0.0020
best reported
actual #66 vs paper #519 453 places worse
paper 0.7140 ±0.0015
paper 0.7140 ±0.0015 Δ at pub 0.0040 Δ today 0.0750
87
MVGRL
actual #87 vs paper #326 239 places worse
0.7300
actual #87 vs paper #326 239 places worse
paper 0.7300

Improvement within reported uncertainty; not highlighted.

paper 0.7300 Δ at pub 0.0040 Δ today 0.0508
350
MLP
0.7289 ±0.0010
505
GCA
actual #505 vs paper #701 196 places worse
0.6752 ±0.0130
actual #505 vs paper #701 196 places worse
paper 0.6752 ±0.0130
prev best: Contrastive Laplacian Eigenmaps (NeurIPS 2022)
paper 0.6752 ±0.0130 Δ at pub 0.1182 Δ today 0.0398
644
GMAE
0.6925 ±0.0153
This paper
739
GAE
actual #739 vs paper #759 20 places worse
0.6639 ±0.0024
best reported
actual #739 vs paper #759 20 places worse
paper 0.6575 ±0.0030
paper 0.6575 ±0.0030 Δ today 0.0064
#ModelAccuracy ↑Paper
1
LGTL
0.9518 ±0.0011
2
MixHop (LO)
0.9513 ±0.0038
3
GraphSAGE (LO)
0.9511 ±0.0036
18
GCN
0.9296 ±0.0015
196
MVGRL
actual #196 vs paper #484 288 places worse
0.8725 ±0.0012
best reported
actual #196 vs paper #484 288 places worse
paper 0.7965 ±0.0010
paper 0.7965 ±0.0010 Δ at pub 0.0015 Δ today 0.0760
204
DGI
actual #204 vs paper #753 549 places worse
0.8708 ±0.0017
best reported
actual #204 vs paper #753 549 places worse
paper 0.7666 ±0.0018
210
MLP
0.8690 ±0.0074
255
GCA
actual #255 vs paper #358 103 places worse
0.8512 ±0.0023
best reported
actual #255 vs paper #358 103 places worse
paper 0.8128 ±0.0085
paper 0.8128 ±0.0085 Δ today 0.0384
304
GAE
actual #304 vs paper #711 407 places worse
0.8294 ±0.0031
best reported
actual #304 vs paper #711 407 places worse
paper 0.7750 ±0.0015
paper 0.7750 ±0.0015 Δ today 0.0544
349
GMAE
0.8140 ±0.0081
This paper
#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
138
GMAE
0.9359 ±0.0030
This paper
191
GCA
actual #191 vs paper #313 122 places worse
0.9320 ±0.0060
best reported
actual #191 vs paper #313 122 places worse
paper 0.9228 ±0.0041
paper 0.9228 ±0.0041 Δ at pub 0.0085 Δ today 0.0092
206
MVGRL
actual #206 vs paper #359 153 places worse
0.9310 ±0.0040
best reported
actual #206 vs paper #359 153 places worse
paper 0.9174 ±0.0007
213
DGI
actual #213 vs paper #366 153 places worse
0.9309 ±0.0008
best reported
actual #213 vs paper #366 153 places worse
paper 0.9161 ±0.0022
352
GAE
actual #352 vs paper #352
0.9185 ±0.0006
actual #352 vs paper #352
paper 0.9185 ±0.0006
paper 0.9185 ±0.0006 Δ at pub 0.0017
390
MLP
0.9128 ±0.0063
#ModelAccuracy ↑Paper
1
GraphTARIF
0.9461 ±0.0017
2
GCN
0.9412 ±0.0008
3
GAT
0.9398 ±0.0022
8
SAGE
0.9351 ±0.0006
160
GCA
actual #160 vs paper #242 82 places worse
0.8894 ±0.0015
best reported
actual #160 vs paper #242 82 places worse
paper 0.8735 ±0.0035
paper 0.8735 ±0.0035 Δ at pub 0.0159 Δ today 0.0159
179
MVGRL
actual #179 vs paper #240 61 places worse
0.8861 ±0.0064
best reported
actual #179 vs paper #240 61 places worse
paper 0.8739 ±0.0011
210
DGI
actual #210 vs paper #354 144 places worse
0.8798 ±0.0081
best reported
actual #210 vs paper #354 144 places worse
paper 0.8395 ±0.0047
paper 0.8395 ±0.0047 Δ at pub 0.0005 Δ today 0.0403
238
GMAE
0.8746 ±0.0022
This paper
264
GAE
actual #264 vs paper #264
0.8666 ±0.0007
actual #264 vs paper #264
paper 0.8666 ±0.0007

Improvement within reported uncertainty; not highlighted.

paper 0.8666 ±0.0007 Δ at pub 0.0139
320
MLP
0.8463

TU Dortmund

#ModelAccuracy ↑Paper
1
MSH-GNN
0.9910 ±0.0030
2
ID-GNN+BEC
0.9830 ±0.0360
3
SupCosine
0.9830 ±0.0250
39
GIN
0.9330 ±0.0290
257
InfoGraph
actual #257 vs paper #421 164 places worse
0.8930 ±0.0514
best reported
actual #257 vs paper #421 164 places worse
paper 0.8607 ±0.0178
best at pub: Graph Contrastive Learning Automated (ICML 2021)
paper 0.8607 ±0.0178 Δ at pub 0.0294 Δ today 0.0323
279
GMAE
0.8897 ±0.0083
This paper
354
GraphCL
actual #354 vs paper #354
0.8766 ±0.0103
actual #354 vs paper #354
paper 0.8766 ±0.0103

Improvement within reported uncertainty; not highlighted.

paper 0.8766 ±0.0103 Δ at pub 0.0086
379
Graphormer-SAGE
0.8721 ±0.0056
This paper
403
MLP
0.8660 ±0.0495
407
graph2vec
actual #407 vs paper #407
0.8644 ±0.0125
actual #407 vs paper #407
paper 0.8644 ±0.0125
paper 0.8644 ±0.0125 Δ at pub 0.0276
472
Sub2Vec
actual #472 vs paper #472
0.8447 ±0.0037
actual #472 vs paper #472
paper 0.8447 ±0.0037

Improvement within reported uncertainty; not highlighted.

paper 0.8447 ±0.0037 Δ at pub 0.2287
773
GCN-SAGE
0.6649 ±0.0033
This paper
#ModelAccuracy ↑Paper
1
WL-MLP
0.9954
2
GIN
0.9934
3
GCN
0.9727
102
GMAE
0.8251 ±0.0031
This paper
104
GraphCL
actual #104 vs paper #276 172 places worse
0.7875 ±0.0028
actual #104 vs paper #276 172 places worse
paper 0.7875 ±0.0028

Improvement within reported uncertainty; not highlighted.

paper 0.7875 ±0.0028 Δ at pub 0.0059 Δ today 0.0375
131
GraphSAGE
0.8200 ±0.0100
338
InfoGraph
actual #338 vs paper #338
0.7750 ±0.0074
actual #338 vs paper #338
paper 0.7750 ±0.0074

Improvement within reported uncertainty; not highlighted.

paper 0.7750 ±0.0074 Δ at pub 0.0086
406
graph2vec
actual #406 vs paper #489 83 places worse
0.7540 ±0.0120
best reported
actual #406 vs paper #489 83 places worse
paper 0.6966 ±0.0026
paper 0.6966 ±0.0026 Δ at pub 0.0574
491
Graphormer-SAGE
0.6940 ±0.0042
This paper
557
Sub2Vec
actual #557 vs paper #557
0.5976 ±0.0035
actual #557 vs paper #557
paper 0.5976 ±0.0035
paper 0.5976 ±0.0035 Δ at pub 0.0692
581
GCN-SAGE
0.5005
This paper
#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
149
MLP
0.7600 ±0.0320
208
GMAE
0.7538 ±0.0085
This paper
265
GraphCL
actual #265 vs paper #265
0.7489 ±0.0065
actual #265 vs paper #265
paper 0.7489 ±0.0065

Improvement within reported uncertainty; not highlighted.

paper 0.7489 ±0.0065 Δ at pub 0.0050
294
InfoGraph
actual #294 vs paper #309 15 places worse
0.7444 ±0.0040
best reported
actual #294 vs paper #309 15 places worse
paper 0.7402 ±0.0040

Difference within reported uncertainty; not counted as underperformance.

paper 0.7402 ±0.0040 Δ at pub 0.0042 Δ today 0.0042
350
graph2vec
actual #350 vs paper #473 123 places worse
0.7330 ±0.0205
best reported
actual #350 vs paper #473 123 places worse
paper 0.6731 ±0.0041
paper 0.6731 ±0.0041 Δ at pub 0.0599 Δ today 0.0599
404
Graphormer-SAGE
0.7213 ±0.0055
This paper
474
Sub2Vec
0.6731 ±0.0050
This paper
512
GCN-SAGE
0.5957
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