Home

Awesome

SuperGAT

Official implementation of Self-supervised Graph Attention Networks (SuperGAT). This model is presented at How to Find Your Friendly Neighborhood: Graph Attention Design with Self-Supervision, International Conference on Learning Representations (ICLR), 2021.

Open Source & Maintenance

BibTeX

@inproceedings{
    kim2021how,
    title={How to Find Your Friendly Neighborhood: Graph Attention Design with Self-Supervision},
    author={Dongkwan Kim and Alice Oh},
    booktitle={International Conference on Learning Representations},
    year={2021},
    url={https://openreview.net/forum?id=Wi5KUNlqWty}
}

Installation

# In SuperGAT/
bash install.sh ${CUDA, default is cu100}

Basics

Run

python3 SuperGAT/main.py \
    --dataset-class Planetoid \
    --dataset-name Cora \
    --custom-key EV13NSO8-ES
 
...

## RESULTS SUMMARY ##
best_test_perf: 0.853 +- 0.003
best_test_perf_at_best_val: 0.851 +- 0.004
best_val_perf: 0.825 +- 0.003
test_perf_at_best_val: 0.849 +- 0.004
## RESULTS DETAILS ##
best_test_perf: [0.851, 0.853, 0.857, 0.852, 0.858, 0.852, 0.847]
best_test_perf_at_best_val: [0.851, 0.849, 0.855, 0.852, 0.858, 0.848, 0.844]
best_val_perf: [0.82, 0.824, 0.83, 0.826, 0.828, 0.824, 0.822]
test_perf_at_best_val: [0.851, 0.844, 0.853, 0.849, 0.857, 0.848, 0.844]
Time for runs (s): 173.85422565042973

The default setting is 7 runs with different random seeds. If you want to change this number, change num_total_runs in the main block of SuperGAT/main.py.

For ogbn-arxiv, use SuperGAT/main_ogb.py.

GPU Setting

There are three arguments for GPU settings (--num-gpus-total, --num-gpus-to-use, --gpu-deny-list). Default values are from the author's machine, so we recommend you modify these values from SuperGAT/args.yaml or by the command line.

If you have four GPUs and want to use the first (cuda:0),

python3 SuperGAT/main.py \
    --dataset-class Planetoid \
    --dataset-name Cora \
    --custom-key EV13NSO8-ES \
    --num-gpus-total 4 \
    --gpu-deny-list 1 2 3

Model (--model-name)

TypeModel name
GCNGCN
GraphSAGESAGE
GATGAT
SuperGAT<sub>GO</sub>GAT
SuperGAT<sub>DP</sub>GAT
SuperGAT<sub>SD</sub>GAT
SuperGAT<sub>MX</sub>GAT

Dataset (--dataset-class, --dataset-name)

Dataset classDataset name
PlanetoidCora
PlanetoidCiteSeer
PlanetoidPubMed
PPIPPI
WikiCSWikiCS
WebKB4UnivWebKB4Univ
MyAmazonPhoto
MyAmazonComputers
PygNodePropPredDatasetogbn-arxiv
MyCoauthorCS
MyCoauthorPhysics
MyCitationFullCora_ML
MyCitationFullCoraFull
MyCitationFullDBLP
CrocodileCrocodile
ChameleonChameleon
FlickrFlickr

Custom Key (--custom-key)

TypeCustom key (General)Custom key (for PubMed)Custom key (for ogbn-arxiv)
SuperGAT<sub>GO</sub>EV1O8-ESEV1-500-ES-
SuperGAT<sub>DP</sub>EV2O8-ESEV2-500-ES-
SuperGAT<sub>SD</sub>EV3O8-ESEV3-500-ESEV3-ES
SuperGAT<sub>MX</sub>EV13NSO8-ESEV13NSO8-500-ESEV13NS-ES

Other Hyperparameters

See SuperGAT/args.yaml or run $ python3 SuperGAT/main.py --help.

Code Base