TL;DR
The paper introduces mlr3mbo, a modern, modular, and highly flexible R toolbox for Bayesian optimization (BO) natively integrated into the mlr3 ecosystem. By using coordinate descent to meta-optimize its own hyperparameters, mlr3mbo establishes robust default configurations that perform on par with state-of-the-art Python frameworks like Ax, HEBO, SMAC3, and Optuna.
What Problem Does This Paper Address?
Hyperparameter optimization (HPO) and Automated Machine Learning (AutoML) frequently require solving "black-box" optimization problems where evaluating a single configuration is incredibly expensive, noisy, and lacks gradient information. Bayesian optimization solves this by using a cheap probabilistic surrogate model to guide the search.
While Python has a dominant ecosystem of modern, actively maintained BO frameworks (e.g., Ax, BoTorch, Optuna), R users have historically been left with older, less modular packages. The authors bridge this gap with mlr3mbo, designed to serve both practitioners wanting robust out-of-the-box performance and researchers needing flexible, object-oriented building blocks to design custom BO algorithms.
Methods
mlr3mbo implements a clean, modular architecture based on R6 object-oriented classes. The framework breaks a BO loop down into four distinct components:
- Surrogate Model: Approximates the black-box function (e.g., Gaussian Processes for numeric spaces; Random Forests for mixed-hierarchical spaces).
- Acquisition Function: Quantifies the utility of searching specific regions, balancing exploration and exploitation (e.g., Expected Improvement, Lower Confidence Bound).
- Acquisition Optimizer: The algorithm used to maximize the acquisition function (e.g., CMA-ES, Local Search, DIRECT).
- Loop Function: Controls the overall execution flow, supporting sequential, batch parallel, or asynchronous decentralized execution.
To make the package highly reliable for automated pipelines, the authors include robust error handling: if a primary surrogate model (like a Gaussian Process) fails numerically, mlr3mbo automatically catches the error and falls back to a stable fallback learner (like a small Random Forest).
Users define their search spaces using the companion paradox package, which provides explicit constructors for different parameter types:
Datasets
The authors evaluated mlr3mbo using YAHPO Gym (YAHPO-SO v1), a comprehensive, surrogate-based benchmark suite for hyperparameter optimization. YAHPO Gym simulates real-world machine learning tuning scenarios (such as tuning XGBoost, Random Forests, or deep neural networks) at a fraction of the computational cost. The benchmark suite includes both purely numeric search spaces and complex mixed-hierarchical spaces (where certain parameters are only active depending on the choice of a parent parameter).
Key Insights and Ideas
- Acquisition Optimization is a Worthwhile Investment: A common debate in BO is whether it's worth precisely optimizing the acquisition function. The authors find that investing computational budget into powerful optimizers—specifically CMA-ES for numeric spaces and Local Search (LS) for mixed spaces—yields massive performance gains compared to cheaper alternatives like random search or standard L-BFGS-B.
- Target Transformations are Vital for GPs: Log-transforming the target values before fitting a Gaussian Process prevents extreme outliers (like timeouts or failed training runs) from warping the surrogate model, drastically improving predictive accuracy.
- Forest Size Matters for Uncertainty: When using Random Forests as surrogates in mixed-hierarchical spaces, the common practice of using very few trees (e.g., 10 trees) to save time severely degrades performance.
mlr3mbodefaults to 500 trees combined with the Law of Total Variance (LTV) estimator to ensure stable, reliable uncertainty estimates.
Key Results
The authors used a greedy coordinate descent search (consuming roughly 7.7 CPU-years of computation) to find the best default settings. Performance was measured using the Random Search Normalized Score (RSNS), where 0 represents the baseline performance of standard Random Search and 1 represents an exhaustive Random Search with 1,000,000 evaluations.
- Numeric Spaces: The optimized configuration (GP surrogate with Matérn 3/2 kernel, LCB acquisition function, and CMA-ES optimizer) achieved a mean RSNS of 1.19, meaning it outperformed an exhaustive 1-million-point random search while using a tiny fraction of the budget.
- Mixed-Hierarchical Spaces: The optimized configuration (Random Forest surrogate with LTV variance estimation, LCB acquisition function, and Local Search optimizer) achieved a mean RSNS of 0.82.
- SOTA Comparison: In direct head-to-head benchmarks against Python's leading tools (Ax, HEBO, Optuna, SMAC3),
mlr3mbodemonstrated highly competitive "anytime performance" and achieved lower toolkit runtime overhead in low-to-medium dimensional spaces.
Limitations and Future Work
- Coordinate Descent Limitations: The tuning method used to find the defaults optimizes one parameter at a time, meaning it can miss complex, multi-parameter interactions.
- Deterministic Benchmarks: YAHPO Gym benchmarks are surrogate-based and therefore deterministic, meaning they do not fully capture the stochastic noise present in real-world machine learning training runs.
- Multi-Fidelity Support: While
mlr3mboexcels at sequential and parallel BO, it does not yet natively support multi-fidelity optimization techniques (like BOHB or Hyperband) that exploit cheaper, lower-fidelity evaluations. The authors note that adding native multi-fidelity support is a high priority on their development roadmap.
Summary updated