betaFeedback

WorksEngineering

Anytime-Valid Certification of Robustness Margins for Safe Control via E-Values

Abstract

Robust control uses the error between a known model and the true system as a robustness margin. However, this error is usually unknown: conservative estimates restrict feasibility and performance, while underestimates can result in violations of the control property. We estimate this robustness margin from online data using e-values, a statistical tool for hypothesis testing, in the setting of discrete-time control barrier functions (CBFs). Here, we measure the robustness margin as the difference between the observed CBF and the model-based CBF prediction. We then design a robust CBF controller in three steps by: (1) selecting a set of candidate margins, (2) obtaining validity certificates for these candidates via sequential tests based on e-values, and (3) updating the CBF controller with the smallest certified candidate. The deployed tests accumulate evidence against the hypothesis that an exceedance risk, the probability of the robustness margin exceeding the candidate margin, remains at or above a pre-specified failure probability αα. Our tests are anytime valid and thus enable the use of certified candidates in the CBF controller, guaranteeing that the probability that the exceedance risk of a certified margin exceeds αα is at most a user-chosen confidence δδ. We validate our approach on navigation problems across different environments with visualizations in NVIDIA Isaac Sim.

Introduction

Learning-based controllers are increasingly deployed in a variety of applications, but often lack formal safety guarantees. This has motivated the use of safety filters via control barrier functions (CBFs) [1]. However, their reliability depend on the availability of an accurate model of the system. In the presence of model mismatches, robust CBFs can still ensure safety by tightening the CBF safety constraint via a robustness margin, which must be larger than the model error [2]. Unfortunately, the model error is typically unknown and depends on the system’s operating range. Robustness margins that are chosen too small may provide insufficient protection, whereas unnecessarily large choices lead to conservative or infeasible problems. This issue, and hence our contribution, is not limited to CBFs and applies to other tools, e.g., robust model predictive control and control Lyapunov functions.

Data-driven estimates of the model error can be obtained in practice, but are often heuristic and approximate, resulting again in unsafe behavior. Therefore, recent work has studied how probabilistic safety guarantees can be obtained using Gaussian Processes [3, 4] and conformal prediction [5]. While Gaussian Processes rely on a well-calibrated model assumption, conformal prediction struggles in dealing with shifts of the data generating distribution due to the closed-loop dependence between controller and data. This issue

was addressed in [6, 7, 8], e.g., via robust conformal prediction, but only under additional regularity assumptions. Importantly, these works require the availability of an offline calibration dataset. We argue for departing from conformal prediction in favor of e-values [9], a statistical tool for hypothesis testing whose properties accommodate closed-loop distribution shifts without requiring an offline dataset.

Our proposed method is initialized with a conservative yet valid fallback robustness margin, see Figure 1. We then start collecting closed-loop data with the goal to find smaller robustness margins. Therefore, at each time step, we compute the barrier loss, which is the amount by which the observed CBF falls below its model-based prediction. We then select a finite set of candidate margins. For each candidate, we test the hypothesis that the exceedance risk, which is the probability of the barrier loss exceeding the candidate margin, remains at or above a user-chosen error confidence. As we need to check this hypothesis at each time step, we require anytime-valid tests for which we use sequential tests based on e-values, as opposed to often used p-values [10, 11, 12].

Overview of the proposed approach

Figure 1. Overview of the proposed approach. (a) Robot navigation under model uncertainty, requiring a robustness margin ctc_t. (b) Closed-loop barrier losses YtY_t provide evidence for selecting valid robustness margins ct2c_t^2.

The authors are with the Automatic Control Laboratory, ETH Zürich, Switzerland. E-mails: [email protected], [email protected], [email protected]. A certificate is now issued if sufficient evidence against this hypothesis is obtained. Such a certificate tells us that the exceedance risk for the corresponding candidate was below the pre-specified failure probability at some point in the past. To transfer this certificate into a safe control action, we have to account for the fact that the exceedance risk may increase in the future, which is done by adding an exceedance buffer. The CBF controller then selects the smallest certified candidate. Our main contributions are as follows:

  1. We develop anytime-valid certificates for robustness margins of CBF controllers using online data and sequential tests based on e-values. We also derive upper bounds for the expected certification time.

  1. We propose a robust CBF controller that transfers certified robustness margins into safe control actions. This transfer relies on a bound on the increase in exceedance risk, which introduces conservatism. Therefore, we permit parallel tests for efficient control design.

  1. We compare our method against baseline algorithms on unicycle navigation problems in corridor and maze environments, visualized in NVIDIA Isaac Sim.

