Stability Verification in Stochastic Control Systems via Neural Network Supermartingales

Mathias Lechner, Dorde Zikelic, Krishnendu Chatterjee, Thomas A. Henzinger

Abstract

Ensuring the stability of neural network-controlled systems under environmental noise is critical for safety-sensitive applications. This paper introduces a formal framework for verifying almost-sure stability in nonlinear stochastic systems using Ranking Supermartingales (RSMs). Unlike traditional Lyapunov-based methods, RSMs facilitate the calculation of formal upper bounds on stabilization time. We propose a learner-verifier architecture that trains a neural network as an RSM candidate and formally verifies it using interval arithmetic. Our approach is demonstrated on stochastic 2D systems and inverted pendulum benchmarks, showing efficient convergence and tight stability bounds.

Introduction

Reinforcement Learning (RL) has become a cornerstone for training complex control policies. However, these policies often function as "black boxes," lacking the rigorous safety guarantees required for autonomous driving or medical robotics. A primary concern is stability: ensuring a system returns to a safe region after being perturbed by environmental noise.

While stability verification for deterministic systems is well-established through Lyapunov functions, stochastic systems present significant challenges. Traditional stochastic Lyapunov methods often rely on restrictive assumptions about noise distributions and struggle to provide temporal guarantees—proving that a system stabilizes but not when.

Comparison of system trajectories in deterministic versus stochastic environments.

Methodology: Ranking Supermartingales

The authors address these challenges by adapting Ranking Supermartingales (RSMs) from computer science—where they are used to prove program termination—to control theory. An RSM is a non-negative function $V(x)$ that decreases in expectation by at least a fixed constant $\epsilon$ at each time step until a target region is reached.

The Learner-Verifier Framework

The proposed framework employs a closed-loop "Learner-Verifier" approach:

  1. The Learner: A neural network is trained to satisfy the RSM conditions. The loss function penalizes violations of the expected decrease property and enforces a bounded Lipschitz constant to ensure smoothness.
  2. The Verifier: This module formally validates the RSM candidate. Because computing the exact expectation of a neural network over a distribution is computationally intractable, the authors use interval arithmetic and noise-space partitioning to derive formal upper bounds.
  3. Counterexample Loop: If the verifier identifies a state where the RSM condition fails, it provides this state to the learner as a counterexample for refinement.

Experimental Evaluation

The framework was tested on two nonlinear stochastic benchmarks:

  • 2D Dynamical System: A synthetic system with zero-mean triangular noise.
  • Stochastic Inverted Pendulum: A classic control task with stochasticity added to both angle and angular velocity.

Policies were trained using Proximal Policy Optimization (PPO) with two-layer neural networks (128 units per layer).

Results and Discussion

The framework successfully verified RSMs for both benchmarks, providing the first formal proof of almost-sure asymptotic stability for these RL policies. The algorithm reached verified solutions in 2 to 4 iterations, typically in under 10 minutes.

Key Insights

  • Learning-Friendly Constraints: RSMs are easier for neural networks to learn than Lyapunov functions because they do not require the function to be exactly zero at the target state.
  • Stabilization Bounds: A major advantage of RSMs is the "stabilization clock." The initial value $V(x_0)/\epsilon$ provides a formal upper bound on the expected time to reach stability, offering a critical metric for safety engineering.
  • Convergence of Bounds: The interval arithmetic method for bounding expectations proved highly effective. As shown in Figure 4, the upper bound converges to the true expectation as the noise space partition is refined.
Convergence of the neural network expectation upper bound as the number of cells in the noise space partition increases.

Limitations and Future Work

The primary bottleneck is the "curse of dimensionality," as the verification step involves state-space discretization that scales exponentially. Future research will explore non-uniform or "on-demand" discretization to focus computational resources on critical regions of the state space. Additionally, integrating stability verification directly into the policy training process remains an open challenge.

Summary updated

BibTeX
@inproceedings{lechner2022stability,
  author = {Mathias Lechner and Dorde Zikelic and Krishnendu Chatterjee and Thomas A. Henzinger},
  title = {{Stability Verification in Stochastic Control Systems via Neural Network Supermartingales}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i7.20695},
}
Figure