Learning a Formally Verified Control Barrier Function in Stochastic Environment

Manan Tayal, Hongchao Zhang, Pushpak Jagtap, Andrew Clark, Shishir Kolathaya · DOI

Abstract

Ensuring safety in autonomous systems operating in unpredictable, noisy environments is a critical challenge. While Neural Control Barrier Functions (NCBFs) offer a scalable approach to safety, they often lack formal guarantees and typically require a cumbersome "train-then-verify" cycle. This paper introduces a novel "single-step" algorithm to synthesize Stochastic Neural Control Barrier Functions (SNCBFs) that are formally verified across the entire state space. By integrating Lipschitz continuity constraints directly into the training process, the proposed method ensures safety even between sampled data points in continuous-time stochastic systems.

Introduction

In autonomous systems like self-driving cars or robotic manipulators, safety is a fundamental mathematical requirement. Control Barrier Functions (CBFs) are widely used to define a "safety envelope" within which a system is guaranteed to remain. However, as system complexity increases, researchers have turned to neural networks to represent these functions. The primary hurdle is that neural networks are difficult to formally verify, particularly in stochastic environments where sensor noise and actuator imperfections are prevalent.

Existing NCBF methods often rely on a repetitive cycle of training followed by post-hoc verification. If the verifier finds a failure point, the network must be retrained. Furthermore, most verified NCBFs are designed for deterministic systems. This research addresses these gaps by providing a framework for synthesizing formally verified SNCBFs in a single training step.

Methodology

The proposed framework for Stochastic Neural Control Barrier Functions (SNCBFs) is built upon three core pillars:

  1. Scenario Optimization (SOP): To handle the infinite state space, the authors sample a finite set of data points and formulate training as an optimization problem to minimize safety violations.
  2. Lipschitz Certification: To bridge the gap between discrete training samples and the continuous state space, the method employs Lipschitz continuity. By bounding the rates of change for the neural network, its Jacobian, and its Hessian, the authors can mathematically prove that if a sampled point is safe, its neighborhood is also safe.
  3. Single-Step Synthesis: Lipschitz "certificates" are integrated directly into the loss function using a log-det barrier function. This allows the network to learn safety and provability simultaneously.
Figure 1: Synthesis and verification of the SNCBF. (a) The identified safe set (cyan) within the state space. (b) The learned 3D barrier function surface. (c) Sample trajectories starting within the safe set remaining bounded.

A unique aspect of this work is the focus on the Hessian. In stochastic systems, safety depends not only on the function's slope (Jacobian) but also its curvature (Hessian) to account for Brownian motion. This paper is the first to enforce Lipschitz bounds on the trace of the Hessian during NCBF synthesis.

Experimental Evaluation

The methodology was validated in two simulated environments: a stochastic inverted pendulum and a mobile robot obstacle avoidance task in the high-fidelity CARLA simulator.

Obstacle Avoidance in CARLA

In the mobile robot scenario, a unicycle-style robot must navigate a roadway while avoiding a pedestrian (the "unsafe region"). The proposed method successfully identified a guaranteed safe subset covering 77.6% of the state space, a significant improvement over baseline methods which only achieved 11.8% coverage.

Figure 2: Obstacle avoidance task in the CARLA simulation environment. The car follows different reaction trajectories to safely navigate around the unsafe region.

Key Results

  • Provable Generalization: The algorithm ensures the safety function is valid for every point in the state space, provided a specific mathematical condition is met.
  • Efficiency: Because the safety filter is implemented as a Quadratic Program (QP), it can be solved at high frequencies, making it suitable for real-time robotic control.
  • Larger Safe Regions: The approach avoids excessive conservatism, granting the system more operational freedom while maintaining formal safety guarantees.

Conclusion and Future Work

This research represents a significant advancement in the synthesis of safe neural controllers for noisy environments. By combining scenario optimization with Lipschitz-based formal verification, the authors eliminate the need for separate verification steps. Future work will focus on extending this framework to systems with unknown dynamics and validating the approach on physical robotic hardware.

Summary updated

BibTeX
@inproceedings{tayal2024learning,
  author = {Manan Tayal and Hongchao Zhang and Pushpak Jagtap and Andrew Clark and Shishir Kolathaya},
  title = {{Learning a Formally Verified Control Barrier Function in Stochastic Environment}},
  booktitle = {CDC},
  year = {2024},
  url = {https://openreview.net/forum?id=lafYnA21Oy},
}
Figure