Code Monkey home page Code Monkey logo

pi_is_back's Introduction

PI is back! Switching Acquisition Functions in Bayesian Optimization

This is the repository for the workshop paper (link to arXiv) at the Gaussian Process workshop at NeurIPS'22.

If you use our work or dataset (2.1GB), please cite us:

@misc{https://doi.org/10.48550/arxiv.2211.01455,
  doi = {10.48550/ARXIV.2211.01455},  
  url = {https://arxiv.org/abs/2211.01455},  
  author = {Benjamins, Carolin and Raponi, Elena and Jankovic, Anja and van der Blom, Koen and Santoni, Maria Laura and Lindauer, Marius and Doerr, Carola},  
  keywords = {Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences},  
  title = {PI is back! Switching Acquisition Functions in Bayesian Optimization},  
  publisher = {arXiv},  
  year = {2022},  
  copyright = {Creative Commons Attribution Share Alike 4.0 International}
}

Installation

Create a fresh conda environment.

conda create -n afs python=3.10
conda activate afs

Download repo, switch to branch and install.

git clone https://github.com/automl-private/DAC-BO.git
cd DAC-BO
git checkout PI_is_back
pip install -e .

Instructions

Our motivation is to make Bayesian Optimization (BO) even more sample-efficient and performant. For this we dynamically set BO's hyperparameters (HPs) or components. As a starter we chose to dynamically switch the acquisition function (AF). Available choices are EI (more explorative) and PI (more exploitative).

We create seven manual schedules composed of those two acquisition functions and evaluate them on the BBOB functions from the COCO benchmark (5d) via IOH experimenter.

BO details:

  • Size of initial design: 3d: 15
  • Number of surrogate-based evaluations: 20d: 100
  • Number of runs/seeds: 40

We adapt SMAC3 for this.

Creating the insights requires following steps:

  1. Rollout schedules on all BBOB functions (run BO with dynamic AF schedule)
  2. Plot and analyse😊

Schedules

  • static (EI): only EI
  • static (PI): only PI
  • random: random EI or PI
  • round robin: EI, PI, EI, PI, EI, PI, ...
  • explore-exploit: first EI, then PI. switch after certain percentage of surrogate-based budget
    • 0.25, 0.5, 0.75

Down below you find rough instructions to reproduce the results.

Rollout Schedules

Use script evaluation/evaluate_manual.py. In particalur, use this command:

python evaluation/evaluate_manual.py '+baseline=glob(*)' 'seed=range(1,41)' 'coco_instance.function=range(1,25)' 'coco_instance.dimension=2,5' -m 

Maybe you need to split this command because this creates 7*40*25*2=14000 jobs. This creates a hydra job array deployed on slurm. You can also use a local launcher (submitit local).

OR

See our raw dataset (2.1GB) 🔮.

Collect Rollout Data and Plot

See evaluation/analyse_bbob.ipynb.

Plots:

  • Violinplot of final regret of the different manual schedules
  • Convergence plot (regret over time)

pi_is_back's People

Contributors

benjamc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  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.