mlrMBO: Bayesian Optimization and Model-Based Optimization of Expensive Black-Box Functions

Bernd Bischl, Jakob Richter, Jakob Bossek, Daniel Horn, Michel Lang, Janek ThomasOpenalex Unknown 2017 · DOI · OpenAlex

Abstract

mlrMBO is a flexible and comprehensive R toolbox for model-based optimization (MBO), also known as Bayesian optimization. It implements the Efficient Global Optimization (EGO) algorithm and is designed for both single- and multi-objective optimization with mixed continuous, categorical, and conditional parameters. By leveraging the mlr machine learning toolbox, it provides dozens of regression learners to model the performance of target algorithms. The package includes various infill criteria, multi-point batch proposal, parallel execution, and sophisticated logging mechanisms. Its modular design allows users to easily adapt or replace components for specific use cases.

Introduction

In fields ranging from deep learning hyperparameter tuning to complex engineering simulations, researchers frequently encounter "expensive" black-box functions. These functions lack a known mathematical form, and each evaluation incurs significant costs in terms of time, capital, or computational resources. Standard optimization techniques like grid or random search are often too inefficient for these scenarios.

mlrMBO addresses this challenge through Model-Based Optimization (MBO). Instead of exhaustive sampling, MBO constructs a "surrogate" model—a computationally inexpensive mathematical approximation—of the target function. This surrogate guides the search process by identifying optimal locations for the next sample, effectively balancing exploration of unknown regions with exploitation of known high-performing areas.

Core Methodology

The package's foundation is the Efficient Global Optimization (EGO) algorithm, enhanced with several advanced features for real-world applicability.

Core parameters of the mlrMBO interface, highlighting the integration with the mlr ecosystem for surrogate modeling.

Surrogate Modeling via mlr

A distinguishing feature of mlrMBO is its integration with the mlr (Machine Learning in R) toolbox. While many Bayesian optimization tools are limited to Gaussian Processes, mlrMBO allows users to employ Kriging, Random Forests, or any regression learner available in mlr as a surrogate model.

Handling Complex Search Spaces

The framework natively supports mixed parameter spaces, including continuous, categorical, and conditional parameters. This is crucial for tuning algorithms where certain parameters only become relevant based on the values of others (e.g., tuning specific solver settings only when that solver is selected).

Infill Criteria and Search Guidance

To navigate the surrogate model, mlrMBO provides various "acquisition functions" or infill criteria, such as:

  • Expected Improvement (EI)
  • Lower Confidence Bound (LCB)
  • Augmented EI (specifically for noisy functions)

Multi-Objective and Parallel Optimization

For problems with conflicting goals, mlrMBO supports multi-objective optimization using methods like ParEGO and SMS-EGO. Furthermore, it utilizes the parallelMap package to enable multi-point batch proposals, allowing for parallel evaluation across multi-core systems or high-performance computing clusters.

Benchmarking and Applications

As a software framework, mlrMBO is typically evaluated using standard optimization benchmarks rather than static datasets. The documentation demonstrates its efficacy using the smoof R package, featuring:

  • 1D/2D Test Functions: Such as the Sine and Branin functions for single-objective validation.
  • Multi-Objective Benchmarks: Including ZDT1 and DTLZ1 to demonstrate Pareto front mapping.

Key Insights and Design Philosophy

  • Modularity: The core strength of mlrMBO is its modular architecture. Users can independently swap surrogate learners, infill criteria, or the underlying optimizer used to find the next proposal point.
  • Robustness for Real-World Problems: The package includes sophisticated error handling (Mechanisms I-IV) to manage failed function evaluations, surrogate model crashes, and state recovery for long-running tasks.
  • Human-in-the-Loop Optimization: Functions like initSMBO and updateSMBO allow researchers to manually inspect intermediate results and inject domain knowledge by adding new points during the optimization process.

Performance and Reliability

mlrMBO provides a versatile and scalable solution for optimization tasks. Its ability to handle batch proposals and parallel execution makes it suitable for large-scale problems. Additionally, built-in logging and state-saving mechanisms ensure that optimization processes can be resumed after system failures, a critical feature for tasks that may span several days.

Limitations

Despite its flexibility, some constraints exist:

  • Visualization: Automated high-quality visualization is primarily optimized for 1D and 2D spaces; higher-dimensional spaces require custom handling by the user.
  • Surrogate Selection: The effectiveness of the optimization is highly sensitive to the choice of surrogate model. Users must select a learner that aligns with the target function's characteristics (e.g., Random Forests for discontinuous spaces).
  • Computational Overhead: As the number of evaluated points increases, the overhead for updating the surrogate and optimizing the infill criterion grows, which may eventually impact the "cheapness" of the surrogate approach.

In conclusion, mlrMBO serves as a comprehensive "Swiss Army Knife" for Bayesian Optimization within the R ecosystem, offering unparalleled flexibility for both academic research and industrial applications.

Summary updated

Abstract

Flexible and comprehensive R toolbox for model-based optimization ('MBO'), also known as Bayesian optimization. It implements the Efficient Global Optimization Algorithm and is designed for both single- and multi- objective optimization with mixed continuous, categorical and conditional parameters. The machine learning toolbox 'mlr' provide dozens of regression learners to model the performance of the target algorithm with respect to the parameter settings. It provides many different infill criteria to guide the search process. Additional features include multi-point batch proposal, parallel execution as well as visualization and sophisticated logging mechanisms, which is especially useful for teaching and understanding of algorithm behavior. 'mlrMBO' is implemented in a modular fashion, such that single components can be easily replaced or adapted by the user for specific use cases.
BibTeX
@inproceedings{bischl2017mlrmbo,
  author = {Bernd Bischl and Jakob Richter and Jakob Bossek and Daniel Horn and Michel Lang and Janek Thomas},
  title = {{mlrMBO: Bayesian Optimization and Model-Based Optimization of Expensive Black-Box Functions}},
  booktitle = {Openalex Unknown},
  year = {2017},
  doi = {10.32614/cran.package.mlrmbo},
}
Figure