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
This module assumes:
- SafeOpt: confidence intervals, safe sets, expanders, and maximizers (Module 4)
- Lipschitz continuity and sensitivity bounds (Primer B)
- GP posterior formulas and nominal noise variance (Module 3)
- Kernels, RKHS norms, and the reproducing property (Module 3)
- Uniform confidence guarantees and union bounds (Primer C)
- Adaptive observations, filtrations, and martingale differences (Primer C)
- Sub-Gaussian noise and Gaussian tail bounds (Primer C)
- Realized and maximum information gain (Module 3)
- SafeOpt's reachable optimum and exploration theorem (Module 4)
- RKHS interpolation and orthogonal projection, for Exercise 5.2 (Module 3)
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.
Try these before opening the answer. The review links lead to earlier material.
- If $y=f(z)+\epsilon$ with $|\epsilon|\le0.1$, what lower bound on $f(z)$ follows? Review observations and noise.
- If the slack is 0.4 and $L=2$, what is the cone radius? Review Lipschitz margins.
- 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
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.
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
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)
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$).
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:
- Variational / discretization characterizations (maximization over families of lower bounds, minimum-norm interpolation problems, matrix inequalities): explicit, kernel-agnostic, but they need exact function values and can only produce lower bounds numerically (the minimum-norm interpolant of any finite data set has a norm no larger than that of $f$).
- Mercer / weighted $\ell^2$ representation for continuous kernels on compact spaces (see Primer 0): explains the regularization behaviour of kernel machines, requires the full coefficient sequence to give a number.
Background — Mercer coefficients
The idea is the function-space version of diagonalizing a symmetric matrix. For a continuous positive semidefinite kernel on a compact set (integrals taken with a finite measure that gives every non-empty open set positive mass), Mercer's theorem gives $k(x,x')=\sum_j\lambda_j e_j(x)e_j(x')$ with eigenvalues $\lambda_j \gt 0$ and eigenfunctions $e_j$ that are orthonormal in $L^2$, the space of square-integrable functions (the rescaled $\sqrt{\lambda_j}e_j$ are orthonormal in $\mathcal{H}_k$). A function $f=\sum_j a_j e_j$ lies in $\mathcal{H}_k$ iff $\|f\|_k^2=\sum_j a_j^2/\lambda_j \lt \infty$, so components along eigenfunctions with small $\lambda_j$ are expensive. Example: $(a_1,a_2)=(1,1)$ with $(\lambda_1,\lambda_2)=(1,\tfrac14)$ contributes $1+4=5$ to $\|f\|_k^2$. The formula needs the whole coefficient sequence; finitely many measured values say nothing about its unobserved tail, which is why it yields no upper bound.
- Fourier representation for translation-invariant kernels: $\|f\|_k$ is a weighted energy of $\hat f$ that penalizes high frequencies; Sobolev spaces (norms that measure the energy of derivatives) and Fock spaces (Gaussian-weighted spaces of analytic functions, a specialist example not needed below) have analogous formulas. These formulas alone do not turn finite observations into an upper bound.
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.
| Algorithm | SafeOpt $\beta \equiv 2$ | Real-$\beta$, $B = 2.5$ | Real-$\beta$, $B = 10$ (true) | Real-$\beta$, $B = 20$ | LoSBO |
|---|---|---|---|---|---|
| Not started % | 1.93 | 3.16 | 30.40 | 68.34 | 0.018 |
| Safety violations % (all runs) | 3.95 | 0.859 | 0 | 0 | 0 |
| Safety violations, worst function % | 28.62 | 13.38 | 0 | 0 | 0 |
| Final performance % | 88.75 | 88.76 | 82.45 | 76.69 | 90.90 |
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.
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
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.
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\}$,
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):
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).
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.
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).
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.
- 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$.
- Bounded noise. $y_t = f(x_t) + \epsilon_t$ with $|\epsilon_t| \le E$ for all $t \ge 1$, $E$ known.
- 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.
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.)
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
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.
- Require: Lipschitz constant $L$, noise bound $E$, a rule for $\beta_t$ (a tuning knob), safe seed $S_0$, threshold $h$.
- $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
- for $t = 1, 2, \dots$ do
- $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
- $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
- $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)
- $M_t \leftarrow \{x \in S_t : u_t(x) \ge \max_{x_S \in S_t}\ell_t(x_S)\}$ // maximizers
- $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$.
- Update the GP with $(x_t, y_t)$; choose $\beta_t$; $Q_t(x) \leftarrow [\mu_t(x) \pm \beta_t\sigma_t(x)]$.
- 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
- $\beta_t$ is a tuning parameter. It may be constant, adapted online, or over-optimistic; the paper runs $\beta \equiv 2$ throughout and suggests ("it appears") that this over-optimism is what makes LoSBO explore better than Real-$\beta$-SafeOpt (Table 1: 90.90% vs 82.45%).
- No RKHS norm, no kernel correctness. Assumption 2 disappears. A wrong kernel or length scale can degrade exploration but cannot cause an unsafe query; hyperparameter optimization during the run is allowed. In the misspecified experiments (Matérn functions, length scale $4\times$ or $0.2\times$ the truth, SE model on Matérn functions) LoSBO's certificate is untouched, since $L$ and $E$ remain valid, whereas the $4\times$ setting produced safety violations in 12.57% of all runs, which can only be Real-$\beta$'s (Section 2.2).
- Deterministic, not probabilistic. The bound $f(x_t) \ge y_t - E$ holds for every realization. This is the Milanese–Novara set-membership philosophy imported into BO.
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.
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.
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
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.
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.
- 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.
- 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.
- 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.
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.
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).
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.
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$.
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:
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
- Asynchronous experiments. On a driving vehicle there is no pause between experiments to wait for the optimizer. MCLoSBO uses a batch acquisition with a pending parameter $\tilde\theta$: since $\sigma_n$ does not depend on $y$, a virtual data point $(\tilde\theta, \mu_n(\tilde\theta))$ is added to the GP before evaluating the acquisition, which discourages re-querying near $\tilde\theta$. The safe set, however, is computed only from points with measured values, so safety is untouched.
Derivation — what the virtual observation does to $\mu_n$ and $\sigma_n$
Let $c_n(\theta,\theta')$ be the current posterior covariance of one GP (so $c_n(\theta,\theta)=\sigma_n^2(\theta)$) and add a virtual observation $\tilde y$ at $\tilde\theta$ with noise variance $\lambda$. Conditioning the Gaussian posterior on it (Primer C) gives
$$\mu_{\mathrm{new}}(\theta)=\mu_n(\theta)+\frac{c_n(\theta,\tilde\theta)\,\big(\tilde y-\mu_n(\tilde\theta)\big)}{\sigma_n^2(\tilde\theta)+\lambda},\qquad \sigma_{\mathrm{new}}^2(\theta)=\sigma_n^2(\theta)-\frac{c_n(\theta,\tilde\theta)^2}{\sigma_n^2(\tilde\theta)+\lambda}.$$The variance update does not contain $\tilde y$ (this is what “$\sigma_n$ does not depend on $y$” means), and the choice $\tilde y=\mu_n(\tilde\theta)$ makes the mean update vanish. So points correlated with $\tilde\theta$ look less uncertain to the acquisition, as if $\tilde\theta$ had been explored, without any invented change in the predicted values; the virtual value never enters the safe set.
- Hyperparameter optimization. Marginal-likelihood fitting (see Primer C) of length scales and output scales during the run is allowed for the same reason. The authors point out that hyperparameter optimization inside SafeOpt-MC has led to safety violations in earlier controller-tuning work (safe model-free adaptive control, and controller design with the parameter-space approach), precisely because there the covariance function is the safety mechanism.
Background — marginal-likelihood fitting
Collect the kernel hyperparameters (length scales, output scale) in $\omega$. Under a zero-mean GP prior with kernel $k_\omega$, the vector $\mathbf{y}$ of the $n$ observations of one function is Gaussian, $\mathbf{y}\sim\mathcal N(0,K_\omega+\lambda I_n)$, because the unknown function values have been integrated out (hence “marginal”). Fitting chooses $\omega$ to maximize the log of this density, $-\tfrac12\mathbf{y}^\top(K_\omega+\lambda I_n)^{-1}\mathbf{y}-\tfrac12\ln\det(K_\omega+\lambda I_n)-\tfrac n2\ln(2\pi)$: the first term rewards fitting the data, the second penalizes overly flexible kernels.
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
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.
| Study | Setup | Outcome |
|---|---|---|
| Simulation | 1, 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-MC | No 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 1 | Opel Astra Sports Tourer; 1 parameter, 15 iterations, $L_1 = 4$, $L_2 = 1.5$, conservative initial set | No 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 2 | 3 parameters, 13 iterations, $L_1 = 10$, $L_2 = 1.5$, safe set seeded from experiment 1 | No violations; about 28% improvement over the initial safe set of this run |
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.
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.
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$.
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.
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$,
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
(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$,
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:
- apply the backup controller $\theta_B$ and observe $\hat J_B$;
- reset the data set to $D_{t+1} = \{(\theta_B, \hat J_B), (\theta_t, \hat J_t)\}$, which resets the safe set;
- recompute the threshold $J_{\min,t}$ from $\hat J_B$ and restart safe exploration ($t' \leftarrow 2$).
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.
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.
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,
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.
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).
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.
| Method | Needs $B \ge \|f\|_k$ | Needs $L$ | Noise assumption | Safety guarantee |
|---|---|---|---|---|
| SafeOpt with theoretical $\beta_t$ (Sui et al. 2015) | yes (on $\|f\|_k^2$) | yes | zero-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$-SafeOpt | yes | yes | $R$-sub-Gaussian, $R$ known | w.p. $\ge 1-\delta$; may not explore |
| LoSBO / LoS-GP-UCB | no | yes | $|\epsilon_t| \le E$ | deterministic; no exploration theorem |
| MCLoSBO | no | $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$) | no | sub-Gaussian | w.p. $\ge 1-\delta$ (ISE: continuous domains) |
| RKHS-norm over-estimation (Tokmak et al., AISTATS 2025) | estimated $B_t$ from data | no (kernel metric $d_k$) | sub-Gaussian | with 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$ |
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)$,
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.
7.1 Open problems
- Estimating the RKHS norm. Data only give lower bounds (minimum-norm interpolation), and queries needed for estimation must already be safe. Tokmak et al. (AISTATS 2025) over-estimate $\|f\|_k$ by comparing with random RKHS functions in a sampling-and-discarding scenario programme (theorem box above; the general scenario approach follows in Module 15), which is rigorous but rests on the assumption that $\|f\|_k$ is an i.i.d. sample from the same distribution as the comparison functions. PACSBO (Tokmak, Schön & Baumann, SysDO 2024) estimates an upper bound on the RKHS norm from data in a probably-approximately-correct sense and treats the norm locally, much as Lipschitz methods use local slopes. The 2026 preprint of Wenzel, Tokmak and Fiedler (arXiv 2605.20091) uses superconvergence of kernel interpolation (for targets smoother than a typical RKHS member, the interpolation error in the RKHS norm decays like a power of the sample spacing) for sampling-based norm estimation, assuming noise-free and safe access to the target function (a setting that arises, e.g., in approximate MPC), not the noisy, safety-constrained queries of safe BO. None of these yet delivers the "engineering-knowledge" bound that Real-$\beta$-SafeOpt would need.
Going deeper — the superconvergence theorem behind the 2026 estimator (optional)
Setting (their Assumption 1): $\Omega \subset \mathbb{R}^d$ is a compact Lipschitz region, and $k$ is continuous and strictly positive definite with $\mathcal{H}_k(\Omega)$ norm-equivalent to the Sobolev space $H^\tau(\Omega)$, $\tau \gt d/2$ (e.g. Matérn kernels, not the SE kernel). With the Mercer eigenpairs $(\lambda_j, e_j)$ of $k$ on $L^2(\Omega)$, the power space $(\mathcal{H}_k)^{\vartheta}$ contains the $f$ with $\sum_j \langle f, e_j\rangle_{L^2}^2/\lambda_j^{\vartheta} \lt \infty$: $\vartheta = 1$ is the RKHS itself, $\vartheta \gt 1$ means extra smoothness. Theorem 2 (forward direction): if $f \in (\mathcal{H}_k)^{\vartheta'}$ for all $\vartheta' \lt \vartheta$, where $\vartheta \in (1,2]$, then for every $\vartheta' \lt \vartheta$ there is a constant $C$ such that for all finite point sets $X \subset \Omega$ the kernel interpolant $s_{f,X}$ of the exact values satisfies $\|f - s_{f,X}\|_k \le C\,h_X^{(\vartheta'-1)\tau}$, where the fill distance $h_X = \sup_{x \in \Omega}\min_{x_i \in X}\|x - x_i\|$ is the largest distance from a point of $\Omega$ to its nearest sample. Since $s_{f,X}$ is the orthogonal projection of $f$ onto the span of the $k(\cdot,x_i)$, Pythagoras gives $\|f\|_k^2 = \|s_{f,X}\|_k^2 + \|f - s_{f,X}\|_k^2$, so the computable $\|s_{f,X}\|_k$ approaches $\|f\|_k$ at an algebraic rate in $h_X$, which their estimator exploits. The constant $C$ is unknown and exact function values are needed, which is why this does not yet give a numerical bound for noisy safe BO. Wenzel, Tokmak & Fiedler, Theorem 2.
- Hyperparameter adaptation with guarantees. Online length-scale fitting changes the RKHS; theory for uncertainty bounds under adapted hyperparameters is only emerging (the TMLR paper points to Teckentrup and Karvonen et al.). A-GP-UCB (Berkenkamp, Schoellig & Krause, JMLR 2019) keeps sublinear regret with unknown hyperparameters by slowly enlarging the function class, but, as Fiedler et al. note, such schemes may query unsafe inputs. LoSBO sidesteps the issue for safety, not for exploration quality.
- Gaussian noise versus hard bounds. LoSBO's $|\epsilon_t| \le E$ excludes Gaussian noise; the practical remedy $E = 2B_\epsilon$ addresses false alarms, not unboundedness. A quantile-based $E$ restores a probabilistic guarantee (Exercise 5.5), which is a different promise. Heteroscedastic and asymmetric bounds are covered by Remark 2 but rarely known.
- Exploration guarantees for Lipschitz-only methods. SafeOpt's Theorem 1 does not transfer; that under-exploration of LoS-GP-UCB (the Safe-UCB effect of Sui et al.) stays mild is only an empirical finding. The optimality properties of the set-membership lower bound (Milanese & Novara) might offer a starting point.
- Connection to cautious BO. If practice runs cautious BO, then conservative bandits and cautious BO with tolerated, bounded violations (e.g. CONFIG, Xu et al., ICML 2023, which bounds cumulative violation) may be the honest theoretical frame for $\beta \equiv 2$; the TMLR paper flags this as future work.
- Transfer to other SafeOpt variants and to dynamical systems. The LoSBO modification applies to any algorithm of the generic SafeOpt class; a Lipschitz-only GoSafeOpt with backup policies certified from trajectory data (see Module 6) would combine deterministic parameter-space safety with global exploration; we are not aware that it has been done.
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.
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.
From the mathematics to a real decision
Learning objectives
- Build a safe region from bounded-noise observations without treating the GP as the safety authority.
- Propagate uncertainty in the implemented experiment through a Lipschitz certificate.
- Convert a finite-horizon Gaussian noise assumption into an explicitly probabilistic noise envelope.
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
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
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$.
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.
Key Papers
| Paper | Venue | Contribution | Why read it |
|---|---|---|---|
| Fiedler, Menn, Kreisköther, Trimpe — On Safety in Safe Bayesian Optimization | TMLR 2024 | Documents the $\beta$ and RKHS-norm problems with experiments; proposes Real-$\beta$-SafeOpt, LoSBO and LoS-GP-UCB | The source of this module; read Sections 5–7 and Table 1 in full |
| Fiedler, Scherer, Trimpe — Practical and Rigorous Uncertainty Bounds for Gaussian Process Regression | AAAI 2021 | Data-dependent frequentist $\beta_N$ (use the corrected arXiv v2 constant); log-det-free bound for independent noise; robustness to misspecification | The bound Real-$\beta$ evaluates; the Corrections section is a lesson in constants |
| Menn, Pelizzari, Fleps-Dezasse, Trimpe — Lipschitz Safe Bayesian Optimization for Automotive Control | IEEE CDC 2024 | MCLoSBO: Lipschitz-only safe sets for several constraints; asynchronous batch variant; tuning on a test vehicle | First hardware demonstration of Lipschitz-only safety with multiple constraints |
| Holzapfel, Brunzema, Trimpe — Event-Triggered Safe Bayesian Optimization on Quadcopters | L4DC 2024 | ETSO: GP-error-bound trigger detects change, resets data and safe set, reverts to a backup controller | Shows what "safe" means when the plant changes; note the heuristic threshold and $\beta = 2$ |
| Brunzema, von Rohr, Solowjow, Trimpe — Event-Triggered Time-Varying Bayesian Optimization | TMLR 2025 | ET-GP-UCB: reset on a uniform GP error bound; regret bounds for any reset strategy within a window; no rate of change needed | The trigger derivation (Lemmas 1–3) in this module |
| Brunzema, von Rohr, Trimpe — On Controller Tuning with Time-Varying Bayesian Optimization | IEEE CDC 2022 | Uncertainty 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 Processes | ICML 2015 | SafeOpt, 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 Processes | ICRA 2016 | Lipschitz-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 Bandits | ICML 2017 | Self-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 Bandits | NeurIPS 2011 | Self-normalized tail inequality by the method of mixtures; anytime confidence ellipsoids | The 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 Design | ICML 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 spaces | AISTATS 2025 | Over-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 Learning | Automatica 2020 | Re-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.