Subg-Con
Sub-graph Contrast for Scalable Self-Supervised Graph Representation Learning (Jiao et al., ICDM 2020): https://arxiv.org/abs/2009.10273
Overview
Here we provide an implementation of Subg-Con in PyTorch and the geometric deep learning extension library, Pytorch Geometric. The repository is organised as follows:
subgcon.py
is the implementation of the Subg-Con pipeline;subgraph.py
is the implementation of subgraph extractor;model.py
is the implementation of components for Subg-Con, including a GNN layer, a pooling layer, and a scoring function;utils_mp.py
is the necessary processing subroutines;dataset/
will contain the automatically downloaded datasets;subgraph/
will contain the processed subgraphs.
Finally, train.py
puts all of the above together and may be used to execute a full training. The codes can be run on six datasets, including Cora, CiteSeer, PubMed, PPI, Flickr, and Reddit.
Train SubgCon
python train.py --dataset DATASET_NAME
Train SubgCon+
python train+.py --dataset DATASET_NAME
Dependencies
- Python 3.9.0
- PyTorch 1.9.0
- pytorch_geometric 2.0.0
- scikit-learn
- scipy
- cytoolz
Reference
If you make advantage of Subg-Con in your research, please cite the following in your manuscript:
@article{jiao2020sub,
title={Sub-graph Contrast for Scalable Self-Supervised Graph Representation Learning},
author={Jiao, Yizhu and Xiong, Yun and Zhang, Jiawei and Zhang, Yao and Zhang, Tianqi and Zhu, Yangyong},
journal={arXiv preprint arXiv:2009.10273},
year={2020}
}