Safety Considerations in Deep Control Policies with Safety Barrier Certificates Under Uncertainty

Tom Hirshberg, Sai Vemprala, Ashish Kapoor

TL;DR

This paper introduces a runtime safety framework that wraps around deep control policies to guarantee collision-free navigation under both perception and model uncertainty. By combining Control Barrier Functions (CBFs) with worst-case uncertainty bounds, the system minimally adjusts neural network commands at test time to ensure safety without requiring policy retraining.

What Problem Does This Paper Address?

Deep reinforcement learning (RL) and imitation learning (IL) have shown incredible promise in enabling robots to navigate complex environments directly from sensor inputs. However, deploying these deep control policies in real-world, safety-critical applications remains dangerous. Because deep neural networks operate as black boxes, they are prone to unpredictable behavior when encountering data distributions unseen during training.

Furthermore, real-world deployment introduces environmental disturbances (like wind or friction) and perception uncertainties (such as noisy object localization). While much of the existing literature focuses on making the training phase safer, guaranteeing safety at deployment time (test time) is an open challenge. This paper tackles the problem of ensuring a robot stays safe during deployment, even when its underlying deep control policy makes an unsafe choice or its sensors provide noisy data.

Methods

The authors propose a test-time safety deployment framework based on Safety Barrier Certificates (SBC). Instead of altering the deep neural network, their framework acts as a supervisory wrapper that monitors and filters the network's control signals ($\tilde{u}$) in real time.

Key components of the methodology include:

  1. Locally Linear Dynamics Approximation: Since explicit dynamics models are rarely available for deep control policies, the authors approximate the robot's dynamics as a locally linear, control-affine single-integrator system with bounded noise to account for model non-linearities.
  2. Euclidean Signed Distance Fields (ESDF): To handle complex, non-convex environmental obstacles (like square drone-racing gates), the framework utilizes ESDFs to map out exact distances to obstacle boundaries.
  3. Worst-Case Uncertainty Inflation: To handle perception errors stemming from the robot's state estimation module (a Variational Autoencoder predicting gate poses), the authors mathematically "inflate" the obstacles. They precompute a modified distance map that represents the worst-case obstacle boundaries given the sensor's empirical error threshold.
  4. Quadratic Programming (QP) Filter: At each time step, if the nominal action from the deep policy is safe, it is executed. If it violates the safety boundary, a QP optimization problem is solved to calculate a safe action ($u^*$) that deviates minimally from the original intent.
Distance maps computed without uncertainty (left) and with worst-case uncertainty inflation (right).

Datasets

The framework was evaluated using a high-fidelity autonomous drone-racing simulation built on AirSim.

  • Benchmark Structure: The evaluation utilized 10 distinct racing tracks, each approximately 50 meters long and consisting of 8 randomly placed square gates.
  • Difficulty Levels: The tracks spanned four difficulty levels (0.0 to 1.5), defined by the maximum spatial offset between consecutive gates—higher offsets demanded aggressive maneuvering.
  • Baselines: The safety wrapper was tested on top of pre-trained baseline networks from prior work, specifically Behavior Cloning (BC) policies (both constrained and unconstrained) and a VAE-based gate pose estimator.

Key Insights and Ideas

  • Decoupling Safety from Training: By implementing safety as a runtime projection layer, developers can use aggressive, high-performance deep control policies without worrying about rewriting reward functions or constraining the network's representation space during training.
  • Simplifying Complex Geometry via ESDFs: Traditional SBC applications often assume simple, convex obstacles. Demonstrating that precomputed ESDF maps can be seamlessly integrated into Zeroing Control Barrier Functions (ZCBFs) opens the door for SBCs in highly complex environments.
  • The Power of Bounded Uncertainty: Assuming that perception and actuation errors have finite support (i.e., are strictly bounded) allows the framework to map probabilistic sensor noise into a deterministic, worst-case geometric inflation. This makes real-time safety guarantees mathematically tractable.

Key Results

The framework was evaluated on two main metrics: safety (remaining collision-free) and task success (percentage of gates successfully cleared).

Performance comparison on safety and success metrics across different track difficulties.
  • Robustness at High Difficulties: As track difficulty increased to 1.5, the safety performance of the standalone deep policies deteriorated drastically. In contrast, the SBC-wrapped policies maintained significantly higher safety rates.
  • Value of Uncertainty Awareness: The best safety rates were consistently achieved when the framework explicitly accounted for perception uncertainty (the worst-case inflation method), outperforming the standard SBC baseline.
  • Preserved Performance: Crucially, adding the safety wrapper did not severely impact the drone's ability to complete the race; the success rates remained highly competitive with the unconstrained baselines while preventing catastrophic crashes.
Sample trajectories and boxplots showing the minimum distance maintained to the gates.

Limitations and Future Work

The authors noted a few edge cases where the system still failed:

  1. Sharp Inter-Gate Angles: If the angle between the current gate and the next gate was excessively sharp, the drone occasionally collided with the current gate because the single-gate optimization horizon was too short.
  2. Proximity Initialization Noise: When starting a trial in close proximity to a gate pole with high initial perception noise that exceeded the assumed worst-case bounds, the filter could fail to recover.

Future Directions: To mitigate these issues, the authors suggest extending the optimization horizon to look ahead and optimize for the next two gates simultaneously rather than just one. They also plan to explore incorporating this runtime safety mechanism directly into the training loop to better balance performance and safety boundaries prior to deployment.

Summary updated

Abstract

Recent advances in Deep Machine Learning have shown promise in solving complex perception and control loops via methods such as reinforcement and imitation learning. However, guaranteeing safety for such learned deep policies has been a challenge due to issues such as partial observability and difficulties in characterizing the behavior of the neural networks. While a lot of emphasis in safe learning has been placed during training, it is non-trivial to guarantee safety at deployment or test time. This paper extends how under mild assumptions, Safety Barrier Certificates can be used to guarantee safety with deep control policies despite uncertainty arising due to perception and other latent variables. Specifically for scenarios where the dynamics are smooth and uncertainty has a finite support, the proposed framework wraps around an existing deep control policy and generates safe actions by dynamically evaluating and modifying the policy from the embedded network. Our framework utilizes control barrier functions to create spaces of control actions that are safe under uncertainty, and when the original actions are found to be in violation of the safety constraint, uses quadratic programming to minimally modify the original actions to ensure they lie in the safe set. Representations of the environment are built through Euclidean signed distance fields that are then used to infer the safety of actions and to guarantee forward invariance. We implement this method in simulation in a drone-racing environment and show that our method results in safer actions compared to a baseline that only relies on imitation learning to generate control actions.
BibTeX
@inproceedings{hirshberg2020safety,
  author = {Tom Hirshberg and Sai Vemprala and Ashish Kapoor},
  title = {{Safety Considerations in Deep Control Policies with Safety Barrier Certificates Under Uncertainty}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2020},
  doi = {10.1109/iros45743.2020.9341315},
}
Figure