No-Regret Algorithms for Safe Bayesian Optimization with Monotonicity Constraints

Arpan Losalka, Jonathan Scarlett

Abstract: We consider the problem of sequentially maximizing an unknown function $f$ over a set of actions of the form $(s, x)$, where the selected actions must satisfy a safety constraint with respect to an unknown safety function $g$. We model $f$ and $g$ as lying in a reproducing kernel Hilbert space (RKHS), which facilitates the use of Gaussian process methods. While existing works for this setting have provided algorithms that are guaranteed to identify a near-optimal safe action, the problem of attaining low cumulative regret has remained largely unexplored, with a key challenge being that expanding the safe region can incur high regret. To address this challenge, we show that if $g$ is monotone with respect to just the single variable $s$ (with no such constraint on $f$), sublinear regret becomes achievable with our proposed algorithm. In addition, we show that a modified version of our algorithm is able to attain sublinear regret (for suitably defined notions of regret) for the task of finding a near-optimal $s$ corresponding to every $x$, as opposed to only finding the global safe optimum. Our findings are supported with empirical evaluations on various objective and safety functions.

The Challenge of Cumulative Regret in Safe BO

In standard black-box optimization, the goal is to maximize an unknown function $f$ using minimal queries. Safe Bayesian Optimization (Safe BO) introduces a critical constraint: every query must evaluate to a value above a safety threshold defined by an unknown function $g$.

Historically, Safe BO algorithms like SafeOpt have focused on simple regret—expanding the known "safe set" to eventually identify a single near-optimal point. However, they often ignore cumulative regret, which measures the total penalty of all suboptimal choices made during the learning process. Achieving low cumulative regret is notoriously difficult because expanding the safe boundary is inherently a "pure exploration" task that often forces the algorithm to sample highly suboptimal points. This paper addresses whether sublinear cumulative regret is achievable when the safety function $g$ exhibits predictable monotonic behavior with respect to a single controllable variable.

M-SAFEOPT: Leveraging Monotonicity

The proposed M-SAFEOPT algorithm models both the objective $f$ and safety function $g$ using Gaussian Processes (GPs). The core innovation lies in the assumption that $g$ is monotonically increasing with respect to a safety variable $s \in [0, 1]$ (e.g., toxicity increasing with drug dosage), while the objective $f$ remains non-monotone and complex.

Visualization of objective and safety function surfaces. The green points represent samples taken by the algorithm, illustrating its ability to focus on high-performing safe regions while respecting the safety boundary.

M-SAFEOPT achieves low cumulative regret through three key mechanisms:

  1. Elimination: It discards context variables ($x$) that are provably suboptimal based on current GP confidence bounds.
  2. Targeted Expansion: Unlike prior algorithms that expand the safe set indiscriminately, M-SAFEOPT only tests the "safe boundary" if expansion could optimistically lead to a better objective value than currently found.
  3. Custom Acquisition Function: It balances exploration and exploitation by sampling only from a curated set of "potential maximizers" and "potential beneficial expanders."

Theoretical and Empirical Results

The authors prove that M-SAFEOPT achieves sublinear cumulative regret of $\mathcal{O}(\sqrt{T \gamma_T})$, where $\gamma_T$ is the maximum information gain. This guarantee holds for both global optimization and the more granular task of finding the optimal safe $s$ for every $x$. A key theoretical insight is that a minimum growth rate for the safety function ($L'_g > 0$) is mathematically necessary to pinpoint the safe boundary efficiently.

Comparison of average cumulative regret ($R_t/t$) for M-SAFEOPT against baselines. M-SAFEOPT (blue) consistently achieves sublinear regret (approaching zero), while baselines like SAFEOPT-MC and PREDVAR fail to do so.

Empirical evaluations on simulated clinical trials, synthetic functions, and pendulum control problems confirm these findings. In all experiments, M-SAFEOPT successfully achieved sublinear cumulative regret, whereas existing baselines like SAFEOPT-MC and PREDVAR failed. These baselines lack the elimination and targeted expansion mechanisms, causing them to waste queries exploring suboptimal safe regions.

Conclusion

Monotonicity in the safety function is a powerful prior that allows Safe BO algorithms to bypass the "pure exploration" trap. By separating the structural assumptions of the safety function from the objective function, M-SAFEOPT provides a more realistic and efficient framework for high-stakes optimization tasks. Future work includes scaling these methods to higher-dimensional spaces and extending the principles to safe Reinforcement Learning.

Summary updated

BibTeX
@inproceedings{losalka2024no,
  author = {Arpan Losalka and Jonathan Scarlett},
  title = {{No-Regret Algorithms for Safe Bayesian Optimization with Monotonicity Constraints}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=CI0INlJnqv},
}
Figure