Source-linked AI summary
mlrMBO: A Modular Framework for Model-Based Optimization of Expensive Black-Box Functions
Bernd Bischl, Jakob Richter, Jakob Bossek, Daniel Horn, Janek Thomas, Michel Lang
TL;DR
Expensive black-box optimization requires effective search when evaluations are costly and system internals are unavailable. mlrMBO addresses this with a modular R framework supporting diverse surrogates, parameter spaces, objectives, and proposal strategies. Across benchmark scenarios, it reports state-of-the-art performance while remaining reasonably fast and comparable to established frameworks in HPOlib benchmarks.
Problem
Expensive black-box functions often lack accessible internal workings or derivatives, making optimization with few evaluations an important problem.
Method
mlrMBO implements a modular SMBO framework that supports interchangeable regression learners and optimization components across mixed, multi-objective, and multi-point settings.
Results
mlrMBO achieved state-of-the-art solution quality in single-objective benchmarks and was on par with SMAC, Spearmint, and TPE in HPOlib benchmarks.
Takeaways & Limitations
mlrMBO offers a flexible R toolbox for combining optimization components across diverse black-box optimization scenarios.
Takeaways & Limitations
For mixed and conditional spaces, random-forest surrogates require uncertainty estimation and are not spatial models like Gaussian processes.
Abstract
from arXiv · showhide
We present mlrMBO, a flexible and comprehensive R toolbox for model-based optimization (MBO), also known as Bayesian optimization, which addresses the problem of expensive black-box optimization by approximating the given objective function through a surrogate regression model. It is designed for both single- and multi-objective optimization with mixed continuous, categorical and conditional parameters. Additional features include multi-point batch proposal, parallelization, visualization, logging and error-handling. mlrMBO is implemented in a modular fashion, such that single components can be easily replaced or adapted by the user for specific use cases, e.g., any regression learner from the mlr toolbox for machine learning can be used, and infill criteria and infill optimizers are easily exchangeable. We empirically demonstrate that mlrMBO provides state-of-the-art performance by comparing it on different benchmark scenarios against a wide range of other optimizers, including DiceOptim, rBayesianOptimization, SPOT, SMAC, Spearmint, and Hyperopt.
1. Introduction
Expensive black-box optimization targets systems whose internal workings are unavailable, making sequential model-based optimization useful for reducing costly evaluations. mlrMBO presents a modular R framework supporting varied parameter spaces, objectives, and optimization components.
- Black-box functions have unknown internal workings and often lack derivatives, while evaluations may be expensive in time or money.
- SMBO begins with an initial design, fits a regression model, proposes a promising point through an infill criterion, and evaluates it.
- SMBO has been extended to multi-objective optimization, multi-point proposals, flexible regression models, and alternative infill criteria.
- Related software: Existing software differs in supported parameter types, objectives, parallelization, modeling approaches, and application focus.DiceOptim, rBayesianOptimization, Spearmint, SMAC, Hyperopt, and SPOT provide different combinations of these capabilities.
- Main contributions: mlrMBO provides a generic, modular SMBO framework with plug-and-play components, broad surrogate-model flexibility, and support for mixed spaces, multi-point proposals, and multi-objective optimization.Its connection to mlr provides access to more than 60 machine-learning regression algorithms, and combinations of its supported domains are possible.
2. Sequential Model-Based Optimization
SMBO is organized as customizable building blocks whose combinations can be adapted to different optimization tasks. The framework covers standard EGO and SMAC-like approaches, parallel multi-point proposals, and multi-objective optimization.
- SMBO is modular, allowing its building blocks to be customized for a variety of optimization tasks.
- The framework presents prominent component combinations including Kriging-based EGO and SMAC-like optimizers.
- Parallelization is introduced through multi-point proposal, alongside multi-objective optimization.
2.1. Sequential model-based optimization
Sequential model-based optimization starts with evaluated design points, fits a surrogate, proposes promising points through an infill criterion, and repeats until a stopping condition is met. mlrMBO supports this workflow across varied input spaces, surrogate models, criteria, and infill optimizers.
- Sequential model-based optimization: The procedure evaluates an initial design, fits a surrogate model, proposes new points, evaluates them, and repeats while budget remains.The initial design supplies data for the first surrogate; subsequent iterations update the data with newly evaluated points.
- Infill criteria: Infill criteria use surrogate predictions to select points with either promising objective values or high potential to improve the surrogate.The framework balances exploitation of predicted performance with exploration of uncertain regions.
- Surrogate models: Surrogate choice depends on the input space: Kriging is recommended for numeric domains, whereas random forests can directly handle categorical parameters.mlrMBO exposes regression learners from mlr and supports custom regression learners.
- Infill criteria: mlrMBO supports pure exploitation, pure exploration, noisy optimization, multi-point proposals, and multi-objective optimization through exchangeable criteria.The modular design makes extensions toward additional criteria functions straightforward.
- Infill optimization: The focus-search infill optimizer handles numeric, categorical, mixed, and hierarchical spaces by repeatedly sampling and shrinking the search region around promising points.It can restart the search and iteratively focus on the best surrogate-evaluated candidate.
- Termination and solution: Optimization can terminate after evaluation or iteration limits, time budgets, a target objective value, or user-defined termination rules.The final solution is usually the best observed point, although a final surrogate prediction can be used, especially for noisy objectives.
2.2. Efficient Global Optimization (EGO)
Efficient Global Optimization combines Kriging with expected improvement to guide sequential search over numeric domains. Its acquisition rule favors points that are both promising under the model and informative where uncertainty is high.
- EGO formulation: EGO applies Kriging models with expected improvement to sequentially optimize box-constrained functions with real-valued inputs.Kriging provides a local uncertainty estimator used by the acquisition strategy.
- Point proposal: Expected improvement balances low predicted objective values with high uncertainty when selecting the next evaluation point.The illustrated EGO run uses the EI optimum as the next proposed point and can locate optima in multi-modal functions.
2.3. Mixed Space Optimization
mlrMBO supports mixed-valued and hierarchical parameter spaces, including conditional parameters whose activity depends on other settings. It uses a modified random forest surrogate and explicit missing-value encodings to model these spaces.
- Mixed and hierarchical spaces: Conditional parameters can become active only under specific settings, as γ does for the radial but not linear SVM kernel.The SVM example distinguishes γ, which depends on kernel choice, from C, which is always active.
- Mixed and hierarchical spaces: Initial-design methods support categorical parameters and hierarchical dependencies whose feasible values depend on other parameter settings.
- Surrogate modeling: The surrogate uses a modified random forest that handles categorical features and missing values arising from inactive conditional parameters.
- Surrogate modeling: Missing categorical values receive a new level, while missing numerical values are imputed outside the parameter's box constraints.This separate-class encoding was reported to perform best for decision trees when missingness is related to the outcome.
- Surrogate uncertainty: Random-forest uncertainty estimates enable LCB and EI, with the jackknife estimator used as mlrMBO's default despite less intuitive spatial properties than Kriging uncertainty.The authors identify the uncertainty estimator's properties as an area for further research.
2.4. Multi-Point Proposal
mlrMBO supports proposing multiple configurations per SMBO iteration for parallel evaluation. Its methods balance exploitation and exploration or generate diverse proposals through sequential surrogate updates or multiobjective optimization.
- Motivation: Parallel evaluation motivates proposing m configurations simultaneously to accelerate optimization when objective evaluations are expensive.
- qLCB: qLCB optimizes separately for multiple λ_k values, producing proposals that range from exploitative to exploratory.Low λ_k values favor proximity to the best observed value, whereas high values encourage exploration.
- Constant liar: Constant liar generates later proposals by updating the surrogate with a made-up target for an earlier unevaluated point.Possible target values include the minimum, maximum, mean, or predicted posterior mean.
- MOIMBO: MOIMBO jointly optimizes posterior mean and variance as multiple objectives and can add nearest-neighbor distance to promote proposal diversity.
2.5. Noisy Optimization
For noisy objectives, mlrMBO provides adapted infill criteria rather than built-in repetition strategies. Its expected quantile improvement criterion uses a plug-in quantile threshold that can support reevaluating promising points.
- Noise handling: Noisy optimization targets E[f(x)], and mlrMBO currently addresses noise with adapted infill criteria rather than repetition strategies.Users can still average repeated objective evaluations themselves.
- Expected quantile improvement: Expected quantile improvement replaces the best observed value in EI with a plug-in threshold q_min.
- Expected quantile improvement: q_min is the lowest β-quantile among previously evaluated points, with β serving as a user-controlled parameter.
- Expected quantile improvement: Because EQI can remain non-zero at evaluated points, it permits reevaluations or nearby evaluations to gather more information about promising points.
- Extensions: mlrMBO also offers augmented expected improvement and supports straightforward extensions to additional criterion functions through its modular design.
2.6. Model-Based Multi-Objective (MBMO) Optimization
Model-based multi-objective optimization handles objectives that cannot be totally ordered by using Pareto dominance and specialized algorithm classes. The paper distinguishes scalarization-based and Pareto-based approaches, while directing readers to further details on implemented methods.
- Problem formulation: Multi-objective problems optimize several target functions simultaneously, so Pareto dominance compares points across all objectives without requiring a total order.A point must be no worse in every component and strictly better in at least one to dominate another.
- Algorithm classes: Scalarization-based MBMO algorithms apply EGO to weighted combinations of objectives, using random scalarization weights across iterations.
- Algorithm classes: Pareto-based algorithms fit separate models for individual objectives and optimize their infill criteria jointly.
- Algorithm classes: The paper identifies three MBMO algorithm classes and refers readers to a detailed discussion of their multi-point variants and mlrMBO implementations.The supplied passage explicitly describes scalarization-based and Pareto-based classes but truncates the third class's description.
3. mlrMBO R Package
mlrMBO is a modular R framework that assembles model-based optimization components around user-defined black-box functions, designs, surrogate models, and control settings. Its plug-and-play structure supports alternative regression learners, infill criteria, infill optimizers, stopping rules, and diagnostic outputs.
- Framework: mlrMBO implements model-based optimization in R through replaceable components that can be combined to match an optimization problem.Infill criteria and stopping conditions are explicitly configurable, while the framework supports custom black-box functions and parameter sets.
- Problem definition: Users define a black-box function by supplying its implementation, name, and parameter set through smoof-compatible constructors.The parameter set specifies the function’s input variables and their domains.
- Initialization: An initial design initializes the surrogate, with maximin Latin Hypercube sampling of 4 times the parameter count used by default when none is supplied.Users can instead provide a design generated with generateDesign().
- Surrogate model: mlrMBO can use Kriging, random forests, or other mlr regression learners, provided uncertainty-based criteria receive uncertainty estimates or bagging support.The default is Kriging with a Matern-3/2 kernel for fully numeric spaces and random forests with jackknife variance otherwise.
- Execution: Control objects configure proposed-point counts, error handling, infill criteria, infill optimizers, and termination conditions for the optimization run.The example starts mbo() with an initial design, black-box function, surrogate, and control object, using expected improvement and 30 iterations.
- Diagnostics: The resulting object records the optimization path, evaluations, runtimes, final state, errors, and optionally fitted surrogates, with visualization utilities for diagnostic inspection.exampleRun() and exampleRunMultiObj() visualize optimization steps for supported one- and two-dimensional domains.
4. Benchmarks
The benchmarks evaluate mlrMBO against R-based, external, and multi-objective optimizers across synthetic, real-world, numeric, mixed, and bi-objective problems. Across these settings, mlrMBO generally achieves leading or state-of-the-art performance, while its additional surrogate and infill overhead is relevant mainly when evaluations are cheap.
- Single-objective benchmarks: Across six continuous single-objective test functions, mlrMBO beats random search on all functions and achieves the best overall averaged rank.It is substantially better than other EGO implementations on four functions and similar on two.
- Runtime: mlrMBO’s optimization overhead is higher than random search and CMA-ES but remains faster than SPOT and far faster than rBayesianOptimization.The paper frames this overhead as reasonable for expensive evaluations because surrogate fitting and infill optimization target better objective values.
- Mixed-space benchmarks: On 13 HPOlib problems, mlrMBO outperforms SMAC and TPE on all four synthetic functions, matches Spearmint except on michalewicz, and ranks first in numeric settings.It also performs exceptionally well on every grid optimization, while competitors are each worse on at least one grid problem.
- Mixed-space benchmarks: For neural-network and deep-belief-network benchmarks, mlrMBO is similar to SMAC, slightly better than Spearmint and TPE, and first by aggregated mean rank in mixed hyperparameter spaces.The paper concludes that mlrMBO is on par with state-of-the-art Bayesian optimization software in complex settings.
- Multi-objective benchmarks: The multi-objective benchmark combines ten BBOB functions into 55 bi-objective problems and evaluates algorithms under a budget of 44d function evaluations, including 4d for initialization.Performance is summarized using normalized Pareto approximations, mean ranks by function class, and raw hypervolume values.
- Multi-objective benchmarks: SMS-EGO, ParEGO, and MSPOT outperform both baselines on nearly all multi-objective test functions, with MSPOT superior overall; GPareto is especially weak on multi-modal functions.GPareto performs best for the separable-function class but is inferior to nearly all mlrMBO implementations elsewhere.
5. Conclusion
The conclusion presents mlrMBO as a suitable R toolbox for expensive single- and multi-objective optimization, supported by benchmarks across diverse scenarios. Its reported performance is competitive with established optimization frameworks while remaining reasonably fast.
- mlrMBO achieved state-of-the-art solution quality in single-objective benchmarks against CMA, random search, and alternative SMBO implementations.The conclusion also reports that it remained reasonably fast.
- mlrMBO was on par with SMAC, Spearmint, and TPE in benchmarks using HPOlib.
- SMBO-based methods, particularly SMS-EGO, showed excellent performance in expensive multi-objective optimization.
- NSGA-II and random search were outperformed on all nine test functions, while ParEGO occasionally failed.
- Overall, the results support mlrMBO for expensive optimization in R across single- and multi-objective tasks.
Appendix
The appendix presents hypervolume plots for final Pareto fronts across test functions and optimization algorithms. The displayed algorithm labels include several MBO variants, NSGA-II, and random search.
- The appendix displays several numeric y-axis ranges, including 0.7–1.1, 0.8–1.2, 1.17–1.21, and 1.00–1.20.
- The plotted algorithm labels include gpareto, EPS-EGO, MSpot, ParEGO, SMS-EGO, NSGA-II, and random search.
- Figures 6 and 7 plot hypervolume values of final Pareto fronts on the y axis for respective algorithms and test functions.