This repo contains an example implementation for KDD'22 paper: COSTA: Covariance-Preserving Feature Augmentation for Graph Contrastive Learning. This code provides the multiview MV-COSTA. The SV-COSTA can be easily obtained by modifying the MV-COSTA.
COSTA is a feature augmentation method that generates augmented samples in the feature space (latent space). It produced a bias-free and covariance-bounded augmentation to alleviate the bias problem in the typical graph augmentation (e.g., edge permutations).
Our implementation works with PyTorch>=1.0.0 Install other dependencies: $ pip install -r requirement.txt
We provide several datasets to reproduce our results. We provide wandb logs to show the performance. See following to see the detail
https://wandb.ai/yifeiacc/COSTA_public?workspace=user-yifeiacc
The detailed settings (including hyper-parameters and GPUs) and the results can be found in these logs. You can directly checkout to the corresponding branch(commit).
To run our code, just run the following
$ cd src
$ python main.py --root path/to/COSTA/dir --dataset Cora --model COSTA --config COSTA_default.yaml