ShieldNN: A Provably Safe NN Filter for Unsafe NN Controllers
James Ferlez, Mahmoud Elnaggar, Yasser Shoukry, Cody Fleming
TL;DR
ShieldNN provides a closed-form, verification-backed barrier-function shield for obstacle avoidance on the Kinematic Bicycle Model, avoiding online optimization and enabling safe RL training. By deriving a parameterized barrier h_{\bar{r},\sigma} with a monotone Lie-derivative condition and a linear class-K function α, ShieldNN yields a convex, state-dependent safe-control set that can be approximated by a ReLU NN and clipped to form a safety filter. The framework supports single- and multi-obstacle shielding (SOSA/MOSA) with theoretical guarantees via the ShieldNN Verifier and CertifyMin, and demonstrates substantial improvements in training completion and obstacle avoidance in CARLA. While demonstrated on KBM, the approach offers practical, scalable safety filtering for learning-enabled controllers and provides a path toward compositional multi-obstacle safety, with acknowledged limitations and future work highlighted for real-world dynamical models. The work advances safe learning by delivering transparent, analyzable safety envelopes that integrate smoothly with neural controllers and RL pipelines.
Abstract
In this paper, we develop a novel closed-form Control Barrier Function (CBF) and associated controller shield for the Kinematic Bicycle Model (KBM) with respect to obstacle avoidance. The proposed CBF and shield -- designed by an algorithm we call ShieldNN -- provide two crucial advantages over existing methodologies. First, ShieldNN considers steering and velocity constraints directly with the non-affine KBM dynamics; this is in contrast to more general methods, which typically consider only affine dynamics and do not guarantee invariance properties under control constraints. Second, ShieldNN provides a closed-form set of safe controls for each state unlike more general methods, which typically rely on optimization algorithms to generate a single instantaneous for each state. Together, these advantages make ShieldNN uniquely suited as an efficient Multi-Obstacle Safe Actions (i.e. multiple-barrier-function shielding) during training time of a Reinforcement Learning (RL) enabled Neural Network controller. We show via experiments that ShieldNN dramatically increases the completion rate of RL training episodes in the presence of multiple obstacles, thus establishing the value of ShieldNN in training RL-based controllers.
