GRAPH-0 / GraphGDP

Implementation for the paper: GraphGDP: Generative Diffusion Processes for Permutation Invariant Graph Generation
MIT License
23 stars 6 forks source link
diffusion-models graph-generation

GraphGDP: Generative Diffusion Processes for Permutation Invariant Graph Generation

Official Code Repository for GraphGDP (ICDM 2022).

Dependencies

The main requirements are:

Others see requirements.txt .

Code Usage

Training Example

  1. Community small dataset

    python main.py --config configs/vp_com_small_pgsn.py --config.model.beta_max 5.0 --mode train --workdir YOUR_PATH
  2. Ego small dataset

Evaluation Example

Neural ODE (GPU) - Adaptive-step

python main.py --config configs/vp_com_small_pgsn.py --config.model.beta_max 5.0 --mode eval --workdir YOUR_PATH \ --config.eval.begin_ckpt 150 --config.eval.end_ckpt 150 --config.sampling.method diffeq \ --config.sampling.ode_method dopri5 --config.sampling.rtol 1e-4 --config.sampling.atol 1e-4

Neural ODE (GPU) - Fixed-step

python main.py --config configs/vp_com_small_pgsn.py --config.model.beta_max 5.0 --mode eval --workdir YOUR_PATH \ --config.eval.begin_ckpt 150 --config.eval.end_ckpt 150 --config.sampling.method diffeq \ --config.sampling.ode_method rk4 --config.sampling.ode_step 0.10


*Note*: we recommend training with config.model.beta_max 20.0 when utilizing probability flow ODEs.

Some models and generated samples are provided on [Google Drive](https://drive.google.com/drive/folders/103eZR1JsPOXsJztP-RdXUHnoZqvOAOqh?usp=sharing).

## Citation

```bibtex
@article{huang2022graphgdp,
  title={GraphGDP: Generative Diffusion Processes for Permutation Invariant Graph Generation},
  author={Huang, Han and Sun, Leilei and Du, Bowen and Fu, Yanjie and Lv, Weifeng},
  journal={arXiv preprint arXiv:2212.01842},
  year={2022}
}

Acknowledgement: Our implementation is based on the repo Score_SDE. Evaluation implementation is modified from the repo GGM-metrics.