Code Monkey home page Code Monkey logo

mixhop's Introduction

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.

mixhop's People

Contributors

samihaija avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.