Official Code Repository for GraphGDP (ICDM 2022).
The main requirements are:
Others see requirements.txt .
Community small dataset
python main.py --config configs/vp_com_small_pgsn.py --config.model.beta_max 5.0 --mode train --workdir YOUR_PATH
Ego small dataset
EM method sampling
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
Langevin correction
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.corrector langevin --config.sampling.snr 0.20
ODE Solvers
# scipy ODE (CPU)
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 ode \
--config.sampling.rtol 1e-4 --config.sampling.atol 1e-4
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
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.