Formal Verification of Stochastic Systems with ReLU Neural Network Controllers

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

Abstract

In this work, we address the problem of formal safety verification for stochastic cyber-physical systems (CPS) equipped with ReLU neural network (NN) controllers. Our goal is to find the set of initial states from where, with a predetermined confidence, the system will not reach an unsafe configuration within a specified time horizon. Specifically, we consider discrete-time LTI systems with Gaussian noise, which we abstract by a suitable graph. Then, we formulate a Satisfiability Modulo Convex (SMC) problem to estimate upper bounds on the transition probabilities between nodes in the graph. Using this abstraction, we propose a method to compute tight bounds on the safety probabilities of nodes in this graph, despite possible over-approximations of the transition probabilities between these nodes. Additionally, using the proposed SMC formula, we devise a heuristic method to refine the abstraction of the system in order to further improve the estimated safety bounds. Finally, we corroborate the efficacy of the proposed method with simulation results considering a robot navigation example and comparison against a state-of-the-art verification scheme.

Introduction

As neural networks (NNs) are increasingly deployed in safety-critical cyber-physical systems (CPS), such as autonomous robot navigation, the "black box" nature of these controllers becomes a liability. While these systems often perform well in practice, formal guarantees are required for deployment in high-stakes environments. We need to determine not just if a robot usually stays safe, but exactly what the maximum probability of failure is when the system is subject to random noise (stochasticity).

Existing verification methods often struggle with the combination of non-linear ReLU activations and stochastic dynamics. Statistical sampling-based methods lack formal guarantees, while traditional Markov Chain abstractions often suffer from the "curse of dimensionality," requiring extremely fine-grained partitions to maintain accuracy. This research introduces a framework that combines graph abstractions with Satisfiability Modulo Convex (SMC) optimization to provide a "correct-by-design" method for calculating tight upper bounds on failure probabilities.

Methodology

The proposed verification pipeline consists of four primary stages designed to mitigate the accumulation of over-approximation errors:

  1. Graph Abstraction: The continuous state space is partitioned into a set of convex polytopes (cells). The system's movement is then modeled as transitions between these cells, forming a directed graph.
  2. SNN-SMC Encoding: To determine transition probabilities between cells, we formulate a Stochastic Neural Network Satisfiability Modulo Convex (SNN-SMC) problem. This uses convex optimization to identify the "worst-case" transition probability between any two nodes in the graph, accounting for both the NN's non-linearity and Gaussian noise.
  3. Partition Merging: A key innovation is an algorithm that merges nodes in the transition graph during calculation. If two target cells have non-overlapping probability distributions from a source cell, merging them prevents the over-estimation that typically occurs when simply summing individual upper bounds. This accounts for the physical reality that a system cannot occupy two distinct "worst-case" locations simultaneously.
  4. Heuristic Refinement: The framework includes an automated method to subdivide (refine) cells where transition probability bounds are too loose. This focuses computational effort on critical areas of the state space, such as those near obstacles.
Heuristic refinement of state space partitions to improve bound tightness.

Experimental Evaluation

The framework was evaluated using a simulated robot navigation task in a 2D non-convex workspace containing obstacles. The controller was a pre-trained ReLU neural network with three hidden layers (32 neurons each), processing 2D LiDAR-like distance measurements. The dynamics followed a discrete-time single-integrator model subject to Gaussian noise.

In head-to-head comparisons with state-of-the-art Interval Markov Chain (IMC) verification schemes, the proposed method yielded significantly tighter safety bounds. To validate the "correct-by-design" claim, 10,000 Monte Carlo simulations were conducted to find the empirical failure probability. In all test cases, the calculated formal bound correctly remained above the empirical failure rate, confirming its reliability as a rigorous upper bound.

Comparison of safety probability estimations showing the impact of merging and refinement.

Conclusion and Future Work

This research demonstrates that by combining SMC optimization with intelligent partition merging and refinement, it is possible to achieve tight, formally guaranteed safety bounds for stochastic systems controlled by NNs. While the current approach focuses on Linear Time-Invariant (LTI) systems and Gaussian noise, future work will explore scaling to deeper neural networks and extending the framework to handle highly non-linear dynamics and non-Gaussian noise distributions.

Summary updated

BibTeX
@inproceedings{sun2022formal,
  author = {Shiqi Sun and Yan Zhang and Xusheng Luo and Panagiotis Vlantis and Miroslav Pajic and Michael 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