Ray-Certified Safe Bayesian Optimization over Star-Shaped Safe Regions

Many real systems can only be tuned by trial and error, and some trials are forbidden. A stimulation pattern must not injure the patient, and a controller gain must not destabilize the robot. Safe Bayesian optimization, meaning black-box tuning with a probabilistic surrogate model that must never try an unsafe setting, handles this by growing a "certified safe" region outward from a known safe starting point. It grows slowly. Existing methods certify one small neighborhood at a time, so the number of trials needed to explore the safe region scales with its volume, which is exponential in dimension. In practice this confines them to a handful of dimensions.

We propose to exploit a simple geometric fact. In many such problems the safe region is star-shaped (star-convex) around the nominal setting: every point on the straight line from the nominal setting to any safe point is also safe. Under that assumption, certifying a single far-away point certifies the entire segment behind it at no extra cost. Exploration therefore becomes a search over directions on a sphere, with a one-dimensional step along each direction, rather than a crawl through volume. We will build a Gaussian-process safe bandit around this ray certificate. We will prove that its sublinear regret, meaning average loss relative to the best safe setting that vanishes over time, is paid with an exploration cost governed by the $(d-1)$-dimensional sphere of directions instead of $d$-dimensional volume. We will also measure what happens when the star-shape assumption is wrong.

Core Claim

Assume the safe set $\mathcal{S}=\{x : g(x)\ge 0\}$ of an unknown constraint $g$ is star-convex with respect to a known safe anchor $c$. Both $g$ and the reward $f$ are modeled as Gaussian processes (GPs), which are distributions over smooth functions that give a mean and an uncertainty at every point. The pessimistic safe set at round $t$ can then be the star hull of every point whose lower confidence bound is nonnegative:

$$\hat{\mathcal{S}}_t=\bigcup_{x:\ \mu^g_{t}(x)-\beta_t\sigma^g_{t}(x)\ge 0}\ [c,x],$$

where $\mu^g_t,\sigma^g_t$ are the GP posterior mean and standard deviation of $g$, $\beta_t$ is the confidence multiplier, and $[c,x]$ is the segment from anchor to $x$. Existing methods take the union of Lipschitz balls around certified points. This set is larger, and it stays sound as long as the star assumption holds.

Our algorithm, Ray-UCB, picks a direction optimistically, choosing it for a high upper confidence bound on $f$ over the ray. It then chooses how far to go along that direction pessimistically, stepping to the furthest certified point or probing just beyond it to extend the certificate. The target guarantee has the form

$$R_T=\tilde{O}\!\left(\beta_T\sqrt{T\,(\gamma^f_T+\gamma^g_T)}\right)+C_{\text{expand}},\qquad C_{\text{expand}}=\tilde{O}\!\left(N_{\mathbb{S}^{d-1}}(\epsilon)\log(1/\epsilon)\right),$$

where $R_T$ is cumulative regret against the best safe point, $\gamma_T$ is the maximum information gain of each GP (the standard complexity measure in GP bandits), and $N_{\mathbb{S}^{d-1}}(\epsilon)$ is the number of $\epsilon$-caps needed to cover the sphere of directions. The first term is the usual GP-UCB-style rate. The second term replaces the volume-covering expansion cost of grid- and ball-based methods; the $\log(1/\epsilon)$ comes from bisecting along each ray.

Relation to Prior Work

The closest work is Directional Optimism for Safe Linear Bandits. That paper decouples "which direction" from "how far" and proves $\tilde{O}(d\sqrt{T})$ regret for Safe-PE on finite star-convex action sets. It supplies our central design principle. However, its rewards and constraints are linear and its directions are finite. We keep the decoupling but make both functions nonparametric GPs and the direction set continuous. This changes the analysis: the safe throttle along a ray is no longer a linear margin but the first zero crossing of an uncertain function.

The GP safe-bandit line supplies our confidence machinery and our main competitors. Regret Bound for Safe Gaussian Process Bandit Optimization (SGP-UCB) proves sublinear regret after an explicit safe-seed exploration phase. Stagewise Safe Bayesian Optimization with Gaussian Processes (StageOpt) separates expansion from exploitation and ran 564 clinical trials with no unsafe sample. On Safety in Safe Bayesian Optimization shows two things. Heuristic $\beta=2$ confidence bounds violate safety in up to 28% of runs, while rigorous bounds (Real-$\beta$-SafeOpt) are safe but conservative. Its LoS-GP-UCB scales to 10 dimensions using unions of safe balls. All three expand by local neighborhoods. That is the bottleneck the ray certificate removes. We reuse the confidence bounds of Chowdhury et al. and the information-gain bounds of Vakili et al. unchanged.

Convergence Rates of Constrained Expected Improvement proves sublinear simple regret for constrained BO. It assumes noise-free constraints, and it does not forbid infeasible queries. It is therefore a reference for sample efficiency, not a safe competitor.

On the geometry side, BayesBD models a star-shaped boundary as a periodic GP radius function $r(\theta)$ with near-minimax contraction. It motivates the polar view, but it estimates boundaries passively from full images. Optimizing Star-Convex Functions concerns star-convex objectives in offline optimization, with no regret or noise. It also warns that gradients of star-convex functions can mislead, so we assume star structure only on the constraint set, never on $f$.

The segmentation literature constrains our claims. Single-center star shapes lose concavities and fail when the center lies outside the object (BayesBD; Cellpose 3D). Multi-center fixes such as CCS priors and k-convexity depend on where the poles are placed. These failure modes are exactly where a wrong star assumption would certify unsafe points, so we test them directly.

Research Program

