PyBADS: Fast and robust black-box optimization in Python

Gurjeet Sangra Singh, Luigi Acerbi
6/27/2023
stat.MLcs.LG

Official code: acerbilab/pybads (95 stars, BSD-3-Clause, last commit 2025-10-16).

Abstract

PyBADS is a Python implementation of the Bayesian Adaptive Direct Search (BADS) algorithm for fast and robust black-box optimization (Acerbi and Ma 2017). BADS is an optimization algorithm designed to efficiently solve difficult optimization problems where the objective function is rough (non-convex, non-smooth), mildly expensive (e.g., the function evaluation requires more than 0.1 seconds), possibly noisy, and gradient information is unavailable. With BADS, these issues are well addressed, making it an excellent choice for fitting computational models using methods such as maximum-likelihood estimation. The algorithm scales efficiently to black-box functions with up to $D \approx 20$ continuous input parameters and supports bounds or no constraints. PyBADS comes along with an easy-to-use Pythonic interface for running the algorithm and inspecting its results. PyBADS only requires the user to provide a Python function for evaluating the target function, and optionally other constraints. Extensive benchmarks on both artificial test problems and large real model-fitting problems models drawn from cognitive, behavioral and computational neuroscience, show that BADS performs on par with or better than many other common and state-of-the-art optimizers (Acerbi and Ma 2017), making it a general model-fitting tool which provides fast and robust solutions.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

PyBADS: Bayesian Adaptive Direct Search optimization algorithm for model fitting in Python

953CSS, PythonFeb 11, 20221 years agoBSD-3-Clause
bayesian-optimizationlog-likelihoodnoiseless-functionsnoisy-functionsoptimization-algorithms+1 more

Similar Papers

Cite this paper

@article{singh2023pybads,
  title  = {PyBADS: Fast and robust black-box optimization in Python},
  author = {Gurjeet Sangra Singh and Luigi Acerbi},
  year   = {2023},
  eprint = {2306.15576},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.15576v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.15576.svg)](https://codeofpaper.com/paper/2306.15576)

Discussion