Stagewise Safe Bayesian Optimization with Gaussian Processes

Yanan Sui, Vincent Zhuang, Joel W. Burdick, Yisong Yue

TL;DR

STAGEOPT is a novel Bayesian optimization algorithm that tackles the challenge of optimizing an unknown function while strictly adhering to unknown safety constraints. Unlike previous methods that interleave exploration and optimization, STAGEOPT separates the process into two distinct stages—first expanding the safe region, then maximizing utility. This approach leads to better efficiency, stronger theoretical guarantees, and successful real-world application in clinical spinal cord therapy.

The Challenge of Safe Optimization

In many real-world scenarios, such as medical treatments or robotic control, the goal is to find the optimal configuration of a system. However, exhaustive search is impossible because some configurations might be dangerous or harmful. This problem is the domain of Safe Bayesian Optimization (SafeBO).

The core challenge in SafeBO is a "chicken and egg" dilemma: to find the optimal safe point, you first need to know which regions of the search space are safe. Previous state-of-the-art algorithms, like SAFEOPT, attempt to expand the safe region and optimize the objective function simultaneously. While elegant, this interleaving can be highly inefficient. This is especially true when safety constraints (e.g., "does this stimulus cause the patient pain?") and the utility function (e.g., "how much grip strength does this stimulus produce?") operate on completely different scales or require different measurement methods.

The STAGEOPT Approach

To overcome the inefficiencies of simultaneous exploration and optimization, the authors introduce STAGEOPT, which breaks the problem into two sequential phases:

  1. Stage One: Safe Region Expansion. The algorithm focuses exclusively on identifying the largest possible "reachable" safe set. It identifies "expander" points—locations within the known safe zone that, if sampled, are most likely to prove that neighboring unexplored points are also safe. It prioritizes points with high predictive uncertainty to maximize the speed of discovery.
  2. Stage Two: Utility Optimization. Once the safe region is sufficiently mapped (determined by a tolerance parameter $\epsilon$), the algorithm switches to a standard optimization strategy (like GP-UCB) restricted strictly to the discovered safe zone.
Comparison of SAFEOPT and STAGEOPT over iterations

Key Technical Components: * Gaussian Processes (GPs): Used to model both the safety and utility functions, providing a mean estimate and a measure of uncertainty (confidence intervals). * Lipschitz Continuity: The algorithm assumes the safety functions don't change too abruptly, allowing it to "bridge" safety from a known point to a nearby unknown point. * Flexibility: Because the stages are separate, Stage Two can easily be swapped out for different optimization styles, such as "dueling bandits" (where the system learns from preferences like "A is better than B" rather than absolute scores).

Datasets and Evaluation

The paper evaluates STAGEOPT using both synthetic and real-world data:

  • Synthetic Benchmarks: 2D functions generated from GP priors with Matern kernels. These tests included scenarios with single versus multiple safety constraints, and absolute versus preference-based feedback.
  • Clinical Trial Data: A real-world application involving a tetraplegic patient undergoing spinal cord stimulation therapy. The goal was to optimize 32-channel electrode patterns to improve gripping ability without crossing a safety threshold (e.g., causing discomfort or autonomic dysreflexia).

Key Insights

  • Separation of Concerns: The core insight is that you do not need to care about the reward while still trying to figure out where it is safe to operate. By focusing purely on expansion first, the algorithm avoids getting "distracted" by sub-optimal rewards in small safe pockets.
  • Natural Clinical Workflow: In medicine, safety is paramount. STAGEOPT mirrors the way doctors actually work: first, they establish a safe range of treatments, and only then do they try to fine-tune for the best outcome.
  • Theoretical Robustness: The authors provide finite-time convergence bounds, proving that STAGEOPT will eventually find the total reachable safe region and the near-optimal utility value with high probability.

Key Results

  • Efficiency: In synthetic tests, STAGEOPT identified the reachable safe region at least as fast as SAFEOPT but reached higher utility values significantly sooner once the optimization stage began.
Reward comparison between SAFEOPT, STAGEOPT, and CEI
  • Clinical Success: In the spinal cord stimulation experiment (564 trials over 10 weeks), STAGEOPT successfully expanded the safe region without ever sampling an unsafe point.
  • Outperforming Experts: The stimulation patterns identified by STAGEOPT provided better gripping utility than the "best" configurations manually suggested by experienced physicians.

Limitations and Future Work

  • Static Assumptions: The current model assumes the underlying functions (safety and utility) are static. In reality, a patient’s physiological response might change over time (non-stationarity), which the algorithm doesn't currently account for.
  • Kernel Dependency: Like all GP-based methods, performance depends heavily on choosing the right "kernel" (the mathematical description of how points relate to each other). Automatically learning these kernels from data is a promising next step.
  • High Dimensionality: While effective in the tested dimensions, scaling to very high-dimensional input spaces remains a challenge for most Bayesian optimization methods. Exploring low-dimensional manifolds is suggested as a potential solution.

Summary updated

BibTeX
@inproceedings{sui2018stagewise,
  author = {Yanan Sui and Vincent Zhuang and Joel W. Burdick and Yisong Yue},
  title = {{Stagewise Safe Bayesian Optimization with Gaussian Processes}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
  url = {https://openreview.net/forum?id=SkZ5go-uWB},
}
Figure