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.
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
| # | Model | Accuracy ↑ | 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 | 0.8680
±0.0050 best reported | best at pub: SAIL: Self-Augmented Graph Contrastive Learning (AAAI 2020) best today: Adaptive Negative Scheduling for Graph Contrastive Learning (2026) |
| 177 | DGI | 0.8630
±0.0020 best reported | best at pub: Deep Learning on Graphs: A Survey (2018) best today: Oversmoothing: A Nightmare for Graph Contrastive Learning? (2023) |
| 415 | GCA | 0.7822
±0.0058 | prev best: Contrastive Laplacian Eigenmaps (NeurIPS 2022) best today: Graph Contrastive Learning with Implicit Augmentations (2022) Improvement within reported uncertainty; not highlighted. |
| 598 | GMAE | 0.8114
±0.0072 | This paper |
| 654 | GAE | 0.8011
±0.0022 | This paper |
| 724 | MLP | 0.7768 |
| # | Model | Accuracy ↑ | 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 | 0.7890
±0.0020 best reported | best at pub: Deep Learning on Graphs: A Survey (2018) best today: Oversmoothing: A Nightmare for Graph Contrastive Learning? (2023) |
| 87 | MVGRL | 0.7300 | prev best: Contrastive and Generative Graph Convolutional Networks for Graph-based Semi-Supervised Learning (AAAI 2020) best today: Node Representation Learning in Graph via Node-to-Neighbourhood Mutual Information Maximization (2022) Improvement within reported uncertainty; not highlighted. |
| 350 | MLP | 0.7289
±0.0010 | |
| 505 | GCA | 0.6752
±0.0130 | prev best: Contrastive Laplacian Eigenmaps (NeurIPS 2022) |
| 644 | GMAE | 0.6925
±0.0153 | This paper |
| 739 | GAE | 0.6639
±0.0024 best reported | best today: Decoupled Self-supervised Learning for Non-Homophilou Graphs (2022) |
| # | Model | Accuracy ↑ | 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 | 0.8725
±0.0012 best reported | best at pub: SAIL: Self-Augmented Graph Contrastive Learning (AAAI 2020) |
| 204 | DGI | 0.8708
±0.0017 best reported | |
| 210 | MLP | 0.8690
±0.0074 | |
| 255 | GCA | 0.8512
±0.0023 best reported | |
| 304 | GAE | 0.8294
±0.0031 best reported | |
| 349 | GMAE | 0.8140
±0.0081 | This paper |
| # | Model | Accuracy ↑ | 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 | 0.9320
±0.0060 best reported | best at pub: Calibrating and Improving Graph Contrastive Learning (TMLR 2021) best today: Decoupling Weighing and Selecting for Integrating Multiple Graph Pre-training Tasks (ICLR 2024) |
| 206 | MVGRL | 0.9310
±0.0040 best reported | best at pub: Graph Contrastive Learning with Adaptive Augmentation (WWW 2020) best today: Decoupling Weighing and Selecting for Integrating Multiple Graph Pre-training Tasks (ICLR 2024) |
| 213 | DGI | 0.9309
±0.0008 best reported | best at pub: Graph Contrastive Learning with Adaptive Augmentation (WWW 2020) |
| 352 | GAE | 0.9185
±0.0006 | prev best: Barlow Graph Auto-Encoder for Unsupervised Network Embedding (2021) |
| 390 | MLP | 0.9128
±0.0063 |
| # | Model | Accuracy ↑ | 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 | 0.8894
±0.0015 best reported | best at pub: Barlow Graph Auto-Encoder for Unsupervised Network Embedding (2021) best today: Adaptive Negative Scheduling for Graph Contrastive Learning (2026) |
| 179 | MVGRL | 0.8861
±0.0064 best reported | best at pub: Graph Contrastive Learning with Adaptive Augmentation (WWW 2020) |
| 210 | DGI | 0.8798
±0.0081 best reported | best at pub: Graph Representation Learning via Aggregation Enhancement (2022) best today: Bootstrap Latents of Nodes and Neighbors for Graph Self-Supervised Learning (2024) |
| 238 | GMAE | 0.8746
±0.0022 | This paper |
| 264 | GAE | 0.8666
±0.0007 | prev best: Graph Contrastive Learning with Adaptive Augmentation (WWW 2020) Improvement within reported uncertainty; not highlighted. |
| 320 | MLP | 0.8463 |
TU Dortmund
| # | Model | Accuracy ↑ | 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 | 0.8930
±0.0514 best reported | best at pub: Graph Contrastive Learning Automated (ICML 2021) best today: Improving Expressivity of GNNs with Subgraph-specific Factor Embedded Normalization (KDD 2023) |
| 279 | GMAE | 0.8897
±0.0083 | This paper |
| 354 | GraphCL | 0.8766
±0.0103 | prev best: Graph Contrastive Learning Automated (ICML 2021) Improvement within reported uncertainty; not highlighted. |
| 379 | Graphormer-SAGE | 0.8721
±0.0056 | This paper |
| 403 | MLP | 0.8660
±0.0495 | |
| 407 | graph2vec | 0.8644
±0.0125 | prev best: CogDL: A Comprehensive Library for Graph Deep Learning (WWW 2021) |
| 472 | Sub2Vec | 0.8447
±0.0037 | prev best: Learning Graph Representation by Aggregating Subgraphs via Mutual Information Maximization (2021) Improvement within reported uncertainty; not highlighted. |
| 773 | GCN-SAGE | 0.6649
±0.0033 | This paper |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | WL-MLP | 0.9954 | |
| 2 | GIN | 0.9934 | |
| 3 | GCN | 0.9727 | |
| 102 | GMAE | 0.8251
±0.0031 | This paper |
| 104 | GraphCL | 0.7875
±0.0028 | prev best: Augmentations in Graph Contrastive Learning: Current Methodological Flaws & Towards Better Practices (WWW 2021) best today: Label-invariant Augmentation for Semi-Supervised Graph Classification (NeurIPS 2022) Improvement within reported uncertainty; not highlighted. |
| 131 | GraphSAGE | 0.8200
±0.0100 | |
| 338 | InfoGraph | 0.7750
±0.0074 | prev best: CogDL: A Comprehensive Library for Graph Deep Learning (WWW 2021) Improvement within reported uncertainty; not highlighted. |
| 406 | graph2vec | 0.7540
±0.0120 best reported | best at pub: InfoGCL: Information-Aware Graph Contrastive Learning (NeurIPS 2021) |
| 491 | Graphormer-SAGE | 0.6940
±0.0042 | This paper |
| 557 | Sub2Vec | 0.5976
±0.0035 | prev best: Graph Contrastive Learning Automated (ICML 2021) |
| 581 | GCN-SAGE | 0.5005 | This paper |
| # | Model | Accuracy ↑ | 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 | 0.7489
±0.0065 | prev best: Adversarial Graph Augmentation to Improve Graph Contrastive Learning (NeurIPS 2021) Improvement within reported uncertainty; not highlighted. |
| 294 | InfoGraph | 0.7444
±0.0040 best reported | best at pub: Adversarial Graph Augmentation to Improve Graph Contrastive Learning (NeurIPS 2021) best today: Adaptive Multi-view Graph Contrastive Learning via Fractional-order Neural Diffusion Networks (2025) Difference within reported uncertainty; not counted as underperformance. |
| 350 | graph2vec | 0.7330
±0.0205 best reported | best at pub: graph2vec: Learning Distributed Representations of Graphs (2017) best today: Model-Driven Graph Contrastive Learning (2025) |
| 404 | Graphormer-SAGE | 0.7213
±0.0055 | This paper |
| 474 | Sub2Vec | 0.6731
±0.0050 | This paper |
| 512 | GCN-SAGE | 0.5957 | This paper |
