Formal Verification of Stochastic Systems with ReLU Neural Network Controllers

Shiqi Sun, Yan Zhang, Xusheng Luo, Panagiotis Vlantis, Miroslav Pajic, Michael M. Zavlanos

This paper presents a new framework for the formal safety verification of stochastic cyber-physical systems (CPS) controlled by ReLU neural networks. By combining graph-based abstractions with Satisfiability Modulo Convex (SMC) optimization, the authors provide a "correct-by-design" method to estimate tight upper bounds on the probability that a system will reach an unsafe state over a finite time horizon.

TL;DR

The authors develop a formal verification method for stochastic systems with neural network controllers that uses convex optimization to find guaranteed upper bounds on failure probabilities. Their approach significantly tightens these safety bounds through novel graph-merging and cell-refinement techniques, outperforming existing state-of-the-art verification schemes.

What Problem Does This Paper Address?

Deep neural networks (NNs) are increasingly used as controllers for complex systems like autonomous robots. However, NNs are notoriously "black boxes," making it difficult to guarantee they will behave safely, especially when the system is subject to random noise (stochasticity).

While existing verification methods can handle deterministic systems, stochastic systems—where a robot might drift due to Gaussian noise—are much harder. Current approaches often rely on sampling (which provides "probably correct" results but no hard guarantees) or coarse abstractions that produce safety bounds so conservative they are practically useless. The challenge is to find a way to compute safety probabilities that are both mathematically guaranteed (formal) and tight enough to be useful for real-world engineering.

Methods

The authors propose a multi-step verification pipeline:

  1. State Space Abstraction: They partition the continuous state space into a set of convex polytopes (cells). This allows them to model the system as a discrete transition graph.
  2. SNN-SMC Encoding: To find the transition probabilities between these cells, they formulate a Stochastic Neural Network Satisfiability Modulo Convex (SNN-SMC) problem. This optimization task searches for the "worst-case" state within a cell—the one most likely to transition into a neighboring cell—while accounting for both the LTI (Linear Time-Invariant) dynamics and the ReLU activation logic of the controller.
  3. Tightening the Bounds: Because the SMC approach naturally over-approximates probabilities, the authors introduce two key innovations:
  4. Partition Merging: They identify pairs of cells that are "far apart" in terms of noise distribution. By merging these in the graph, they can reduce the cumulative over-approximation error.
  5. Transition Probability Normalization: A recursive algorithm that truncates probability sums to ensure the resulting safety bounds remain valid and as tight as possible.
  6. Heuristic Refinement: If the safety bounds are still too loose, the method uses the SMC results to identify exactly where a cell should be subdivided (refined) to most effectively improve the estimate.
Figure 1 illustrates how merging cells that don't have overlapping high-probability transition regions (b) leads to tighter bounds compared to cells that do overlap (a).

Datasets

The method was evaluated using a simulated Robot Navigation Task. The environment consists of a non-convex planar workspace (60x60 units) filled with obstacles.

  • Dynamics: A single-integrator model with Gaussian noise.
  • Controller: A ReLU neural network with 3 hidden layers and 32 neurons, trained to steer the robot toward a goal using LiDAR-like sensor inputs.
  • Benchmark: The authors compared their results against the method proposed by Lahijanian et al. (2015), a standard reference for stochastic system verification.
The workspace and its initial convex partition are shown here, with black areas representing obstacles and the red dot marking the goal.

Key Insights and Ideas

  • Worst-Case Logic: The power of the SMC formulation is that it doesn't just sample; it mathematically finds the specific point in a region that is most dangerous.
  • Strategic Merging: Counter-intuitively, making the graph "simpler" by merging nodes can actually make the safety bounds more accurate. This happens when the merging prevents the algorithm from double-counting the probability of transitioning into two different cells from the same starting point.
  • Refinement with Hyperplanes: Instead of just splitting cells in half, the authors use the SMC solution to find a hyperplane perpendicular to the most likely transition path, maximizing the impact of the refinement. (See Figure 2).
Figure 2 shows the heuristic refinement process, where a cell is split by a hyperplane H to isolate the highest-probability transition states.

Key Results

  • Superior Tightness: In head-to-head comparisons, the proposed Algorithm 3 provided significantly tighter safety bounds than existing methods across various time horizons ($T=3, 6, 9$).
  • Validation: The authors ran 10,000 Monte Carlo simulations to estimate the "true" safety probability. Their formal bounds correctly acted as an upper envelope to the true probability in all cases.
  • Impact of Refinement: Combining both merging and refinement produced the tightest results, bringing the formal bound much closer to the empirical failure rate observed in simulations.
Figure 4 compares the safety probability bounds of the proposed method (top row) vs. the state-of-the-art (bottom row), showing much higher precision in the proposed approach.

Limitations and Future Work

  • Scalability: While effective for the tested 32-neuron network, the computational cost of solving SMC problems grows with the size of the neural network and the number of cells in the partition.
  • Linear Dynamics: The current work focuses on LTI systems. Extending this to highly non-linear dynamics would require more complex convex relaxations.
  • Horizon Gap: As the time horizon increases, the gap between the estimated bound and the true probability grows, suggesting that further work is needed to maintain tightness over very long durations.

Summary updated

BibTeX
@inproceedings{sun2022formal,
  author = {Shiqi Sun and Yan Zhang and Xusheng Luo and Panagiotis Vlantis and Miroslav Pajic and Michael M. Zavlanos},
  title = {{Formal Verification of Stochastic Systems with ReLU Neural Network Controllers}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2022},
  doi = {10.1109/icra46639.2022.9811866},
}
Figure