GithubHelp home page GithubHelp logo

knut0815 / ladies Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acbull/ladies

0.0 0.0 0.0 6.48 MB

Code for NeurIPS'19 "Layer-Dependent Importance Sampling for Training Deep and Large Graph Convolutional Networks"

Python 100.00%

ladies's Introduction

Overview

LADIES (Layer-Dependent Importance Sampling for Training Deep and Large Graph Convolutional Networks) is a novel sampling algorithm for training GNN. It considers the previously sampled nodes for calculating layer-dependent sampling probability.

Based on the sampled nodes in the upper layer, LADIES selects their neighborhood nodes, compute the importance probability accordingly and samples a fixed number of nodes within them. We prove theoretically and experimentally, that our proposed sampling algorithm outperforms the previous sampling methods regarding time, memory and accuracy.

You can see our NeurIPS 2019 paper โ€œLayer-Dependent Importance Sampling for Training Deep and Large Graph Convolutional Networksโ€ for more details.

Setup

This implementation is based on Pytorch We assume that you're using Python 3 with pip installed. To run the code, you need the following dependencies:

We upload the three small benchmark node classification datasets, cora, pubmed and citeseer in /data for usage. You can upload any graph datasets as you want, and change the data loader function in /utils.py

Usage

Execute the following scripts to train and evaluate the model:

python3 pytorch_ladies.py --cuda 0 --dataset cora  # Train GCN with LADIES on cora.

There's also other hyperparameters to be tuned, which can be found in 'pytorch_ladies.py' for details.

The main function is ladies_sampler(), which sample a fixed number of nodes per layer. The sampling probability (importance) is computed adaptively according to the nodes sampled in the upper layer. We currently implement it using numpy sparse matrix multiplication. One can also implement it via pytorch multiplication or dictionary operation later.

Citation

Please consider citing the following paper when using our code for your application.

@inproceedings{ladies2019,
  title={Few-Shot Representation Learning for Out-Of-Vocabulary Words},
  author={Difan Zou and Ziniu Hu and Yewen Wang and Song Jiang and Yizhou Sun and Quanquan Gu},
  booktitle={Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems, NeurIPS},
  year={2019}
}

ladies's People

Contributors

acbull 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.