The theory has three parts. First, we prove soundness of $\hat{\mathcal{S}}_t$ with probability $1-\delta$ under star-convexity with an interior margin around $c$. Second, we bound the expansion cost. We assume the true radius function $r(\theta)$ is Lipschitz on the sphere, and we bound $g$'s slope at the boundary from below along rays. This slope condition keeps the zero crossing well conditioned under noise, so noisy constraint observations are allowed, unlike in the CEI analysis. Under these assumptions, bisection along each of $N_{\mathbb{S}^{d-1}}(\epsilon)$ directions certifies an $\epsilon$-inner approximation of $\mathcal{S}$. Third, we combine this with a standard GP-UCB argument restricted to $\hat{\mathcal{S}}_t$ to get the regret bound above. We will also state a lower-bound sanity check. In one dimension the sphere is two points, and the bound should reduce to known one-dimensional safe rates.

The algorithm maximizes the reward's upper confidence bound over the star hull. In practice this means sampling candidate directions, running a cheap one-dimensional maximization along each ray up to its certified radius, and occasionally spending a query just beyond the certified radius of the most promising direction. No spatial grid is used, so cost per round grows with the number of candidate directions, not with $N^d$.

For robustness we add a hedged variant. It certifies a segment only up to where the Lipschitz tube around already-observed ray points also agrees. This interpolates between Ray-UCB and LoS-GP-UCB, and it quantifies how much of the gain survives when the star assumption is only approximately true.

Baselines

The naive reference is to stay at the anchor $c$, or to sample uniformly inside the initially certified ball. Any method that fails to beat this in fraction of optimum reached has learned nothing.

The strongest existing method is LoS-GP-UCB and LoSBO from On Safety in Safe Bayesian Optimization. It is the only safe GP method in the file shown to scale to 10 dimensions without a grid, and it is what practitioners would pick today. Its reported figure on the paper's benchmark functions is that LoSBO reaches 90.9% of the global optimum, versus 82.45% for Real-$\beta$-SafeOpt, with rigorous bounds giving 0% violations. Real-$\beta$-SafeOpt and SGP-UCB serve as additional rigorous safe baselines, and StageOpt represents stagewise expansion.

All methods will share the same GP kernels, hyperparameter-fitting protocol, confidence multiplier schedule, single safe seed $c$, and evaluation budget. Wall-clock time will be reported separately. Beating LoSBO means reaching a higher fraction of the optimum at equal budget, with zero violations whenever the safe set is star-shaped, and doing so by a margin that grows with dimension.

CEI from Wang et al. runs as an unsafe efficiency ceiling. Its violations are counted, not excused. Safe-PE from Hutchinson et al. runs with a fixed finite direction set and a linearized constraint, to show what nonlinearity costs; the file gives no numeric result for Safe-PE, so no reported number is available on Lacuna for it.

Two ablations isolate the key ingredient. The first grafts star-hull closure onto LoS-GP-UCB's safe set but keeps its acquisition. The second runs LoS-GP-UCB in polar coordinates without the segment certificate.

Why not just…?

Why not just take the star hull of SafeOpt's or LoSBO's safe set? This is the most serious threat. The segment certificate is the core idea, and it can be bolted onto any method. That is exactly why it is our first ablation. If the bolt-on variant matches Ray-UCB, then the contribution is the certificate and its expansion bound rather than the directional acquisition. We would report it that way. Our expectation is that ball-based acquisition still spends queries on local expanders near the current boundary, whereas directional probing places queries at radial extremes where one query certifies the most. The measured gap in queries-to-certify-90%-of-$\mathcal{S}$ settles this.

Why not just use CEI or a penalty method, which need no geometric assumption? Both query infeasible points by design. The file's evidence that safety must be hard comes from StageOpt's zero-violation clinical run and from the 28% violation rate of loose confidence bounds. CEI's guarantee also assumes noise-free constraints. We run CEI anyway. If Ray-UCB approaches CEI's simple regret while CEI violates constraints, the geometric assumption has paid for itself.

Why not just reparameterize into polar coordinates and run standard safe BO? A change of coordinates alone does not certify the interior of a ray. The kernel still has to learn that safety is monotone in radius, and ball-based expansion in $(r,\theta)$ still crawls. The polar-only ablation tests this. If it matches Ray-UCB, the benefit came from the coordinates, not the certificate.

Decisive Experiments

Synthetic tests use the 2D and 4D RKHS-sampled functions of Wang et al.. They also use Camelback (2D), Hartmann (6D), and the 10D Gaussian benchmark from On Safety in Safe Bayesian Optimization. For all of these, the safe sets are replaced by star-shaped regions of controlled boundary roughness, and we sweep dimension from 2 to 20. The prediction is that queries-to-certify grow like the sphere covering number for Ray-UCB and like the volume covering number for LoSBO.

To get realistic shapes, we will use segmentation masks as safe sets. Cell nuclei from DSB2018 are close to star-shaped. Glands from GlaS are known to violate star-convexity, since Siddiqui et al. report higher error there for star-shaped models. 3D liver volumes from k-convexity extend the test to three dimensions. Each mask defines $g$ as a signed distance, and a smooth GP draw serves as $f$.

Metrics are cumulative and simple regret, fraction of the global safe optimum reached, violation rate over 100 seeds, and certified-volume fraction over time.

The decisive checks are three. Ray-UCB must beat the star-hull-only ablation on queries-to-certify. It must stay at zero violations on DSB2018-style shapes. And we must report its violation rate on GlaS shapes and on crescents with the anchor near the concavity. The hedged variant must bring that rate back to zero while retaining a measurable part of the speedup. If it cannot, the method is only for problems where star-shape is known, and the note will say so.