NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning a Better Control Barrier Function Under Uncertain Dynamics

Bolun Dai, Prashanth Krishnamurthy, Farshad KhorramiarXiv 2023 · DOI

Abstract

Ensuring safety in autonomous systems often relies on Control Barrier Functions (CBFs), which act as mathematical filters to prevent unsafe states. However, designing valid CBFs and maintaining safety under uncertain dynamics remain significant challenges. This paper introduces a learning-based framework that utilizes Deep Differential Networks (DDNs) to refine conservative handcrafted CBFs and estimate system dynamics simultaneously. Key innovations include a distance function heuristic to prevent trivial solutions and a regression method based on the CBF's time-derivative. Experimental results in simulation demonstrate safe set expansion and robustness to significant modeling errors.

Introduction

Control Barrier Functions (CBFs) are a powerful tool for safety-critical control, providing formal guarantees that a system will remain within a safe set. Despite their theoretical appeal, practical implementation faces two primary hurdles: the "Construction Problem," where designing a non-conservative CBF is difficult, and the "Model Problem," where safety guarantees depend on an accurate physics model. This research proposes a method to overcome these bottlenecks by starting with a conservative "handcrafted" CBF (HCBF) and an inaccurate model, then iteratively improving both using data collected from system interactions.

Methodology

The proposed framework employs an episodic learning approach centered on Deep Differential Networks (DDNs). DDNs are uniquely suited for this task as they efficiently compute both the function value and its Jacobian, which are essential for CBF-based quadratic programming (QP) controllers.

The architecture of the learned CBF-QP controller, showing the integration of the performance controller, environment, and replay buffers for updating the learned safety components.

The system maintains separate replay buffers for safe and unsafe data to effectively learn the boundaries of the safe set. A critical aspect of the learning process is regressing on the time-derivative of the CBF ($\dot{h}$) rather than the full state derivative ($\dot{x}$), which simplifies the sensing requirements and provides a theoretical bound on the error in learned dynamics.

Technical Innovations: The Distance Function Heuristic

A common failure mode in CBF learning is the "trivial solution," where the network learns a function that is zero everywhere, satisfying safety constraints but providing no guidance. To counter this, the authors introduce a distance function $d(x)$ into the loss function. This heuristic forces the learned CBF to scale its magnitude relative to the distance from obstacles, ensuring the function remains informative and non-flat across the state space.

Comparison of trajectories and CBF values with and without the distance function heuristic. The heuristic prevents the CBF from becoming 'flat' and improves navigation around obstacles.

Evaluation and Results

The method was evaluated on several simulated robotic systems, including a double integrator, a unicycle model, and a two-link robotic arm. In these scenarios, the "ground truth" physics were hidden, and initial parameters (e.g., mass) were intentionally misestimated.

Key findings include:

  • Safe Set Expansion: The learned CBFs successfully recovered significantly more of the safe state space than the initial conservative HCBFs.
  • Robustness to Uncertainty: The algorithm converged to accurate dynamics and safe trajectories even when initial mass estimates were off by 100%.
  • Safety Guarantees: In the two-link arm experiment, the proposed method successfully avoided collisions that occurred when using only nominal (incorrect) dynamics.

Conclusion

This work demonstrates that starting with a conservative safety filter and an imperfect model is a viable path toward learning robust, high-performance safety controllers. By leveraging DDNs and novel loss heuristics, the framework ensures differentiability and safety during the learning process. Future research will focus on extending these methods to higher-order systems and validating the approach on physical hardware under real-world noise conditions.

Summary updated

BibTeX
@misc{dai2023learning,
  author = {Bolun Dai and Prashanth Krishnamurthy and Farshad Khorrami},
  title = {{Learning a Better Control Barrier Function Under Uncertain Dynamics}},
  year = {2023},
  eprint = {2310.04795},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.04795},
}
Figure