Table of Contents
Fetching ...

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.

ShieldNN: A Provably Safe NN Filter for Unsafe NN Controllers

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.

Paper Structure

This paper contains 25 sections, 8 theorems, 47 equations, 4 figures, 2 tables, 2 algorithms.

Key Result

Corollary 1

Let $h: \mathbb{R}^n \rightarrow \mathbb{R}$ with $\mathcal{C}_h \triangleq \{x \in \mathbb{R}^n | h(x) \geq 0\}$, and let $\mathcal{D} \subseteq \mathbb{R}^n$ s.t. $\mathcal{C}_h \subseteq \mathcal{D}$. Further let $\dot{x} = f(x,u)$ be a control system where $f : \mathbb{R}^n \times \Omega_\tex is non-empty for each $x \in \mathcal{D}$, and a Lipschitz-continuous feedback controller $\mu : x

Figures (4)

  • Figure 1: Obstacle specification and minimum barrier distance as a function of relative vehicle orientation, $\xi$.
  • Figure 2: Illustrated ShieldNN products for $\ell_f = \ell_r = 2 \;\text{m}$, $\bar{r} = 4 \;\text{m}$, $\beta_\text{max} = 0.4636$, $\sigma = 0.48$.
  • Figure 3: Distributions of distance-to-obstacles for experiments 2 & 3, with and without ShieldNN.
  • Figure 4: Results of Experiment 3-B, distributions of metrics in a novel environment relative to training.

Theorems & Definitions (21)

  • Corollary 1
  • proof
  • Remark 1
  • Theorem 1
  • proof
  • Definition 1
  • Proposition 1
  • proof
  • Proposition 2
  • proof
  • ...and 11 more