/22-WebConf-AugPractices

Contains code for: "Augmentations in Graph Contrastive Learning: Current Methodological Flaws & Towards Better Practices"

Primary LanguageJupyter Notebook

Header Figure

Requirements

This code uses:

- python 3.8
- torch 1.11.0
- torch-geometric 2.0.4
- PyGCL 0.1.2

Source Code

⚠️ This repository is still under construction. However, we provide some key files here.

  • datasets_mnist.py: provides implementations for the node dropping and colorizing augmentations.
  • run_BYOL.py: contains code for running the BYOL on MNIST using either the node dropping or colorizing transforms.
  • examples/compute_invariance_sep.py: given a trained checkpoint, compute invariance and separability scores. See run_compute_invariance.sh for an example.

Acknowledgements

This code is inspired by and makes us of several great code bases. We especially thank the authors of PyGCL, GraphCL, AD-GCL, EDA, and Benchmarking GNNs.