Robust and stochastic safety filters account for model uncertainty through error bounds or additional distributional information. Predictive safety filters use model-error bounds that can be learned from data [13], while adaptive CBFs use state-estimation error bounds [14]. Probabilistic CBFs use known moments or i.i.d. disturbance samples [15], while stochastic CBFs rely on a known disturbance distribution [16].An open challenge is to quantify error bounds and to certify robustness margins directly from online observations.

Conformal prediction (CP) is increasingly used in control to construct uncertainty bounds from observed prediction errors without assuming a parametric error distribution [17]. Under i.i.d. assumptions, standard CP approaches provide marginal coverage, so guarantees averaged over offline calibration trajectories and a test trajectory. One of the main challenges in control, however, is dealing with non i.i.d. data.

Online conformal prediction methods adapt uncertainty bounds in tube-based MPC [18] or switch thresholds in learned safety filters [19]. However, these provide safety guarantees that are only valid on average over time. For CBF controllers, [6] provides an iterative procedure to deal with distribution shifts by updating robustness margins using large sets of i.i.d. calibration trajectories. Instead, we use anytime-valid tests that require neither known disturbance distributions, offline calibration data, nor i.i.d. observations.

Sequential hypothesis testing methods based on e-values have been developed for change detection [20] and risk-controlling prediction sets [21]. Conformal e-prediction provides anytime-valid coverage for i.i.d. data arriving in batches [22]. In robotics, martingale tests detect distribution shifts with guarantees on false alerts [23], while multiple hypothesis testing can help identify the type of distribution shift [24]. Sequential tests can also be used to compare robust policies using i.i.d. evaluation trials [25]. Closest to our work are [16, 26]–[29], which formulate safety through enforcing a martingale condition. However, verifying the validity of this martingale condition requires precise knowledge of the disturbance distribution and must be performed offline. To the best of our knowledge, no one has used anytime-valid sequential certification of robustness margins from online data to design safe feedback controllers.

Problem Formulation

Stochastic System and Nominal Model

Let (Ω,F,P)(\Omega,\mathcal{F},\mathbb{P}) be a probability space, where Ω\Omega is the sample space, F\mathcal{F} is the associated σ\sigma-algebra, and P\mathbb{P} is a probability measure. Let E\mathbb{E} denote expectation under P\mathbb{P}. Relations between random variables are understood to hold almost surely.3 We consider a discrete-time stochastic system:

xt+1=f(xt,ut,wt),t∈N0,(1)x_{t+1}=f(x_t,u_t,w_t), \qquad t\in\mathbb{N}_0, \tag*{(1)}

where xt:Ω→X⊆Rnx_t:\Omega\to\mathcal{X}\subseteq\mathbb{R}^n, ut:Ω→U⊆Rmu_t:\Omega\to\mathcal{U}\subseteq\mathbb{R}^m, and wt:Ω→W⊆Rpw_t:\Omega\to\mathcal{W}\subseteq\mathbb{R}^p denote the state, control input, and disturbance, respectively. Moreover, x0:Ω→Xx_0:\Omega\to\mathcal{X} is the random initial state of (1). The actual transition map f:X×U×W→Xf:\mathcal{X}\times\mathcal{U}\times\mathcal{W}\to\mathcal{X} is unknown. Suppose, however, that a nominal one-step predictor f^:X×U→X\hat{f}:\mathcal{X}\times\mathcal{U}\to\mathcal{X} is available, e.g., obtained from first principles or via system identification. Define the model error et:=xt+1−f^(xt,ut)e_t:=x_{t+1}-\hat{f}(x_t,u_t), so that

