Bayesian optimization is a coherent, ubiquitous approach to decision-making under uncertainty, with applications including multi-arm bandits, active learning, and black-box optimization. Bayesian optimization selects decisions (i.e. objective function queries) with maximal expected utility with respect to the posterior distribution of a Bayesian model, which quantifies reducible, epistemic uncertainty about query outcomes. In practice, subjectively implausible outcomes can occur regularly for two reasons: 1) model misspecification and 2) covariate shift. Conformal prediction is an uncertainty quantification method with coverage guarantees even for misspecified models and a simple mechanism to correct for covariate shift. We propose conformal Bayesian optimization, which directs queries towards regions of search space where the model predictions have guaranteed validity, and investigate its behavior on a suite of black-box optimization tasks and tabular ranking tasks. In many cases we find that query coverage can be significantly improved without harming sample-efficiency.
We want
git clone https://github.com/samuelstanton/conformal-bayesopt && cd conformal-bayesopt
conda create --name conf-bo-env python=3.8 -y && conda activate conf-bo-env
conda install -c conda-forge rdkit -y
conda install -c pytorch cudatoolkit=11.3
pip install -r requirements.txt --upgrade
pip install -e .
python scripts/black_box_opt.py task=ackley acq_fn=cucb
python scripts/black_box_opt.py task=branin_currin acq_fn=cehvi
python scripts/tab_bandits.py task=poas_stability acq_fn=cucb
See the config files in ./hydra_config
for all configurable parameters.
Note that any config field can be overridden from the command line, and some configurations are not supported.
ackley
branin
levy
michal
branin_currin
carside
peniciliin
zdt2
poas_hydrophobicity
poas_stability
zinc_penalized_logp
zinc_qed
zinc_3pbl_docking
cei
cnei
cucb
ei
nei
ucb
cehvi
cnehvi
ehvi
nehvi
pytest tests
This project currently has very limited test coverage.
If you use any part of this code for your own work, please cite (update citation once ArXiv link is available)
@misc{stanton2022bayesian,
title={Bayesian Optimization with Conformal Coverage Guarantees},
author={Samuel Stanton and Wesley Maddox and Andrew Gordon Wilson},
year={2022},
eprint={2210.12496},
archivePrefix={arXiv},
primaryClass={cs.LG}
}