GithubHelp home page GithubHelp logo

vgraphrnn / vgrnn Goto Github PK

View Code? Open in Web Editor NEW
107.0 1.0 32.0 9.77 MB

Variational Graph Recurrent Neural Networks - PyTorch

Python 100.00%
variational-autoencoder graph-auto-encoder representation-learning variational-inference graph-convolutional-networks graph-embedding node-embedding graph-neural-networks graph-neural-network variational-autoencoders graph-representation-learning dynamic-graphs link-prediction

vgrnn's Introduction

Variational Graph Recurrent Neural Networks

This is a PyTorch implementation of the VGRNN model as described in our paper:

E. Hajiramezanali*, A. Hasanzadeh*, N. Duffield, K. R. Narayanan, M. Zhou, and X. Qian, Variational Graph Recurrent Neural Networks, Advances in Neural Information Processing Systems (NeurIPS), 2019, *equal contribution

VGRNN

Abstract: Representation learning over graph structured data has been mostly studied in static graph settings while efforts for modeling dynamic graphs are still scant. In this paper, we develop a novel hierarchical variational model that introduces additional latent random variables to jointly model the hidden states of a graph recurrent neural network (GRNN) to capture both topology and node attribute changes in dynamic graphs. We argue that the use of high-level latent random variables in this variational GRNN (VGRNN) can better capture potential variability observed in dynamic graphs as well as the uncertainty of node latent representation. With semi-implicit variational inference developed for this new VGRNN architecture (SI-VGRNN), we show that flexible non-Gaussian latent representations can further help dynamic graph analytic tasks. Our experiments with multiple real-world dynamic graph datasets demonstrate that SI-VGRNN and VGRNN consistently outperform the existing baseline and state-of-the-art methods by a significant margin in dynamic link prediction.

Example: VGRNN learns interpretable latent representations.

VGRNN_graphs VGRNN_representations

Requirements

CUDA==9.0.176
Python==2.7.12
networkx==2.2
scipy==1.1.0
torch==1.0.0      
torch-cluster==1.2.3      
torch-geometric==1.0.2      
torch-scatter==1.1.1      
torch-sparse==0.2.3      
torch-spline-conv==1.0.5      
torchvision==0.2.1

Cite

Please cite our paper if you use this code in your own work:

@inproceedings{hajiramezanali2019variational,
  title={Variational graph recurrent neural networks},
  author={Hajiramezanali, Ehsan and Hasanzadeh, Arman and Narayanan, Krishna and Duffield, Nick and Zhou, Mingyuan and Qian, Xiaoning},
  booktitle={Advances in Neural Information Processing Systems},
  pages={10700--10710},
  year={2019}
}

Please direct your inquiries to [email protected] or [email protected] .

vgrnn's People

Contributors

vgraphrnn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vgrnn's Issues

Failed to load data

Hi,

I'm trying to run your code but always fail to load the data at this line. Please find below the error log:

UnicodeDecodeError: 'ascii' codec can't decode byte 0x96 in position 8: ordinal not in range(128)

Thanks for your help!

Incorrect use of torch.nn.utils.clip_grad_norm

In both training examples clip_grad_norm() is called after opt.step() so it isn't doing anything. It should either be removed or moved before the optimizer updates the model components

Bug in prediction code?

Hello,

I am looking at the VGRNN_prediction.py script and I found what seems to be a bug on this line:

nll_loss += self._nll_bernoulli(dec_t_sl, adj_orig_dense_list[t])

Shouldn't it be:

nll_loss += self._nll_bernoulli(dec_t_sl, adj_orig_dense_list[t + 1])

in order to do link prediction for the graph at time T+1?
Did I misunderstand something?

Thanks

Pre-processing code for HEP-TH, Cora, and Social Evolution

Hi,

I've been reading your paper and I wanted to play a bit with the datasets that you used for the experiments. I see that you have uploaded the pre-processed data for Facebook, Enron, and Colab, but I couldn't find the other three datasets.
Do you have the code to produce the time series for HEP-TH, Cora, and Social Evolution? Or even the pre-processed data like for the other datasets would be good.

Thanks,
Daniele

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.