Skip to content
Efficient Graph Generation with Graph Recurrent Attention Networks, Deep Generative Model of Graphs, Graph Neural Networks, NeurIPS 2019
C++ Python Shell
Branch: master
Clone or download
Latest commit ae15f4d Oct 2, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
model first push Oct 1, 2019
runner add requirements Oct 2, 2019
.gitignore Initial commit Sep 26, 2019
LICENSE update paper link Oct 3, 2019
requirements.txt add requirements Oct 2, 2019 first push Oct 1, 2019


This is the official PyTorch implementation of Efficient Graph Generation with Graph Recurrent Attention Networks as described in the following NeurIPS 2019 paper:

  title={Efficient Graph Generation with Graph Recurrent Attention Networks}, 
  author={Liao, Renjie and Li, Yujia and Song, Yang and Wang, Shenlong and Nash, Charlie and Hamilton, William L. and Duvenaud, David and Urtasun, Raquel and Zemel, Richard}, 


Generation of GRAN per step:

Overall generation process:


Python 3, PyTorch(1.2.0)

Other dependencies can be installed via

pip install -r requirements.txt

Run Demos


  • To run the training of experiment X where X is one of {gran_grid, gran_DD, gran_DB, gran_lobster}:

    python -c config/X.yaml


  • Please check the folder config for a full list of configuration yaml files.
  • Most hyperparameters in the configuration yaml file are self-explanatory.


  • After training, you can specify the test_model field of the configuration yaml file with the path of your best model snapshot, e.g.,

    test_model: exp/gran_grid/xxx/model_snapshot_best.pth

  • To run the test of experiments X:

    python -c config/X.yaml -t


Trained Models

  • You could use our trained model for comparisons. Please make sure you are using the same split of the dataset. Running the following script will download the trained model:


Sampled Graphs from GRAN

  • Proteins Graphs from Training Set:

  • Proteins Graphs Sampled from GRAN:


Please cite our paper if you use this code in your research work.


Please submit a Github issue or contact if you have any questions or find any bugs.

You can’t perform that action at this time.