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

Exact Verification of ReLU Neural Control Barrier Functions

Hongchao Zhang, Junlin Wu, Yevgeniy Vorobeychik, Andrew Clark

TL;DR

This paper introduces a novel method for the exact safety verification of Neural Control Barrier Functions (NCBFs) with ReLU activation functions. By leveraging a generalization of Nagumo’s theorem for nonsmooth boundaries, the authors derive necessary and sufficient safety conditions that overcome the non-differentiability of ReLU networks. Their algorithm significantly outperforms state-of-the-art Satisfiability Modulo Theory (SMT) solvers, successfully verifying systems with up to 1,024 neurons and higher-dimensional state spaces where traditional methods time out.

What Problem Does This Paper Address?

Control Barrier Functions (CBFs) are mathematical tools used to guarantee that a dynamical system (like a robotic arm or an autonomous vehicle) stays within a designated "safe region." Recently, researchers have begun using neural networks to represent these functions (Neural CBFs, or NCBFs) because they can capture highly complex safety boundaries.

However, verifying that a learned NCBF actually guarantees safety is incredibly difficult. Most traditional verification methods assume the barrier function is smooth and continuously differentiable. ReLU neural networks are piecewise linear, meaning they have sharp "corners" where they are non-differentiable. If a system hits one of these corners, standard safety proofs break down, potentially leading to hidden safety violations. Furthermore, existing verification methods often couple the safety function with a specific control policy, which can lead to false negatives during verification.

Methods

The authors tackle the non-differentiability problem by using a generalized version of Nagumo's theorem, characterizing the safety boundary using Clarke tangent cones. This allows them to establish exact, policy-independent necessary and sufficient conditions for safety.

To turn these conditions into a practical verification algorithm, they propose a coarser-to-finer search strategy:

  1. State Space Discretization: The state space is divided into hyper-cubes. Linear relaxation-based perturbation analysis (LiRPA) is used to quickly identify which cells intersect the safety boundary ($b(x) = 0$).
  2. Activation Set Enumeration & Pruning: Within the intersecting cells, Interval Bound Propagation (IBP) over-approximates which neurons might be "unstable" (flipping between active and inactive). Linear programming is then used to prune impossible activation combinations, leaving only the exact valid activation segments.
  3. Nonlinear Programming (NLP): Finally, the algorithm sets up and solves NLPs to verify safety constraints on each individual linear segment, as well as at the intersections where the segments meet.
Figure 1: Illustration of proposed coarser-to-finer searching method. Hyper-cubes that intersect the safety boundaries are marked in red. When all possible activation sets are listed, we can identify exact activation set and intersections.

Datasets

The method was evaluated using four standard benchmarks from the safe control literature:

  • Darboux System: A classic 2D nonlinear open-loop polynomial system used widely for testing barrier certificates.
  • Obstacle Avoidance (OA): A 3D controlled UAV system modeled as a Dubins aircraft avoiding a tree trunk.
  • Spacecraft Rendezvous (SR): A 6D system based on linearized Clohessy–Wiltshire–Hill equations, simulating a "chaser" satellite maintaining a safe distance from a target.
  • hi-ord8: An 8-dimensional linear system benchmark used specifically to test the scalability of verification algorithms.

Key Insights and Ideas

  • The Non-Differentiability Trap: The paper demonstrates that even if an NCBF looks safe everywhere it is differentiable, points where the derivative is undefined (the ReLU "kinks") can cause catastrophic safety violations because no single control input can satisfy the safety conditions on both sides of the kink simultaneously.
  • Policy-Independent Verification: Unlike previous methods that verify a combined "network + specific controller" pair, this approach verifies the NCBF itself. If the NCBF passes, any control policy constrained by it is guaranteed to be safe. This prevents false negatives where a safe barrier function is rejected simply because the test controller was poorly tuned.
  • Boundary-Only Focus: By realizing that safety violations only occur when a system tries to exit the safe region, the algorithm restricts its computationally expensive NLP solving exclusively to the boundary ($b(x)=0$), drastically reducing execution time.

Key Results

The proposed method was compared against state-of-the-art SMT solvers like dReal and Z3:

  • Scalability in Network Size: For the 2D Darboux system, the proposed method verified an NCBF with 1,024 neurons in roughly 108 seconds. In contrast, dReal and Z3 timed out (taking >3 hours) on networks with more than 32 neurons.
  • High-Dimensional Verification: The algorithm successfully verified the 6D Spacecraft Rendezvous and 8D hi-ord8 systems. SMT-based methods either timed out or were completely unable to be directly applied (UTD) to these benchmarks.

Limitations and Future Work

Despite the performance leaps, the authors note that computational complexity remains highly sensitive to the dimension of the state space and the depth of the neural network. As the state dimension grows, the number of activation sets intersecting the boundary increases exponentially.

The pruning step currently relies on IBP, which can yield loose bounds and cause the algorithm to evaluate more segments than necessary. Future work will focus on incorporating tighter bound estimation methods, scaling the approach to deeper networks, and extending the framework to handle other non-smooth activation functions like LeakyReLU or ELU.

Summary updated

BibTeX
@inproceedings{zhang2023exact,
  author = {Hongchao Zhang and Junlin Wu and Yevgeniy Vorobeychik and Andrew Clark},
  title = {{Exact Verification of ReLU Neural Control Barrier Functions}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=1h2TAUEfc4},
}
Figure