Tree ensemble kernels for Bayesian optimization with known constraints over mixed-feature spaces

Alexander Thebelt, Calvin Tsay, Robert M. Lee, Nathan Sudermann-Merx, David Walz, Behrang Shafei, Ruth Misener

Introduction

Bayesian Optimization (BO) has emerged as a premier strategy for the global optimization of expensive-to-evaluate black-box functions. Despite its success in hyperparameter tuning and experimental design, traditional BO frameworks—typically built upon Gaussian Processes (GPs) with standard kernels—face significant challenges when applied to real-world engineering problems. These problems often involve mixed-feature spaces (a combination of continuous, integer, and categorical variables) and known constraints (logical, hierarchical, or physical rules that define the feasible region).

Presented at NeurIPS 2022, LEAF-GP introduces a novel framework that bridges the gap between the flexibility of tree ensembles and the probabilistic rigor of GPs. By interpreting tree ensembles as kernels and formulating the acquisition function optimization as a mathematical programming problem, LEAF-GP provides a robust solution for optimizing complex systems under hard constraints.

The LEAF-GP Framework

The core innovation of LEAF-GP lies in its dual approach to surrogate modeling and acquisition optimization. It addresses the limitations of standard GPs in handling categorical data and the inability of traditional tree-based models (like Random Forests) to provide principled uncertainty quantification.

1. The Tree Ensemble Kernel

LEAF-GP utilizes a Tree Ensemble Kernel to define the similarity between points in the search space. The authors demonstrate that a gradient-boosted tree ensemble can be transformed into a valid Mercer kernel based on "leaf overlap."

In this formulation, if two input points consistently fall into the same leaf across a majority of trees in the ensemble, they are considered highly correlated. This allows the model to leverage the inherent strengths of trees—such as handling categorical splits and non-linearities—while maintaining the formal uncertainty estimates of a Gaussian Process. The "agreement" or "disagreement" between trees across the ensemble serves as a proxy for epistemic uncertainty, signaling the model to explore regions where data is sparse.

2. Acquisition via Mixed-Integer Programming

In standard BO, the next point to evaluate is chosen by maximizing an acquisition function (e.g., Expected Improvement). This is often done via local search or random sampling, which can be highly inefficient in constrained or disjointed search spaces.

LEAF-GP replaces these heuristics with Mixed-Integer Second-Order Cone Programming (MISOCP). By using a formal optimization solver (such as Gurobi), the framework can identify the global optimum of the acquisition function. More importantly, this approach allows for the direct integration of known constraints. Linear, quadratic, and logical constraints (e.g., "if variable A is active, variable B must be within range X") are embedded into the solver, ensuring the algorithm never evaluates infeasible configurations.

Experimental Evaluation

The authors validated LEAF-GP across a diverse set of benchmarks, ranging from synthetic functions to complex engineering tasks:

  • Constrained Optimization: On benchmarks with non-linear inequality and equality constraints (G1 through G10), LEAF-GP significantly outperformed standard GP-based BO and Genetic Algorithms. While traditional methods often struggled to even find feasible points, LEAF-GP navigated the restricted search space efficiently.
  • Neural Architecture Search (NAS): The framework was tested on high-dimensional NAS tasks, including CIFAR-NAS (29D) and VAE-NAS (32D). In the VAE-NAS task, where the encoder and decoder architectures must satisfy strict compatibility constraints, LEAF-GP excelled at navigating the "feasibility bottleneck," finding high-performing architectures faster than established baselines like SMAC or BoTorch.
  • Engineering Design: In a 4D Pressure Vessel design problem, LEAF-GP demonstrated its utility in practical engineering, balancing continuous dimensions with discrete material choices and safety constraints.

Key Insights

  • Global vs. Heuristic Search: The shift to MISOCP allows for global optimality in the acquisition step. This is particularly crucial when the search space is riddled with "holes" or disconnected feasible regions caused by complex constraints.
  • Handling Hierarchies: The use of indicator constraints allows LEAF-GP to prune the search space effectively. For example, in hierarchical problems where certain parameters are only relevant if a specific component is selected, LEAF-GP can "turn off" irrelevant dimensions, making high-dimensional problems more tractable.
  • Robustness: Even on smooth, continuous functions where standard GPs typically dominate, LEAF-GP remained competitive, proving to be a versatile general-purpose optimizer.

Limitations and Future Directions

While powerful, LEAF-GP is not without trade-offs. Solving an MISOCP is NP-hard, and while the authors reported solve times under 100 seconds for their benchmarks, the computational overhead may become a factor in extremely high-dimensional spaces or with very large tree ensembles. Additionally, because tree kernels are inherently piece-wise constant, they may not be as efficient as smooth Matern kernels for functions known to be highly continuous and differentiable.

Future work involves optimizing the update cycle of the tree ensemble to avoid retraining from scratch at every iteration, potentially further reducing the computational footprint of the BO loop.

Conclusion

LEAF-GP represents a significant step forward for Bayesian Optimization in the wild. By combining the structural advantages of tree ensembles with the rigorous optimization of MISOCP, it provides a principled way to handle the messy, constrained, and mixed-variable nature of real-world design and tuning problems.

Summary updated

BibTeX
@inproceedings{thebelt2022tree,
  author = {Alexander Thebelt and Calvin Tsay and Robert M. Lee and Nathan Sudermann-Merx and David Walz and Behrang Shafei and Ruth Misener},
  title = {{Tree ensemble kernels for Bayesian optimization with known constraints over mixed-feature spaces}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
}
Figure