In this work, we study graph neural networks for vertex classification. This work is conducted at RIKEN AIP. Our preprint is uploaded on arXiv.
Create an Python 3.6 environment and install these packages:
numpy
scipy
networkx==1.11
scikit-learn
pytorch
torchvision
Or install from requirements.txt
.
Move files in data/*
to your ~/data/gcn/
folder, or change the paths in utils.py
for Cora, Citeseer, Pubmed. The data files can be found here (Gdrive).
For Reddit, download reddit.adj (Gdrive) and reddit.npz (Gdrive) and put them under ~/data/reddit/
, or change paths in utils.py
.
We will pack data for PPI in the later version.
Check args.py
file to change options for noise and other filters.
To run with Cora, Citeseer, Pubmed:
python citation.py --no-cuda --model gfnn --dataset cora
python citation.py --no-cuda --model SGC --dataset cora
python citation.py --no-cuda --model GCN --dataset cora
To run with synthetic dataset (4000 data points):
python synthetic.py --no-cuda --model gfnn
python synthetic.py --no-cuda --model SGC
python synthetic.py --no-cuda --model GCN
The frequency experiment (Figure 3) can be found in transformation.py
and raw_feats_citation.py
.
This reposipory is built upon SGC, FastGCN, and GCN. I would like to say thanks to the authors of these repositories for making their code available.