Rethinking Graph Masked Autoencoders through Alignment and Uniformity

Liang Wang 0001, Xiang Tao, Qiang Liu, Shu Wu, Liang Wang 0056

Abstract

Graph self-supervised learning has traditionally been divided into generative (e.g., GraphMAE) and contrastive (e.g., GCL) paradigms. This work bridges these approaches by proving that GraphMAE’s reconstruction objective implicitly performs contrastive alignment. Building on this insight, we propose AUG-MAE, which incorporates adversarial "easy-to-hard" masking and an explicit uniformity regularizer. AUG-MAE achieves state-of-the-art performance across 15 benchmarks by addressing representation collapse and enhancing feature robustness.

Introduction

In graph self-supervised learning (SSL), two main philosophies dominate. Contrastive Learning (GCL) focuses on maximizing similarity between augmented views of the same graph, guided by the principles of alignment (keeping similar samples close) and uniformity (spreading representations out to avoid collapse). Conversely, Generative Learning (GraphMAE) utilizes a masking-and-reconstruction task. While GraphMAE has shown strong empirical results, the theoretical justification for its success and its relationship to contrastive methods have remained unclear.

This paper identifies two primary limitations in existing generative models:

  1. Random Masking: Simple random masking often fails to provide "hard" enough samples to drive robust alignment.
  2. Representation Collapse: Generative models lack explicit mechanisms to ensure uniform representation distribution, often leading to "partial dimensional collapse" where embeddings cluster in a narrow subspace.

Bridging Generative and Contrastive Learning

The authors provide a mathematical proof demonstrating that the node-level reconstruction loss in GraphMAE is lower-bounded by a context-level alignment loss. This reveals that reconstructing a masked node is fundamentally a form of contrastive learning between the node and its local neighborhood. This unification suggests that the choice between generative and contrastive methods is more about implementation strategy than underlying learning principles.

The AUG-MAE Framework

To overcome the limitations of standard GraphMAE, the authors introduce AUG-MAE (Alignment and Uniformity enhanced Graph Masked Autoencoder).

The AUG-MAE architecture featuring an adversarial mask generator and a dual-loss objective.

Key Components:

  • Adversarial Masking: Instead of random selection, a GNN-based mask generator learns to identify nodes that are difficult to reconstruct. This adversarial process forces the encoder to capture more complex structural and feature-based information.
  • Easy-to-Hard Training Strategy: To maintain training stability, the model employs a curriculum-like approach. It begins with random masking and gradually shifts toward adversarial masking as the encoder matures.
  • Explicit Uniformity Regularizer: To prevent dimensional collapse, a loss term based on a Gaussian potential kernel is added. This term encourages node embeddings to spread uniformly across the unit hypersphere.

Experimental Evaluation

AUG-MAE was tested on 15 benchmark datasets, including 9 node classification and 6 graph classification tasks.

Performance Highlights

AUG-MAE consistently outperformed both GraphMAE and leading contrastive baselines. In node classification, it achieved the top accuracy on 8 out of 9 datasets, with an average rank of 1.22 (compared to GraphMAE's 3.00). In graph classification, it surpassed GraphMAE across all tested datasets.

Alignment and Uniformity Analysis

Quantitative analysis of the learned embeddings confirms that AUG-MAE effectively optimizes both alignment and uniformity.

Distribution of l2 distances for GCL, GraphMAE, and AUG-MAE, demonstrating improved alignment and uniformity in the proposed model.

As shown in the distance distributions, AUG-MAE achieves a better balance than its predecessors. While GraphMAE improves upon GCL in some aspects, AUG-MAE's adversarial masking and explicit regularization lead to more discriminative and well-distributed representations.

Conclusion

By unifying generative and contrastive graph SSL through the lens of alignment and uniformity, this work provides a new theoretical foundation for graph autoencoders. AUG-MAE demonstrates that incorporating adversarial masking and explicit uniformity constraints can significantly boost the performance and robustness of self-supervised graph representations. Future work may extend this framework to global graph structures or more complex graph types like heterogeneous networks.

Summary updated

BibTeX
@inproceedings{wang2024rethinking,
  author = {Liang Wang and Xiang Tao and Qiang Liu and Shu Wu and Liang Wang},
  title = {{Rethinking Graph Masked Autoencoders through Alignment and Uniformity}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i14.29479},
}
Figure