Directed Graph Contrastive Learning
The PyTorch implementation of Directed Graph Contrastive Learning (DiGCL).
In this paper, we present the first contrastive learning framework for learning directed graph representation.
Our project is developed using Python 3.7, PyTorch 1.7.0 with CUDA10.2. We recommend you to use anaconda for dependency configuration.
First create an anaconda environment called
conda create -n DiGCL python=3.7 conda activate DiGCL
Then, you need to install torch manually to fit in with your server environment (e.g. CUDA version). For the torch and torchvision used in my project, run
conda install pytorch==1.7.0 torchvision==0.6.0 cudatoolkit=10.2 -c pytorch
Other requirements can be set up through:
cd DiGCL pip install -e .
cd code python train_digcl.py --gpu_id 0 --dataset cora_ml --curr-type log python train_digcl.py --gpu_id 0 --dataset citeseer
--dataset argument can be one of [cora_ml, citeseer] and the
--curr-type argument can be one of [linear, log, exp, fixed].
DiGCL is released under the MIT License. See the LICENSE file for more details.
We are grateful for the following enlightening works, which are also of great use in our work.
- Graph Contrastive Learning Library for PyTorch: PyGCL
- Graph Contrastive Learning with Adaptive Augmentation: GRACE and GCA
- Graph Contrastive Learning with Augmentations: GraphCL
- Our another supervised approach to process directed graphs: DiGCN
- MagNet: A Neural Network for Directed Graphs: MagNet