xt+1=f^(xt,ut)+et.(2)x_{t+1}=\hat{f}(x_t,u_t)+e_t. \tag*{(2)}

At each time tt, a causal, possibly randomized controller, such as an RL policy, generates a nominal input utnom:Ω→Rmu_t^{\mathrm{nom}}:\Omega\to\mathbb{R}^m. The control input utu_t is then obtained by passing utnomu_t^{\mathrm{nom}} through a CBF filter, introduced below, which modifies the nominal input when necessary to enforce safety constraints.

The probability space supports the initial state, the disturbance process {wt}t≥0\{w_t\}_{t\geq0}, and any randomization used to generate utnomu_t^{\mathrm{nom}}. Together with the system dynamics (1) and the CBF controller, these random variables induce the state and input processes {xt}t≥0\{x_t\}_{t\geq0} and {ut}t≥0\{u_t\}_{t\geq0}, respectively. Let {Ft}t≥0\{\mathcal{F}_t\}_{t\geq0} denote the decision-time filtration, where Ft\mathcal{F}_t contains all information available after utu_t is selected, but before xt+1x_{t+1} is observed. In particular, Ft\mathcal{F}_t contains the past states and control inputs x0,u0,…,xt−1,ut−1x_0,u_0,\ldots,x_{t-1},u_{t-1}, the current state xtx_t, the nominal input utnomu_t^{\mathrm{nom}}, and the control input utu_t. Thus, xtx_t, utnomu_t^{\mathrm{nom}}, and utu_t are Ft\mathcal{F}_t-measurable, while xt+1x_{t+1} and ete_t are Ft+1\mathcal{F}_{t+1}-measurable and are not available at time tt.

Robust CBF Safety Filter

Let h:X→Rh:\mathcal{X}\to\mathbb{R} define the safe set C:={x∈X∣h(x)≥0}\mathcal{C}:=\{x\in\mathcal{X}\mid h(x)\geq0\}. Our objective is to keep the state xtx_t inside C\mathcal{C} despite the mismatch between the nominal model f^\hat{f} and the system ff. Therefore, we utilize robust CBFs for which we let ct≥0c_t\geq0 be a robustness margin. Consider now a control input utu_t satisfying the tightened nominal barrier condition

h(f^(xt,ut))−ct≥(1−γ)h(xt),γ∈(0,1].(3)h\bigl(\hat{f}(x_t,u_t)\bigr)-c_t\geq(1-\gamma)h(x_t), \qquad\gamma\in(0,1]. \tag*{(3)}

For a given margin c≥0c \ge0, define the feasible input set U(xt,c):={u∈U:h(f^(xt,u))−c≥(1−γ)h(xt)}U(x_t,c) := \left\{u \in\mathcal{U}: h(\hat{f}(x_t,u)) - c \ge(1-\gamma)h(x_t)\right\}.

The corresponding CBF safety filter modifies the nominal input utnomu_t^{\mathrm{nom}} as little as possible:

ut(c)∈arg⁡min⁡u∈U(xt,c) ∥u−utnom∥2.(4)u_t(c) \in\underset{u \in U(x_t,c)}{\arg\min}\ \lVert u-u_t^{\mathrm{nom}}\rVert^2. \tag*{(4)}

If U(xt,c)U(x_t,c) is nonempty, we assume that the minimum is attained4 and that a minimizer can be selected. The control input is ut:=ut(ct)u_t := u_t(c_t).5 To quantify how the model mismatch affects the true barrier condition, define the barrier loss

Yt:=[h(f^(xt,ut))−h(xt+1)]+.(5)Y_t := \left[h(\hat{f}(x_t,u_t))-h(x_{t+1})\right]_+. \tag*{(5)}

where [χ]+:=max⁡{χ,0}[\chi]_+ := \max\{\chi,0\}. Since [χ]+≥χ[\chi]_+ \ge\chi for every χ∈R\chi\in\mathbb{R}, we know that the following inequality is always satisfied:

h(xt+1)≥h(f^(xt,ut))−Yt.(6)h(x_{t+1}) \ge h(\hat{f}(x_t,u_t))-Y_t. \tag*{(6)}

