-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
411 additions
and
631 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,11 +10,12 @@ | |
TODO: FIX PREPRINT BUTTON AFTER WE'RE ON ARXIV!!! | ||
|
||
## Description | ||
This is the official repository for the paper [Iterated Denoising Energy Matching for Sampling from Boltzmann Densities](https://arxiv.org/abs/2310.02391) (TODO: FIX THIS LINK AFTER WE'RE ON ARXIV). | ||
|
||
This is the official repository for the paper [Iterated Denoising Energy Matching for Sampling from Boltzmann Densities](https://arxiv.org/abs/2310.02391) (TODO: FIX THIS LINK AFTER WE'RE ON ARXIV). | ||
|
||
We propose iDEM, a scalable and efficient method to sample from unnormalized probability distributions. iDEM makes use of the DEM objective, inspired by the stochastic regression and simulation | ||
free principles of score and flow matching objectives while allowing one to learn off-policy, in a loop while itself generating (optionally exploratory) new states which are subsequently | ||
learned on. iDEM is also capable of incorporating symmetries, namely those represented by the product group of $SE(3) \times \mathbb{S}_n$. We experiment on a 2D GMM task as well as a number of physics | ||
learned on. iDEM is also capable of incorporating symmetries, namely those represented by the product group of $SE(3) \\times \\mathbb{S}\_n$. We experiment on a 2D GMM task as well as a number of physics | ||
inspired problems. These include: | ||
|
||
- DW4 -- the 4 particle double well potential (8 dimensions total) | ||
|
@@ -29,13 +30,14 @@ out most of the code and experiments with help from [@sarthmit](https://github.c | |
|
||
For installation we recommend the use of Micromamba. Please refer [here](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) for an installation guide for Micromamba. | ||
First, we install dependencies | ||
|
||
```bash | ||
# clone project | ||
git clone [email protected]:jarridrb/DEM.git | ||
cd DEM | ||
|
||
# create micromamba environment | ||
micromamba create -f environment.yaml | ||
micromamba create -f environment.yaml | ||
micromamba activate dem | ||
|
||
# install requirements | ||
|
@@ -48,25 +50,29 @@ an example `.env.example` file for convenience. Note that to use wandb we requir | |
`.env` file. | ||
|
||
To run an experiment, e.g., GMM with iDEM, you can run on the command line | ||
|
||
```bash | ||
python dem/train.py experiment=gmm_idem | ||
``` | ||
|
||
We include configs for all experiments matching the settings we used in our paper for both iDEM and pDEM with the exception of LJ55 for | ||
which we only include a config for iDEM and pDEM had convergence issues on LJ55. | ||
|
||
## Current Code | ||
## Current Code | ||
|
||
The current repository contains code for experiments for iDEM and pDEM as specified in our paper. | ||
|
||
## Planned Updates | ||
|
||
- [ ] Code to do Langevin on top of generated samples | ||
|
||
## Citations | ||
|
||
If this codebase is useful towards other research efforts please consider citing us. TODO: FIX THIS CITATION ONCE WE'RE ON ARXIV!!! | ||
|
||
``` | ||
@misc{bose2023se3stochastic, | ||
title={SE(3)-Stochastic Flow Matching for Protein Backbone Generation}, | ||
title={SE(3)-Stochastic Flow Matching for Protein Backbone Generation}, | ||
author={Avishek Joey Bose and Tara Akhound-Sadegh and Kilian Fatras and Guillaume Huguet and Jarrid Rector-Brooks and Cheng-Hao Liu and Andrei Cristian Nica and Maksym Korablyov and Michael Bronstein and Alexander Tong}, | ||
year={2023}, | ||
eprint={2310.02391}, | ||
|
@@ -75,14 +81,13 @@ If this codebase is useful towards other research efforts please consider citing | |
} | ||
``` | ||
|
||
|
||
## Contribute | ||
|
||
We welcome issues and pull requests (especially bug fixes) and contributions. | ||
We will try our best to improve readability and answer questions! | ||
|
||
|
||
## Licences | ||
|
||
This repo is licensed under the [MIT License](https://opensource.org/license/mit/). | ||
|
||
### Warning: the current code uses PyTorch 2.0.0+ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
_target_: dem.energies.multi_double_well_energy.MultiDoubleWellEnergy | ||
_target_: dem.energies.multi_double_well_energy.MultiDoubleWellEnergy | ||
|
||
dimensionality: 8 | ||
n_particles: 4 | ||
dimensionality: 8 | ||
n_particles: 4 | ||
|
||
data_from_efm: true | ||
data_path: "data/test_split_DW4.npy" | ||
data_path_train: "data/train_split_DW4.npy" | ||
data_path_val: "data/val_split_DW4.npy" | ||
data_from_efm: true | ||
data_path: "data/test_split_DW4.npy" | ||
data_path_train: "data/train_split_DW4.npy" | ||
data_path_val: "data/val_split_DW4.npy" | ||
|
||
device: ${trainer.accelerator} | ||
device: ${trainer.accelerator} | ||
|
||
plot_samples_epoch_period: 1 | ||
plot_samples_epoch_period: 1 | ||
|
||
data_normalization_factor: 1.0 | ||
data_normalization_factor: 1.0 | ||
|
||
is_molecule: true | ||
|
||
|
||
is_molecule: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
_target_: dem.energies.gmm_energy.GMM | ||
_target_: dem.energies.gmm_energy.GMM | ||
|
||
dimensionality: 2 | ||
n_mixes: 40 | ||
loc_scaling: 40 | ||
log_var_scaling: 1.0 | ||
dimensionality: 2 | ||
n_mixes: 40 | ||
loc_scaling: 40 | ||
log_var_scaling: 1.0 | ||
|
||
device: ${trainer.accelerator} | ||
device: ${trainer.accelerator} | ||
|
||
plot_samples_epoch_period: 1 | ||
plot_samples_epoch_period: 1 | ||
|
||
should_unnormalize: true | ||
data_normalization_factor: 50 | ||
should_unnormalize: true | ||
data_normalization_factor: 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
_target_: dem.energies.lennardjones_energy.LennardJonesEnergy | ||
_target_: dem.energies.lennardjones_energy.LennardJonesEnergy | ||
|
||
dimensionality: 39 | ||
n_particles: 13 | ||
data_path: "data/test_split_LJ13-1000.npy" | ||
data_path_train: "data/train_split_LJ13-1000.npy" | ||
data_path_val: "data/test_split_LJ13-1000.npy" | ||
dimensionality: 39 | ||
n_particles: 13 | ||
data_path: "data/test_split_LJ13-1000.npy" | ||
data_path_train: "data/train_split_LJ13-1000.npy" | ||
data_path_val: "data/test_split_LJ13-1000.npy" | ||
|
||
device: ${trainer.accelerator} | ||
device: ${trainer.accelerator} | ||
|
||
plot_samples_epoch_period: 1 | ||
plot_samples_epoch_period: 1 | ||
|
||
data_normalization_factor: 1.0 | ||
data_normalization_factor: 1.0 | ||
|
||
is_molecule: True | ||
is_molecule: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
_target_: dem.energies.lennardjones_energy.LennardJonesEnergy | ||
_target_: dem.energies.lennardjones_energy.LennardJonesEnergy | ||
|
||
dimensionality: 165 | ||
n_particles: 55 | ||
data_path: "data/test_split_LJ55-1000-part1.npy" | ||
data_path_train: "data/train_split_LJ55-1000-part1.npy" | ||
data_path_val: "data/val_split_LJ55-1000-part1.npy" | ||
dimensionality: 165 | ||
n_particles: 55 | ||
data_path: "data/test_split_LJ55-1000-part1.npy" | ||
data_path_train: "data/train_split_LJ55-1000-part1.npy" | ||
data_path_val: "data/val_split_LJ55-1000-part1.npy" | ||
|
||
device: ${trainer.accelerator} | ||
device: ${trainer.accelerator} | ||
|
||
plot_samples_epoch_period: 1 | ||
plot_samples_epoch_period: 1 | ||
|
||
data_normalization_factor: 1.0 | ||
|
||
is_molecule: True | ||
|
||
|
||
data_normalization_factor: 1.0 | ||
|
||
is_molecule: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.