Giter Site home page Giter Site logo

chao1224 / graphcg Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 110.4 MB

Unsupervised Discovery of Steerable Factors When Graph Deep Generative Models Are Entangled, TMLR 2024

Home Page: https://chao1224.github.io/GraphCG

License: MIT License

Python 92.54% Shell 6.00% HTML 1.46%
controllable-generation graph molecular-graph molecule point-clouds contrastive-learning editing lead-optimization function-group-editing shape-editing

graphcg's Introduction

Unsupervised Discovery of Steerable Factors When Graph Deep Generative Models Are Entangled

TMLR 2024

Authors: Shengchao Liu, Chengpeng Wang, Jiarui Lu, Weili Nie, Hanchen Wang, Zuoxinran Li, Bolei Zhou, Jian Tang

This repository provides the source code for the paper GraphCG: Unsupervised Discovery of Steerable Factors When Graph Deep Generative Models Are Entangled, which aims at:

  • exploring the steerable factors in graphs
  • implementing the graph controllable generation in an unsupervised manner

[Project Page] [Paper] [ArXiv]
[NeurIPS Graph Learning Frontiers Workshop 2022]

1.1 Molecular Graph

1.1 Environment

conda create --name GraphCG python=3.7 pandas matplotlib
conda activate GraphCG

conda install -y -c pytorch pytorch=1.7.0 torchvision cudatoolkit=10.2
conda install -y -c rdkit rdkit=2019.03.4
conda install -y tabulate
conda install -y networkx
conda install -y scipy
conda install -y seaborn
conda install -y -c conda-forge opencv
pip install cairosvg
pip install orderedset
pip install pickle5
pip install git+https://github.com/bp-kelley/descriptastorus
pip install PyTDC
pip install scikit-learn==0.23
pip install gdown

pip install .

1.2 MoFlow

  1. Go to directory, cd MoFlow.
  2. Download datasets and pretrained models,
python step_01_download.py
unzip MoFlow.zip
  1. Set up model weight path,
qm9_folder=./results_reported/qm9_64gnn_128-64lin_1-1mask_0d6noise_convlu1
zinc250k_folder=./results_reported/zinc250k_512t2cnn_256gnn_512-64lin_10flow_19fold_convlu2_38af-1-1mask
chembl_folder=./results_reported/chembl
  1. Run testing scripts using bash test_GraphCG.sh.
  2. Submit SLURM jobs using bash submit_*.sh.

1.3 HierVAE

  1. Go to directory, cd HierVAE.
  2. Download datasets and pretrained models,
python step_01_download.py
unzip HierVAE.zip
  1. Set up model weight path,
data_name=qm9
model=results_reported/qm9/model.ckpt
  1. Run testing scripts using bash test_GraphCG.sh. Notice that please make sure the GPU is enabled.
  2. Submit SLURM jobs using bash submit_*.sh.

2 Point Clouds

2.1 Environment

conda create -n GraphCG python=3.6
conda activate GraphCG

conda install pytorch=1.9.1 torchvision -c pytorch -y
conda install numpy matplotlib pillow scipy tqdm scikit-learn -y
conda install tensorflow-gpu==1.13.1 -y
pip install tensorboardX==1.7
pip install pandas
pip install torchdiffeq==0.0.1
pip install cython
conda install -c sirokujira python-pcl --channel conda-forge
pip install gdown

pip install -e .

2.2 PointFlow

  1. Go to directory, cd PointFlow.
  2. Download datasets,
python step_01_download.py
unzip ShapeNetCore.v2.PC15k.zip
unzip pretrained_models.zip
  1. Set up data path,
data_dir=ShapeNetCore.v2.PC15k
  1. Run testing scripts using bash test_GraphCG.sh. Notice that please make sure the GPU is enabled.
  2. Submit SLURM jobs using bash submit_*.sh.

3 Optimal Hyperparameters and Results

The optimal results and hyperparameters can be found at this HuggingFace link.

Please notice that in the archived scripts, we used hyperparameter contrastive_SSL (now changed to GraphCG_editing).

Cite Us

Feel free to cite this work if you find it useful to you!

@article{liu2024unsupervised,
    title={Unsupervised Discovery of Steerable Factors When Graph Deep Generative Models Are Entangled},
    author={Shengchao Liu and Chengpeng Wang and Jiarui Lu and Weili Nie and Hanchen Wang and Zhuoxinran Li and Bolei Zhou and Jian Tang},
    journal={Transactions on Machine Learning Research},
    issn={2835-8856},
    year={2024},
    url={https://openreview.net/forum?id=wyU3Q4gahM},
}

graphcg's People

Contributors

chao1224 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.