Model-Free Verification for Neural Network Controlled Systems

Han Wang, Zuxun Xiong, Liqun Zhao, Antonis PapachristodoulouarXiv 2023 · DOI

Abstract

Neural network (NN) controllers have demonstrated significant potential in optimizing feedback control systems, particularly through deep reinforcement learning. However, providing formal guarantees for the closed-loop properties of these systems remains a significant challenge due to the complex, nonlinear nature of neural activation functions. Traditional verification methods often rely on precise mathematical models of the system dynamics, which are frequently unavailable in real-world applications. This paper proposes a novel framework using data-driven semi-definite programs (SDPs) to formally verify the stability and safety of NN-controlled linear systems with unknown dynamics. By bypassing the system identification phase and performing verification directly from input-output data, the method provides a robust path toward certifying "black-box" controllers.

Introduction

As autonomous systems like drones and self-driving cars become more prevalent, the demand for high-performance controllers has led to the widespread adoption of Neural Networks. While NNs can handle complex, non-linear tasks more effectively than many traditional control laws, they are notoriously difficult to trust. Their internal structures—filled with non-linear activation functions like ReLU or tanh—make it hard to provide formal guarantees that a system will remain safe or reach its target state.

Existing formal verification methods typically assume that a perfect mathematical model (e.g., state-space matrices) of the physical system is known. In practice, modeling physical systems is error-prone and time-consuming. This research bridges the gap between data-driven control and formal verification by proposing an end-to-end framework that verifies NN controllers using only collected trajectory data, without ever needing to identify the underlying system parameters.

Methodology

The proposed framework integrates three core mathematical concepts to enable model-free verification:

1. Data-Driven System Representation

Instead of relying on traditional $A$ and $B$ matrices to describe system dynamics, the authors utilize Willems’s Fundamental Lemma. This lemma allows the behavior of a linear system to be represented entirely by a collection of "persistently exciting" data—essentially a sufficiently rich set of past inputs and states. This allows the verification process to interact directly with the system's recorded history.

2. Sector Constraints for Non-Linearities

To address the non-linearities of the NN controller, the authors employ sector bounds. This technique "sandwiches" the non-linear activation functions between two linear envelopes. By bounding the non-linearity in this way, the complex neural network can be treated as a robust linear component, making the entire closed-loop system amenable to convex optimization.

3. Optimization via Semi-Definite Programming (SDP)

The verification of stability and safety is formulated as a set-inclusion problem: "Does the set of possible system states stay within the defined safe region?" Using the Positivestellensatz from algebraic geometry, the authors transform these questions into Sum-of-Squares (SOS) constraints. These are then solved efficiently as Semi-Definite Programs (SDPs), providing a rigorous certificate of performance.

Experimental Evaluation

The efficacy of the method was tested on two primary benchmarks:

  • Vehicle Lateral Dynamics: A 4th-order linear system simulating a vehicle cruise control task. The NN controller was trained via imitation learning to keep the vehicle centered within a lane.
  • Inverted Pendulum: A classic non-linear benchmark. Here, the controller was trained using Soft Actor-Critic (SAC), a popular reinforcement learning algorithm. To apply the linear framework, the authors used data linearized around the equilibrium point.

Key Insights

  • End-to-End Verification: The primary advantage of this approach is the elimination of the "system identification" step. By embedding raw data directly into the optimization constraints, the method avoids the modeling errors that typically compromise verification.
  • The Importance of Data Richness: The reliability of the verification is tied to a "rank condition" of the data. In vehicle simulations, the authors noted that while verification failed with very few samples, it became highly accurate once a threshold of data richness (e.g., more than 5 samples in their specific test) was met.
  • Safety and Stability Certificates: For the vehicle system, the authors successfully calculated the Region of Attraction (ROA)—the set of initial states from which the controller is guaranteed to stabilize the car. They also generated safety certificates ($\gamma$ values); a value of $\gamma \le 1$ provides a formal guarantee that the system will not violate safety constraints over a given time horizon.

Conclusion and Future Work

This work demonstrates that it is possible to provide formal safety and stability guarantees for neural network controllers even when the underlying system dynamics are unknown. By combining data-driven representations with robust optimization, the framework offers a rigorous alternative to traditional model-based verification.

However, several challenges remain. The current framework assumes the underlying dynamics are linear and the data is noise-free. Future research will focus on extending these methods to handle noise-corrupted data and developing more scalable techniques for long-term safety verification in highly non-linear environments.

Summary updated

BibTeX
@misc{wang2023model,
  author = {Han Wang and Zuxun Xiong and Liqun Zhao and Antonis Papachristodoulou},
  title = {{Model-Free Verification for Neural Network Controlled Systems}},
  year = {2023},
  eprint = {2312.08293},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.08293},
  howpublished = {arXiv},
}
Figure