Data-Driven Distributionally Robust Safety Verification Using Barrier Certificates and Conditional Mean Embeddings

Oliver Schön, Zhengang Zhong, Sadegh Soudjani

Introduction

In safety-critical engineering domains, such as autonomous driving and robotics, providing rigorous guarantees that a system will not enter an unsafe state is a fundamental requirement. Traditionally, this verification relies on precise mathematical models of the system's dynamics. However, real-world systems often exhibit complex, stochastic behaviors that are difficult to model analytically. While data-driven methods have emerged to bridge this gap, they frequently suffer from extreme data requirements or rely on restrictive assumptions, such as knowing the system's Lipschitz constants or assuming linear dynamics.

This paper introduces a novel framework for verifying the safety of unknown stochastic systems using only a finite set of data points. By integrating Conditional Mean Embeddings (CMEs) with Barrier Certificates (BC), the authors provide a distributionally robust approach to safety verification that remains effective even with relatively small, noisy datasets.

The Challenge of Unknown Dynamics

Safety verification for stochastic systems typically involves proving that the probability of the system state entering an unsafe set remains below a certain threshold over a given time horizon. When the transition kernel—the probability distribution governing how the system moves from one state to the next—is unknown, researchers must estimate it from data.

Existing data-driven verification techniques often hit two primary obstacles:

  1. Sample Complexity: Many methods require an impractical amount of data (often in the billions of samples) to provide meaningful probabilistic guarantees.
  2. Structural Assumptions: Many frameworks only work for specific classes of systems (e.g., control-affine) or require prior knowledge of complex regularity parameters that are hard to estimate for "black-box" systems.

Proposed Methodology: A Lifting Approach

The researchers propose a three-step "lifting" approach that moves the verification problem into a high-dimensional functional space to simplify the underlying complexity.

1. Conditional Mean Embeddings (CME)

The framework utilizes CMEs to represent unknown system dynamics within a Reproducing Kernel Hilbert Space (RKHS). This "kernel trick" allows complex nonlinear expectations of the system's future states to be treated as simple inner products in the RKHS. This transformation effectively bypasses the need for explicit modeling of the nonlinear transition kernel.

2. Distributional Robustness

Because the model is constructed from finite data, the estimated CME may not perfectly represent the true system. To account for this uncertainty, the authors construct an ambiguity set—a "ball" in the RKHS centered at the empirical estimate. The safety guarantee is then formulated to be distributionally robust, meaning it must hold true for every possible system transition kernel contained within that ambiguity set.

3. Barrier Certificates via SOS Optimization

To prove safety, the framework searches for a Barrier Certificate, a scalar function that acts as a mathematical "wall" between safe and unsafe regions of the state space. If such a function exists and satisfies certain inequalities, the system is guaranteed to stay within the safe region with a specific probability. The authors solve for these certificates using Sum-of-Squares (SOS) optimization, a powerful tool for handling polynomial inequalities.

To bridge the gap between the polynomial barrier certificates and the kernel-based system model, the authors employ a Gaussian Process (GP) envelope. This allows them to calculate the necessary complexity bounds to ensure the certificate remains valid across the entire ambiguity set.

Experimental Evaluation: Lane-Keeping Case Study

The framework was evaluated using a stochastic lane-keeping case study involving a single-track car model. The system is defined by a 3D state space representing the vehicle's longitudinal position, lateral position, and heading angle.

Using a dataset of $N = 10^4$ (10,000) samples, the framework was compared against state-of-the-art methods. Key findings include:

  • Safety Probability: The framework successfully identified a barrier certificate certifying that the vehicle would remain safe for 10 time steps with a probability of at least 88%.
  • Robustness Trade-off: The results demonstrated a clear relationship between the "ambiguity radius" (the level of uncertainty allowed) and the safety probability. As the requirement for robustness increases, the guaranteed safety probability decreases, allowing engineers to calculate a "safety budget" based on data quality.
  • Efficiency: Unlike competing methods, this approach did not require knowledge of the system's Lipschitz constants, making it significantly more adaptable to unknown dynamics.

Discussion and Future Directions

The proposed method represents a significant step forward in sample-efficient safety verification. By embedding the problem in an RKHS, the authors transform a difficult nonlinear problem into a more manageable optimization task that provides global guarantees from local data.

However, some limitations remain. The primary computational bottleneck is the requirement to invert an $N \times N$ kernel matrix, resulting in $O(N^3)$ complexity, which may limit scaling for extremely large datasets. Additionally, the combination of ambiguity sets and SOS optimization can be conservative, potentially underestimating the true safety of the system.

Future work aims to extend this framework from verification to controller synthesis, enabling the design of safe-by-construction behaviors. The authors also plan to explore more complex logic specifications, such as Linear Temporal Logic (LTL), to handle more sophisticated safety and mission requirements.

Summary updated

Abstract

Algorithmic verification of realistic systems to sat-isfy safety and other temporal requirements has suffered from poor scalability of the employed formal approaches. To design systems with rigorous guarantees, many approaches still rely on exact models of the underlying systems. Since this assumption can rarely be met in practice, models have to be inferred from measurement data or are bypassed completely. Whilst former usually requires the model structure to be known a-priori and immense amounts of data to be available, latter gives rise to a plethora of restrictive mathematical assumptions about the unknown dynamics. In a pursuit of developing scalable formal verification algorithms without shifting the problem to unrealistic assumptions, we employ the concept of barrier certificates, which can guarantee safety of the system, and learn the certificate directly from a compact set of system trajectories. We use conditional mean embeddings to embed data from the system into a reproducing kernel Hilbert space (RKHS) and construct an RKHS ambiguity set that can be inflated to robustify the result w.r.t. a set of plausible transition kernels. We show how to solve the resulting program efficiently using sum-of-squares optimization and a Gaussian process envelope. Our approach lifts the need for restrictive assumptions on the system dynamics and uncertainty, and suggests an improvement in the sample complexity of verifying the safety of a system on a tested case study compared to a state-of-the-art approach.
BibTeX
@inproceedings{schon2024data,
  author = {Oliver Schön and Zhengang Zhong and Sadegh Soudjani},
  title = {{Data-Driven Distributionally Robust Safety Verification Using Barrier Certificates and Conditional Mean Embeddings}},
  booktitle = {ACC},
  year = {2024},
  url = {https://openreview.net/forum?id=6MSMkAkEFO},
}
Figure