• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    Python
  • Created over 5 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Official Implementation of ICML 2019 Paper. MixHop: Higher-Order Graph Convolutional Architectures via Sparsified Neighborhood Mixing; and UAI 2019 Paper: N-GCN: Multi-scale Graph Convolution for Semi-supervised Node Classification

MixHop TensorFlow Implementation

Official Implementation of ICML 2019 Paper: MixHop: Higher-Order Graph Convolutional Architectures via Sparsified Neighborhood Mixing and UAI 2019 Paper: N-GCN: Multi-scale Graph Convolutionfor Semi-supervised Node Classification

If you find this code useful, please cite us as:

@inproceedings{mixhop,
 author={Sami Abu-El-Haija AND Bryan Perozzi AND Amol Kapoor AND Hrayr Harutyunyan
         AND Nazanin Alipourfard AND Kristina Lerman AND Greg Ver Steeg AND Aram Galstyan},
 title={MixHop: Higher-Order Graph Convolution Architectures via Sparsified Neighborhood Mixing},
 booktitle = {International Conference on Machine Learning (ICML)},
 year = {2019},
}

If you made use of the files train_*_ngcn.sh or ngcn_trainer.py, then you may alternatively cite us as:

@inproceedings{ngcn,
 author={Sami Abu-El-Haija AND Bryan Perozzi AND Amol Kapoor AND Joonseok Lee},
 title={N-GCN: Multi-scale Graph Convolutionfor Semi-supervised Node Classification},
 booktitle = {Conference on Uncertainty in Artificial Intelligence (UAI)},
 year = {2019},
}

File Overview

  1. mixhop_model.py: Contaits our mixhop layer and model architecture. Use this file if you want to try our model on different datasets [e.g. not citation datasets of planetoid]. You can invoke our layer alone or our entire architecture. The architecture can be saved to disk (as JSON) and loaded later.
  2. mixhop_dataset.py: This reads the planetoid datasets.
  3. mixhop_trainer.py: End-to-end training and evaluation over the planetoid datasets. You probably want to start by invoking/modifying the shell scripts directly (e.g. train_cora.sh).
  4. ngcn_trainer.py: Same as above, but trains the NGCN model. It utilizes the files above, as NGCN can be treated as a special-case of MixHop.

How to use mixhop_trainer.py

This implementation relies on the datasets of planetoid living on your machine. Unless you override the flag --dataset_dir in mixhop_trainer, code expects that planetoid repo is cloned on ~/data. To clone it, you can run:

# Line clones plenetoid if it does not exist.
mkdir -p ~/data && cd ~/data && ls planetoid || git clone [email protected]:kimiyoung/planetoid.git

Then, we advise you to run the shell script which have good hyper-parameter values:

### MixHop (ICML'19) training scripts
# Cora:
bash train_cora.sh  # Model in paper

# Citeseer:
bash train_citeseer.sh  # Model in paper

# Pubmed
bash train_pubmed_2layer_psum.sh  # Model in paper

# Pubmed fully-connected output layer.
bash train_pubmed_3layer_fc.sh  # Model not in paper

### NGCN (UAI'19) training scripts
# Cora:
bash train_cora_ngcn.sh

# Citeseer:
bash train_citeseer_ngcn.sh

# Pubmed:
bash train_pubmed_ngcn.sh

Note: for cora and citeseer, the shell scripts produce results that are a little better than the paper. We discovered these hyper-parameters only recently (after ICML submission ended).

Need help?

Please help us by reaching out to [email protected] -- Whenever possible, we would like to improve the quality of the code and resolve any ambiguities.

To be completed!

This code provides the complete MixHop Graph Conv Layer and Architecture, however, it is still missing the Group-lasso regularization. Reason for delay: Our original code is researchy i.e. not pleasant to read [you know how it goes: you try a bunch of things, until something works, without removing the things that did not work, producing one huge file]. The code will be completely ready, and up to our coding standards, by the ICML conference. If you want the code sooner, please email [email protected] and we are happy to provide you with the messy version or prioritize the clean-up accordingly.