Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Guangyu Zhou eaa51ac4dc | 3 months ago | |
---|---|---|
.. | ||
aug.py | 7 months ago | |
grade_trainer.py | 3 months ago | |
readme.md | 1 year ago | |
utils.py | 3 months ago |
This GammaGL example implements the model proposed in the paper "Uncovering the Structural Fairness in Graph Contrastive Learning".
Author's code: https://github.com/BUPT-GAMMA/Uncovering-the-Structural-Fairness-in-Graph-Contrastive-Learning
This example was implemented by Yifei Shao
'Cora', 'Citeseer' 'Photo' and 'Computers'
Dataset | # Nodes | # Edges | # Classes |
---|---|---|---|
Cora | 2,708 | 10,556 | 7 |
Citeseer | 3,327 | 9,228 | 6 |
Photo | 7,650 | 238,162 | 8 |
Computers | 13,752 | 491,722 | 10 |
--gpu_id int Set device for training. Default is 0.
--dataset str The graph dataset name. Default is 'cora'.
--warmup int Warmup of training. Default is 200.
--epoch int Number of training periods. Default is 400.
--lr float Learning rate. Default is 0.001.
--wd float Weight decay. Default is 1e-5.
--threshold int Definition of low-degree nodes. Default is 9.
--act_fn str Activation function Default is 'relu'.
--temp float Temperature. Default is 0.5.
--hid_dim int Hidden dimension. Default is 256.
--out_dim int Output dimension. Default is 256.
--num_layers int Number of GNN layers. Default is 2.
--der1 float Drop edge ratio 1. Default is 0.2.
--der2 float Drop edge ratio 2. Default is 0.2.
--dfr1 float Drop feature ratio 1. Default is 0.2.
--dfr2 float Drop feature ratio 2. Default is 0.2.
--dataset_path str Path to save dataset. Default is r'../'
--mode str Split dataset. Default is 'full'.
# use paddle backend
# Cora
TL_BACKEND=paddle python grade_trainer.py --dataset cora --mode full --hid_dim 256 --out_dim 256 --act_fn relu --temp 0.8 --gpu_id (up to you)
# Citeseer
TL_BACKEND=paddle python grade_trainer.py --dataset citeseer --mode full --hid_dim 256 --out_dim 256 --act_fn relu --temp 1.7 --gpu_id (up to you)
# Photo
TL_BACKEND=paddle python grade_trainer.py --dataset photo --mode full --hid_dim 512 --out_dim 512 --act_fn relu --temp 0.8 --gpu_id (up to you)
# Computers
TL_BACKEND=paddle python grade_trainer.py --dataset computers --mode full --hid_dim 800 --out_dim 800 --act_fn prelu --temp 1.1 --gpu_id (up to you)
# use tensorflow backend
# Cora
TL_BACKEND=tensorflow python grade_trainer.py --dataset cora --mode full --hid_dim 256 --out_dim 256 --act_fn relu --temp 0.8 --gpu_id (up to you)
# Citeseer
TL_BACKEND=tensorflow python grade_trainer.py --dataset citeseer --mode full --hid_dim 256 --out_dim 256 --act_fn relu --temp 1.7 --gpu_id (up to you)
# Photo
TL_BACKEND=tensorflow python grade_trainer.py --dataset photo --mode full --hid_dim 512 --out_dim 512 --act_fn relu --temp 0.8 --gpu_id (up to you)
# Computers
TL_BACKEND=tensorflow python grade_trainer.py --dataset computers --mode full --hid_dim 800 --out_dim 800 --act_fn prelu --temp 1.1 --gpu_id (up to you)
# use pytorch backend
# Cora
TL_BACKEND=torch python grade_trainer.py --dataset cora --mode full --hid_dim 256 --out_dim 256 --act_fn relu --temp 0.8 --gpu_id (up to you)
# Citeseer
TL_BACKEND=torch python grade_trainer.py --dataset citeseer --mode full --hid_dim 256 --out_dim 256 --act_fn relu --temp 1.7 --gpu_id (up to you)
# Photo
TL_BACKEND=torch python grade_trainer.py --dataset photo --mode full --hid_dim 512 --out_dim 512 --act_fn relu --temp 0.8 --gpu_id (up to you)
# Computers
TL_BACKEND=torch python grade_trainer.py --dataset computers --mode full --hid_dim 800 --out_dim 800 --act_fn prelu --temp 1.1 --gpu_id (up to you)
Evaluation(mode=full) | F1Mi | F1Ma | Mean | Bias |
---|---|---|---|---|
Cora(paper) | 0.8340 | 0.7854 | 0.9287 | 0.0048 |
Cora(ours) | 0.8660 | 0.8604 | 0.9027 | 0.0378 |
Citeseer(paper) | 0.6714 | 0.6104 | 0.8588 | 0.0152 |
Citeseer(ours) | 0.7450 | 0.7045 | 0.8724 | 0.0156 |
Photo(paper) | 0.9472 | 0.7886 | 0.9852 | 0.0020 |
Photo(ours) | 0.9030 | 0.8980 | 0.9199 | 0.0050 |
Computers(paper) | 0.8942 | 0.7471 | 0.9742 | 0.0035 |
Computers(ours) | 0.8760 | 0.8740 | 0.8880 | 0.0061 |
No Description
Python C++ Cuda Markdown Text
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》