An implementation of a Thompson Sampling strategy for high-dimensional Bayesian Optimization that leverages gradient samples to guide search. ACTS generates candidate points in subspaces guided by the gradient of a Gaussian Process posterior sample. Compatible with trust region methods such as TuRBO, ACTS produces better samples of maxima and improved optimization across synthetic and real-world benchmarks.
git clone git@github.com:DonneyF/ACTS.git
cd ACTS
pip install -r requirements.txt
pre-commit installBenchmark dependencies
To use the Guacmol/Molecule benchmark tasks you will need rdkit>=2024.09.1. On clusters with
the AllianceCan/ComputeCanada software stack, you can run module load rdkit/2024.09.6 before loading
your virtual environment.
For MuJoCo benchmark tasks, an apptainer sif file needs to be provided to run MuJoCo objectives, which can be obtained from https://github.com/DonneyF/mujoco-v2-for-global-optimization.
Weights and Biases
This project uses Weights and Biases for logging and experiment tracking.
Logging can be disabled by passing logging.wandb=null as a command line argument.
This project uses Hydra to manage run configurations under the hood.
All configurable options are defined in configs/default.yaml, which contains
default values for every tunable option.
You can also override these options through the command line using Hydra's dot-list syntax:
# Example
python main.py benchmark=mopta08 seed=0 benchmark.n_tot=200 acquisition.q=1An example command to run ACTS on the Rover Benchmark:
python main.py acquisition=acts gp=jacobianrbfgp trust_region=turbo benchmark=rover
You can optionally run ACTS within your own BO framework by transplanting the following pieces:
- The Jacobian GP:
JacobianRBFGPfromsrc/models/jacobian.py - The ACTS acquisition routine:
AdaptiveCandidateThompsonSamplingfromsrc/acquisition/acts.py
