[Paper Review] Graph Masked Autoencoders with Transformers
This paper proposes Graph Masked Autoencoders (GMAE), a self-supervised transformer-based model that uses a masking mechanism and asymmetric encoder-decoder architecture to learn graph representations efficiently. By masking up to 70% of nodes and reconstructing their features, GMAE achieves state-of-the-art performance on graph and node classification tasks while reducing memory consumption by up to 20% compared to conventional transformers, enabling training on larger graphs and deeper models.
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.
Motivation & Objective
- To address the challenges of training deep transformers on graphs, including high memory consumption and difficulty in training from scratch.
- To improve global information capture in graph representation learning beyond the limitations of GCNs, which suffer from over-smoothing in deeper architectures.
- To develop a self-supervised pre-training framework that simplifies downstream fine-tuning while maintaining performance comparable to end-to-end training.
- To reduce the quadratic memory complexity of transformers in graph settings through node masking and asymmetric design.
- To enable effective pre-training for graph transformers that generalizes well across diverse graph benchmark datasets.
Proposed method
- GMAE employs a masked autoencoding objective where a large portion of nodes (up to 70%) are masked, and the model reconstructs the original features of the masked nodes.
- The model uses an asymmetric architecture: a deep 12-layer transformer encoder processes the masked graph, while a shallow 2-layer transformer decoder reconstructs the masked node features.
- The masking mechanism reduces the effective number of nodes in the self-attention computation, lowering memory usage from O(n²) to O(0.49n²) with a 70% mask ratio.
- Self-supervised pre-training on graph data enables transfer learning, allowing fine-tuning with higher learning rates and fewer epochs on downstream tasks.
- The model is trained using a reconstruction loss over masked node features, optimizing for both node-level and graph-level representation quality.
- Hyperparameters such as mask ratio and decoder depth are tuned empirically to balance performance and efficiency.
Experimental results
Research questions
- RQ1Can a masked autoencoding approach with asymmetric transformers reduce memory consumption in graph representation learning without sacrificing performance?
- RQ2How does the mask ratio affect the downstream performance of the GMAE model across diverse graph datasets?
- RQ3Does using a shallow decoder with a deep encoder improve performance and training efficiency compared to symmetric transformers?
- RQ4Can GMAE pre-training achieve performance comparable to end-to-end training while simplifying the training process?
- RQ5How does GMAE compare to state-of-the-art models like Graphormer in terms of accuracy and memory efficiency?
Key findings
- GMAE achieves state-of-the-art performance on 7 benchmark graph datasets (PROTEINS, BZR, COX2, ER_MD, NCI1, MUTAG, DHFR) in both graph and node classification under standard self-supervised evaluation protocols.
- With a 70% mask ratio, GMAE reduces memory consumption by approximately 20% compared to conventional transformers, despite theoretical savings of up to 50% in self-attention computation.
- The model performs best with mask ratios around 0.4 or 0.7, indicating robustness when half the nodes are masked, which significantly reduces computational load.
- A shallow decoder with 1–2 layers outperforms deeper decoders, validating the effectiveness of the asymmetric encoder-decoder design for efficiency and performance.
- Pre-training with GMAE enables fine-tuning with higher learning rates and fewer epochs, achieving performance comparable to end-to-end training while simplifying the training pipeline.
- GMAE outperforms Graphormer in some benchmarks without requiring a highly tailored training scheme, demonstrating strong generalization and ease of use.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.