ReGCL: Rethinking Message Passing in Graph Contrastive Learning

December 14, 2023 ยท View on GitHub

Code for AAAI 2024 paper "ReGCL: Rethinking Message Passing in Graph Contrastive Learning".

Dependencies

  • Python 3.8
  • PyTorch 1.13.1+ cu117
  • torch-geometric 2.3.0
  • torch-scatter 2.1.0
  • torch-sparse 0.6.15
  • torch-spline-conv 1.2.1
  • pyyaml 6.0.1
  • scikit-learn 1.3.0
  • numpy 1.21.6

Datasets

Citation Networks: 'Cora', 'Citeseer' and 'Pubmed'.

Co-occurence Networks: 'Amazon-Photo', 'Coauthor-CS'

Dataset# Nodes# Edges# Classes# Features
Cora2,70810,55671,433
Citeseer3,3279,22863,703
Pubmed19,71788,6513500
Amazon-Photo7,650287,3268745
Coauthor-CS18,333327,576156,805

Usage

To run the codes, use the following commands:

#test:
python train.py --dataset Cora  --test 
#train:
python train.py --dataset Cora  --lr 5e-4 --tau 0.2 --dfr1 0.4 --dfr2 0.4 --der1 0.0 --der2 0.4