Using equation (6), we can now present a sufficient condition for our goal. Indeed, knowing that ut∈U(xt,c)u_t \in U(x_t,c), we have

Yt≤ct⟹h(xt+1)≥(1−γ)h(xt),(7)Y_t \le c_t \quad\Longrightarrow\quad h(x_{t+1}) \ge(1-\gamma)h(x_t), \tag*{(7)}

i.e., Yt≤ctY_t \le c_t is sufficient to ensure the “then” part of (7), which is the true barrier condition [30]. Hence, if x0∈Cx_0 \in\mathcal{C} and Yt≤ctY_t \le c_t for all t∈N0t \in\mathbb{N}_0, then xt∈Cx_t \in\mathcal{C} for all t∈N0t \in\mathbb{N}_0.

We note that the loss YtY_t becomes observable only after utu_t is applied and xt+1x_{t+1} is observed. It is hence Ft+1\mathcal{F}_{t+1}-measurable and unavailable when ctc_t and utu_t are selected. At time tt, only the previous losses Y0,…,Yt−1Y_0,\ldots,Y_{t-1} are available.

Problem Statement

Let us select a CBF-violation probability α0∈(0,1)\alpha_0 \in(0,1). At every time step at which a margin ctc_t is deployed and an input utu_t satisfying (4) is applied, we seek to ensure

P(h(xt+1)<(1−γ)h(xt)∣Ft)≤α0.\mathbb{P}\left(h(x_{t+1}) < (1-\gamma)h(x_t)\mid\mathcal{F}_t\right) \le\alpha_0.

In words, given all information available at time tt, we want that the probability that the barrier condition h(xt+1)≥(1−γ)h(xt)h(x_{t+1}) \ge(1-\gamma)h(x_t) is violated does not exceed α0\alpha_0. By the sufficient condition in (7), we can achieve this goal by ensuring

