|
# Graph Mask AutoEncoder(GraphMAE) on QM9 Dataset
|
|
## Overview
|
|
We run the **Graph Mask AutoEncoder** on **QM9 Dataset** for pretraining. We use the atom position of each atom and the embedding of their element type as the input feature (dim=7) and predict the input feature by using the GraphSage with 4-dim hidden representation.
|
|
|
|
**Total Epochs: 10**
|
|
## How to run
|
|
### If you do not want to re-train the model again
|
|
- **Unzip the model.zip** to get the model weight & embedded graph in each epoch
|
|
### If you want to try out the training process
|
|
- step1. **Preprocess the dataset** (we have provided the preprocessed as well)
|
|
|
|
```bash
|
|
python prepare_QM9_dataset.py --label_keys "mu" "gap"
|
|
```
|
|
- step2. **Train the Graph Mask AutoEncoder on the preprocessed dataset**
|
|
```bash
|
|
python run.py [--dataset_path] [--batch_size] [--epochs] [--device] [--save_dir]
|
|
```
|
|
|
|
## Model Description
|
|
### Overview
|
|
Ref:**[GraphMAE](https://arxiv.org/abs/2205.10803)**
|
|
>Self-supervised learning (SSL) has been extensively explored in recent years. Particularly, generative SSL has seen emerging success in natural language processing and other AI fields, such as the wide adoption of BERT and GPT. Despite this, contrastive learning-which heavily relies on structural data augmentation and complicated training strategies-has been the dominant approach in graph SSL, while the progress of generative SSL on graphs, especially graph autoencoders (GAEs), has thus far not reached the potential as promised in other fields. In this paper, we identify and examine the issues that negatively impact the development of GAEs, including their reconstruction objective, training robustness, and error metric. We present a masked graph autoencoder GraphMAE that mitigates these issues for generative self-supervised graph pretraining. Instead of reconstructing graph structures, we propose to focus on feature reconstruction with both a masking strategy and scaled cosine error that benefit the robust training of GraphMAE. We conduct extensive experiments on 21 public datasets for three different graph learning tasks. The results manifest that GraphMAE-a simple graph autoencoder with careful designs-can consistently generate outperformance over both contrastive and generative state-of-the-art baselines. This study provides an understanding of graph autoencoders and demonstrates the potential of generative self-supervised pre-training on graphs.
|
|
|
|
### Detail
|
|
Encoder & Decoder: Two layer [GraphSage](https://docs.dgl.ai/generated/dgl.nn.pytorch.conv.SAGEConv.html)
|
|
|
|
Readout Method: Mean
|
|
|
|
HiddenDims: 4 (Default)
|
|
|
|
MaskRate: 0.3 (Default)
|
|
|
|
Training on RTX 4060
|
|
|
|
## Dataset Description
|
|
### Overview
|
|
Ref: **[QM9](https://docs.dgl.ai/generated/dgl.data.QM9Dataset.html)**
|
|
> Type: Molecule property prediction
|
|
>
|
|
> Sample_num: 130831
|
|
>
|
|
> Total Elements: H,C,N,O,F
|
|
|