Formal Verification of Neural Certificates Done Dynamically

Thomas A. Henzinger, Konstantin Kueffner, Emily Yu

Introduction

In the deployment of safety-critical autonomous systems—such as drones, autonomous vehicles, and satellites—ensuring that the underlying controllers adhere to safety constraints is paramount. Researchers often employ Neural Certificates, such as Control Barrier Functions (CBFs), which act as mathematical witnesses to prove a system will remain within a safe operating envelope. However, a significant gap exists between the theory of these certificates and their practical application: verifying that a neural network actually satisfies the required safety conditions is a computationally grueling task.

Traditional approaches rely on static verification, attempting to prove validity across the entire possible state space before the system ever moves. As the dimensionality of the system or the depth of the neural network increases, these methods suffer from the "curse of dimensionality," often timing out or requiring hours of computation for even moderately sized models. This paper introduces a paradigm shift: moving formal verification from development time to runtime through a lightweight, "on-the-fly" monitoring framework.

The Runtime Monitoring Framework

Rather than attempting to verify the global validity of a certificate, the proposed framework focuses exclusively on the local, immediate future of the system. This "on-the-fly" verifier continuously monitors the system's state and ensures safety within a specific lookahead horizon.

Local Abstraction and Reachability

At each discrete time step, the monitor observes the current state and computes a Local Abstraction. This involves generating a "reachability cone"—a conservative over-approximation of all possible states the system could inhabit within a short future window (e.g., the next several seconds). By bounding the search to this cone, the verifier ignores the vast majority of the state space that is irrelevant to the current trajectory.

Exploiting ReLU Linearity

For neural networks utilizing Rectified Linear Unit (ReLU) activation functions, the framework employs a specialized optimization. ReLU networks are piecewise linear, meaning the state space is naturally partitioned into "polyhedral cells" (or cubes) where the network's behavior is linear. The monitor exploits this structure to transform complex safety checks into a series of simple linear inequalities. This allows the verifier to check safety conditions with high computational efficiency, suitable for real-time execution.

Formal Soundness

The authors provide a rigorous foundation for this approach in Theorem 1, proving that the monitor is formally sound. If the monitor issues a "green light" for a given horizon, the system is mathematically guaranteed to remain safe for that duration, provided the underlying physical dynamics model used for the abstraction is accurate.

Experimental Evaluation: Satellite Rendezvous

The framework was evaluated using a Satellite Rendezvous benchmark, a complex 6-dimensional control problem (tracking position and velocity in 3D space). In this scenario, a "chaser" satellite must approach a "target" while strictly maintaining a line-of-sight safety constraint. The researchers tested various ReLU-based CBF architectures, ranging from shallow networks to deep models with 16 hidden layers.

Key Results and Performance

  • Scalability vs. Static Tools: The framework was compared against SEEV, a state-of-the-art static verifier. While SEEV timed out after two hours when attempting to verify an 8-layer network, the dynamic monitor successfully identified safety violations in the same network in real-time.
  • Minimal Computational Overhead: Across all tests, the average monitoring overhead was less than 16ms per step. Given a standard control interval of 100ms, the monitor utilizes only a small fraction of the available CPU time, making it viable for onboard hardware with limited resources.
  • Predictive Safety: Because the monitor looks ahead, it can trigger fail-safe protocols before a boundary is crossed. This is critical for physical systems with inertia that cannot stop or change direction instantaneously.

Insights and Future Directions

One of the primary advantages of this approach is that it is controller-agnostic. The monitor does not need to understand the internal logic of the neural controller; it only requires the system's physical dynamics to predict the reachability cone. This makes it a versatile "safety wrapper" that can be placed around various black-box AI models.

Furthermore, the monitor serves as a powerful diagnostic tool during development. By identifying specific points where a certificate fails during simulation, developers can use these counterexamples to "repair" and retrain faulty neural certificates more effectively than they could with static tools.

Limitations

Despite its strengths, the framework's reliability is tied to the accuracy of the mathematical model of the system's dynamics. In highly unpredictable environments, the reachability cone may become overly conservative or unsound. Additionally, if the system operates extremely close to safety boundaries, the number of linear "cubes" the monitor must check can increase, potentially leading to spikes in computational demand.

Future work aims to extend this framework into probabilistic settings to better handle environmental uncertainty and to integrate the runtime monitor directly into the training loop, allowing for the automated synthesis of more robust, self-correcting neural certificates.

Summary updated

BibTeX
@inproceedings{henzinger2025formal,
  author = {Thomas A. Henzinger and Konstantin Kueffner and Emily Yu},
  title = {{Formal Verification of Neural Certificates Done Dynamically}},
  booktitle = {RV},
  year = {2025},
  doi = {10.1007/978-3-032-05435-7\_4},
}
Figure