Home

Awesome

[CIKM 2022]-Towards Self-supervised Learning on Graphs with Heterophily

Source code of HGRL model proposed in the CIKM 2022 paper Towards Self-supervised Learning on Graphs with Heterophily.

Dependencies

Datasets

Heterogeneous datasets: 'Cornell', Texas', 'Wisconsin', 'Actor', 'Squirrel' and 'Chameleon'.

Homogeneous dataset: 'Cora', 'CiteSeer' and 'PubMed'.

Dataset# Nodes# Edges# Classes# Features# Homo. ratio
Texas18329551,7030.11
Wisconsin25146651,7030.21
Actor7,60026,75259310.22
Squirrel5,201198,49352,0890.22
Chameleon2,27731,42152,3250.23
Cornell18328051,7030.3
CiteSeer3,3274,67673,7030.74
PubMed19,71744,32735000.8
Cora2,7085,27861,4330.81

Usage

To run the codes, use the following commands:

# Cora
python main.py --dataset Cora --epochs 500 --lr 0.005 --lr_gamma 0.005 --weight_decay 0.0005 --hidden_size 512 --output_size 512 --dropout 0.4 --method hn2n_CCA_init_adj --task node_classification --topology_augmentation init

# CiteSeer
python main.py --dataset CiteSeer --epochs 500 --lr 0.005 --lr_gamma 0.005 --weight_decay 0.0005 --hidden_size 512 --output_size 512 --dropout 0.4 --method hn2n_CCA_init_adj --task node_classification --topology_augmentation init

# PubMed
python main.py --dataset PubMed --epochs 500 --lr 0.005 --lr_gamma 0.005 --weight_decay 0.0005 --hidden_size 512 --output_size 512 --dropout 0.4 --method hn2n_CCA_init_adj --task node_classification --topology_augmentation init

# Texas
python main.py --dataset texas --epochs 500 --lr 0.005 --lr_gamma 0.005 --weight_decay 0.0005 --hidden_size 512 --output_size 512 --dropout 0.4 --method hn2n_CCA_learned_adj --task node_classification

# Wisconsin
python main.py --dataset wisconsin --epochs 500 --lr 0.005 --lr_gamma 0.005 --weight_decay 0.0005 --hidden_size 512 --output_size 512 --dropout 0.4 --method hn2n_CCA_learned_adj --task node_classification

# Actor
python main.py --dataset film --epochs 500 --lr 0.005 --lr_gamma 0.005 --weight_decay 0.0005 --hidden_size 512 --output_size 512 --dropout 0.4 --method hn2n_CCA_learned_adj --task node_classification

# Squirrel 
python main.py --dataset squirrel --epochs 500 --lr 0.005 --lr_gamma 0.005 --weight_decay 0.0005 --hidden_size 512 --output_size 512 --dropout 0.4 --method hn2n_CCA_init_adj --task node_classification --topology_augmentation init

# Chameleon
python main.py --dataset chameleon --epochs 500 --lr 0.005 --lr_gamma 0.005 --weight_decay 0.0005 --hidden_size 512 --output_size 512 --dropout 0.3 --method hn2n_CCA_init_adj --task node_classification --topology_augmentation init

# Cornell
python main.py --dataset cornell --epochs 500 --lr 0.005 --lr_gamma 0.005 --weight_decay 0.0005 --hidden_size 512 --output_size 512 --dropout 0.4 --method hn2n_CCA_learned_adj --task node_classification

For node cluster task, please use "--task node_cluster" and "--output_size 16".

<!-- ## Reference If our paper and code are useful for your research, please cite the following article: ``` @inproceedings{zhang2021canonical, title={From canonical correlation analysis to self-supervised graph neural networks}, author={Zhang, Hengrui and Wu, Qitian and Yan, Junchi and Wipf, David and Philip, S Yu}, booktitle={Thirty-Fifth Conference on Neural Information Processing Systems}, year={2021} } ``` -->