Skip to content

GNN方法和模型的Pytorch实现。Pytorch implementation of GNN.

License

Notifications You must be signed in to change notification settings

quqixun/GNN-Pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GNN-Pytorch

GNN方法和模型的Pytorch实现。Pytorch implementation of GNN.

这里更注重方法的学习,而不是获得更高的结果。


节点分类 - Node Classification

使用的数据集列表,有条件可以使用OGB数据集

Dataset Nodes Edges Node Attr. Classes Train Valid Test
Cora 2708 5429 1433 7 140 500 1000
Cora-Full 2708 5429 1433 7 1208 500 1000
Citeseer 3327 4732 3703 6 120 500 1000
Citeseer-Full 3327 4732 3703 6 1827 500 1000
Pubmed 19717 44338 500 3 60 500 1000
Pubmed-Full 19717 44338 500 3 18217 500 1000

各方法实验结果(Accuracy)列表:

Status Method Paper Cora Citeseer Pubmed
✔️ GCN Kipf and Welling, 2017 0.819 0.702 0.790
✔️ GraphSAGE Hamilton and Ying et al., 2017 0.801 0.701 0.778
✔️ GAT Velickovic et al., 2018 0.824 0.719 0.782
✔️ FastGCN* Chen and Ma et al., 2018 0.854 0.779 0.855
✔️ GRAND Feng and Zhang et al., 2020 0.839 0.726 0.797

* 使用Cora-Full,Pubmed-Full和Citeseer-Full数据集训练并评价。


图分类 - Graph Classification

使用的数据集列表,更多的数据集见TUDataset,有条件可以使用OGB数据集

Dataset Graphs Avg. Nodes Avg. Edges Node Attr. Classes Train Valid Test
DD 1178 284.32 715.66 89 2 826 117 235
NCI1 4110 29.87 32.30 37 2 2877 411 822
PROTEINS 1113 39.06 72.82 4 2 780 111 222

各方法实验结果(Accuracy)列表:

Status Method Paper DD NCI1 PROTEINS
DiffPool Ying et al., 2018
Graph U-Nets Gao et al., 2019
✔️ SAGPoolg Lee and Lee et al., 2019 0.723 0.763 0.757
✔️ SAGPoolh Lee and Lee et al., 2019 0.745 0.648 0.743
✔️ MinCutPool Bianchi and Grattarola et al., 2020 0.770 0.742 0.766

环境配置 - Packages

依赖 版本 安装
python 3.8.6 conda create --name gnn python=3.8.6
numpy 1.20.0 pip install numpy==1.20.0
scipy 1.6.0 pip install scipy==1.6.0
pyyaml 5.4.1 pip install pyyaml==5.4.1
scikit-learn 0.24.1 pip install scikit-learn==0.24.1
pytorch 1.7.1 conda install pytorch==1.7.1 cudatoolkit=11.0 -c pytorch
torch-geometric 1.6.3 Installation