Code Monkey home page Code Monkey logo

digress's Introduction

DiGress: Discrete Denoising diffusion models for graph generation (ICLR 2023)

Warning: The code has been updated after experiments were run for the paper. If you don't manage to reproduce the paper results, please write to us so that we can investigate the issue.

For the conditional generation experiments, check the guidance branch.

Environment installation

  • Download anaconda/miniconda if needed
  • Create a rdkit environment that directly contains rdkit: conda create -c conda-forge -n digress rdkit python=3.9
  • Install graph-tool (https://graph-tool.skewed.de/): conda install -c conda-forge graph-tool
  • Install the nvcc drivers for your cuda version. For example, conda install -c "nvidia/label/cuda-11.3.1" cuda-nvcc
  • Install pytorch 1.10 or 1.11 (https://pytorch.org/)
  • Install pytorch-geometric. Your version should match the pytorch version that is installed (https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html)
  • Install other packages using the requirement file: pip install -r requirements.txt
  • Install mini-moses: pip install git+https://github.com/igor-krawczuk/mini-moses
  • pip install -e .

Download the data

Run the code

  • All code is currently launched through python3 main.py. Check hydra documentation (https://hydra.cc/) for overriding default parameters.
  • To run the debugging code: python3 main.py +experiment=debug.yaml. We advise to try to run the debug mode first before launching full experiments.
  • To run a code on only a few batches: python3 main.py general.name=test.
  • To run the continuous model: python3 main.py model=continuous
  • To run the discrete model: python3 main.py
  • You can specify the dataset with python3 main.py dataset=guacamol. Look at configs/dataset for the list of datasets that are currently available

Checkpoints

We uploaded pretrained models for the Planar and SBM datasets. If you need other checkpoints, please write to us.

Planar: https://drive.switch.ch/index.php/s/tZCjJ6VXU2Z3FIh SBM: https://drive.switch.ch/index.php/s/rxWFVQX4Cu4Vq5j

Cite the paper

@article{vignac2022digress,
  title={DiGress: Discrete Denoising diffusion for graph generation},
  author={Vignac, Clement and Krawczuk, Igor and Siraudin, Antoine and Wang, Bohan and Cevher, Volkan and Frossard, Pascal},
  journal={arXiv preprint arXiv:2209.14734},
  year={2022}
}

digress's People

Contributors

cvignac avatar cheraissi avatar sriramdvt avatar

Forkers

noraliu525

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.