Formal Verification of Safety Critical Autonomous Systems via Bayesian Optimization

Prithvi Akella, Ugo Rosolia, Andrew Singletary, Aaron D. AmesarXiv 2020

Introduction

Verifying the safety of autonomous systems, such as self-driving cars or delivery drones, remains a significant challenge. While "correct-by-construction" methods offer mathematical proofs of safety, they often struggle with the complexity and unpredictability of real-world environments. Simulation-based testing is a common alternative, but it faces the "reality gap"—the discrepancy between simulated models and physical hardware—and the computational impossibility of exhaustive testing.

This work introduces a framework that bridges this gap by using Bayesian Optimization (BO) to identify worst-case scenarios in simulation. By quantifying the error between the simulator and the real world, the authors establish a mathematical lower bound on the probability that a physical system will satisfy its safety requirements.

Methodology: Bridging Simulation and Reality

The proposed verification pipeline integrates several key concepts to provide formal guarantees.

Overview of the Bayesian verification framework, illustrating the loop between test generation, simulation, and robustness calculation to find worst-case trajectories.

Signal Temporal Logic and Robustness

The framework utilizes Signal Temporal Logic (STL) to define complex safety specifications, such as reaching a goal within a time limit while maintaining stability. A Lipschitz continuous robustness measure ($\rho$) converts these logical specifications into scalar values. A positive $\rho$ indicates the specification is met, with higher values representing greater safety margins.

Bayesian Optimization for Worst-Case Discovery

To efficiently search for failures, the environment is treated as an adversary. Bayesian Optimization is employed to navigate the space of environmental parameters (e.g., goal locations) and find configurations that minimize the robustness measure in simulation.

The Probabilistic Signal Tube

The core theoretical contribution is the "Probabilistic Signal Tube." If a simulator's error relative to the physical system is bounded by $\epsilon$ with probability $1-\lambda$, and the worst-case robustness found in simulation ($h^*$) exceeds a specific threshold ($L\epsilon$), the physical system is guaranteed to be safe with at least $1-\lambda$ probability.

Experimental Setup

The framework was validated using a Segway platform running a Nonlinear Model Predictive Control (NMPC) controller. The setup involved:

  • Simulation: A ROS-based environment used for initial testing and BO iterations.
  • Hardware: Physical experiments at Caltech to characterize the reality gap.
  • Characterization: 300 pairs of simulated and real trajectories were analyzed to estimate the simulator's accuracy ($\epsilon$) and the associated probability ($\lambda$).

Key Results and Validation

The experimental results demonstrated the effectiveness of the BO-driven approach:

  • Accuracy Estimation: The simulator was found to be ($\epsilon=0.125, \lambda=0.05$)-accurate, meaning there is a 95% confidence that the real robot's tilt angle will not deviate from simulation by more than 0.125 radians.
  • Convergence: BO converged in approximately 125 iterations, identifying a worst-case robustness of $h^* = 0.225$.
  • Safety Guarantee: Since $h^* > \epsilon$, the theorem provided a formal guarantee of safety with at least 95% probability.
Experimental validation of the safety guarantee, showing multiple real-world trajectories (black) staying within the predicted safety region (lavender) despite perturbations.

Validation trials in the identified "worst-case" environment confirmed these findings, with all physical trajectories remaining within the predicted safety bounds (the "lavender region").

Limitations and Future Directions

While promising, the current framework has limitations. It primarily addresses "Reach-Avoid" specifications and requires accurate estimation of the Lipschitz constant ($L$), which can be difficult for highly complex systems. Future research will explore extending this methodology to dynamic, multi-agent environments where the "adversary" includes other moving entities.

Summary updated

BibTeX
@misc{akella2020formal,
  author = {Prithvi Akella and Ugo Rosolia and Andrew Singletary and Aaron D. Ames},
  title = {{Formal Verification of Safety Critical Autonomous Systems via Bayesian Optimization}},
  year = {2020},
  eprint = {2009.12909},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.12909},
}
Figure