Learning Relevant Contextual Variables Within Bayesian Optimization
Julien Martinelli, Ayush Bharti, Armi Tiihonen, S. T. John, Louis Filstroff, Sabina J. Sloman, Patrick Rinke, Samuel Kaski
TL;DR
Contextual factors often influence black-box objectives in Bayesian optimization, but their relevance is rarely known and some contexts can be controlled at a cost. The paper introduces Sensitivity-Analysis-Driven CBO (SADCBO), which uses a sensitivity-analysis-based variable selection (via Feature Collapsing) to identify a subset of contextual variables to optimize, and employs an adaptive phase switch (based on an early-stopping bound) to alternate between observational and interventional querying. The method builds GP surrogates on the selected context subset and uses standard acquisition (UCB) on the joint space, with a cost-aware adjustment to compare relevance against optimization cost through a per-variable cost term. Empirical results on 4 real-world and 4 synthetic tasks show that SADCBO delivers consistent improvements over baselines, and can be combined with sparsity-promoting surrogates like SAASBO to further boost performance. This framework offers a practical and explainable approach to cost-efficiently learn which contextual variables matter and how to best leverage them in optimization workflows.
Abstract
Contextual Bayesian Optimization (CBO) efficiently optimizes black-box functions with respect to design variables, while simultaneously integrating contextual information regarding the environment, such as experimental conditions. However, the relevance of contextual variables is not necessarily known beforehand. Moreover, contextual variables can sometimes be optimized themselves at an additional cost, a setting overlooked by current CBO algorithms. Cost-sensitive CBO would simply include optimizable contextual variables as part of the design variables based on their cost. Instead, we adaptively select a subset of contextual variables to include in the optimization, based on the trade-off between their relevance and the additional cost incurred by optimizing them compared to leaving them to be determined by the environment. We learn the relevance of contextual variables by sensitivity analysis of the posterior surrogate model while minimizing the cost of optimization by leveraging recent developments on early stopping for BO. We empirically evaluate our proposed Sensitivity-Analysis-Driven Contextual BO (SADCBO) method against alternatives on both synthetic and real-world experiments, together with extensive ablation studies, and demonstrate a consistent improvement across examples.
