Learning Provably Stabilizing Neural Controllers for Discrete-Time Stochastic Systems

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

Abstract

This work addresses the challenge of learning control policies for discrete-time stochastic systems with "almost-sure" stability guarantees. We introduce stabilizing ranking supermartingales (sRSMs), a novel mathematical framework that ensures a system will eventually enter and remain within a target region, even under persistent random disturbances. By jointly training a neural network policy and an sRSM certificate, our approach formally proves stability without requiring the target region to be "closed" or invariant. Our experimental results demonstrate that this method can successfully learn and verify stable policies for non-linear systems like the inverted pendulum.

The Problem: Persistence in Stochastic Systems

In safety-critical autonomous systems—such as medical robotics or autonomous drones—Reinforcement Learning (RL) often fails to provide formal safety or stability guarantees. While Lyapunov functions are standard for deterministic systems, stochastic environments introduce persistent noise that can push an agent out of a "safe" zone.

Previous methods often relied on a "closedness" assumption: once a system enters a stabilizing region, it can never leave. However, real-world noise is persistent. This paper focuses on persistence—proving that a system will not only reach a target but will eventually stay there with probability 1, despite ongoing random disturbances. This represents a significant jump in formal verification complexity, moving from simple reachability to long-term stability.

Methods: The sRSM Framework

The core of our approach is a "Learner-Verifier" loop that co-optimizes a control policy $\pi$ and a certificate of stability $V$, both parameterized as neural networks.

Conceptual overview of the framework: (a) example system parameters, (b) stochastic state transition under policy $\pi$, and (c) the sRSM certificate function $V$.

The sRSM Certificate

A stabilizing ranking supermartingale (sRSM) is a non-negative function $V(x)$ that certifies stability by satisfying three key conditions:

  1. Non-negativity: $V(x) \geq 0$ for all states.
  2. Expected Decrease: Outside a small inner set, the expected value of $V$ must decrease at each time step.
  3. Lower Bounding: Outside the target stabilizing region, $V$ must be sufficiently large relative to its values inside the region.
The sRSM certificate $V$ must satisfy specific bounds outside the stabilizing region to guarantee almost-sure convergence despite persistent noise.

This third condition is crucial: it allows the use of concentration bounds to prove that the probability of the system repeatedly exiting the target region vanishes as time approaches infinity. Beyond proving stability, the sRSM provides a concrete upper bound on the expected number of time steps the system will spend outside the stabilizing region.

The Learner-Verifier Loop

The training process iterates between two components:

  • Learner: Minimizes a loss function that penalizes violations of the sRSM conditions across sampled states.
  • Verifier: Employs Interval Arithmetic Abstract Interpretation (IA-AI) and Lipschitz analysis to formally prove the conditions hold across the entire continuous state space. It mathematically guarantees the conditions for every possible state, not just random points. If violations are found, they are returned as counterexamples to the learner for the next iteration.

Experimental Evaluation

We evaluated the method on two benchmarks designed to test stability under persistent noise:

  1. 2D Linear System: A synthetic system featuring non-linear control bounds and triangular-shaped random noise.
  2. Inverted Pendulum: Based on the classic OpenAI Gym environment but modified with non-polynomial dynamics (sine functions) and stochastic disturbances. The goal is to keep the pendulum upright despite random "shoves."

In both cases, the learner-verifier loop typically converged in just 4 to 5 iterations. Verification on an NVIDIA A10 GPU took approximately 45 to 60 minutes, demonstrating that formal verification for neural controllers is feasible in stochastic settings where traditional methods like Sum-of-Squares (SOS) often struggle.

Conclusion and Future Work

By shifting the focus from reachability to persistence, sRSMs provide a robust framework for certifying the long-term stability of stochastic systems. While the current implementation is limited by the "curse of dimensionality" in the verification step, future work will explore non-uniform grids and more efficient decomposition methods to scale these provable guarantees to higher-dimensional autonomous systems.

Summary updated

BibTeX
@inproceedings{ansaripour2022learning,
  author = {Matin Ansaripour and Krishnendu Chatterjee and Thomas A. Henzinger and Mathias Lechner and Dorde Zikelic},
  title = {{Learning Provably Stabilizing Neural Controllers for Discrete-Time Stochastic Systems}},
  booktitle = {ATVA},
  year = {2022},
  url = {https://openreview.net/forum?id=uobuKltpSy},
}
Figure