References

  1. [1]A. D. Ames, X. Xu, J. W. Grizzle, and P. Tabuada, “Control barrier function based quadratic programs for safety critical systems,” IEEE Trans. Autom. Control, vol. 62, no. 8, pp. 3861–3876, 2017.DOI
  2. [2]M. Jankovic, “Robust control barrier functions for constrained stabilization of nonlinear systems,” Automatica, vol. 96, pp. 359–367, 2018.
  3. [3]A. Lederer, J. Umlauft, and S. Hirche, “Uniform error bounds for Gaussian process regression with application to safe control,” in Adv. Neural Inf. Process. Syst., vol. 32, 2019.
  4. [4]K. P. Wabersich, A. J. Taylor, J. J. Choi, K. Sreenath, C. J. Tomlin, A. D. Ames, and M. N. Zeilinger, “Data-driven safety filters: Hamilton–Jacobi reachability, control barrier functions, and predictive methods for uncertain systems,” IEEE Control Syst. Mag., vol. 43, no. 5, pp. 137–177, 2023.
  5. [5]T.-W. Hsu and H. Tsukamoto, “Statistical guarantees in data-driven nonlinear control: conformal robustness for stability and safety,” IEEE Control Syst. Lett., vol. 9, pp. 997–1002, 2025.DOI
  6. [6]O. Mirzaeedoganleh, E. Shekhtman, N. Matni, and L. Lindemann, “Robust conformal CBF and CLF controllers via iterative policy updates,” arXiv:2606.15366, 2026.
  7. [7]S. Wei, M. Ornik, and H. Tsukamoto, “Conformal contraction for robust nonlinear control with distribution-free uncertainty quantification,” in Proc. IEEE Conf. Decis. Control, 2025, pp. 3502–3507.arxiv.org/abs/2507.13613
  8. [8]O. Mirzaeedoganleh, E. S. Shekhtman, N. Matni, and L. Lindemann, “Safe planning in interactive environments via iterative policy updates and adversarially robust conformal prediction,” in Proc. Learn. Dyn. Control Conf., ser. Proc. Mach. Learn. Res., vol. 331, 2026, pp. 678–704.
  9. [9]A. Ramdas and R. Wang, “Hypothesis testing with e-values,” Found. Trends Stat., vol. 1, no. 1–2, pp. 1–390, 2025.DOI
  10. [10]A. Ramdas, P. Grünwald, V. Vovk, and G. Shafer, “Game-theoretic statistics and safe anytime-valid inference,” Stat. Sci., vol. 38, no. 4, pp. 576–601, 2023.arxiv.org/abs/2210.01948
  11. [11]P. Grünwald, R. de Heide, and W. Koolen, “Safe testing,” J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 86, no. 5, pp. 1091–1128, 2024.
  12. [12]V. Vovk and R. Wang, “E-values: calibration, combination and applications,” Ann. Statist., vol. 49, no. 3, pp. 1736–1754, 2021.DOI
  13. [13]K. P. Wabersich and M. N. Zeilinger, “A predictive safety filter for learning-based control of constrained nonlinear dynamical systems,” Automatica, vol. 129, 2021, art. no. 109597.
  14. [14]E. Das, R. Nanayakkara, X. Tan, R. M. Bena, J. W. Burdick, P. Tabuada, and A. D. Ames, “Safe navigation under state uncertainty: online adaptation for robust control barrier functions,” IEEE Robot. Autom. Lett., vol. 11, no. 3, pp. 3398–3405, 2026.DOI
  15. [15]P. Mestres, B. Werner, R. K. Cosner, and A. D. Ames, “Probabilistic control barrier functions: safety in probability for discrete-time stochastic systems,” in Proc. Am. Control Conf., 2026, pp. 1942–1949.arxiv.org/abs/2510.01501
  16. [16]R. K. Cosner, P. Culbertson, A. J. Taylor, and A. D. Ames, “Robust safety under stochastic uncertainty with discrete-time control barrier functions,” in Proc. Robot.: Sci. Syst., 2023.arxiv.org/abs/2302.07469
  17. [17]L. Lindemann, Y. Zhao, X. Yu, G. J. Pappas, and J. V. Deshmukh, “Formal verification and control with conformal prediction: practical safety guarantees for autonomous systems,” IEEE Control Syst. Mag., vol. 45, no. 6, pp. 72–122, 2025.DOI
  18. [18]D. M. Cherenson and D. Panagou, “Staggered integral online conformal prediction for safe dynamics adaptation with multi-step coverage guarantees,” arXiv:2604.06058, 2026.arxiv.org/abs/2604.06058
  19. [19]S. Huriot, I. Tabara, and H. Sibai, “Safe control using learned safety filters and adaptive conformal inference,” in Proc. Learn. Dyn. Control Conf., ser. Proc. Mach. Learn. Res., vol. 331, 2026, pp. 833–847.arxiv.org/abs/2604.18482
  20. [20]J. Shin, A. Ramdas, and A. Rinaldo, “E-detectors: a nonparametric framework for sequential change detection,” New Engl. J. Stat. Data Sci., vol. 2, no. 2, pp. 229–260, 2024.arxiv.org/abs/2203.03532
  21. [21]Z. Xu, N. Karampatziakis, and P. Mineiro, “Active, anytime-valid risk controlling prediction sets,” in Adv. Neural Inf. Process. Syst., vol. 37, 2024, pp. 60 110–60 132.arxiv.org/abs/2406.10490
  22. [22]E. Gauthier, F. Bach, and M. I. Jordan, “E-values expand the scope of conformal prediction,” arXiv:2503.13050, 2025.arxiv.org/abs/2503.13050
  23. [23]R. Luo, R. Sinha, Y. Sun, A. Hindy, S. Zhao, S. Savarese, E. Schmerling, and M. Pavone, “Online distribution shift detection via recency prediction,” in Proc. IEEE Int. Conf. Robot. Autom., 2024, pp. 16 251–16 263.arxiv.org/abs/2211.09916
  24. [24]A. Hindy, R. Luo, S. Banerjee, J. Kuck, E. Schmerling, and M. Pavone, “Diagnostic runtime monitoring with martingales,” arXiv:2407.21748, 2024.arxiv.org/abs/2407.21748
  25. [25]D. Snyder, A. Badihela, N. Matni, G. J. Pappas, A. Majumdar, M. Itkina, and H. Nishimura, “Beyond binary success: sample-efficient and statistically rigorous robot policy comparison,” in Proc. Robot.: Sci. Syst., 2026.arxiv.org/abs/2603.13616
  26. [29]R. K. Cosner, P. Culbertson, and A. D. Ames, “Bounding stochastic safety: Leveraging freedman’s inequality with discrete-time control barrier functions,” IEEE Control Systems Letters, vol. 8, pp. 1937–1942, 2024.arxiv.org/abs/2403.05745
  27. [30]A. Agrawal and K. Sreenath, “Discrete control barrier functions for safety-critical control of discrete systems with application to bipedal robot navigation,” in Proc. Robot.: Sci. Syst., 2017.DOI
  28. [31]J. Ville, Étude critique de la notion de collectif. Paris: Gauthier-Villars, 1939.
  29. [32]E. Clerico, “Sequential testing of conditionally constrained hypotheses,” arXiv:2606.06769, 2026.arxiv.org/abs/2606.06769
  30. [33]C. W. S. Chen, R. Gerlach, and E. M. H. Lin, “Bayesian estimation of smoothly mixing time-varying parameter GARCH models,” Comput. Stat. Data Anal., vol. 76, pp. 194–209, 2014.DOI
  31. [34]I. Gibbs and E. Candès, “Adaptive conformal inference under distributional shift,” in Adv. Neural Inf. Process. Syst., vol. 34, 2021, pp. 1660–1672.arxiv.org/abs/2106.00170
  32. [35]A. Dixit, L. Lindemann, S. X. Wei, M. Cleaveland, G. J. Pappas, and J. W. Burdick, “Adaptive conformal prediction for motion planning among dynamic agents,” in Proc. Learn. Dyn. Control Conf., ser. Proc. Mach. Learn. Res., vol. 211, 2023, pp. 300–314.arxiv.org/abs/2212.00278
  33. [36]P. S. Trakas, O. Mirzaeedoangeh, and L. Lindemann, “Anytime-valid certification of robustness margins for safe control via e-values: supplementary ablation report,” 2026. [Online]. Available: https://github.com/omdimirza/ecbf-ablation/blob/main/pdf/ablation_report.pdf
  34. [37]A. N. Angelopoulos, E. J. Candès, and R. J. Tibshirani, “Conformal PID control for time series prediction,” in Adv. Neural Inf. Process. Syst., vol. 36, 2023, pp. 23 047–23 074.arxiv.org/abs/2307.16895
  35. [38]K. Azuma, “Weighted sums of certain dependent random variables,” Tohoku Math. J., vol. 19, no. 3, pp. 357–367, 1967.DOI
  36. [39]G. Shafer, “Testing by betting: a strategy for statistical and scientific communication,” J. R. Stat. Soc. Ser. A Stat. Soc., vol. 184, no. 2, pp. 407–431, 2021.DOI
  37. [40]Q. Q. Wang, R. Wang, and J. F. Ziegel, “E-backtesting,” Manage. Sci., vol. 72, no. 6, pp. 4952–4973, 2026.
  38. [41]Y. Fan, Z. Jiao, and R. Wang, “Testing the mean and variance by e-processes,” Biometrika, vol. 112, no. 1, 2025, art. no. asae049.
  39. [42]D. Wang, J. Ding, G. Chu, D. Xu, and T. S. Wirjanto, “Modelling asset returns in the presence of price limits with Markov-switching mixture of truncated normal GARCH distribution: evidence from China,” Appl. Econ., vol. 53, no. 7, pp. 781–804, 2021.DOI
  40. [43]C. J. Clopper and E. S. Pearson, “The use of confidence or fiducial limits illustrated in the case of the binomial,” Biometrika, vol. 26, no. 4, pp. 404–413, 1934.DOI

Paper details

vlnc:W_3wkyfzuj
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 7

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Engineering

Not recorded for this paper

View statement
Looking for related papers…
Contents