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

Formal verification of neural networks for safety-critical tasks in deep reinforcement learning

Davide Corsi, Enrico Marchesini, Alessandro Farinelli

Introduction

Deep Reinforcement Learning (DRL) has shown remarkable success in complex control tasks, from robotics to autonomous systems. However, standard evaluation metrics like cumulative reward fail to provide the rigorous guarantees required for safety-critical applications. This paper introduces ProVe (Property Verifier), a formal verification tool designed to evaluate DRL policies using a continuous "violation rate" metric. By leveraging parallelized interval analysis, ProVe ensures agents remain rational and safe even in previously unencountered states.

The Verification Challenge in DRL

Deploying DRL agents in domains like healthcare or autonomous navigation requires more than just high average performance; it requires mathematical proof of safety. Traditional formal verification tools face two primary obstacles when applied to DRL:

  1. Binary Limitations: Most tools return a simple "SAT" (safe) or "UNSAT" (unsafe). In complex real-world environments, a tiny unsafe region almost always exists, making a binary "UNSAT" result practically useless for risk assessment.
  2. The Overestimation Problem: DRL agents choose actions by comparing multiple network outputs (e.g., Q-values). Standard tools often produce overlapping output bounds, making it impossible to definitively prove which action an agent will select.

The ProVe Framework: Parallelized Iterative Bisection

To overcome these hurdles, ProVe utilizes a reachability-based framework centered on interval analysis and iterative bisection.

Iterative Bisection

The core strategy involves recursively subdividing the input space into smaller sub-areas. By calculating output bounds for these refined regions, ProVe significantly reduces the overestimation inherent in interval arithmetic.

Iterative bisection reduces overestimation in interval analysis.

As shown in Figure 1, splitting the input intervals allows for a tighter union of output bounds. This refinement is crucial for proving properties like $y_j > y_i$, which is necessary to determine the agent's chosen action.

Action Comparison via Refinement

The benefit of this partitioning is most evident when comparing multiple outputs. Global bounds are often too coarse to distinguish between competing actions.

Refining output bounds through input space partitioning to enable action comparison.

Figure 2 illustrates how partitioning the input space (panels c and d) allows for distinct, non-overlapping bounds for different actions ($y_0, y_1, y_2$), enabling formal proof of the agent's decision-making logic across the entire state space.

GPU Acceleration

Because iterative bisection leads to an exponential increase in sub-areas, ProVe encodes the splitting process into matrix multiplication operations. This allows the framework to process thousands of sub-areas in parallel on a GPU, providing massive speedups over sequential CPU-based methods.

Quantifying Safety with Violation Rates

Instead of a binary output, ProVe introduces the violation rate: the percentage of the input space that fails a given safety property. To handle continuous spaces, the authors use a discretization parameter ($\epsilon$) tied to physical sensor precision (e.g., LiDAR resolution). This provides a granular safety metric that engineers can use to decide if a model is "safe enough" for deployment.

Experimental Evaluation

The authors tested ProVe on ACAS Xu (collision avoidance), Mapless Navigation (TurtleBot3), and a Robotic Manipulator (7-DOF Panda arm).

Key Findings: * Performance: ProVe achieved up to a 56x speedup over Neurify on the ACAS Xu benchmark. * Safety vs. Reward: High cumulative reward does not guarantee safety. In later training stages, agents often sacrifice safety for efficiency, a trend ProVe successfully identifies. * Predictive Power: The calculated violation rate strongly correlates with real-world collision probabilities. A model with a 50% violation rate on behavioral properties had a 14.21% collision rate, whereas a 5% violation rate model dropped to 0.72%.

Conclusion and Future Directions

ProVe addresses the critical gap between DRL performance and formal safety guarantees. While its complexity scales with the required precision ($\epsilon$), its speed enables new possibilities, such as "safety-oriented training" where verification is integrated directly into the reinforcement learning loop to guide the agent toward provably safe behaviors.

Summary updated

BibTeX
@inproceedings{corsi2021formal,
  author = {Davide Corsi and Enrico Marchesini and Alessandro Farinelli},
  title = {{Formal verification of neural networks for safety-critical tasks in deep reinforcement learning}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2021},
}
Figure