Skip to content

umkiyoung/CiBO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Posterior Inference in Latent Space for Scalable Constrained Black-box Optimization (CiBO)

This repository implements the CiBO method presented in our paper "Posterior Inference in Latent Space for Scalable Constrained Black-box Optimization". CiBO leverages diffusion models to perform efficient posterior inference and amortize the sampling from the posterior distribution in the latent space of flow-based models, achieving superior performance on various synthetic and real-world constrained black-box optimization tasks.

For a visual explanation of the CiBO framework, please see the image below: figure1_update_ver4


📑 Table of Contents


🛠️ Installation

To include the CiBO repository in your Python path, add the following line to your shell configuration file (e.g., .bashrc, .zshrc):

# Open your shell configuration file
nano ~/.bashrc  # or nano ~/.zshrc

# Add the following line (replace /home/name/CiBO with your path)
export PYTHONPATH=/home/name/CiBO:$PYTHONPATH

After editing, reload your shell configuration:

source ~/.bashrc  # or source ~/.zshrc

Alternatively, add the same export line to the top of baselines/scripts/cibo.sh.


🧩 Environment Setup

We recommend using conda for environment management.

# 1. Create and activate conda environment
conda create -n cibo python=3.9 -y
conda activate cibo

# 2. Mujoco Installation (Mujoco should be in ~/.mujoco)
pip install Cython==0.29.36 numpy==1.22.0 mujoco_py==2.1.2.14
pip install box2d-py Box2D
python -c "import mujoco_py"  # Mujoco compile test

# 3. Torch Installation
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117

# 4. Additional Dependencies
pip install botorch==0.6.4 gpytorch==1.6.0
pip install gym==0.13.1 attrdict==2.0.1 wandb==0.15.3 matplotlib==3.7.5
pip install pandas==1.5.3 scikit-learn==1.2.2 tqdm==4.64.1 
pip install torchdiffeq

# 5. Lasso Environment
pip install celer
pip install "sparse-ho @ https://github.com/QB3/sparse-ho/archive/master.zip"
pip install libsvmdata
pip install pygame

# 6. Other dependencies
pip install einops POT

▶️ Running Examples

To run the main CiBO example:

sh baselines/scripts/cibo.sh

All configuration settings are available in the baselines/scripts folder.


📚 References

Our implementation of the diffusion sampler is based on:


Feel free to open issues or pull requests for questions, suggestions, or contributions!

About

Posterior Inference in Latent Space for Scalable Constrained Black-box Optimization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors