5. Is Safe BO Actually Safe? Real-β-SafeOpt and LoSBO

The β-heuristic gap, Real-β-SafeOpt, Lipschitz-only safe BO, LoS-GP-UCB, MCLoSBO and event-triggered safe BO

Before you start

This module assumes:

How to study this module

Core reading. Start with what a confidence guarantee requires and the Real-beta remedy. Then derive the cone in LoSBO and follow the safety-proof walkthrough. The first eight graded problems connect these ideas to continuous sets, multiple constraints, and explicitly bounded drift.

Practice route. Try the three readiness checks. If a skill is rusty, use its exact review link, then return. Work through Easy P1–P4, Medium P5–P8, and Hard P9–P12; each has a separate hint and a full worked solution. Reattempt a missed problem later without opening the answer.

Optional research reading. The continuous acquisition optimizer, automotive case study, reset/regret theorems, and scenario-based RKHS norm estimates are research extensions. A reset detector does not by itself validate a new stationary model, and the stationary LoSBO theorem does not cover arbitrary changes.

Readiness check — Three prerequisite skills

Try these before opening the answer. The review links lead to earlier material.

  1. If $y=f(z)+\epsilon$ with $|\epsilon|\le0.1$, what lower bound on $f(z)$ follows? Review observations and noise.
  2. If the slack is 0.4 and $L=2$, what is the cone radius? Review Lipschitz margins.
  3. May an acquisition rule select outside the certified set because its score is larger? Review restricted acquisition.
Show readiness answers

Since $\epsilon\le0.1$, $f(z)=y-\epsilon\ge y-0.1$. The radius is slack divided by $L$, or $0.4/2=0.2$. A safety-restricted acquisition must return a point in its certified set; a large score outside that set does not create a certificate.

Book contents · Apply this chapter to a real decision · Glossary

Contents
1. The Gap Between Theory and Practice 2. Real-β-SafeOpt Interactive: How Large Is a Real βt? 3. LoSBO: Safety from a Lipschitz Constant Alone 4. LoS-GP-UCB: Dropping the Grid 5. Multiple Constraints and Automotive Control 6. Event-Triggered and Time-Varying Safe BO 7. Consequences for Control and Open Problems Walkthrough: The LoSBO Safety Proof Interactive: Break SafeOpt, Not LoSBO Application lab & chapter review Exercises Graded practice: Easy, Medium & Hard Key Papers Flashcards

Module 4 ended with a comfortable picture: SafeOpt certifies a growing safe set from GP confidence bounds, and Theorem 1 of Sui et al., ICML 2015 promises that all queries are safe with probability at least $1-\delta$. This module asks the uncomfortable follow-up question posed by Fiedler, Menn, Kreisköther and Trimpe, TMLR 2024: does that promise survive contact with an implementation? The answer is no, for two independent reasons, and the fix (LoSBO) is a small change to one line of the algorithm that separates safety from statistics entirely.

Notation for this module
Unknown objective $f: D \to \mathbb{R}$ on a set $D$ with metric $d$ (see Primer A); a query $x$ is safe iff $f(x) \ge h$ for a known threshold $h$ (SafeOpt convention: the letter $h$ is a scalar threshold here, not the barrier function $h(x)$ of Module 10). Observations $y_t = f(x_t) + \epsilon_t$. GP posterior mean $\mu_t$ and standard deviation $\sigma_t$ after $t$ observations, computed with nominal noise variance $\lambda$ in $(K_t + \lambda I_t)^{-1}$; we write $\sigma_n^2$ only for a physical noise variance (exception: in Section 5, where $n$ counts iterations as in the MCLoSBO paper, $\sigma_n(\theta, i)$ is a posterior standard deviation). Confidence band $\mu_t \pm \beta_t\sigma_t$ (Chowdhury–Gopalan convention, $\beta_t$ multiplies $\sigma_t$ directly); RKHS $\mathcal{H}_k$ with $\|f\|_k \le B$ where $B$ bounds the norm. Safe set $S_t$, expanders $G_t$, maximizers $M_t$, lower/upper bounds $\ell_t, u_t$, width $w_t = u_t - \ell_t$. Lipschitz constant $L$ (see Primer B), noise bound $E$. Noise always carries a subscript ($\epsilon_t$, $\epsilon_{i,n}$); an unsubscripted $\epsilon$ is SafeOpt's accuracy (Section 3.2) or ETSO's safety margin (Section 6), and $\varepsilon$ is the rate of change of ET-GP-UCB. Maximum information gain $\gamma_t$ (not a discount factor in this module; the reset indicator $\gamma_{\mathrm{reset}}$ of Section 6 and the confidence parameter $\gamma$ of Tokmak et al. in Section 7 are unrelated to it).

Here $K_t=[k(x_i,x_j)]_{i,j=1}^t$ is the Gram matrix and $I_t$ is the identity. A metric is a distance: nonnegative, symmetric, zero only between identical points, and satisfying the triangle inequality. For instance, $d(1,3)=|1-3|=2$. The Lipschitz condition $|f(x)-f(z)|\le Ld(x,z)$ immediately gives $f(x)\ge f(z)-Ld(x,z)$.

1. The Gap Between Theory and Practice

Intuition — A starting example

One measurement, one guaranteed region. Take $y=0.7$, hard noise bound $E=0.1$, slope bound $L=2$, and threshold $h=0.2$. The true value at the measured center is at least 0.6. At distance $r$, the true value is at least $0.6-2r$, so distances $r\le0.2$ are certified. The GP can rank points inside this region, but these three inequalities do not use it. LoSBO's change is to make the certificate depend on explicit physical bounds; those bounds still need to be valid.

1.1 Where the guarantee lives

Every SafeOpt-type guarantee rests on one event. Let $Q_t(x) = [\mu_{t-1}(x) \pm \beta_t\sigma_{t-1}(x)]$, $C_t(x) = C_{t-1}(x) \cap Q_t(x)$ (see Primer 0) with $C_0(x) = [h,\infty)$ on $S_0$ and $C_0(x) = \mathbb{R}$ elsewhere, $\ell_t = \inf C_t$, $u_t = \sup C_t$. Define the good event (see Primer C)

$$\mathcal{E}_\delta := \big\{\, \ell_t(x) \le f(x) \le u_t(x) \quad \forall x \in D,\ \forall t \ge 1 \,\big\}.$$

The endpoints are infima and suprema because the initial intervals are unbounded: $\mathbb{R}$ has endpoints $\mp\infty$, and $[h,\infty)$ has endpoints $h$ and $+\infty$. Since $Q_1 = [\mu_0 \pm \beta_1\sigma_0]$ is already bounded, $\ell_t$ and $u_t$ are finite for all $t \ge 1$ unless the intersection is empty (Section 3). Algorithm 3 below uses no prior band ($Q_0 = \mathbb{R}$): in its first round every width is infinite, and the first query is a seed point picked by a tie-break.

Everything downstream of $\mathcal{E}_\delta$ is deterministic: on $\mathcal{E}_\delta$ the Lipschitz expansion $S_t = \bigcup_{x \in S_{t-1}}\{x' : \ell_t(x) - L\,d(x,x') \ge h\}$ only ever adds points with $f(x') \ge f(x) - L\,d(x,x') \ge \ell_t(x) - L\,d(x,x') \ge h$. The only probabilistic statement in the whole theory is $\mathbb{P}[\mathcal{E}_\delta] \ge 1-\delta$, and that statement is a theorem about $\beta_t$, not about the algorithm. The walkthrough below spells this out step by step, because the next two subsections are about what happens when the theorem is not applied.

Three bounds (on their stated time ranges) of the form $\nu(x) = \beta\,\sigma(x)$ certify $\mathcal{E}_\delta$ for a fixed $f \in \mathcal{H}_k$ (frequentist setting: $f$ is not random, only the noise is; see Module 3 and Primer C). In the convention of this module ($\|f\|_k \le B$, $\beta$ multiplies $\sigma$ directly) and with the time indices of the sources: the Srinivas and Chowdhury–Gopalan multipliers $\beta_t$ are stated for $\sigma_{t-1}$, the posterior after $t-1$ observations (as in $Q_t$ above), eq. (7) for $\sigma_t$, with $K_t$ the Gram matrix of $t$ observations. Written for the same posterior, the first two simply shift $t \to t+1$.

Source$\beta_t$Assumptions
Srinivas et al. 2010, Thm 6, used by SafeOpt$\sqrt{2B^2 + 300\,\gamma_t \ln^3(t/\delta)}$noise zero-mean given the past (see Primer C) and a.s. bounded by $\sigma$ (see Primer C), GP run with $\lambda = \sigma^2$; Sui et al. write $\|f\|_k^2 \le B$ and $\beta_t^{1/2}\sigma_t$, hence the square root here
Chowdhury & Gopalan 2017, Thm 2 (eq. 5 of Fiedler et al.)$B + R\sqrt{2(\gamma_{t-1} + 1 + \ln(1/\delta))}$conditionally $R$-sub-Gaussian noise (see Primer C); GP run with $\lambda = 1+\eta$, $\eta = 2/T$ for a known horizon $T$ (the "$+1$" absorbs $\eta t \le 2$); Fiedler et al. paraphrase this as $\lambda \gt 1$, or $\lambda \ge 1$ with $k$ positive definite
Abbasi-Yadkori 2013 (thesis), stated as eq. 7 of Fiedler et al. 2024; cf. Fiedler, Scherer & Trimpe, AAAI 2021$B + \dfrac{R}{\sqrt{\lambda}}\sqrt{2\ln\!\big(\delta^{-1}\det(I_t + \lambda^{-1}K_t)^{1/2}\big)}$ (see Primer A)same noise model, any $\lambda \gt 0$, $k$ positive definite; data-dependent (a-posteriori), no $\gamma_t$

Reading the table: “a.s.” (almost surely) means with probability one; “given the past” means conditionally on everything known before the current query; conditional sub-Gaussianity (Section 2) bounds the tails of the noise through $R$, not its largest value. To compare the rows for one posterior, say after $n$ observations, use the Srinivas and Chowdhury–Gopalan multipliers with index $n+1$ and eq. (7) with index $n$, and compute each $\gamma$ with the $\lambda$ that its own theorem prescribes. The “$+1$” of Chowdhury–Gopalan uses $\eta t \le 2$, so with $\eta = 2/T$ that row certifies the event only for $t \le T$, not for all $t \ge 1$.

1.2 The β problem

To the best of Fiedler et al.'s knowledge, no implementation of SafeOpt or its variants before their paper evaluated any of these $\beta_t$; all used heuristics. They document the constants actually used: $\beta_t \equiv 2$ in Berkenkamp, Schoellig & Krause, ICRA 2016 and in SafeMDP (Turchetta et al., NeurIPS 2016), $\beta_t \equiv 3$ in Helwa et al. 2019 and in GoSafe (Baumann et al., ICRA 2021), $\beta_t \equiv 4$ in GoSafeOpt (Sukhija et al., AIJ 2023). These are multipliers of $\sigma$, the convention of Fiedler et al. and of this module. Two of the papers print their band as $\mu \pm \beta^{1/2}\sigma$ instead: SafeMDP sets $\beta_t = 2$ and GoSafe $\beta_n \equiv 3$, which read literally would be multipliers $\sqrt2$ and $\sqrt3$. The code settles it. SafeMDP's public implementation (befelix/SafeMDP) multiplies $\sigma$ by beta $= 2$ directly. GoSafe's implementation builds on the SafeOpt package (befelix/SafeOpt), whose beta likewise multiplies $\sigma$ directly (default 2), so its 3 is presumably a multiplier of $\sigma$ too. The group's own event-triggered quadcopter work (Section 6) also uses $\beta \equiv 2$. The usual justification is conservatism: in the words of the SafeOpt-MC paper (Berkenkamp, Krause & Schoellig, ML 2023), the theoretical $\beta_n$ "may be impractically conservative for experiments", and a constant $\beta$ "roughly corresponds to bounding the failure probability per iteration, rather than over all iterations" (SafeMDP argues the same for its $\beta_t = 2$).

Pitfall — a heuristic $\beta$ is not a weaker guarantee, it is no guarantee
With $\beta_t \equiv 2$ the probability of $\mathcal{E}_\delta$ is simply unknown; nothing bounds it, per iteration or otherwise. And unlike ordinary BO, SafeOpt has no tuning phase: the hard constraint $f(x_t) \ge h$ must hold from the first query, so $\beta$ cannot be calibrated by trial and error without leaving the problem setting. Fiedler et al. conclude that what practitioners have been running is not hard-constrained safe BO but cautious BO, which happens to work often.

How often does the tube break? Fiedler et al. sample 100 functions from the RKHS of a squared-exponential kernel (length scale $0.2/\sqrt{2}$, domain $[-2,2]$, RKHS norm exactly 10, built from the RKHS orthonormal basis), draw $10^4$ datasets per function (100 uniformly sampled inputs, i.i.d. Gaussian noise of variance $0.01$, i.e. standard deviation $0.1$), fit the GP with the correct kernel and check on a fine grid whether $f$ lies inside $\mu \pm 2\sigma$. Result: $2727 \pm 3882$ of the $10^4$ datasets per function (mean $\pm$ SD over functions) violate the tube. Running SafeOpt with $\beta \equiv 2$ on one such function from a random safe start gave $2862$ unsafe runs out of $10^4$.

An orthonormal basis $(b_j)$ of $\mathcal{H}_k$ consists of mutually orthogonal functions of unit RKHS norm, so $f = \sum_j c_jb_j$ has $\|f\|_k^2 = \sum_j c_j^2$, and a prescribed norm is reached by rescaling the coefficients (Primer A); i.i.d. means independent and identically distributed (Primer C).

1.3 The RKHS-norm problem

Suppose we do evaluate a rigorous $\beta_t$. All three formulas above need $B \ge \|f\|_k$ (Assumption 2 of the paper), and a justified RKHS-norm upper bound is particularly difficult to supply from engineering knowledge. Fiedler et al. survey the known characterizations and conclude that, to the best of their knowledge, none currently turns realistic prior knowledge into a numerical upper bound in non-trivial cases:

Worse, $f \in \mathcal{H}_k$ is itself delicate: for squared-exponential kernels the RKHSs for different length scales are different spaces (Steinwart & Christmann, Sect. 4.4), so a wrong length scale can push the norm to infinity, and hyperparameters are routinely re-fitted during BO. Both over- and under-estimating $B$ hurt: too small voids the guarantee silently, too large freezes the safe set. With a misspecified $B = 2.5$ (true norm 10) Real-$\beta$-SafeOpt (Section 2) produced $1338$ unsafe runs out of $10^4$ on the test function, against a promised $\delta = 0.01$.

1.4 Which noise?

The three bounds also differ in what they assume about $\epsilon_t$. Sui et al. inherit Srinivas' Theorem 6, which needs noise that is zero-mean given the past and uniformly bounded by $\sigma$, while the GP likelihood is Gaussian (a deliberately misspecified but frequentist-valid model, see Module 3). Chowdhury–Gopalan and Abbasi-Yadkori allow conditionally $R$-sub-Gaussian martingale differences, which covers bounded zero-mean and Gaussian noise. LoSBO (Section 3) will need a hard bound $|\epsilon_t| \le E$, which Gaussian noise violates with positive probability. Keep the three models apart: zero-mean bounded (Srinivas) $\subset$ conditionally sub-Gaussian (Chowdhury–Gopalan, Abbasi-Yadkori), whereas LoSBO's hard bound needs neither zero mean nor a martingale structure (a bounded bias is allowed) but excludes Gaussian noise; only the hard bound supports a deterministic guarantee.

1.5 The numbers

Table 1 of the paper is the empirical core of this module. Setup: 100 functions from the SE-kernel RKHS with $B = 10$, each algorithm run $10^4$ times per function for 20 iterations from a random initial safe point (the table caption says two initial safe points, the text of Sect. 6.3 describes a singleton seed drawn from the plateau around the maximizer where $f \ge h + E$); the threshold is $h = \hat\mu(f) - 0.2\,\widehat{\mathrm{SD}}(f)$ (empirical mean and standard deviation of $f$ on a fine grid); $L$ is $1.1\times$ the numerically computed maximum slope; noise uniform on $[-B_\epsilon, B_\epsilon]$ with $B_\epsilon = 0.01$ (Sect. 6.3; the single-function $\beta \equiv 2$ experiment of Sect. 5.1, whose 2862 unsafe runs per $10^4$ match the worst-function entry 28.62%, used Gaussian noise of variance 0.01); $\delta = 0.01$. The paper (arXiv v1) does not define "not started"; we read it as runs that never left their initial safe points. "Final performance" is $\hat f^*_t = \big(f(\arg\max_{x\in S_t}\mu_t(x)) - h\big)/(f^* - h)$.

Here $f^*=\max_{x\in D}f(x)$ (assumed $\gt h$), so the score is $0$ when the recommended point $\tilde x_t\in\arg\max_{x\in S_t}\mu_t(x)$ sits exactly at the threshold and $1$ when it is a global maximizer. It scores a posterior-mean recommendation; SafeOpt's exploration theorem (Section 3.2) is about a different point, $\hat x_t\in\arg\max_{x \in S_t}\ell_t(x)$, and a reachable rather than global optimum.

AlgorithmSafeOpt $\beta \equiv 2$Real-$\beta$, $B = 2.5$Real-$\beta$, $B = 10$ (true)Real-$\beta$, $B = 20$LoSBO
Not started %1.933.1630.4068.340.018
Safety violations % (all runs)3.950.859000
Safety violations, worst function %28.6213.38000
Final performance %88.7588.7682.4576.6990.90
Key insight
Read the table column by column. The heuristic is unsafe (3.95% of runs, 28.62% on the worst function) but explores well. Real-$\beta$ with the true norm has no observed violations but does not start in 30% of runs. Real-$\beta$ with an under-estimated norm looks reassuring on average (0.859%) and is catastrophic on the worst function (13.38%), i.e. the failure is invisible unless you happen to test the bad case. LoSBO has no observed violations and explores best in this experiment, which the authors attribute to its $\beta$ being free to be optimistic.

2. Real-β-SafeOpt

The first fix is the obvious one: run SafeOpt (Algorithm 2 of the paper, i.e. Sui et al.'s original with Lipschitz expansion) but actually compute a valid $\beta_t$. Fiedler et al. call this Real-$\beta$-SafeOpt and use the a-posteriori bound that follows from Theorem 3.11 and Remark 3.13 of Abbasi-Yadkori's 2013 thesis, the RKHS version of the self-normalized inequality of Abbasi-Yadkori, Pál & Szepesvári, NeurIPS 2011.

Theorem — Data-dependent frequentist GP bound (eq. 7 of Fiedler et al. 2024, after Abbasi-Yadkori 2013)

Assumptions. (i) $k$ is a positive definite kernel and $f \in \mathcal{H}_k$ with $\|f\|_k \le B$; (ii) there is a filtration $(\mathcal{F}_t)$ such that each input $x_t$ is $\mathcal{F}_{t-1}$-measurable (predictable: it may depend on all past data, as in BO, but not on the noise it is about to receive) and each $\epsilon_t$ is $\mathcal{F}_t$-measurable; (iii) the noise is conditionally $R$-sub-Gaussian: $\mathbb{E}[e^{\nu\epsilon_t}\mid\mathcal{F}_{t-1}] \le e^{R^2\nu^2/2}$ for all $\nu \in \mathbb{R}$ (which forces $\mathbb{E}[\epsilon_t \mid \mathcal{F}_{t-1}] = 0$, a martingale difference sequence); (iv) $\mu_t, \sigma_t$ are the GP posterior mean and standard deviation for a zero-mean prior with covariance $k$ and nominal noise variance $\lambda \gt 0$.

Statement. For any $\delta \in (0,1)$, with

$$\beta_t = B + \frac{R}{\sqrt{\lambda}}\sqrt{2\ln\!\Big(\frac{1}{\delta}\det\big(I_t + \lambda^{-1}K_t\big)^{1/2}\Big)} \;=\; B + \frac{R}{\sqrt{\lambda}}\sqrt{\ln\det\big(I_t + \lambda^{-1}K_t\big) - 2\ln\delta},$$
$$\mathbb{P}\Big[\,|f(x) - \mu_t(x)| \le \beta_t\,\sigma_t(x)\quad \forall x \in D,\ \forall t \ge 1\,\Big] \ge 1-\delta.$$

In words. The band is valid uniformly over inputs and time, with a width that depends only on the data actually collected (through $K_t$), on the noise level $R$, on the regularization $\lambda$ and on the norm bound $B$. No maximum information gain appears.

Why each assumption matters. Positive definiteness of $k$ is part of the setting in which Fiedler et al. state eqs. (6)–(7) (it makes $K_t$ invertible for distinct inputs). Predictability of $x_t$ is what allows the bound inside a closed loop (BO chooses $x_t$ from past $y$'s, never from the noise of the current measurement); it is paid for by the martingale structure of the noise. Sub-Gaussianity gives the exponential supermartingale behind the method of mixtures (Module 3, confidence bounds). The nominal $\lambda$ is a free algorithmic choice; it is not the physical noise variance, and the factor $1/\sqrt{\lambda}$ shows that under-regularizing is penalized.

Interpretation — realized versus maximal information gain
Write $G_t = \tfrac12\ln\det(I_t + \lambda^{-1}K_t)$ for the realized information gain of the actual design $x_1,\dots,x_t$. For a design fixed in advance, $G_t = I(\mathbf{y}_t;\mathbf{f}_t)$ is the mutual information between observations and function values in an auxiliary GP model with noise variance $\lambda$ (Module 3); in an adaptive run $G_t$ is simply a number computed from the data, and eq. (7) needs nothing more (in particular, $f$ is not treated as random). Chowdhury–Gopalan replace it by the maximal information gain $\gamma_{t-1}$ over all designs of size $t-1$ (plus a $+1$ and without $1/\sqrt{\lambda}$). So eq. (7) is the same bound evaluated a posteriori: $\beta_t = B + \frac{R}{\sqrt{\lambda}}\sqrt{2\,G_t + 2\ln(1/\delta)}$. When $R/\sqrt{\lambda}$ is small it is dominated by $B$. Justifying a constant $\beta \equiv 2$ with this theorem would therefore need $B + \frac{R}{\sqrt{\lambda}}\sqrt{\ln\det(I_t + \lambda^{-1}K_t) - 2\ln\delta} \le 2$, roughly a norm bound $\|f\|_k \lesssim 2$ (a sufficient condition from one theorem, not an equivalence).
Derivation — eq. (7) coincides with the corrected AAAI-2021 bound for $0 \lt \lambda \lt 1$

The corrected Theorem 1 of Fiedler, Scherer & Trimpe, AAAI 2021 (arXiv v2; the original lacked the $1/\sqrt{\lambda}$ and the $\bar\lambda/\lambda$ factor) reads, with $\bar\lambda = \max\{1,\lambda\}$,

$$\beta_t^{(6)} = B + \frac{R}{\sqrt{\lambda}}\sqrt{\ln\det\!\Big(\tfrac{\bar\lambda}{\lambda}K_t + \bar\lambda I_t\Big) - 2\ln\delta}.$$

Step 1 (rewrite eq. 7). Using $\ln(a^{1/2}) = \tfrac12\ln a$ and $\ln(\delta^{-1}a) = \ln a - \ln\delta$ (in the paper's eq. 7 as printed the exponent $\tfrac12$ on the determinant is missing; the rewritten form below, which the paper states immediately afterwards, is the correct Abbasi-Yadkori form and the one that coincides with eq. 6):

$$2\ln\!\Big(\frac{1}{\delta}\det(I_t + \lambda^{-1}K_t)^{1/2}\Big) = \ln\det(I_t + \lambda^{-1}K_t) - 2\ln\delta.$$

Step 2 (case $0 \lt \lambda \lt 1$). Then $\bar\lambda = 1$, so $\tfrac{\bar\lambda}{\lambda}K_t + \bar\lambda I_t = \lambda^{-1}K_t + I_t$, which is exactly the matrix in Step 1. Hence $\beta_t^{(6)} = \beta_t^{(7)}$: the AAAI-21 result reproduces Abbasi-Yadkori's bound in this regime.

Step 3 (case $\lambda \ge 1$). Now $\bar\lambda = \lambda$ and the matrix becomes $K_t + \lambda I_t = \lambda(I_t + \lambda^{-1}K_t)$, so $\ln\det(K_t + \lambda I_t) = t\ln\lambda + \ln\det(I_t + \lambda^{-1}K_t)$. The two bounds differ by $t\ln\lambda \ge 0$ inside the square root; (7) is the tighter one. The difference vanishes at $\lambda = 1$ and grows linearly in $t$; the paper expects a noticeable difference only for $\lambda \gg 1$ and calls it negligible in practice. For $\lambda \ge 1$ the original (uncorrected) AAAI-21 statement was already valid, as the paper's Corrections section notes.

Why it matters. Lower-bounding the nominal noise variance by 1 (as Chowdhury–Gopalan do through $\lambda = 1 + \eta$) is harmless for regret analysis but wasteful for a safe set when the noise is small: with $\lambda = 1$ the posterior barely trusts the data. Eq. (7) holds for any $\lambda \gt 0$ and pays only the prefactor $R/\sqrt{\lambda}$: with the paper's choice $\lambda = R$ it is $\sqrt{R}$, with $\lambda = R^2$ (the variance scale of $R$-sub-Gaussian noise) it is $1$.

Regret (Primer E): with $x^\star$ a maximizer of $f$, the cumulative regret is $R_T=\sum_{t=1}^T [f(x^\star)-f(x_t)]$ (unrelated to the noise constant $R$), and sublinear means $R_T/T\to0$, i.e. the average loss per query vanishes. It measures performance only; it says nothing about whether each query is safe.

2.1 The algorithm and its cost

Real-$\beta$-SafeOpt is Algorithm 2 of the paper with line 17 ("compute updated $\beta_t$") implemented as an evaluation of eq. (7): after each update, compute the Cholesky factor (see Primer A) of $I_t + \lambda^{-1}K_t$, read off $\ln\det$ as twice the sum of the log-diagonal, and form $Q_t(x) = [\mu_t(x) \pm \beta_t\sigma_t(x)]$. The $O(t^3)$ cost of the determinant (Primer 0) is irrelevant at the tens of evaluations typical for controller tuning. Inputs: $B$, $R$, $\lambda$, $\delta$, $L$, $S_0$, $h$. The noise must be conditionally $R$-sub-Gaussian with $R$ known; zero-mean noise bounded in $[-B_\epsilon, B_\epsilon]$ gives $R = B_\epsilon$ (Hoeffding's lemma, Primer C: a zero-mean variable with values in $[a,b]$ is $\tfrac{b-a}{2}$-sub-Gaussian).

Derivation — $\ln\det$ from a Cholesky factor

If $A=CC^\top$ with $C$ lower triangular, then $\det A=\det C\,\det C^\top=(\prod_i C_{ii})^2$, since the determinant of a triangular matrix is the product of its diagonal; hence $\ln\det A=2\sum_i\ln C_{ii}$. The explorer below factors $A = K_t+\lambda I_t = \lambda(I_t+K_t/\lambda)$ (the matrix it needs for $\mu_t$ and $\sigma_t$ anyway), so $\ln\det(I_t+K_t/\lambda)=2\sum_i\ln C_{ii}-t\ln\lambda$. A dense factorization costs $O(t^3)$ operations: doubling $t$ multiplies the work by about eight.

2.2 The conservatism trade-off

With the true norm and $\delta = 0.01$, Real-$\beta$-SafeOpt made zero unsafe queries in $10^6$ runs, comfortably inside the promised $\delta$. The price is in the first row of Table 1: with $B = 10$, 30.40% of the runs are "not started" (never leave their initial points, in our reading), with $B = 20$ 68.34%. The mechanism is structural, not a bug: the certificate $\ell_t(x) - L\,d(x,x') \ge h$ needs $\ell_t(x)$ well above $h$, and the raw lower endpoint $\mu_t - \beta_t\sigma_t$ with $\beta_t \approx B$ is far below $\mu_t$ wherever $\sigma_t$ is not tiny. A safe set that cannot grow is safe in the same way a switched-off robot is.

Strictly, the lower bound actually used is the running maximum of these raw endpoints (and of $h$ on $S_0$), because $C_t$ intersects all bands so far and $[a,b]\cap[c,d]=[\max\{a,c\},\min\{b,d\}]$. A large $\beta_t$ therefore never lowers a certificate already obtained; it stops new bands from raising $\ell_t$ far enough to expand the safe set.

Caveat — under-estimating $B$ breaks Real-$\beta$ silently
Nothing in the algorithm detects an invalid $B$: the band looks perfectly reasonable, the safe set grows nicely, and the failure probability quietly rises from $\le 1\%$ to 13% on the worst function ($B = 2.5$ instead of 10). There is no data-driven repair either: lower bounds on $\|f\|_k$ from data are easy, upper bounds are not (Section 7). Fiedler et al. also stress that a "very conservative" $B$ is not an option because the user has no way to judge what conservative means for an RKHS norm. Exercise 5.2 constructs the failure explicitly.

Real-$\beta$-SafeOpt also inherits every other assumption of Section 1: the kernel and its hyperparameters must be right (with a length scale 4$\times$ too large, the paper reports safety violations in 12.57% of all runs and in 943 of $10^4$ runs for the worst-behaving function; it does not name the algorithm, but only Real-$\beta$ can violate there, and the two numbers are inconsistent as printed in arXiv v1, since a worst-function rate of 9.43% cannot lie below an average of 12.57%), and hyperparameters may not be adapted online. Fiedler et al. are careful to note that a comparison between Real-$\beta$-SafeOpt and heuristic SafeOpt is meaningless: they solve different problems (hard safety versus cautious BO).

Interactive: How Large Is a Real βt?

This explorer computes the three theoretical scalings on a real design: it runs uncertainty sampling (greedy maximum-variance selection, which approximates the maximal-information design) on a 200-point grid with a squared-exponential kernel, evaluates $\ln\det(I_t + \lambda^{-1}K_t)$ by Cholesky at every $t$, sets $\gamma_t \approx \tfrac12\ln\det(I_t + \lambda^{-1}K_t)$ for that design (the information gain of one design is a lower bound on $\gamma_t$, so the two $\gamma_t$-based curves are, if anything, too low), and plots $\beta_t$ on a log scale against the heuristics $2,3,4$. The Chowdhury–Gopalan curve is evaluated with your $\lambda$ for comparison, although their theorem fixes $\lambda = 1 + 2/T$.

Reading the plot. At horizontal position $t$, Real-$\beta$ uses the $t$-observation posterior, whereas the Chowdhury–Gopalan curve uses the gain after $t-1$ observations: each curve keeps its source's index. For the same $t$-observation posterior, read the Chowdhury–Gopalan curve one step to the right. The vertical axis is logarithmic (equal steps are equal ratios), and information is measured in nats because the logarithm is natural (Primer C).

Real βt versus heuristics

3. LoSBO: Safety from a Lipschitz Constant Alone

The second fix attacks objective (O2) of the paper: safety should rest only on assumptions that the user can verify and interpret. Two such assumptions have decades of use in system identification (Milanese & Novara's set-membership bounds, Calliess' kinky inference): a bound on the slope of $f$ and a bound on the size of the measurement noise. Both are engineering quantities, related to sensitivity analysis and sensor specifications. LoSBO builds the safe set from these two alone and leaves the GP to do what it is good at, guiding exploration.

Assumption — LoSBO safety assumptions (Assumption 1 and Proposition 1 of Fiedler et al. 2024)
  1. Lipschitz regularity. $D$ carries a metric $d$ and $f$ is $L$-Lipschitz with a known constant: $|f(x) - f(x')| \le L\,d(x,x')$ for all $x,x' \in D$.
  2. Bounded noise. $y_t = f(x_t) + \epsilon_t$ with $|\epsilon_t| \le E$ for all $t \ge 1$, $E$ known.
  3. Safe seed. A non-empty $S_0 \subseteq D$ with $f(x) \ge h$ for all $x \in S_0$.

Nothing is assumed about $f \in \mathcal{H}_k$, about $\|f\|_k$, about the kernel or its hyperparameters, or about the distribution of $\epsilon_t$ beyond its support.

Key equation — the LoSBO safe set (eq. 11)
$$S_t = S_{t-1} \cup \big\{\, x \in D \;:\; y_{t-1} - E - L\,d(x_{t-1}, x) \ge h \,\big\}, \qquad t \ge 2,$$

with $S_1 = S_0$ (no measurement yet). Geometrically: lower the last measurement by the noise bound, hang a Lipschitz cone of slope $L$ below it, and certify every point where the cone is still above $h$. For $L \gt 0$, $\{x : y - E - L\,d(x_s,x) \ge h\} = \bar B_r(x_s)$ is the closed ball of radius $r = (y - E - h)/L$ (empty if the slack $y - E - h$ is negative), so the safe set is a union of closed metric balls around queried points, plus $S_0$. (If $L = 0$, $f$ is constant, and the cone certifies all of $D$ when $y - E \ge h$ and nothing otherwise.)

Proposition 1 — LoSBO is deterministically safe (Fiedler et al. 2024)
Let $f$ be $L$-Lipschitz, $|\epsilon_t| \le E$ for all $t \ge 1$, and $\emptyset \ne S_0 \subseteq D$ with $f \ge h$ on $S_0$. Then for any choice of the scaling factors $\beta_t \gt 0$, LoSBO queries only safe inputs: $f(x_t) \ge h$ for all $t \ge 1$.

Proof. It suffices that $f \ge h$ on every $S_t$, by induction (Primer 0: prove the first cases, then that each round's claim implies the next one's). $t = 0$: assumption; $t=1$: $S_1=S_0$. For $t \ge 2$: for $x \in S_{t-1}$ use the hypothesis; otherwise $y_{t-1} - E - L\,d(x_{t-1},x) \ge h$ and

$$f(x) = \underbrace{f(x_{t-1}) + \epsilon_{t-1}}_{y_{t-1}} - \epsilon_{t-1} + \big(f(x) - f(x_{t-1})\big) \;\ge\; y_{t-1} - E - L\,d(x_{t-1},x) \;\ge\; h. \qquad\blacksquare$$

The proof uses only that each query is taken from $S_t$, so the acquisition step must return some point of $S_t$ (on a finite $D$ a maximizer exists; a continuous search may return any approximate maximizer, as long as it lies in $S_t$).

The full argument, with the reason for every inequality, is the walkthrough in Section 8. The guarantee holds surely, not with probability $1-\delta$: the kind of statement control and robotics usually want.

Algorithm 3 (Fiedler et al. 2024): LoSBO
  1. Require: Lipschitz constant $L$, noise bound $E$, a rule for $\beta_t$ (a tuning knob), safe seed $S_0$, threshold $h$.
  2. $Q_0(x) \leftarrow \mathbb{R}$; $C_0(x) \leftarrow [h,\infty)$ for $x \in S_0$, $C_0(x) \leftarrow \mathbb{R}$ otherwise. // uncertainty sets, as in SafeOpt
  3. for $t = 1, 2, \dots$ do
  4. $C_t(x) \leftarrow C_{t-1}(x) \cap Q_{t-1}(x)$; $\ell_t \leftarrow \inf C_t$, $u_t \leftarrow \sup C_t$. // GP bounds: exploration only
  5. $S_t \leftarrow S_{t-1} \cup \{x : y_{t-1} - E - L\,d(x_{t-1},x) \ge h\}$ if $t \gt 1$, else $S_1 \leftarrow S_0$. // safety: Lipschitz + noise bound only
  6. $G_t \leftarrow \{x \in S_t : \exists x' \in D\setminus S_t,\ u_t(x) - L\,d(x,x') \ge h\}$ // expanders (optimistic)
  7. $M_t \leftarrow \{x \in S_t : u_t(x) \ge \max_{x_S \in S_t}\ell_t(x_S)\}$ // maximizers
  8. $x_t \leftarrow \arg\max_{x \in G_t \cup M_t} w_t(x)$, $w_t = u_t - \ell_t$; query $y_t = f(x_t) + \epsilon_t$.
  9. Update the GP with $(x_t, y_t)$; choose $\beta_t$; $Q_t(x) \leftarrow [\mu_t(x) \pm \beta_t\sigma_t(x)]$.
  10. end for

Compare with SafeOpt's Algorithm 2: the only change is the safe-set line (line 8 of the paper's Algorithms 2 and 3, line 5 of the box above), where $\ell_t(x_s) - L\,d(x_s,x) \ge h$ over all $x_s \in S_{t-1}$ became $y_{t-1} - E - L\,d(x_{t-1},x) \ge h$ for the single last query. The measurement replaces the GP lower bound; the cone is the same. Everything else, expanders, maximizers, uncertainty sampling, is untouched, so LoSBO is a drop-in change for any SafeOpt variant (the paper expects it to transfer to most of them). A note on indices: the pseudocode labels the band by the posterior it uses, $Q_{t-1} = [\mu_{t-1} \pm \beta_{t-1}\sigma_{t-1}]$, whereas Section 1.1 followed the paper's prose, which calls the same band $Q_t$ and indexes $\beta$ by the round in which it is used; both describe the same intersection $C_t = C_{t-1} \cap [\mu_{t-1} \pm \beta\,\sigma_{t-1}]$.

Neither pseudocode says what happens when that intersection is empty. With a valid $\beta$ this has probability at most $\delta$, because $f(x)$ lies in every band. With a heuristic $\beta$ a measurement can contradict an earlier band. For example, a single seed point with $f = h = 1$, $k(x,x) = 1$, $\lambda = 1$, a noise-free measurement and $\beta = 0.5$ gives $\mu_1 = 0.5$, $\sigma_1 = 1/\sqrt2$ and an upper band end $0.854 \lt h$, so $C_2 = [h,\infty) \cap Q_1 = \emptyset$. Then $\ell_t$, $u_t$ and $w_t$ are undefined, so an implementation needs an explicit rule. A naive one that keeps the crossed endpoints gets negative widths and can end up with an empty $G_t \cup M_t$. For LoSBO any rule is harmless for safety as long as queries are taken from $S_t$. Two natural choices are to restart $C_t(x)$ from the current band (the rule used by the explorer in Section 9) or to drop the intersection altogether, as SafeOpt-MC's practical version and MCLoSBO do (Section 5). For SafeOpt and Real-$\beta$-SafeOpt, an empty intersection (given a safe seed) proves that some band missed $f(x)$, so the good event $\mathcal{E}_\delta$ failed on this run. It does not prove that the assumptions are wrong: a valid $1-\delta$ theorem still allows this failure with probability up to $\delta$, and one run cannot tell the two explanations apart.

3.1 What the separation buys

Going deeper — Remark 2: asymmetric noise and general moduli of continuity

The proof uses only two inequalities, $f(x_{t-1}) \ge y_{t-1} - E$ and $f(x) \ge f(x_{t-1}) - L\,d(x_{t-1},x)$. Each can be weakened separately.

Noise. Assume two functions $E_\ell, E_u : D\times\mathbb{N}_0 \to \mathbb{R}_{\ge 0}$ with $-E_\ell(x,t) \le \epsilon_t \le E_u(x,t)$ whenever $x$ is queried at time $t$ (asymmetric, time-varying, heteroscedastic; the paper prints $E_\ell(x,t) \le \epsilon_t$ with $E_\ell \ge 0$, evidently meaning $-E_\ell$). Only the upper noise bound enters safety: $f(x_{t-1}) = y_{t-1} - \epsilon_{t-1} \ge y_{t-1} - E_u(x_{t-1},t-1)$, so the rule becomes $y_{t-1} - E_u(x_{t-1},t-1) - L\,d(x_{t-1},x) \ge h$.

Regularity. Replace Lipschitz continuity by a modulus (see Primer B): a continuous, strictly increasing $\phi : \mathbb{R}_{\ge 0} \to \mathbb{R}_{\ge 0}$ with $\phi(0) = 0$ and $f(x') \ge f(x) - \phi(d(x,x'))$ (a one-sided condition suffices). The rule becomes $y_{t-1} - E - \phi(d(x_{t-1},x)) \ge h$. With the slack $s = y_{t-1} - E - h$, the certified set is empty if $s \lt 0$, the closed ball of radius $\phi^{-1}(s)$ if $0 \le s \lt \sup_{r \ge 0}\phi(r)$ (the least upper bound of the values of $\phi$, Primer 0; $\phi^{-1}$ exists on this range because $\phi$ is continuous and strictly increasing), and all of $D$ if $s \ge \sup_{r \ge 0}\phi(r)$. The last case can only occur for a bounded modulus such as $\phi(r) = 1 - e^{-r}$, which the assumptions allow. Hölder continuity, $\phi(r) = C r^\alpha$, is unbounded, so there $\phi^{-1}(s) = (s/C)^{1/\alpha}$ for every $s \ge 0$; it is the case treated by Calliess' kinky inference, and Exercise 5.3 works it out.

Caveat — Remark 3: why the experiments use $E = 2B_\epsilon$
Suppose $|\epsilon_t| \le B_\epsilon$ is sharp (e.g. $\epsilon_t = \pm B_\epsilon$ with probability $\tfrac12$ each). With $E = B_\epsilon$ LoSBO is safe by Proposition 1, but the boundary of the safe set sits where $f \approx h$; a query there with $\epsilon_t \approx -B_\epsilon$ returns $y_t \lt h$ although $f(x_t) \ge h$. Formally safe, it looks like a violation to the operator and may trigger an emergency stop. Setting $E = 2B_\epsilon$ removes these false alarms at the price of conservatism: every point certified by a cone then has $f \ge y_s - B_\epsilon - L\,d \ge h + B_\epsilon$, so any later measurement there satisfies $y \ge h$ (seed points need the same margin $f \ge h + B_\epsilon$, which is how the experiments choose them). The paper leaves the choice ($B_\epsilon$, $2B_\epsilon$, or in between) to the practitioner. Note what this does not do: it does not make Gaussian noise admissible (Exercise 5.5).

3.2 What the separation costs: no exploration theorem

SafeOpt's Theorem 1 also guarantees that for all $t \ge t^*$ the point $\hat x_t = \arg\max_{x \in S_t}\ell_t(x)$ is $\epsilon$-optimal with respect to the best value on the $\epsilon$-reachable safe region $\bar R_\epsilon(S_0)$. Its proof relies on the GP model interacting with the safety mechanism: the safe set grows exactly when the lower bound at an expander rises above $h + L\,d$, and the uncertainty-sampling rule shrinks $w_t$ at expanders. In LoSBO the safe set no longer depends on the GP at all, so this coupling is gone; Fiedler et al. state that the last inequality in the proof of Sui et al.'s Lemma 7 cannot be ensured, and they suspect (but never observed) pathological cases where LoSBO under-explores. Their position is that this loss is acceptable: SafeOpt's own exploration guarantee is conditional on the kernel through the growth of $\gamma_t$ ($t^*$ is the smallest $t$ with $t/(\beta_t^2\gamma_t) \ge C_1(|\bar R_0(S_0)| + 1)/\epsilon^2$, $C_1 = 8/\ln(1 + \sigma^{-2})$ with $\sigma$ the noise bound, in this module's convention; note that the size of the larger $0$-reachable set $\bar R_0(S_0)$ sets the time, while $\epsilon$-optimality is measured on $\bar R_\epsilon(S_0)$; Sui et al. write $\beta_t\gamma_t$ for their squared multiplier, so the statement is vacuous unless $t/(\beta_t^2\gamma_t)$ grows), and LoSBO's $\beta_t$ is a free knob for fixing under-exploration when it happens. Providing exploration guarantees for LoSBO is listed as open.

Derivation — the step of Sui et al.'s Lemma 7 that LoSBO loses

Lemma 7 shows that the safe set keeps growing while some $\epsilon$-reachable point $x$ is still uncertified. Such an $x$ has a certified neighbour $z \in S_t$ with $f(z) - \epsilon - L\,d(z,x) \ge h$. On the good event $u_t(z) \ge f(z)$, so $z$ is an expander; if the safe set stalled, uncertainty sampling on $G_t \cup M_t$ would shrink the width at $z$ to $w_t(z) \le \epsilon$ within a bounded number of rounds (their Corollary 2). The last inequality of the proof then reads

$$\ell_t(z) - L\,d(z,x) \;\ge\; u_t(z) - \epsilon - L\,d(z,x) \;\ge\; f(z) - \epsilon - L\,d(z,x) \;\ge\; h,$$

so SafeOpt's rule, which uses $\ell_t(z)$, certifies $x$. LoSBO's rule uses measurements instead: it needs a query at some $x_s$ with $y_s - E - L\,d(x_s,x) \ge h$. Narrow GP bands do not produce such a measurement: $z$ need not have been queried at all, and even a query at $z$ only guarantees $y_s - E \ge f(z) - 2E$, which is below the needed $f(z) - \epsilon$ whenever $2E \gt \epsilon$. The chain breaks at its last step, and with it the contradiction that proves growth.

Pitfall — $L$ and $E$ must be valid upper bounds, and they cannot be learned safely
Proposition 1 is only as good as its inputs. An under-estimated $L$ (or $E$) certifies a ball that is too large and the guarantee fails just as silently as Real-$\beta$ with a small $B$ (try the explorer in Section 9 with the $L$ factor below 1). Estimating a Lipschitz constant from data, as in global optimization or set-membership identification, requires queries, which in the hard-safety setting must already be safe; the paper notes this circularity explicitly. What makes $L$ and $E$ different from $B$ is not that they are free, but that an engineer can reason about them: slopes come from sensitivity analyses or simulation, noise bounds from sensor specifications.

3.3 Experimental evidence

The frequentist protocol of Section 1.5 (100 functions, $10^4$ repetitions each, 20 iterations, functions from the pre-RKHS (the space of finite kernel expansions) $f = \sum_i \alpha_i k(\cdot,x_i)$ or from the SE orthonormal basis, norm 10, uniform noise with $B_\epsilon = 0.01$, $R = B_\epsilon$, nominal noise variance $\lambda = R$, $\delta = 0.01$, $E = 2B_\epsilon$, $\beta \equiv 2$ in LoSBO) gives the LoSBO column of Table 1: never a violation, essentially never stuck (0.018%), best final performance. Two details are worth remembering for your own experiments: the target functions are generated in two ways for variety, and ONB samples turn out "bumpier" and harder for the bounds than pre-RKHS samples; and Matérn-3/2 functions are slightly harder for both algorithms, which the authors relate to their lower smoothness (both algorithms rely on a Lipschitz bound, which is tied to regularity).

4. LoS-GP-UCB: Dropping the Grid

Objective (O3) of the paper is scalability. Computing SafeOpt's sets exactly needs a discrete $D$: expanders count the points of $D \setminus S_t$ that an optimistic observation would certify, maximizers compare $u_t$ against a maximum over $S_t$. On a continuous domain the enumerated implementations therefore grid, and dense grids quickly become impractical as the dimension grows (the motivation for LineBO, Kirschner et al., ICML 2019, and for GoSafeOpt). A fixed grid is not intrinsic to every SafeOpt-type method, though: the swarm-based SafeOpt of Duivenvoorden et al., IFAC 2017 (SafeOptSwarm, built on the Lipschitz-free SafeOpt) searches a continuous parameter space and approximates the sets with particle swarms, an adaptive discretization; Fiedler et al. note that it comes with only heuristic safety guarantees. LoSBO as stated in Algorithm 3 enumerates its sets and inherits the grid. Fiedler et al. remove it with three observations.

A grid with $m$ values per coordinate has $m^d$ candidates, exponential in the dimension $d$ (Primer 0): with $m=100$, two dimensions give $10^4$ points and six give $10^{12}$. There is no sharp cutoff dimension; what is feasible depends on the resolution and on the cost of the acquisition and expansion tests per candidate.

  1. Safety needs only a safe feasible region. Any acquisition rule restricted to a set $S$ with $f|_S \ge h$ is safe, whatever the rule and however the optimization is carried out. Expanders and maximizers were introduced for the exploration proof, not for safety.
  2. LoSBO's safe sets are unions of balls. By eq. (11) and the geometric reading above,
    $$S_t = \bigcup_{j=1}^{N_t} \bar B_{r_j}(z_j), \qquad \bar B_r(z) = \{x \in D : d(z,x) \le r\},$$
    with $L\gt0$ for this radius representation (the $L=0$ case is handled in Section 3), and, for a singleton seed $x_0$ and no repeated inputs, $z_1 = x_0$ (radius 0) and $z_j = x_{j-1}$, $r_j = (y_{j-1} - E - h)/L$ for $j = 2,\dots,t+1$ (eq. 15). Balls with negative radius are empty and are dropped (and the rest relabelled), so $N_t \le t+1$, with equality when all $t$ measurements have non-negative slack. Few evaluations means few balls. Note the index shift: here, as in Section 7 of the paper, $S_t$ is the safe set available after the $t$-th observation (it would be $S_{t+1}$ in Algorithm 3), which is why $x_{t+1}$ is chosen from $S_t$ below.
  3. Modern BO does not grid. Acquisition functions are maximized by multi-start local (gradient-based) optimization (see Primer B), which copes with moderate dimensions; BoTorch does this by default.
Algorithm idea — LoS-GP-UCB (eqs. 13–16, Algorithm 4)
For the ball decomposition assume $L\gt0$ and discard negative-slack cones. Start from GP-UCB, $x_{t+1} = \arg\max_{x\in D}\ \mu_t(x) + \beta_t\sigma_t(x)$, restrict it to the LoSBO safe set, $x_{t+1} = \arg\max_{x \in S_t}\ \mu_t(x) + \beta_t\sigma_t(x)$, and use the ball decomposition to split the constrained problem into $N_t$ independent problems, one per ball, with $a_t(x) = \mu_t(x) + \beta_t\sigma_t(x)$:
$$x_j^\star \in \operatorname*{arg\,max}_{x \in \bar B_{r_j}(z_j)} a_t(x) \quad (j = 1,\dots,N_t), \qquad x_{t+1} = x_{j^\star}^\star \ \text{ with } \ j^\star \in \operatorname*{arg\,max}_{j = 1,\dots,N_t} a_t(x_j^\star).$$
(The paper's eq. (16) writes this compactly as a nested $\arg\max$ over $j$ and $x$.) Each inner problem is a maximization over a closed ball, a convex set (see Primer B) when $D \subseteq \mathbb{R}^d$ is convex and $d$ comes from a norm (the paper's setting), solved by gradient-based local optimization from several starts inside the ball; the inner problems and their multistarts are embarrassingly parallel. After the query, add the new centre $x_{t+1}$ with radius $(y_{t+1} - E - h)/L$.

Why the split is exact, and what the solver really returns. Every point of $S_t$ lies in at least one ball, so $\sup_{x\in S_t}a_t(x)=\max_j\sup_{x\in\bar B_{r_j}(z_j)}a_t(x)$; each supremum is attained when $D$ is compact and $a_t$ is continuous, and “$\in\arg\max$” means picking any one maximizer (Primer B). The feasible ball is convex, but the problem is not: $a_t$ is generally not concave, so multistart local search returns good candidates, not certified global maxima. Safety does not care: any returned point that lies in a certified ball is safe.

Derivation — why the LoSBO safe set is a union of closed balls

Claim (for $L\gt0$, indexing of Algorithm 3, queries $x_1, x_2, \dots$). For all $t \ge 1$, $S_t = S_0 \cup \bigcup_{1 \le s \le t-1} \bar B_{r_{s}}(x_s)$ with $r_s = (y_s - E - h)/L$, where balls with $r_s \lt 0$ are empty. (In the post-observation indexing of this section the union runs up to $s = t$.)

Step 1. Fix a query $x_s$ with observation $y_s$. The certified set $\{x : y_s - E - L\,d(x_s,x) \ge h\}$ is, after rearranging, $\{x : d(x_s,x) \le (y_s - E - h)/L\}$ when $L \gt 0$. If $y_s - E - h \ge 0$ this is the closed ball $\bar B_{r_s}(x_s)$; otherwise no $x$ satisfies it (distances are non-negative), and the set is empty. If $L = 0$ the function is constant, and the set is either all of $D$ or empty.

Step 2 (induction). $S_1 = S_0$ is the claim for $t = 1$ (empty union). If $S_{t-1} = S_0 \cup \bigcup_{1 \le s \le t-2}\bar B_{r_s}(x_s)$, eq. (11) adds exactly the set of Step 1 for $s = t-1$, giving the claim for $t$. Repeated inputs simply produce concentric balls, of which the largest matters.

Consequence. Membership $x \in S_t$ is a check of at most $N_t$ distances, so the constraint set of the acquisition problem is cheap to represent in any dimension, and each ball is convex when $d$ is a norm distance and $D \subseteq \mathbb{R}^d$ is convex. Nothing about this used a grid.

LoS-GP-UCB keeps Proposition 1 verbatim (the query is always in $S_t$), needs no RKHS norm bound, and Remarks 2 and 3 apply. Its exploration behaviour is the interesting question: Sui et al. already tested a "Safe-UCB" variant of GP-UCB restricted to the certified set and found that it can get stuck at low-value boundary points that it never expands. In the 1-D comparison of Fiedler et al. (100 Matérn-3/2 pre-RKHS functions, 1000 runs each, $\beta \equiv 2$), LoS-GP-UCB is only slightly worse than LoSBO and still better than Real-$\beta$-SafeOpt, and the authors attribute the absence of severe under-exploration to the optimism of $\beta \equiv 2$. On benchmarks without a discrete alternative (Camelback in 2-D, Hartmann in 6-D, a Gaussian bump $\exp(-4\|x\|_2^2)$ in 10-D; SE kernel with output variance 1, length scale $1/L$, prior mean $0.5$, noise level $0.01$, 100 iterations, 100 repetitions) it outperforms random search started from the same initial safe set (Fig. 8 of the paper).

Connection to Module 4 and Module 6
LoS-GP-UCB is the Lipschitz-only counterpart of the practical, Lipschitz-free SafeOpt of Module 4: there, the safe set is $\{x : \ell_t(x) \ge h\}$ and everything depends on $\beta$; here, the safe set is $\bigcup_j \bar B_{r_j}(z_j)$ and nothing depends on $\beta$. Only LoS-GP-UCB gives up the expander/maximizer machinery for scalability; the Lipschitz-free SafeOpt keeps both sets (its expanders are found by adding an optimistic fake observation to the GP) and therefore still needs a finite candidate set: a grid, or the adaptively placed particles of its swarm version. GoSafeOpt (see Module 6) attacks the same dimensionality problem for dynamical systems with a different tool, backup policies, but keeps the GP-based safe set with a heuristic constant multiplier (4 or 3, depending on the experiment).

5. Multiple Constraints and Automotive Control

Controller tuning (see Primer D) rarely has a single safety requirement on the objective. SafeOpt-MC (Berkenkamp, Krause & Schoellig, ML 2023) and StageOpt (Sui et al., ICML 2018) handle $q$ unknown constraint functions $g_i(\theta) \ge 0$, but through GP bounds, hence with RKHS-norm bounds for every $g_i$ and probabilistic guarantees. Menn, Pelizzari, Fleps-Dezasse & Trimpe, CDC 2024 transplant the LoSBO safe set into that setting; the result, MCLoSBO, was tuned on a real car.

5.1 Setting and assumptions

Parameters $\theta \in \Theta \subseteq \mathbb{R}^d$ (the paper's $\theta$ is our $x$), objective $f$ and constraints $g_i$, $i \in I_g = \{1,\dots,q\}$, with thresholds normalized to zero. Every query returns noisy values of all functions, $y_{0,n} = f(\theta_n) + \epsilon_{0,n}$ and $y_{i,n} = g_i(\theta_n) + \epsilon_{i,n}$, each modelled by its own GP. The requirement is $g_i(\theta_n) \ge 0$ for all $i$ and all $n$. Assumption 1: each $g_i$ is $L_i$-Lipschitz, $|g_i(\theta) - g_i(\theta')| \le L_i\|\theta - \theta'\|$. Assumption 2: $|\epsilon_{i,n}| \le E_i$. A safe seed $\theta_0$ is given. The constants are per constraint, which matters: a stability-type constraint may be much steeper than a tracking-error constraint.

The parameter vector $\theta$ specifies one feedback controller (for example, its gains). During one experiment the physical state evolves under that fixed controller; a trajectory is then reduced to scalar objective and constraint measurements. The BO iteration index counts experiments, not the small time steps within a trajectory.

Key equation — MCLoSBO safe set (eq. 5) and Proposition 3
$$S_n = \bigcap_{i \in I_g} A_{i,n}, \qquad A_{i,n} = A_{i,n-1} \cup \big\{\theta' \in \Theta : y_{i,n-1} - E_i - L_i\|\theta_{n-1} - \theta'\| \ge 0\big\}, \qquad A_{i,0} = S_0,$$

i.e. each constraint keeps its own LoSBO set, accumulated over all measured points, and a parameter is safe once every constraint certifies it, possibly from different measurements. This is our reading of the paper's eq. (5), $S_n = \bigcap_{i}\bigcup_{\theta \in S_{n-1}}\{\theta' : y_{n,i} - E_i - L_i\|\theta - \theta'\| \ge 0\}$, whose union runs over the measured points $\theta$, each with its own measurement (the printed index of $y$ does not track $\theta$); the safe set is built only from points with measured values. The simpler recursion $S_n = S_{n-1} \cup \bigcap_i\{\theta' : y_{i,n-1} - E_i - L_i\|\theta_{n-1} - \theta'\| \ge 0\}$, which admits a new point only if the latest measurement certifies it for all constraints at once, is also safe but more conservative. Proposition 3. Under Assumptions 1 and 2, for any $\beta \in \mathbb{R}_+$, MCLoSBO yields only safe inputs: $g_i(\theta_n) \ge 0$ for all $i \in I_g$ and $n \ge 1$. Proof: the argument of Proposition 1, applied to each $g_i$ with its own set $A_{i,n}$, gives $g_i \ge 0$ on $A_{i,n}$; hence every $\theta \in S_n = \bigcap_i A_{i,n}$ satisfies all constraints, and queries are taken from $S_n$.

Example of the difference. Suppose an old measurement certifies constraint 1 at a candidate $\theta'$ but not constraint 2, while a later measurement certifies constraint 2 there but not constraint 1. Then $\theta'\in A_{1,n}\cap A_{2,n}$ is safe under eq. (5), whereas the simpler recursion, which needs one measurement certifying both constraints, never admits it.

Relative to SafeOpt-MC's Algorithm 1, two things changed. The first is the safe set. The second is easy to miss: the bounds are the current GP confidence intervals $Q_n(\theta,i) = [\mu_{n-1}(\theta,i) \pm \beta\sigma_{n-1}(\theta,i)]$ themselves, with a tuning factor $\beta$, so that $l_{i,n}(\theta) = \mu_{n-1}(\theta,i) - \beta\sigma_{n-1}(\theta,i)$ and $u_{i,n}(\theta) = \mu_{n-1}(\theta,i) + \beta\sigma_{n-1}(\theta,i)$ (the paper's eq. (6) and the definitions after it). There is no intersection $C_n = C_{n-1} \cap Q_n$ over time. SafeOpt-MC's own practical version (its Section 4.3) drops the intersection as well. Since these bounds never enter the safe set, dropping the intersection costs nothing in safety, and the empty-intersection problem of Section 3 cannot arise. They drive the rest: maximizers $M_n = \{\theta \in S_n : u_{0,n}(\theta) \ge \max_{\theta' \in S_n} l_{0,n}(\theta')\}$ (objective only), expanders $G_n = \{\theta \in S_n : e_n(\theta) \gt 0\}$ with $e_n(\theta) = |\{\theta' \in \Theta\setminus S_n : \exists i \in I_g,\ u_{i,n}(\theta) - L_i\|\theta - \theta'\| \ge 0\}|$ (the paper's eq. (7) and Algorithm 1 print $e_n(\theta) \ge 0$, as does the algorithm box of SafeOpt-MC; for a cardinality that would make every safe point an expander, and SafeOpt-MC's own definition, its eq. (13), uses $\gt 0$). The count $e_n(\theta)$ is optimistic and per constraint: it counts uncertified points that an optimistic measurement of at least one constraint at $\theta$ could certify for that constraint, not points that would become jointly safe. The acquisition picks the most uncertain function at the most uncertain point, $\theta_n = \arg\max_{\theta \in G_n \cup M_n}\max_{i \in \{0\}\cup I_g}\ u_{i,n}(\theta) - l_{i,n}(\theta)$. With $q = 1$ and $g_1 = f$ this recovers LoSBO's setting and safety rule (the paper says it recovers "the setting of LoSBO"). The acquisition, however, then uses the current bands $Q_n$ instead of the intersected $C_t$ of Algorithm 3, so the two algorithms need not query the same points.

As in LoSBO, the count $|\cdot|$ in $e_n$ and the $\arg\max$ of the acquisition only make sense on a finite candidate set, so the enumerated algorithm replaces $\Theta$ there by a grid $\Theta_{\mathrm{grid}}$ (then $|A|$ is the number of grid points in $A$, and a maximizer exists); the Lipschitz certificates themselves remain valid on all of $\Theta$.

Worked example — how two constraints' safe sets intersect

Take $\Theta = [0,1]$, seed $\theta_0 = 0.5$, and two constraints with $(L_1, E_1) = (3, 0.2)$ and $(L_2, E_2) = (1, 0.1)$. Measuring at $\theta_0$ returns $y_{1,0} = 1.4$ and $y_{2,0} = 0.35$. Per-constraint radii:

$$r_1 = \frac{y_{1,0} - E_1}{L_1} = \frac{1.4 - 0.2}{3} = 0.4, \qquad r_2 = \frac{y_{2,0} - E_2}{L_2} = \frac{0.35 - 0.1}{1} = 0.25.$$

Constraint 1 certifies $[0.1, 0.9]$, constraint 2 certifies $[0.25, 0.75]$, and $S_1 = [0.25, 0.75]$: the most restrictive constraint at each point governs. Note that the steeper constraint ($L_1 = 3$) is not the binding one here, because its measured margin is larger; what matters is the ratio (margin)/(slope). A second query at $\theta_1 = 0.75$ with $y_{1,1} = 1.1$, $y_{2,1} = 0.3$ adds $r_1 = 0.3$ (constraint 1 now covers $[0.1, 1.0]$) and $r_2 = 0.2$ (constraint 2 covers $[0.25, 0.95]$), so $S_2 = [0.25, 0.95]$. Each constraint's set only ever grows, and the intersection grows with them, but never faster than the slowest constraint. Exercise 5.4 continues this computation on a grid.

5.2 Practical adaptations

5.3 The automotive application

The task is lateral trajectory tracking on a closed test track with two straights and two turns (about 55 km/h on the straights). The controller is a rear-axle tracking controller with three free parameters, treated as a black box. With cross-track error $e_{ct}$ (lateral distance to the reference path) and course-angle error $e_{ca}$, one experiment is scored by the cost

$$\mathrm{cost}(\theta) = \frac{\int_{T_0}^{T_1}\big(|e_{ct}(t)| + |e_{ca}(t)|\big)\,dt}{T_1 - T_0} + \max_{t \in [T_0, T_1)}|e_{ct}(t)|,$$

and BO maximizes $f(\theta) = -\mathrm{cost}(\theta)$ (the paper writes $f$ for the cost itself and flips the sign for the optimization). The window $[T_0,T_1)$ covers one straight and the turns; the sum adds metres and radians, so it is a designed score rather than a physical quantity. The two safety constraints are $g_1(\theta) = 2\,\mathrm{m} - \max_{t\in[T_0,T_1)}|e_{ct}(t)|$ (stay on the track) and $g_2(\theta) = 0.2\,\mathrm{rad/s} - \max_{t \in [T_1,T_2)}|\dot\psi(t)|$, where $\psi$ is the yaw (heading) angle and $\dot\psi$ the yaw rate, measured in the window $[T_1,T_2)$ after a virtual 1 m cross-track disturbance injected at $T_1$ on the long straight, emulating side wind. The second constraint catches controllers that track corners well but oscillate on straights, a real hazard when tuning on the vehicle.

StudySetupOutcome
Simulation1, 2 and 3 parameters; 100 runs each; Matérn-5/2 kernels; $E_1 = E_2 = 0.1$, $L_1 = 10$, $L_2 = 3$; synchronous and asynchronous variants, with and without hyperparameter optimization; baseline SafeOpt-MCNo violations for either algorithm in this study; asynchronous MCLoSBO performs best for 2 and 3 parameters; the authors stress that SafeOpt-MC's safety depends on kernel and hyperparameter choices, MCLoSBO's does not
Vehicle, experiment 1Opel Astra Sports Tourer; 1 parameter, 15 iterations, $L_1 = 4$, $L_2 = 1.5$, conservative initial setNo violations; nearly the whole safe set explored; best objective 70% better than the initial controller. During the vehicle experiments a communication flaw transmitted some false measurements (the true values were recovered from logs afterwards; the paper's Fig. 5 marks them), and the method proved robust to them
Vehicle, experiment 23 parameters, 13 iterations, $L_1 = 10$, $L_2 = 1.5$, safe set seeded from experiment 1No violations; about 28% improvement over the initial safe set of this run
Why it matters
According to the authors, this is the first real-world implementation of a LoSBO-type algorithm, here with several constraints. The Lipschitz constants were determined by "expert knowledge and the insights gained from simulation", which is exactly the kind of prior knowledge the TMLR paper argues is available to engineers, whereas an RKHS norm bound is not. The sequential protocol (tune one parameter conservatively, then use its safe set to seed a three-parameter run) is a good template.

6. Event-Triggered and Time-Varying Safe BO

All safe sets so far assume $f$ is fixed. Wear, payload changes or a re-tuned inner loop shift the objective, and a parameter certified safe last week may be unsafe today. Two responses exist: model the drift (time-varying BO), or detect it and start over (event triggering). The Trimpe group has done both, and the event-triggered route leads to the group's safe variant.

6.1 ET-GP-UCB: a GP error bound as an event trigger

Brunzema, von Rohr, Solowjow & Trimpe, TMLR 2025 work in the Bayesian time-varying setting of Bogunovic et al.: $f_t = \sqrt{1-\varepsilon}\,f_{t-1} + \sqrt{\varepsilon}\,g_t$ with i.i.d. $g_t \sim \mathcal{GP}(0,k)$, $k \le 1$, i.i.d. Gaussian noise $w_t \sim \mathcal{N}(0,\sigma_n^2)$ and an unknown rate of change $\varepsilon$. Instead of forgetting at a rate that requires $\varepsilon$, ET-GP-UCB treats $f$ as static, runs GP-UCB, and resets the dataset when an observation is inconsistent with the posterior (see Primer C). The trigger is an error bound, in the spirit of event-triggered learning (Solowjow & Trimpe, Automatica 2020): learn only when the data say the model is wrong.

Background — a random function that drifts

The recursion starts from $f_1 = g_1$, the $g_t$ are independent $\mathcal{GP}(0,k)$ samples, and $0 \le \varepsilon \le 1$. By induction every $f_t$ is again $\mathcal{GP}(0,k)$, because its covariance is $(1-\varepsilon)k + \varepsilon k = k$. Across $s$ rounds, $f_{t+s} = (1-\varepsilon)^{s/2}f_t + (\text{terms independent of } f_t)$, so the covariance of $f_t(x)$ and $f_{t+s}(x')$ is $(1-\varepsilon)^{s/2}k(x,x')$: $\varepsilon = 0$ gives a fixed function, $\varepsilon = 1$ a fresh independent function every round, and in between old information fades geometrically. The best prediction of $f_{t+s}$ given $f_t$ is $(1-\varepsilon)^{s/2}f_t$, which decays toward the prior mean $0$: this is the mean reversion that UI-TVBO (Section 6.3) avoids.

Key equation — the ET-GP-UCB event trigger (Definition 2, Lemma 3, eq. 11)
Let $t_r$ count the steps since the last reset, let $D_t$ be the data collected since then before $y_t$ arrives, and pick $\pi_{t_r} \gt 0$ with $\sum_{t_r \ge 1}\pi_{t_r}^{-1} = 1$. The weights split one failure budget over infinitely many steps, step $t_r$ receiving the share $1/\pi_{t_r}$ (Primer C); the paper uses $\pi_{t_r} = \pi^2 t_r^2/6$, valid because $\sum_{r \ge 1}1/r^2 = \pi^2/6$, and $\pi_{t_r} = t_r(t_r+1)$ works as well, because $\frac{1}{r(r+1)} = \frac1r - \frac1{r+1}$ telescopes to $1$. With
$$\rho_{t_r} = 2\ln\frac{2\pi_{t_r}}{\delta_B}, \qquad \bar w_{t_r}^2 = 2\sigma_n^2\ln\frac{2\pi_{t_r}}{\delta_B},$$
the trigger resets the dataset iff
$$\gamma_{\mathrm{reset}} = 1 \iff \underbrace{|y_t - \mu_{D_t}(x_t)|}_{\text{test } \psi_t} \;\gt\; \underbrace{\sqrt{\rho_{t_r}}\,\sigma_{D_t}(x_t) + \bar w_{t_r}}_{\text{threshold } \kappa_t}.$$

Lemma 3. Assume $\varepsilon = 0$ (a fixed $f \sim \mathcal{GP}(0,k)$), i.i.d. noise $w_t \sim \mathcal{N}(0,\sigma_n^2)$ and $\delta_B \in (0,1)$. Then with probability at least $1 - \delta_B$, $|y_t - \mu_{D_t}(x_t)| \le \sqrt{\rho_{t_r}}\,\sigma_{D_t}(x_t) + \bar w_{t_r}$ for all $t_r \ge 1$ of the current segment, i.e. the trigger does not fire. The proof below needs the posterior computed from $D_t$ to be the exact conditional law of $f$ given everything the queries were based on. That holds in the first segment; after a data-dependent reset that discarded observations it is an additional assumption, not a consequence of restarting.

Reading $\delta_B$. It bounds the probability of a false alarm in one segment when nothing changed. It is not the probability that a change occurred given a trigger, and it does not guarantee detection: the trigger looks only at the current query point, so a change elsewhere can go unnoticed. Every reset, including the forced one at $t_r = \bar N$ (below), restarts $t_r$ and with it the budget, so the lemma is no false-alarm guarantee for a whole run. If the false-alarm probability of segment $j$, conditioned on the history at its start, is at most $\delta_{B,j}$, then averaging over that history and the union bound give at most $\sum_j\delta_{B,j}$ for the run: $m\delta_B$ for $m$ segments with equal levels (an upper bound, not a prediction that false alarms occur), and a run-wide level $\delta_B$ if the budgets satisfy $\sum_j\delta_{B,j} \le \delta_B$.

Derivation — Lemma 3 from a GP bound and a Gaussian tail bound

Step 1 (function error, Lemma 1 = Srinivas et al. Lemma 5.5). Given the past, the query $x_t$ is fixed, and for $f \sim \mathcal{GP}(0,k)$ the error $f(x_t) - \mu_{D_t}(x_t)$ is $\mathcal{N}(0, \sigma_{D_t}^2(x_t))$ conditionally on the past (this is where the posterior must be the exact conditional law). The Gaussian tail bound $\mathbb{P}[|Z| \gt c] \le e^{-c^2/2}$ for a standard normal $Z$ (Primer C) gives $\mathbb{P}[|f(x_t) - \mu_{D_t}(x_t)| \gt \sqrt{\rho}\,\sigma_{D_t}(x_t)] \le e^{-\rho/2}$ given the past, hence also after averaging over the past. Choosing $e^{-\rho_{t_r}/2} = \delta'/\pi_{t_r}$, i.e. $\rho_{t_r} = 2\ln(\pi_{t_r}/\delta')$, and a union bound over $t_r = 1, 2, \dots$ (the steps of one segment between resets) gives failure probability $\sum_{t_r}\delta'/\pi_{t_r} = \delta'$.

Step 2 (noise, Lemma 2). For $w \sim \mathcal{N}(0,\sigma_n^2)$ the same tail bound gives $\mathbb{P}[|w_{t_r}| \gt \bar w_{t_r}] \le e^{-\bar w_{t_r}^2/(2\sigma_n^2)}$; setting $\bar w_{t_r}^2 = 2\sigma_n^2\ln(\pi_{t_r}/\delta')$ and a union bound over $t_r$ again costs $\delta'$.

Step 3 (combine). Since $y_t = f_t(x_t) + w_t$ and $\varepsilon = 0$ means $f_t = f$, the triangle inequality gives $|y_t - \mu_{D_t}(x_t)| \le |f(x_t) - \mu_{D_t}(x_t)| + |w_t| \le \sqrt{\rho_{t_r}}\sigma_{D_t}(x_t) + \bar w_{t_r}$ on the intersection of both events. Spending $\delta' = \delta_B/2$ on each event yields the constants $2\ln(2\pi_{t_r}/\delta_B)$ of the statement and total failure probability $\delta_B$. Note that this is a Bayesian bound ($f$ is a GP sample, noise is Gaussian), unlike the frequentist bounds of Section 2, and the two settings genuinely differ: for the usual infinite-dimensional RKHSs, GP sample paths lie outside the RKHS of their own kernel with probability one (Kanagawa et al. 2018). The trigger only monitors the current query location, and the $\pi_{t_r}$ series makes the threshold grow slowly with time since the last reset.

Resets are confined to a window $[\underline N, \bar N]$ of steps since the last reset (a forced reset at $\bar N$), and the paper's Theorem 1 and Corollary 1 bound the regret of GP-UCB under any reset strategy inside such a window, which is how ET-GP-UCB inherits guarantees without knowing $\varepsilon$. Regret is now dynamic: each query is compared with the optimum of its own round, $R_T=\sum_{t=1}^T[\max_{x\in D}f_t(x)-f_t(x_t)]$. For fixed $\varepsilon \gt 0$ no algorithm achieves sublinear regret (Bogunovic et al. prove an $\Omega(\varepsilon T)$ lower bound), so the bound below is linear in $T$ with an explicit dependence on $\varepsilon$; for $\varepsilon = 0$ and $\underline N = T$ (no resets) it recovers GP-UCB's sublinear rate. It is a performance statement, not a safety certificate.

Theorem — regret of GP-UCB with resets in a window (Brunzema et al. 2025, Theorem 1)

Assumptions. $D \subset [0,r]^d$ is convex and compact; $f_t$ follows the recursion above with a stationary kernel $k \le 1$ and i.i.d. noise $w_t \sim \mathcal{N}(0,\sigma_n^2)$; and for $g \sim \mathcal{GP}(0,k)$ the sample paths and their partial derivatives have Gaussian tails, with constants $a_0, b_0, a_1, b_1 \ge 0$,

$$\begin{aligned}\mathbb{P}\Big[\sup_{x\in D}|g(x)| \gt L_f\Big] &\le a_0e^{-(L_f/b_0)^2},\\ \mathbb{P}\Big[\sup_{x\in D}\Big|\tfrac{\partial g}{\partial x_j}(x)\Big| \gt L\Big] &\le a_1e^{-(L/b_1)^2}\end{aligned}$$

for all $L, L_f \ge 1$ and $j = 1,\dots,d$ (this restricts $k$ to kernels that are at least four times differentiable, such as the SE kernel). GP-UCB uses the time-invariant posterior of the current block, $x_t \in \arg\max_{x}\mu_{D_t}(x) + \beta_t\sigma_{D_t}(x)$ with

$$\beta_t^2 = 2\ln\frac{2\pi^2t^2}{3\delta} + 2d\ln\Big(t^2db_1r\sqrt{\ln\frac{2da_1\pi^2t^2}{3\delta}}\Big)$$

(the paper's $\beta_t$ is our $\beta_t^2$), and the data set is reset after blocks whose lengths lie between $\underline N$ and $\bar N$, $1 \le \underline N \le \bar N \le T$, chosen by any rule.

Conclusion. With probability at least $1-\delta$,

$$R_T \le \sqrt{C_1T\beta_T^2\Big(\frac{T}{\underline N}+1\Big)\gamma_{\bar N}} + 2 + T\phi_T(\varepsilon,\bar N),$$
$$\begin{aligned}\phi_T(\varepsilon,\bar N) ={}& 2\beta_T\sqrt{(3\sigma_n^{-2}+\sigma_n^{-4})\bar N^3\varepsilon}\\ &+ 2(\sigma_n^{-2}+\sigma_n^{-4})\bar N^3\varepsilon\,\big(b_0+\sqrt2\,\sigma_n\big)\sqrt{\ln\tfrac{4(a_0+1)\pi^2T^2}{3\delta}},\end{aligned}$$

where $C_1 = 8/\ln(1+\sigma_n^{-2})$ and $\gamma_{\bar N}$ is the maximum information gain over $\bar N$ points.

Intuition. $\underline N$ caps the number of blocks at $T/\underline N + 1$, and each block pays GP-UCB's learning cost again (first term); $\bar N$ caps how stale the data can become, and the mismatch between the static model and the drifting $f_t$ grows with $\bar N^3\varepsilon$ ($T\phi_T$). “Any reset strategy” refers to when to reset, e.g. by the event trigger; the queries are GP-UCB's. Brunzema et al., Theorem 1.

6.2 ETSO: event-triggered SafeOpt on quadcopters

Holzapfel, Brunzema & Trimpe, L4DC 2024 combine the trigger with safe BO for controller tuning under unknown mode changes $\xi_t$ of the closed loop (minimum dwell time between changes). The performance $J_{\xi_t}(\theta)$ must stay above a mode-dependent threshold $J_{\min,t}$. Assumption 1: a backup controller $\theta_B$ (typically the manufacturer's robust default) is safe for all modes, with a safe neighbourhood, $J_{\xi_t}(\theta_B) - \epsilon \ge J_{\mathrm{crit}}$. ETSO runs the practical SafeOpt of Berkenkamp et al. 2016 for $T_L$ learning rounds, monitored at every step by the trigger of Definition 1 (test $\psi_t = |\hat J_t - \mu_{D_t}(\theta_t)|$, threshold $\kappa_t = \sqrt{\rho_{t'}}\sigma_{D_t}(\theta_t) + \bar w_{t'}$ with $t'$ the steps since the last reset), then exploits $\arg\max_{\theta \in S_t}\mu_t(\theta)$. When the trigger fires:

  1. apply the backup controller $\theta_B$ and observe $\hat J_B$;
  2. reset the data set to $D_{t+1} = \{(\theta_B, \hat J_B), (\theta_t, \hat J_t)\}$, which resets the safe set;
  3. recompute the threshold $J_{\min,t}$ from $\hat J_B$ and restart safe exploration ($t' \leftarrow 2$).
Background — modes, dwell time and the two thresholds

A mode $\xi_t$ collects whatever changes in the closed loop (a payload, a degraded motor gain), so the performance function $J_{\xi_t}$ is piecewise constant in time. A minimum dwell time means consecutive changes are separated by at least a known number of rounds, so each segment between changes is a stationary safe-BO problem. Two thresholds appear: $J_{\min,t}$ is the safety threshold SafeOpt enforces while learning, and $J_{\mathrm{crit}} \le J_{\min,t}$ is the critical performance below which the system fails; “critically stable” means $J \ge J_{\mathrm{crit}}$. The margin $\epsilon$ of Assumption 1 is what makes a neighbourhood of $\theta_B$ safe: if every $J_\xi$ is $L_J$-Lipschitz (a SafeOpt assumption), then $J_\xi(\theta) \ge J_\xi(\theta_B) - L_J\|\theta - \theta_B\| \ge J_{\mathrm{crit}}$ whenever $\|\theta - \theta_B\| \le \epsilon/L_J$.

Assumption 2 asks that every performance-relevant change is detected and that the parameters in use at the moment of change are at least critically stable in the new mode; under Assumptions 1 and 2, Corollary 3 states that ETSO stays safe across time variations, by chaining the stationary SafeOpt guarantee across the segments between resets.

Corollary — ETSO stays safe across mode changes (Holzapfel et al. 2024, Corollary 3)

Assumptions. (a) In every mode the SafeOpt assumptions of Section 1 hold for $J_{\xi}$ (Lipschitz, bounded RKHS norm, valid $\beta_t$), so SafeOpt is safe with high probability within a stationary segment (Sui et al., Theorem 1). (b) Assumption 1: $\theta_B$ stabilizes the loop in every mode, with margin $J_{\xi}(\theta_B) - \epsilon \ge J_{\mathrm{crit}}$ for some $\epsilon \gt 0$. (c) Assumption 2: every performance-relevant change is detected, and the parameters $\theta_\tau$ in use at the change time $\tau$ are at least critically stable in the new mode, $J_{\xi_\tau}(\theta_\tau) \ge J_{\mathrm{crit}}$.

Statement. ETSO remains safe across time variations. Proof idea: within a segment SafeOpt's guarantee applies; at a change, (c) keeps the controller in use above $J_{\mathrm{crit}}$ and the change is detected; the reset reverts to $\theta_B$, which is safe in the new mode by (b), and the restarted exploration is again covered by (a).

What it does not say. The paper states no run-wide probability: each segment spends its own $\delta$, so by the union bound $m$ segments are all safe with probability at least $1 - m\delta$, and only if the restarted bands are valid for the new mode (see the caveat below). Nor does it bound the detection delay; (c) simply assumes that the change is caught at once. Holzapfel et al., Corollary 3.

Caveat — what ETSO's guarantee rests on
Three things to keep straight. (i) The safety inside each segment is the probabilistic SafeOpt guarantee; even with a valid $\beta$ every segment would spend its own $\delta$, and these add up over segments like the trigger's $\delta_B$ in Lemma 3. The implementation, moreover, uses $\beta_{\mathrm{const}} = 2$ "a value widely used in the literature", so Section 1 applies in full. (ii) The trigger threshold actually used in the experiments is the heuristically scaled $\kappa_t = \tfrac34\sqrt{\rho_{t'}}\,\sigma_{D_t}(\theta_t) + \tfrac14\bar w_{t'}$ (eq. 7), because the union-bound series makes $\bar w_{t'}$ grow too large in practice; the scaled threshold is no longer covered by Lemma 2. (iii) Assumption 2 cannot be verified beforehand and, as the authors note, not every change can or should be detected; insignificant changes should not trigger. The formal content is therefore mainly the decomposition into stationary segments.

The experiments are nonetheless instructive. In simulation with the attitude-controller gains multiplied by 0.65 (AC.65), SafeOpt without a budget limit (SafeOpt$^\infty$) crashed in 50 of 50 runs after the change, while ETSO detected the change in all 50 runs, reset to the backup and had no crash (the budget-limited SafeOpt, which only exploits after its $T_L$ learning rounds, had none either). On hardware (AC.40, attitude gains multiplied by 0.4) SafeOpt crashed in 2 of 10 runs and SafeOpt$^\infty$ in 2 of 10; ETSO reset in 9 of 10 runs and never crashed. For an insignificant trajectory change (2DTV) the trigger never fired on hardware (0 of 10 runs; the simulation figure reports 2 resets in 50 runs), so ETSO behaved like SafeOpt.

6.3 Modelling the drift instead: UI-TVBO

The alternative is to keep all data and let the model forget. Brunzema, von Rohr & Trimpe, CDC 2022 observe that in controller tuning changes are typically incremental and lasting (wear), not mean-reverting, and that the tuning objective is often convex in the parameters. Their UI-TVBO models the objective as a spatio-temporal GP on inputs $(\theta,t)$ with a Wiener-process temporal kernel,

$$k\big((\theta,t),(\theta',t')\big) = k_{\mathrm{SE}}(\theta,\theta')\cdot\sigma_w^2\big(\min(t,t') - c_0\big), \qquad c_0 = -\sigma_w^{-2}\ \text{ so that } k_T(0,t') = 1 \text{ for all } t' \ge 0,$$

which injects uncertainty linearly in time between queries without pulling the mean back to the prior (contrast: back-to-prior forgetting with a stationary temporal kernel). Convexity is encouraged through GPs with linear inequality constraints: nonnegative second derivatives, enforced coordinate-wise at finitely many virtual observation points, which, as the authors note, does not enforce a positive semidefinite Hessian (Primer B) in more than one dimension. The benefit reported is fewer unstable controllers tried during online tuning, a safety lever even without a formal safe set. The 2026 review of Stenger et al. places these time-varying and event-triggered variants in the wider landscape of BO for controller tuning.

Background — the Wiener kernel and product kernels

A Wiener process $(W_t)_{t \ge 0}$ starts at $W_0 = 0$ and has independent Gaussian increments with $\operatorname{Var}(W_{t+\Delta}-W_t)=\sigma_w^2\Delta$; hence $\operatorname{Cov}(W_t,W_{t'})=\sigma_w^2\min(t,t')$. Adding an independent offset of variance $1$ gives $k_T(t,t')=1+\sigma_w^2\min(t,t')$, which is the temporal factor above, since $-\sigma_w^2c_0 = 1$. The increments have mean zero, so the model adds variance as time passes ($\sigma_w^2 = 0.2$ adds $0.6$ over three unobserved time units) without pulling the predicted mean toward zero, unlike the recursion of Section 6.1. Multiplying the spatial and the temporal kernel is legitimate: if $k_{\mathrm{SE}}(\theta,\theta') = \sum_i a_i(\theta)a_i(\theta')$ and $k_T(t,t') = \sum_j b_j(t)b_j(t')$ in terms of features, the product has the features $a_i(\theta)b_j(t)$, so all its Gram matrices are again positive semidefinite (Primer A).

Background — derivative constraints for a GP

For a sufficiently smooth kernel, the derivatives of a GP are jointly Gaussian with its values, with covariances obtained by differentiating the kernel, e.g. $\operatorname{Cov}\big(\partial_j^2 f(z), f(\theta)\big) = \partial_{z_j}^2 k(z,\theta)$ (the covariance of two second derivatives needs four derivatives of $k$). UI-TVBO requires $\partial_j^2 f(z) \ge 0$ at finitely many virtual points $z$: this conditions the Gaussian vector on inequalities (no derivative is measured), which makes the posterior a truncated Gaussian, and it restricts the curvature only at those points and only along the coordinate axes. Even exact coordinate-wise convexity is weaker than convexity: $f(\theta) = \theta_1^2 + \theta_2^2 + 3\theta_1\theta_2$ has $\partial_1^2 f = \partial_2^2 f = 2 \gt 0$, but its Hessian $\begin{pmatrix}2&3\\3&2\end{pmatrix}$ has eigenvalues $5$ and $-1$, so $f$ is not convex.

7. Consequences for Control and Open Problems

The thesis of this module in one sentence, from Fiedler et al.: in the hard-safety setting, safety should rest only on assumptions that practitioners judge reliable, that have a clear interpretation, and that connect to established prior knowledge in the application area. Lipschitz constants and noise bounds pass that test; RKHS norms, kernels and hyperparameters do not. The short companion paper "Safety in safe Bayesian optimization and its ramifications for control" (Fiedler, Menn and Trimpe, SysDO 2024, arXiv 2501.13697) restates this for the control audience; cite the TMLR paper for the results.

MethodNeeds $B \ge \|f\|_k$Needs $L$Noise assumptionSafety guarantee
SafeOpt with theoretical $\beta_t$ (Sui et al. 2015)yes (on $\|f\|_k^2$)yeszero-mean, bounded by $\sigma$w.p. $\ge 1-\delta$
Practical SafeOpt, $\beta \equiv 2,3,4$ (ICRA 2016, GoSafe, GoSafeOpt, ETSO)not used; justifiable via (7) only if $\|f\|_k \lesssim \beta$optional—none ("cautious BO")
Real-$\beta$-SafeOptyesyes$R$-sub-Gaussian, $R$ knownw.p. $\ge 1-\delta$; may not explore
LoSBO / LoS-GP-UCBnoyes$|\epsilon_t| \le E$deterministic; no exploration theorem
MCLoSBOno$L_i$ per constraint$|\epsilon_{i,n}| \le E_i$deterministic
ISE / ITL (Bottero et al. 2022, Hübotter et al. 2024)yes (via a C&G/AY $\beta_t$)nosub-Gaussianw.p. $\ge 1-\delta$ (ISE: continuous domains)
RKHS-norm over-estimation (Tokmak et al., AISTATS 2025)estimated $B_t$ from datano (kernel metric $d_k$)sub-Gaussianwith confidence $\ge 1-\kappa$ (see Primer C), w.p. $\ge (1-\gamma)(1-\delta)$ ($\gamma$ a confidence parameter here); needs an i.i.d. assumption on $\|f\|_k$
Theorem — norm over-estimation by sampling and discarding (Tokmak et al. 2025, Theorem 1, scalar core)

Setting. Draw $m$ random RKHS functions that interpolate the data collected so far, and let $Z_1,\dots,Z_m$ be their RKHS norms. Their Assumption 2 is that, given the data, $Z_1,\dots,Z_m$ and the unknown $Z = \|f\|_k$ are i.i.d. draws from one distribution; take its CDF $F$ continuous. Sort $Z_{(1)} \le \dots \le Z_{(m)}$, discard the $r$ largest and set $B = Z_{(m-r)}$.

Statement. With $\mathcal{Z} = (Z_1,\dots,Z_m)$,

$$\mathbb{P}_{\mathcal{Z}}\Big[\,\mathbb{P}\big(Z \gt B \mid \mathcal{Z}\big) \gt \gamma\,\Big] = \sum_{j=0}^{r}\binom{m}{j}\gamma^j(1-\gamma)^{m-j}.$$

So if the sum is at most $\kappa$: with confidence at least $1-\kappa$ (over the $m$ samples), $B \ge \|f\|_k$ with probability at least $1-\gamma$ (over the draw of $\|f\|_k$). Their Algorithm 3 discards as many samples as this condition allows and never lets $B$ decrease over the iterations; their Theorem 1 asks for $m$ with $(1-\gamma)^{m-1}(1+\gamma(m-1)) \le \kappa$, which is the sum for $r = 1$. Combined with a $1-\delta$ band (their Theorems 2 and 3), safety holds with confidence $1-\kappa$ and probability $(1-\gamma)(1-\delta)$: three separate random experiments, namely the comparison sample ($\kappa$), the draw of the norm ($\gamma$) and the measurement noise ($\delta$).

Why. The $F(Z_i)$ are i.i.d. uniform on $[0,1]$, and $B$ misses more than a fraction $\gamma$ of fresh norms exactly when at most $r$ of the $m$ samples land in the top $\gamma$ fraction: a binomial event. Example: $\gamma = 0.1$, $\kappa = 0.05$ and $r = 0$ need $m \ge \ln\kappa/\ln(1-\gamma) \approx 28.4$, so $m = 29$ ($0.9^{29} \approx 0.047$). Everything rests on the i.i.d. premise linking $\|f\|_k$ to the random interpolants, which the data cannot check. Tokmak et al., Theorem 1.

Consequence for the rest of this section
The Trimpe-lens modules that follow are affected by the same caveat. GoSafe's Furuta-pendulum runs used $\beta_n \equiv 3$ (printed with a $\beta_n^{1/2}$ band, but presumably a multiplier of $\sigma$ in the SafeOpt code it builds on; Section 1.2), and GoSafeOpt multiplied $\sigma$ by 4 (its $\beta_n^{1/2}$, our $\beta$) in its 8-D simulated reaching task and by 3 in the 11-D path-following simulation and on the Franka arm (its Table E.2; see Module 6); their near-perfect safety records (100% on the Franka path-following task, 99.9% in the first simulated reaching task) are empirical, not the $1-\delta$ of their theorems. The same holds for every method that certifies a set from a frequentist GP band: the Lyapunov-based safe RL of Berkenkamp et al. (see Module 11) and the learning-enhanced robust synthesis of Fiedler, Scherer and Trimpe (see Module 11) inherit the RKHS-norm problem through their $B$. Wherever you see "$\beta_n$ as in Chowdhury and Gopalan" in a paper, ask what $B$ was used.

7.1 Open problems

8. Walkthrough: The LoSBO Safety Proof

Proposition 1 is one line in the paper. Here it is taken apart inequality by inequality, because the point of LoSBO is which assumption each inequality uses, and which it does not.

9. Interactive: Break SafeOpt, Not LoSBO

A small Monte-Carlo version of the paper's Table 1 in the browser. Each run samples $N_{\mathrm{functions}}$ functions $f = \sum_{i=1}^{12}\alpha_i k(\cdot, x_i)$ from the pre-RKHS of a squared-exponential kernel (length scale $0.2$ on $[0,1]$), rescales the coefficients so that $\|f\|_k = \sqrt{\alpha^\top K\alpha}$ ($K$ the Gram matrix of the 12 centres) equals the chosen norm exactly, sets $h = \hat\mu(f) - 0.2\,\widehat{\mathrm{SD}}(f)$, computes $L_{\mathrm{true}}$ as the largest slope of $f$ (the maximum of $|f'|$ on a 401-point grid, raised if necessary to the exact Lipschitz constant of $f$ on the query grid), picks a random safe seed from the plateau around the maximizer where $f \ge h + E$, and then runs three algorithms for 25 iterations on a 40-point grid with a real GP posterior (Cholesky solves, intersection of confidence sets, expanders and maximizers as in Algorithms 2 and 3). Where a measurement contradicts an earlier band, $C_{t-1}(x) \cap Q(x)$ is empty and the algorithms are undefined (Section 3). There the explorer restarts $C_t(x)$ from the current band $Q(x)$. This keeps $\ell_t \le u_t$ everywhere, so the maximizer of $\ell_t$ over $S_t$ always lies in $M_t$ and no other fallback is needed (on the finite grid a maximizer $z$ of $\ell_t$ over $S_t$ exists, $S_t$ containing the seed, and $u_t(z) \ge \ell_t(z) = \max_{S_t}\ell_t$ puts $z$ in $M_t$); the last column of the table reports the share of runs in which a restart happened. The three algorithms are SafeOpt with a heuristic constant $\beta$, Real-$\beta$-SafeOpt with eq. (7) and $B = (\text{factor})\times\|f\|_k$, and LoSBO with $E = (\text{multiple})\times B_\epsilon$ and the same $\beta$ as its (safety-irrelevant) tuning knob. All three use the same Lipschitz constant $L = (\text{factor})\times L_{\mathrm{true}}$ (SafeOpt's expansion rule needs it too, so an under-estimated $L$ can hurt every algorithm, while an under-estimated $B$ or $\beta$ only hurts the GP-certified ones). Noise is uniform on $[-B_\epsilon, B_\epsilon]$ ($R = B_\epsilon$, nominal $\lambda = B_\epsilon$ as in the paper) or, to break LoSBO's assumption, Gaussian with $\sigma_n = B_\epsilon$. Besides violations, the table reports which share of the truly safe grid points the final safe set certifies. The absolute rates are not comparable with Table 1 (coarser grid, larger noise, 25 iterations, small $N_{\mathrm{functions}}$), and the "never expanded" column is mostly a grid effect: a seed whose margin $f - h$ is below roughly $L$ times the grid spacing cannot certify a neighbour under any of the three rules, so, unlike Table 1's "not started" row, it is often the same for all three (when it differs, it is mostly Real-$\beta$ that is left behind). The explorer illustrates the mechanisms; finite samples need not reproduce a fixed ranking.

Going deeper — how the explorer samples functions and sets $L_{\mathrm{true}}$

The 12 centres $x_i$ are drawn uniformly from $[0,1]$ and the coefficients uniformly from $[-1,1]$; with $q = \alpha^\top K\alpha \gt 0$, replacing $\alpha$ by $B\alpha/\sqrt q$ gives $\|f\|_k = B$ exactly. This is one convenient distribution over finite kernel expansions, not a GP draw and not a uniform draw from all functions of norm $B$. Restricted to the 40 query points the norm can only decrease (the norm of a restriction is the smallest norm of any extension), so $B$ stays a valid bound there. $L_{\mathrm{true}}$ is the larger of the maximum of $|f'|$ on the 401-point grid and the exact grid constant $\max_{i \lt j}|f(g_i)-f(g_j)|/|g_i-g_j|$ over the query points $g_i$. A factor $\ge 1$ therefore makes every certificate the explorer can issue valid on the grid, which is all it ever queries; it is not a certified slope bound between grid points.

Reading the plot. The mean and band use all 25 observations, and the band is the raw interval $\mu_{25} \pm \beta\sigma_{25}$ ($Q_{25}$ in the indexing of Algorithm 3), not the intersected $C_t$ used for acquisition. The safe-set bars show $S_{25}$, the set from which query 25 was chosen, so they include observations up to the 24th only.

Break SafeOpt, not LoSBO
What to try
(1) Leave the defaults: SafeOpt with $\beta = 2$ breaks the tube and queries an unsafe point in a sizeable fraction of runs (30% in the default sample), while certifying as much of the grid as LoSBO (74% of the safe points for both); Real-$\beta$ with the true norm has no violations in this reference sample but certifies the least (64%); LoSBO also has no observed violations. The last column shows what $\beta = 2$ means for these functions: in 75% of the runs a measurement contradicts an earlier band, for SafeOpt and LoSBO alike, since they use the same band. A valid $\beta$ allows this only with probability $\delta$ (Real-$\beta$: 0%); in LoSBO it only affects exploration. Final performance is almost the same for all three here, because the seed lies on the maximizer's plateau and the optimum of a 40-point grid is easy to reach. (2) Slide the Real-$\beta$ factor to 0.25 (the paper's $B = 2.5$): violations appear (20% of runs in the default sample), and nothing warns you in time. The band looks as plausible as before, and the empty intersections of the last column mostly come too late: over the default sample and nine resamples, 66 runs violated; in 53 of them the first restart came only after the first unsafe query, and in 2 there was none. About half of the runs that stayed safe had a restart too. Slide it to 2 ($B = 20$): the certified share shrinks markedly (64% to 44% in the default sample) and final performance drops, the last Real-$\beta$ column of Table 1 in miniature. (3) Slide the $L$ factor below 1: at 0.9 LoSBO violates in some runs, at 0.5 all three do (Real-$\beta$'s wide band hides a mild under-estimate). With bounded noise and a safe seed (guaranteed here by construction), Proposition 1 can only be broken by under-estimating $L$ or $E$; on this coarse grid an $E$ below $B_\epsilon$ rarely shows, for the reason given in (4). (4) Switch to Gaussian noise with $E = 2B_\epsilon$: the hard bound is exceeded in about 4.6% of measurements, yet LoSBO violations stay rare, because an exceedance by $\epsilon_t - E$ over-certifies only a shell of width $(\epsilon_t - E)/L$ (far below the grid spacing here) and the default $L$ factor 1.1 adds slack; with $L$ factor 1.0 and $E = B_\epsilon$ an occasional LoSBO violation shows up if you resample long enough (3 of 800 runs over the default sample and 39 resamples). (5) Raise $\beta$: at 4 SafeOpt still violates about as often as at 2 (32.5% of runs at both over the default sample and nine resamples; 40% against 30% in the default sample itself), at 6 rarely, at 8 not at all. Meanwhile its certified share falls towards Real-$\beta$'s and the empty intersections disappear, the trade-off of Table 1. LoSBO's certified share grows with $\beta$, because there $\beta$ only steers exploration. All percentages refer to the default random seed and sample: each sampled function gets one run per algorithm, with the same function and seed point but separate noise draws, so they are illustrations, not rankings. Zero observed violations do not prove a zero failure probability: LoSBO's guarantee comes from valid $L$, $E$ and seed, and Real-$\beta$'s still allows failure with probability $\delta$.

From the mathematics to a real decision

Learning objectives

A commissioning decision

Continue tuning the enclosure's dimensionless gain, but now separate the search model from the safety mechanism. The unknown headroom $f(a)$ is fixed, has units degrees Celsius, and is assumed to satisfy $|f(a)-f(b)|\le0.8|a-b|$. A reading is $y_i=f(a_i)+\epsilon_i$. For the first part, assume the sensor has a deterministic error bound $|\epsilon_i|\le E=0.15$ degrees for every experiment. This is stronger than knowing its standard deviation.

A baseline gain $a_0=0$ is known safe independently. Its reading is $y_0=0.95$ degrees. A later reading $y_1=0.75$ is collected at gain $a_1=0.8$. The second experiment is legitimate because it will be certified from the first reading. The domain for this example is the whole real line of gains; any actual hardware limits would require an additional intersection.

A GP may rank candidates for performance, including candidates where it predicts unusually large thermal headroom. The safety gate instead uses the reading-minus-error lower bound and the known Lipschitz constant. Assume the measurement bound includes all sensor error relevant to the standardized experiment and that the headroom definition includes the actual trajectory maximum.

Worked decision, with its limits

Turn one observation into a cone. At the baseline, $f(0)\ge y_0-E=0.80$ degrees. At a candidate gain $a$, Lipschitz continuity therefore gives

$$f(a)\ge0.80-0.8|a|.$$

The right side is nonnegative for $|a|\le1$, so the first certified interval is $[-1,1]$. In particular, gain 0.8 may be measured without relying on its GP prediction. This is the induction step: only a point already certified by earlier evidence supplies the next reading.

Add the second certificate. The second reading gives $f(0.8)\ge0.75-0.15=0.60$ degrees. Its radius is $0.60/0.8=0.75$, yielding $[0.05,1.55]$. The union of the two intervals is $[-1,1.55]$. A point needs one valid witness; requiring every observation to certify it would unnecessarily take an intersection instead.

Check two actual proposals. Gain 1.4 receives lower bound $0.60-0.8|1.4-0.8|=0.12$ degrees from the second reading and is admissible. Gain 1.7 receives $0.60-0.8(0.9)=-0.12$; the baseline gives an even lower bound. It remains uncertified even if the GP predicts excellent performance there.

Interpret the authority of the surrogate. An inaccurate GP can cause inefficient choices inside $[-1,1.55]$ without changing this safety proof. It cannot enlarge that set. The deterministic conclusion still rests on exact assumptions about $L=0.8$, $E=0.15$, a fixed function, and experiment execution. A drifting thermal load or a wrong Lipschitz constant changes the physical problem rather than merely making the model's predictions less accurate.

The cone radius is a budget: observed slack pays for sensor uncertainty and parameter displacement. Improving acquisition does not recover slack already spent by these terms. Better sensor calibration or a justified smaller Lipschitz bound may enlarge the region, but only after new evidence supports those replacements.

A tempting wrong approach

Common mistake — A noise scale is a hard bound

A Gaussian sensor with standard deviation 0.15 degrees does not satisfy $|\epsilon_i|\le0.15$ deterministically. Inserting that number into the preceding cone and calling the result always safe drops the tail events. Likewise, observing small errors in a short calibration run is not a universal error bound. The finite-horizon alternative in B2 makes the probability and intended number of experiments explicit.

Transfer the argument

Exercise 5.B1 — Medium: Certify the gain the actuator might implement

The command $a$ is realized somewhere in $[a-0.1,a+0.1]$. Using the certified union $[-1,1.55]$, derive the allowable command interval. Does command 1.5 pass?

Review: Bounded-noise safety cones.

Show hint

Require containment of the entire realization interval, including both endpoints.

Show worked solution

The two conditions are $a-0.1\ge-1$ and $a+0.1\le1.55$, giving $a\in[-0.9,1.45]$. Command 1.5 fails because realization 1.6 lies outside the certified region. The largest realizable gain from command 1.45 is exactly 1.55 and is covered by the nonnegative-margin model. If strict positive headroom is desired, use a smaller command interval.

Exercise 5.B2 — Hard: Replace deterministic noise by a finite-run event

Instead assume each error has conditional Gaussian distribution with zero mean and standard deviation 0.15 degrees, even when gains are chosen adaptively. Plan at most 100 experiments and allow noise-envelope failure probability 0.01. Using $\mathbb P(|\epsilon|\gt E)\le2\exp[-E^2/(2(0.15)^2)]$, find a sufficient common $E$ and the radius certified by the first reading 0.95.

Review: Noise assumptions in the safety proof.

Show hint

Make each tail at most $0.01/100$, then sum the tail probabilities. Independence is unnecessary for this union bound.

Show worked solution

Choose $E=0.15\sqrt{2\log(2\cdot100/0.01)}\approx0.667575$ degrees. The probability that any of the first 100 errors exceeds this envelope is at most 0.01. On its complement, the first safe radius is $(0.95-E)/0.8\approx0.353031$. This region is much smaller than radius 1 under the original deterministic bound. The new statement is probabilistic and finite-horizon; continuing beyond 100 evaluations requires a new budget or an all-time construction. The Gaussian conditional assumption matters because query adaptation must not invalidate the stated tail bound.

Synthesis and bridge

A safe set can be independent of the GP while still depending strongly on physical regularity and noise assumptions. That separation makes it easier to diagnose a failed prediction: the surrogate's poor ranking and the gate's invalid assumptions are different failure modes. Recording which observation certifies a candidate also makes the decision reviewable.

Even a valid cone may leave a desirable parameter region unreachable. The next chapter introduces state-aware backups: the robot may safely test a policy whose parameters lack a local certificate if its trajectory can be monitored and a validated controller can recover from every state reached before switching.

Exercises

Graded practice — Build the argument yourself

There are 12 new problems: four Easy, four Medium, and four Hard. Start with the level that lets you make progress without opening the solution. Easy problems rebuild individual operations; Medium problems combine them; Hard problems ask for proofs, boundary cases, and the limits of a guarantee. The required concepts are explained on this page or in the linked earlier material.

Easy — Warm up one skill at a time.

Exercise 5.P1 — Easy: Build one LoSBO safety cone

On $D=[0,1]$, a safe query at $z=0.4$ yields $y=0.7$. Use noise bound $E=0.1$, Lipschitz bound $L=2$, and threshold $h=0.2$. Find the interval certified by this observation, and check $x=0.6$ and $x=0.65$.

Review if needed: Primer B: Lipschitz margins. Apply here: this module's explanation.

Show hint

Its radius is $(y-E-h)/L$; intersect the ball with $D$.

Show worked solution

The available slack is $0.7-0.1-0.2=0.4$, so the radius is $0.4/2=0.2$. The certified interval is $[0.2,0.6]$. At $x=0.6$ the lower bound is $0.7-0.1-2(0.2)=0.2$, meeting the threshold. At $x=0.65$ it is $0.1$, below threshold.

Any earlier certified points remain in the accumulated safe set even if they are outside this particular interval. The new interval is safe because the observation minus the noise allowance is a lower bound at its center, and the Lipschitz allowance bounds further loss away from that center.

Exercise 5.P2 — Easy: Safety membership and GP preference

LoSBO has certified candidates $a,b$. A GP gives acquisition scores $a:0.8$, $b:1.1$, and uncertified $c:3.0$. Which point may be selected by maximizing the score over the safe set? If the GP is inaccurate, which part of the safety argument remains valid?

Review if needed: Module 4: certified sets and acquisition. Apply here: this module's explanation.

Show hint

The GP ranks candidates after the separate Lipschitz/noise test has restricted the domain.

Show worked solution

The maximum among the certified candidates is 1.1 at $b$, so $b$ is selected. The score 3.0 at $c$ does not make it eligible. It would first need a valid independent safety certificate.

Under correct $L$, correct $E$, a safe seed and actual membership in the accumulated safe set, LoSBO's deterministic safety proof still holds even if the GP scores are poor. An inaccurate GP may waste samples or slow the search. It does not change the lower cones used for safety; returning a point outside those cones would change the argument.

Exercise 5.P3 — Easy: Conservatism from a larger Lipschitz bound

An observation has slack $y-E-h=0.3$. Compare the cone radii using $L=1$ and $L=3$. If the true Lipschitz constant is 2, which claimed radius is justified by these choices?

Review if needed: Primer B: valid Lipschitz constants. Apply here: this module's explanation.

Show hint

Larger valid slope bounds shrink the region; smaller invalid ones can enlarge it incorrectly.

Show worked solution

The radii are $0.3/1=0.3$ and $0.3/3=0.1$. Since the true constant is 2, the justified tight radius from this slack is 0.15. Choosing $L=3$ is a valid upper bound and gives the smaller, conservative radius 0.1. Choosing $L=1$ is not justified and its radius 0.3 need not be safe.

A valid bound need not equal the smallest possible constant. Safety survives overestimation, although exploration may slow. The guarantee requires an upper bound on all relevant slopes, rather than an estimate that is accurate only on previously observed pairs.

Exercise 5.P4 — Easy: Intersect constraint certificates

Constraint 1 certifies $A_1=[0.1,0.5]$ and constraint 2 certifies $A_2=[0.3,0.8]$ on a scalar parameter. Find the set certified for both constraints. Check parameters 0.2, 0.4 and 0.7.

Review if needed: Primer 0: unions and intersections. Apply here: this module's explanation.

Show hint

Keep points belonging to both intervals.

Show worked solution

The intersection is $A_1\cap A_2=[0.3,0.5]$. Parameter 0.4 lies in both sets and is certified. Parameter 0.2 has only the first certificate, and 0.7 only the second, so neither is certified for the combined task.

Within each constraint, several historical observations can provide alternative witnesses and their regions are united. Across different constraints, every condition must hold, so those accumulated per-constraint sets are intersected. This order reflects “for each constraint, there exists a suitable witness.”

Medium — Combine definitions and compute a certificate.

Exercise 5.P5 — Medium: Accumulate several observations

On $D=[0,1]$, observations at $z_1=0.2$, $z_2=0.6$ have values $y_1=0.35$, $y_2=0.45$. Use $E=0.05$, $L=1$, $h=0.1$. Find each certified interval and their union. Do observations with negative slack contribute a ball?

Review if needed: Primer 0: set unions. Apply here: this module's explanation.

Show hint

Compute each radius independently, clip each ball to $D$, then unite them.

Show worked solution

The radii are $r_1=0.35-0.05-0.1=0.2$ and $r_2=0.45-0.05-0.1=0.3$. The intervals are $[0,0.4]$ and $[0.3,0.9]$, whose overlap makes their union $[0,0.9]$. The full safe set also retains any known-safe seed points.

A negative slack gives no points satisfying the cone test, including its own center; it contributes an empty region, rather than a negative-radius interval. A query center that was already known safe stays safe through the stored seed or previous certificates. New data never revoke older valid certificates in the stationary bounded-noise setting.

Exercise 5.P6 — Medium: Observed slopes are lower information about a global bound

Exact observations are $f(0)=0$ and $f(1)=0$. Show that the observed secant slope 0 does not prove a zero global Lipschitz constant. Construct functions matching these data with arbitrarily large Lipschitz constants.

Review if needed: Primer B: global versus sampled Lipschitz bounds. Apply here: this module's explanation.

Show hint

A triangular bump can vanish at both endpoints while being tall at the midpoint.

Show worked solution

For any $M\gt0$, define $f_M(x)=M\min\{x,1-x\}$ on $[0,1]$. It matches both observations and has slope $M$ on $[0,1/2]$ and slope $-M$ on $[1/2,1]$. Its smallest global Lipschitz constant is exactly $M$, which can be arbitrarily large.

The observed secant slope gives a necessary lower bound on any valid global constant, not a sufficient upper bound. Without additional structural knowledge, unobserved regions can hide rapid changes. This elementary example explains why obtaining a safety assumption from the same sparse data needs more than fitting a slope estimate.

Exercise 5.P7 — Medium: Quantify uncertainty in Real-beta

Use $\beta=B+(R/\sqrt\lambda)\sqrt{\log\det(I+K/\lambda)+2\log(1/\delta)}$ with $B=1$, $R=0.2$, $\lambda=0.04$, log determinant 2, and $\delta=0.1$. Find $\beta$. At mean 0.5 and standard deviation 0.1, does its lower band certify threshold 0.2?

Review if needed: Module 3: computable confidence bounds. Apply here: this module's explanation.

Show hint

Here $R/\sqrt\lambda=1$. Evaluate the band with the resulting multiplier.

Show worked solution

The multiplier is $1+\sqrt{2+2\log10}\approx3.5700526$. The lower endpoint is $0.5-0.1(3.5700526)\approx0.1429947$, which is below 0.2, so the point is not certified.

The heuristic multiplier 2 would produce lower endpoint 0.3 and admit the point, but that calculation does not inherit the stated confidence theorem. A valid Real-beta band can prevent a query that a heuristic would allow. These numbers illustrate the decision difference; the theorem still depends on the kernel, norm and noise assumptions being correct.

Exercise 5.P8 — Medium: An old safety cone loses margin under drift

At time $s$, $y_s=f_s(z)+\epsilon_s$ with $|\epsilon_s|\le E$. Assume $f_s$ is $L$-Lipschitz and $|f_t(x)-f_s(x)|\le v|t-s|$ for every $x$. Derive a lower bound for $f_t(x)$. Evaluate it for $y_s=0.8$, $E=0.1$, $L=2$, $|x-z|=0.2$, $v=0.05$, and $t-s=3$.

Review if needed: Primer B: sensitivity and triangle inequalities. Apply here: this module's explanation.

Show hint

Transfer first across space at the observation time, then subtract the allowed temporal loss.

Show worked solution

At time $s$, $f_s(x)\ge f_s(z)-L|x-z|\ge y_s-E-L|x-z|$. The drift assumption gives $f_t(x)\ge f_s(x)-v|t-s|$, hence $f_t(x)\ge y_s-E-L|x-z|-v|t-s|$.

The numerical lower bound is $0.8-0.1-2(0.2)-0.05(3)=0.15$. Ignoring drift would claim 0.3 and overstate the margin by 0.15. This is a direct consequence of the extra stated drift bound, rather than a guarantee provided by stationary LoSBO; arbitrary unbounded changes invalidate old cones.

Hard — Explain why the argument works and where it stops.

Exercise 5.P9 — Hard: Prove sharpness of the cone allowance

Fix a measured value $y$ at center $z$, noise bound $E\ge0$, and $L\gt0$. Construct a compatible $L$-Lipschitz function for which $f(x)=y-E-L|x-z|$. Use it to show why admitting points beyond radius $(y-E-h)/L$ is not justified when the numerator is nonnegative.

Review if needed: Primer 0: constructing a counterexample. Apply here: this module's explanation.

Show hint

Use the downward cone itself as a possible true function and choose the observation noise at its positive extreme.

Show worked solution

Define $f(x)=y-E-L|x-z|$ and observation noise $\epsilon=E$. Then $f(z)+\epsilon=y$, so this function matches the observation. The reverse triangle inequality gives $||x-z|-|x'-z||\le|x-x'|$, proving that $f$ is $L$-Lipschitz.

If $|x-z|\gt(y-E-h)/L$, then $f(x)\lt h$. Thus the same measurement and the same valid assumptions allow a true function that is unsafe beyond the cone radius. Additional observations or structural assumptions may certify more, but this single observation and these two bounds alone cannot.

Exercise 5.P10 — Hard: Different constraints can need different witnesses

At a candidate $x$, two observations indexed 1 and 2 give certified lower bounds: for constraint 1, $b_{1,1}=0.2$, $b_{1,2}=-0.1$; for constraint 2, $b_{2,1}=-0.3$, $b_{2,2}=0.1$. Compare the tests $\min_i\max_j b_{i,j}\ge0$ and $\max_j\min_i b_{i,j}\ge0$. Which accepts $x$?

Review if needed: Primer 0: the order of quantifiers. Apply here: this module's explanation.

Show hint

The first permits each constraint its own witness; the second insists on one witness for both.

Show worked solution

The first expression is $\min\{\max(0.2,-0.1),\max(-0.3,0.1)\}=\min\{0.2,0.1\}=0.1$, so it accepts. The second is $\max\{\min(0.2,-0.3),\min(-0.1,0.1)\}=\max\{-0.3,-0.1\}=-0.1$, so it rejects.

If every $b_{i,j}$ is a valid lower bound on $g_i(x)$, the first test is safe: observation 1 proves constraint 1 and observation 2 proves constraint 2. No single observation proves both. The stricter second test loses valid combined evidence; exchanging “for every constraint” and “there exists a witness” changes the algorithm.

Exercise 5.P11 — Hard: Data can bound the RKHS norm below, without bounding it above

For a positive definite data Gram matrix $K$, the minimum-norm interpolant $s$ matches exact observations $y$. Suppose the RKHS contains a unit-norm function $g$ orthogonal to every observed kernel section. Show that $s+cg$ matches the same data for every real $c$, yet has unbounded norm as $|c|\to\infty$.

Review if needed: Module 3: minimum-norm interpolation. Apply here: this module's explanation.

Show hint

Use the reproducing property to evaluate $g$ at data points, then Pythagoras for the norm.

Show worked solution

At an observed input $x_i$, orthogonality gives $g(x_i)=\langle g,k(x_i,\cdot)\rangle_k=0$. Therefore $(s+cg)(x_i)=s(x_i)=y_i$ for every $c$. The interpolant lies in the span of the observed kernel sections, so $s\perp g$.

$$\|s+cg\|_k^2=\|s\|_k^2+c^2\|g\|_k^2=y^\top K^{-1}y+c^2.$$

The exact data give the lower bound $\|f\|_k^2\ge y^\top K^{-1}y$, but no finite upper bound when such an unobserved direction exists. The explicit existence assumption matters: a fully observed finite-dimensional RKHS can instead determine the function completely.

Exercise 5.P12 — Hard: Why Gaussian noise cannot use a hard finite bound

Let independent noises satisfy $\epsilon_t\sim\mathcal N(0,\sigma^2)$ with $\sigma\gt0$. For any finite $E$, let $p=\Pr(|\epsilon_t|\le E)$. Find the probability that all first $T$ noises satisfy the bound and its limit as $T\to\infty$. Explain the consequence for deterministic LoSBO safety.

Review if needed: Primer C: Gaussian tails. Apply here: this module's explanation.

Show hint

A Gaussian has positive probability beyond every finite interval, so $p\lt1$.

Show worked solution

For $E\ge0$, $p=2\Phi(E/\sigma)-1\lt1$. Independence gives $\Pr(|\epsilon_t|\le E\text{ for all }1\le t\le T)=p^T$, which tends to zero. Thus with probability 1 some noise value eventually exceeds every chosen finite fixed bound.

LoSBO's deterministic theorem assumes the bound holds at every query, so ordinary Gaussian noise with a finite $E$ does not satisfy it. This does not prove that a safety violation must occur: a bound exceedance may be harmless. It means the deterministic guarantee cannot be invoked. A finite-horizon probabilistic replacement must budget the tail probability and changes the statement being proved.

Further practice — Original problems and research connections

The original exercises below retain their numbering. Some compare later methods or ask for longer research derivations; use the graded set above first, and return to a research-connection problem after reading the relevant linked module.

Exercise 5.1 — Proposition 1 with asymmetric, heteroscedastic noise

Assume $f$ is $L$-Lipschitz, $f \ge h$ on $S_0 \ne \emptyset$, and the noise satisfies $-E_\ell(x,t) \le \epsilon_t \le E_u(x,t)$ whenever $x$ is the input queried at time $t$ (Remark 2). Propose the safe-set rule, prove that every query is safe for any $\beta_t \gt 0$, and explain why $E_\ell$ plays no role.

Show answer

Rule. $S_t = S_{t-1} \cup \{x \in D : y_{t-1} - E_u(x_{t-1},t-1) - L\,d(x_{t-1},x) \ge h\}$, $S_1 = S_0$.

Proof. Claim: $f \ge h$ on $S_t$ for all $t \ge 0$; then $x_t \in G_t \cup M_t \subseteq S_t$ is safe whatever the GP did. Induction: $t = 0$ is the seed assumption. The case $t=1$ is $S_1=S_0$. For $t \ge 2$ and $x \in S_t \setminus S_{t-1}$ we have $y_{t-1} - E_u(x_{t-1},t-1) - L\,d(x_{t-1},x) \ge h$. Since $y_{t-1} = f(x_{t-1}) + \epsilon_{t-1}$ and $\epsilon_{t-1} \le E_u(x_{t-1},t-1)$, we get $f(x_{t-1}) = y_{t-1} - \epsilon_{t-1} \ge y_{t-1} - E_u(x_{t-1},t-1)$ (a large positive noise makes the measurement flatter the function; subtracting the largest possible positive error is the worst case). Lipschitz continuity gives $f(x) \ge f(x_{t-1}) - L\,d(x_{t-1},x)$. Chaining: $f(x) \ge y_{t-1} - E_u(x_{t-1},t-1) - L\,d(x_{t-1},x) \ge h$. $\blacksquare$

Why $E_\ell$ is irrelevant. A negative noise realization makes $y$ smaller than $f$, so the certified region is smaller than it could be, which is conservative but safe. Only the upper noise bound can make a measurement lie about how large $f$ is. (The lower bound would matter for an upper confidence bound on $f$, which LoSBO takes from the GP, not from the noise model.) Note also that $E_u$ is evaluated at the queried point and time, so known heteroscedastic sensors, e.g. noise growing with speed, are handled without change.

Exercise 5.2 — Real-β with $B \lt \|f\|_k$ can be unsafe: a construction

Work noise-free ($R = 0$, $\lambda \to 0$, so $\mu_t = s$ is the minimum-norm interpolant of the data and $\sigma_t^2$ is the power function). (a) Assume $K_t$ is invertible (for example, distinct inputs with a strictly positive-definite kernel), $B_{\mathrm{true}} \ge \|s\|_k$ and $\sigma_t(x) \gt 0$. Show that there is an $f \in \mathcal{H}_k$ interpolating the data with $\|f\|_k = B_{\mathrm{true}}$ and $f(x) = s(x) - \sqrt{B_{\mathrm{true}}^2 - \|s\|_k^2}\;\sigma_t(x)$. (b) Conclude that the Real-$\beta$ lower bound with $B_{\mathrm{est}} \lt \sqrt{B_{\mathrm{true}}^2 - \|s\|_k^2}$ is violated at $x$, and construct a three-point domain on which this produces an unsafe query.

Show answer

(a) Let $V = \mathrm{span}\{k(\cdot,x_i)\}_{i \le t}$ and $g_x = k(\cdot,x) - P_V k(\cdot,x)$ the residual of the orthogonal projection onto $V$. Then $g_x \perp V$, so $g_x(x_i) = \langle g_x, k(\cdot,x_i)\rangle_k = 0$ for all data points (reproducing property), and $g_x(x) = \langle g_x, k(\cdot,x)\rangle_k = \langle g_x, g_x + P_Vk(\cdot,x)\rangle_k = \|g_x\|_k^2$. The squared norm of the residual is the power function, $\|g_x\|_k^2 = k(x,x) - k_t(x)^\top K_t^{-1}k_t(x) = \sigma_t^2(x)$ (noise-free posterior variance, Module 3). Set $f_c = s + c\,g_x$. It interpolates the data, $f_c(x) = s(x) + c\,\sigma_t^2(x)$, and since $s \in V \perp g_x$, $\|f_c\|_k^2 = \|s\|_k^2 + c^2\sigma_t^2(x)$. Choosing $c = -\sqrt{B_{\mathrm{true}}^2 - \|s\|_k^2}/\sigma_t(x)$ (this is where $\sigma_t(x) \gt 0$ and $B_{\mathrm{true}} \ge \|s\|_k$ are needed; if $\sigma_t(x) = 0$ the data pin down $f(x) = s(x)$) gives $\|f_c\|_k = B_{\mathrm{true}}$ and $f_c(x) = s(x) - \sqrt{B_{\mathrm{true}}^2 - \|s\|_k^2}\,\sigma_t(x)$. This is the extremal function of the noise-free bound $|f(x) - s(x)| \le \sqrt{B^2 - \|s\|^2}\,\sigma_t(x)$: the bound is tight, and no smaller multiplier of $\sigma_t$ is valid.

(b) In the noise-free limit the Real-$\beta$ band has $\beta_t = B_{\mathrm{est}}$ (the $R$ term vanishes), so $\ell_t(x) \ge s(x) - B_{\mathrm{est}}\sigma_t(x) \gt f_c(x)$ whenever $B_{\mathrm{est}} \lt \sqrt{B_{\mathrm{true}}^2 - \|s\|_k^2}$: the tube is violated at $x$ with certainty, not with probability $\delta$.

A complete three-point example. Let $D = \{0, 1, 2\} \subset \mathbb{R}$ with $d(x,x') = |x - x'|$ and the kernel given by its Gram matrix $K = \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 2\\ 0 & 2 & 5\end{pmatrix}$ (positive definite: leading minors $1, 1, 1$ (see Primer A)). Take $f = -2\,k(\cdot,1)$, i.e. $\big(f(0), f(1), f(2)\big) = (0, -2, -4)$ with $\|f\|_k = 2 = B_{\mathrm{true}}$; this is the extremal function of (a) for the data point $0$ and $x = 1$. Let $h = -3$, so $0$ and $1$ are safe and $2$ is not; $L = 2$ is the exact Lipschitz constant; seed $S_0 = \{0, 1\}$ (two safe points, as in the caption of Table 1); run Real-$\beta$-SafeOpt noise-free with $B_{\mathrm{est}} = 0.5$.

  • $t = 1$: $S_1 = S_0$ and both seed points have infinite width; break the tie towards $x_1 = 0$ and observe $y_1 = f(0) = 0$.
  • Posterior: $\mu_1 \equiv 0$ (because $k(\cdot, 0)$ vanishes at $1$ and $2$) and $\sigma_1^2 = (0, 1, 5)$. With $\beta = 0.5$: $\ell_2 = (0, -0.5, -\tfrac{\sqrt5}{2})$ and $u_2 = (0, 0.5, \tfrac{\sqrt5}{2})$ (the seed floor $h = -3$ is inactive).
  • Safe set: from $x_s = 1$, $\ell_2(1) - L\,d(1,2) = -0.5 - 2 = -2.5 \ge -3$, so $2$ is certified and $S_2 = D$, although $f(2) = -4 \lt h$. The culprit is the tube violation at the unobserved seed point: $\ell_2(1) = -0.5 \gt f(1) = -2$.
  • Acquisition: $G_2 = \emptyset$ (no uncertified points are left), $\max_{S_2}\ell_2 = 0 \le u_2$ everywhere, so $M_2 = D$; the widths are $(0, 1, \sqrt5)$, hence $x_2 = 2$: an unsafe query.

With any $B_{\mathrm{est}} \gt 1$ this first certificate fails: the seed floor gives $\ell_2(1)=\max\{-3,-B_{\mathrm{est}}\}$, so $\ell_2(1)-2 \lt -3$. For a valid $B_{\mathrm{est}}\ge2$ every band contains $f$, so the safety theorem keeps $2$ out for good. For $1 \lt B_{\mathrm{est}} \lt 2$ the band at $1$ already excludes $f(1)=-2$, so a later query at $1$ would empty the intersection and leave the unmodified algorithm undefined; the one-step calculation shows no more than the failure of the first certificate. Note that entering the safe set is not the same as being queried; here the maximizer rule picks $2$ because it is the most uncertain candidate.

Moral. The lower confidence bound at unobserved safe points is where SafeOpt-type algorithms are exposed; the RKHS norm is exactly the quantity controlling how far $f$ can dip below the interpolant there, which is why no data-driven proxy for $B$ can be safe without extra assumptions.

Exercise 5.3 — From a Hölder modulus to a LoSBO rule

Suppose $|f(x) - f(x')| \le C\,d(x,x')^\alpha$ with known $C \gt 0$ and $\alpha \in (0,1]$. (a) State the safe-set update and prove its safety. (b) Compute the radius of the certified ball around a query with slack $y - E - h = 0.3$ for $C = 3$ and $\alpha \in \{1, \tfrac12\}$. (c) For which slacks does the Hölder-$\tfrac12$ ball beat the Lipschitz ball with the same $C$?

Show answer

(a) $S_t = S_{t-1} \cup \{x : y_{t-1} - E - C\,d(x_{t-1},x)^\alpha \ge h\}$. Proof as in Proposition 1 with $\phi(r) = Cr^\alpha$, which is continuous, strictly increasing, $\phi(0) = 0$: $f(x) \ge f(x_{t-1}) - C\,d(x_{t-1},x)^\alpha \ge y_{t-1} - E - C\,d(x_{t-1},x)^\alpha \ge h$. The GP is again untouched.

(b) For a slack $y - E - h \ge 0$ the certified set is $\{x : d(x_{t-1},x) \le r\}$ with $r = \phi^{-1}(y - E - h) = \big((y-E-h)/C\big)^{1/\alpha}$; a negative slack certifies nothing (do not feed it to the formula, which for $\alpha = \tfrac12$ would square it into a positive radius). With slack $0.3$ and $C = 3$: $\alpha = 1$ gives $r = 0.1$; $\alpha = \tfrac12$ gives $r = 0.1^2 = 0.01$.

(c) $r_{1/2} = (s/C)^2 \gt r_1 = s/C$ iff $s/C \gt 1$, i.e. only for slacks larger than $C$ (distances above 1 in the chosen units). For small slacks, the typical situation near the boundary of the safe set, a rougher regularity class certifies far less; this is the price of weaker prior knowledge. (The paper's Matérn-3/2 experiments still use a Lipschitz bound, so this effect is not what is measured there; the authors explain the slightly slower exploration on Matérn functions by their lower smoothness, to which a global Lipschitz bound is tied.)

Exercise 5.4 — Compute LoSBO and MCLoSBO safe sets on a grid

Let $D = \{0, 0.1, \dots, 1.0\}$, $h = 0$, $L = 3$, $E = 0.2$, $S_0 = \{0.5\}$. The queries and measurements are $(0.5, 1.4)$, then $(0.9, 0.8)$, then $(0.1, 0.25)$. (a) Compute $S_1, S_2, S_3$. (b) Add a second constraint with $L_2 = 1$, $E_2 = 0.1$ and measurements $0.35$ at $0.5$; which of the planned queries is now inadmissible, and what is $S_1$ for MCLoSBO? (c) Suppose $L = 2$ had been used instead of $3$ for the first constraint and the true function has $f(0) = -0.1$. What happens?

Show answer

(a) $S_1 = S_0$ (no measurement before the first query). After $(0.5, 1.4)$: radius $(1.4 - 0.2 - 0)/3 = 0.4$, so $S_2 = \{0.1, 0.2, \dots, 0.9\}$. After $(0.9, 0.8)$: radius $(0.8 - 0.2)/3 = 0.2$, adding $1.0$ (and re-certifying $0.7$–$0.9$), so $S_3 = \{0.1,\dots,1.0\}$. After $(0.1, 0.25)$: radius $0.05/3 \approx 0.017 \lt 0.1$, nothing new; $S_4 = S_3$. Every step is an explicit union of balls, and a measurement below $h + E = 0.2$ would have certified nothing at all (radius $\lt 0$).

(b) Constraint 2 at $0.5$ gives radius $(0.35 - 0.1)/1 = 0.25$, certifying $\{0.3, \dots, 0.7\}$. In MCLoSBO's indexing (Section 5: the seed measurement is $y_{i,0}$, so the set after it is $S_1$; it plays the role of $S_2$ in (a)), $S_1 = A_{1,1} \cap A_{2,1} = \{0.1,\dots,0.9\} \cap \{0.3,\dots,0.7\} = \{0.3,\dots,0.7\}$, so the planned query at $0.9$ is inadmissible: the next query must be chosen inside $\{0.3,\dots,0.7\}$ (the acquisition picks the most uncertain point of $G_1 \cup M_1$, which depends on the GPs, e.g. $0.3$ or $0.7$). The tighter constraint governs even though constraint 1 was the steeper one.

(c) With $L = 2$ the first radius becomes $1.2/2 = 0.6$ and $S_2 = D$ including $0$ and $1.0$. If the true $f$ has slope up to $3$, $f(0) = -0.1 \lt 0$ is consistent with the data ($f(0.5) \in [1.2, 1.6]$ and $|f(0.5) - f(0)| \le 1.5$ allows $f(0) \ge -0.3$), so an unsafe query at $0$ can follow. An under-estimated $L$ fails exactly like an under-estimated $B$: silently, on the boundary, in the direction of the largest cone.

Exercise 5.5 — Gaussian noise breaks the hard bound; what does $E = 2B_\epsilon$ actually fix?

Let $\epsilon_t \sim \mathcal{N}(0,\sigma_n^2)$ i.i.d. and $E = 2\sigma_n$. (a) Compute the probability that a single measurement violates $|\epsilon_t| \le E$, and that at least one of $T = 25$ does. (b) Explain why not every exceedance causes an unsafe query. (c) Derive an $E_T$ such that all $T$ measurements satisfy $|\epsilon_t| \le E_T$ with probability $\ge 1-\delta$, and state what LoSBO then guarantees; evaluate for $T = 25$, $\delta = 0.01$. (d) What is the actual purpose of $E = 2B_\epsilon$ in the paper?

Show answer

(a) $\mathbb{P}[|\epsilon_t| \gt 2\sigma_n] = 2\Phi(-2) \approx 0.0455$, with $\Phi$ the standard normal CDF (Primer C). Over 25 independent measurements, $1 - (1 - 0.0455)^{25} \approx 0.69$: an exceedance is the rule, not the exception, so Proposition 1 does not apply to Gaussian noise at all.

(b) Safety needs $f(x_{t-1}) \ge y_{t-1} - E$, i.e. only $\epsilon_{t-1} \le E$ (one-sided, probability of failure $\Phi(-2) \approx 0.023$ per query); a violation also requires the over-certified ball to contain a point $x$ with $f(x) \lt h$. Rearranging the certificate, such an $x$ satisfies $f(x_{t-1}) - h \lt L\,d(x_{t-1},x) \le f(x_{t-1}) - h + (\epsilon_{t-1} - E)$, because $f(x) \ge f(x_{t-1}) - L\,d(x_{t-1},x)$ would otherwise give $f(x) \ge h$. Dividing by $L$, with $r_0 = (f(x_{t-1}) - h)/L$ the true reach of the cone: $r_0 \lt d(x_{t-1},x) \le r_0 + (\epsilon_{t-1} - E)/L$, a shell of width $(\epsilon_{t-1} - E)/L$ just beyond $r_0$, and there $f(x) \ge f(x_{t-1}) - L\,d(x_{t-1},x) \ge h - (\epsilon_{t-1} - E)$. This is only a necessary condition: points of the shell may well be safe. The query itself need not be near the boundary (for $f(x) = 1 - x$, $h = 0$, $L = 1$, a query at $x = 0$ with $\epsilon_{t-1} - E = 0.1$ certifies the unsafe point $x = 1.05$). Exceedances on flat parts of $f$, or with a conservative $L$, are harmless, which is why the explorer shows only occasional violations under Gaussian noise.

(c) Gaussian tail and union bound: $\mathbb{P}[\exists t \le T : |\epsilon_t| \gt E_T] \le T\cdot 2e^{-E_T^2/(2\sigma_n^2)} = \delta$ for $E_T = \sigma_n\sqrt{2\ln(2T/\delta)}$. On the event that all $|\epsilon_t| \le E_T$, Proposition 1 applies verbatim, so LoSBO with $E = E_T$ is safe with probability at least $1-\delta$, the same structure as Lemma 2 of ET-GP-UCB (Section 6). For $T = 25$, $\delta = 0.01$: $E_T = \sigma_n\sqrt{2\ln 5000} \approx 4.13\,\sigma_n$. The guarantee is now probabilistic and horizon-dependent (an anytime version uses $\pi_t$ weights as in Section 6), which is the honest statement for unbounded noise.

(d) Remark 3 is about bounded noise with a sharp bound $B_\epsilon$: with $E = B_\epsilon$, queries near the boundary can return $y_t \lt h$ although $f(x_t) \ge h$, which looks like a violation and may trigger costly reactions. $E = 2B_\epsilon$ avoids these false alarms at the price of smaller balls. It does nothing about unboundedness; for Gaussian noise the relevant remedy is (c).

Exercise 5.6 — How large is a real $\beta_t$ in numbers?

Take $B = 10$, $R = 0.05$, $\lambda = 0.05$, $\delta = 0.01$, and suppose after $t = 20$ queries $\ln\det(I_t + \lambda^{-1}K_t) = 12$. Evaluate eq. (7), the Chowdhury–Gopalan $\beta_t$ with $\gamma_{t-1}$ replaced by the realized information gain, and the Srinivas-type $\sqrt{2B^2 + 300\gamma_t\ln^3(t/\delta)}$. Compare with $\beta \equiv 2$ and interpret.

Show answer

Eq. (7): $\beta_t = 10 + \frac{0.05}{\sqrt{0.05}}\sqrt{12 + 2\ln 100} = 10 + 0.2236\sqrt{21.21} = 10 + 0.2236\times 4.606 \approx 11.03$. Chowdhury–Gopalan with $\gamma = \tfrac12\cdot 12 = 6$: $10 + 0.05\sqrt{2(6 + 1 + 4.605)} = 10 + 0.05\times 4.817 \approx 10.24$ (formally it needs $\lambda = 1 + 2/T \ge 1$, not $\lambda = 0.05$). Srinivas-type: $\ln(t/\delta) = \ln 2000 = 7.60$, $\ln^3 = 439$, so $\sqrt{200 + 300\cdot 6\cdot 439} = \sqrt{790{,}400} \approx 889$.

Interpretation. With low noise, both modern bounds are essentially $B$: the noise term contributes about 9% of eq. (7) and about 2% of the Chowdhury–Gopalan value. The heuristic $\beta = 2$ is therefore not "a bit optimistic": justifying it through eq. (7) would require $B + 1.03 \le 2$, i.e. a norm bound $\|f\|_k \lesssim 1$ (roughly $\lesssim 2$ in the limit of negligible noise, a sufficient condition from one theorem), whereas the supplied norm bound is 10 and gives a band about 5.5 times wider. A bound $B=10$ alone does not establish that the actual norm equals 10. The Srinivas constant explains why nobody ever used the theoretical value; the modern bounds explain why that is no longer an excuse. Whether $\beta \approx 11$ still explores is the "not started" row of Table 1.

Key Papers

PaperVenueContributionWhy read it
Fiedler, Menn, Kreisköther, Trimpe — On Safety in Safe Bayesian OptimizationTMLR 2024Documents the $\beta$ and RKHS-norm problems with experiments; proposes Real-$\beta$-SafeOpt, LoSBO and LoS-GP-UCBThe source of this module; read Sections 5–7 and Table 1 in full
Fiedler, Scherer, Trimpe — Practical and Rigorous Uncertainty Bounds for Gaussian Process RegressionAAAI 2021Data-dependent frequentist $\beta_N$ (use the corrected arXiv v2 constant); log-det-free bound for independent noise; robustness to misspecificationThe bound Real-$\beta$ evaluates; the Corrections section is a lesson in constants
Menn, Pelizzari, Fleps-Dezasse, Trimpe — Lipschitz Safe Bayesian Optimization for Automotive ControlIEEE CDC 2024MCLoSBO: Lipschitz-only safe sets for several constraints; asynchronous batch variant; tuning on a test vehicleFirst hardware demonstration of Lipschitz-only safety with multiple constraints
Holzapfel, Brunzema, Trimpe — Event-Triggered Safe Bayesian Optimization on QuadcoptersL4DC 2024ETSO: GP-error-bound trigger detects change, resets data and safe set, reverts to a backup controllerShows what "safe" means when the plant changes; note the heuristic threshold and $\beta = 2$
Brunzema, von Rohr, Solowjow, Trimpe — Event-Triggered Time-Varying Bayesian OptimizationTMLR 2025ET-GP-UCB: reset on a uniform GP error bound; regret bounds for any reset strategy within a window; no rate of change neededThe trigger derivation (Lemmas 1–3) in this module
Brunzema, von Rohr, Trimpe — On Controller Tuning with Time-Varying Bayesian OptimizationIEEE CDC 2022Uncertainty injection through a Wiener-process temporal kernel; convexity encouraged by second-derivative constraints at virtual points (constrained GPs)The modelling alternative to resets for slow, lasting drift
Sui, Gotovos, Burdick, Krause — Safe Exploration for Optimization with Gaussian ProcessesICML 2015SafeOpt, Theorem 1 (safety and $\epsilon$-optimality with $\beta_t = 2B + 300\gamma_t\log^3(t/\delta)$, $\|f\|_k^2 \le B$)The proof template whose exploration part LoSBO gives up
Berkenkamp, Schoellig, Krause — Safe Controller Optimization for Quadrotors with Gaussian ProcessesICRA 2016Lipschitz-free practical SafeOpt with $\beta_n = 2$The de facto implementation whose heuristics started the gap
Berkenkamp, Krause, Schoellig — Bayesian Optimization with Safety Constraints: Safe and Automatic Parameter Tuning in Robotics (SafeOpt-MC)Machine Learning 2023 (online 2021)Multiple constraints via an index-augmented GP; contextual safe BO; remarks on constant $\beta$The multi-constraint machinery MCLoSBO reuses
Chowdhury, Gopalan — On Kernelized Multi-armed BanditsICML 2017Self-normalized RKHS concentration; $\beta_t = B + R\sqrt{2(\gamma_{t-1}+1+\ln(1/\delta))}$ with $\lambda = 1+\eta$, $\eta = 2/T$The default theoretical $\beta_t$ of the safe-BO literature and its $\lambda \ge 1$ restriction
Abbasi-Yadkori, Pál, Szepesvári — Improved Algorithms for Linear Stochastic BanditsNeurIPS 2011Self-normalized tail inequality by the method of mixtures; anytime confidence ellipsoidsThe determinant term of eq. (7) comes from here (the RKHS version is in Abbasi-Yadkori's 2013 thesis)
Srinivas, Krause, Kakade, Seeger — Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental DesignICML 2010 (extended version, retitled: IEEE TIT 2012)GP-UCB, maximum information gain, the first RKHS $\beta_t$ (Theorem 6)Explains why the theoretical constants were never used, and the $\|f\|_k^2 \le B$ convention
Tokmak, Krishnan, Schön, Baumann — Safe exploration in reproducing kernel Hilbert spacesAISTATS 2025Over-estimates $\|f\|_k$ from data by a sampling-and-discarding scenario approach; safety with confidence $1-\kappa$ and probability $(1-\gamma)(1-\delta)$The direct answer to the RKHS-norm objection, and its i.i.d. assumption
Solowjow, Trimpe — Event-triggered LearningAutomatica 2020Re-learn only when a statistical test says the model is wrong (Hoeffding/DKW triggers)The principle behind ET-GP-UCB and ETSO

DKW is the Dvoretzky–Kiefer–Wolfowitz inequality, Lemma 3 of Solowjow and Trimpe (with Massart's constant): for $n$ i.i.d. samples $X_i$ with CDF $F$ and empirical CDF $F_n(z) = \frac1n\#\{i : X_i \le z\}$, $\mathbb{P}\big[\sup_{z}|F_n(z) - F(z)| \gt \epsilon\big] \le 2e^{-2n\epsilon^2}$ for every $\epsilon \gt 0$, so a whole CDF is learned uniformly from samples. Their triggers compare observed and predicted distributions this way; ET-GP-UCB instead uses the GP bound of Lemma 3 above.

Flashcards