TL;DR
Existing methods for formally certifying the stability of reinforcement learning policies in stochastic systems assume the target region is an "inescapable trap" (closed under dynamics). This paper introduces stabilizing ranking supermartingales (sRSMs), a novel mathematical certificate that guarantees almost-sure asymptotic stability even when stochastic noise can kick the system back out of the target region, alongside an automated learner-verifier framework to train and verify neural network policies.
What Problem Does This Paper Address?
Reinforcement learning (RL) is effective for non-linear control, but standard RL offers no formal safety or stability guarantees. In safety-critical systems, control theorists often require almost-sure (a.s.) asymptotic stability—meaning the system must enter and remain within a designated target region ($\mathcal{X}_s$) with probability 1.
While prior work adapted Lyapunov functions to stochastic settings using ranking supermartingales (RSMs), they made a restrictive assumption: once the system enters $\mathcal{X}_s$, it can never leave (i.e., $\mathcal{X}_s$ is forward invariant / closed under dynamics). In the real world, persistent stochastic disturbances can easily bounce an agent out of the target set. Under standard RSM formulations, an agent might leave and re-enter infinitely many times without ever truly stabilizing.
Methods
The authors introduce $(\epsilon, M, \delta)$-stabilizing ranking supermartingales (sRSMs):
- Mathematical Formulation: An sRSM $V(x)$ is a Lipschitz-continuous function that:
- Is nonnegative everywhere ($V(x) \ge 0$).
- Decreases in expectation by at least $\epsilon$ whenever $V(x) \ge M$ (driving trajectories into the sub-level set $\mathcal{S} = \{x \mid V(x) \le M\} \subseteq \mathcal{X}_s$).
- Maintains a "buffer zone" outside $\mathcal{X}_s$, ensuring $V(x) \ge M + L_V \cdot \Delta + \delta$ for all $x \notin \mathcal{X}_s$, where $L_V$ is the Lipschitz constant of $V$ and $\Delta$ is the maximal step size of the system.
- Learner-Verifier Framework:
- Learner: Jointly trains a policy $\pi_\theta$ and an sRSM candidate $V_\nu$ using a loss function based on sampled empirical expectations, lower-bound penalties, global-minimum regularization, and Lipschitz regularization.
- Verifier: Evaluates the sRSM conditions over a fine grid discretization of the state space using Interval Arithmetic Abstract Interpretation (IA-AI). If a cell violates a condition, counterexamples are fed back to the learner; if all cells verify, stability is certified.
Datasets
The authors evaluate on two stochastic control benchmarks adapted from prior literature (Lechner et al., 2022):
- 2D Linear Dynamical System with Non-linear Bounds: A 2D state space where the agent has bounded control inputs and experiences additive zero-mean triangular noise.
- Inverted Pendulum: An OpenAI Gym–adapted continuous inverted pendulum where triangular random noise is added to both angle and angular velocity update steps.
In both tasks, the target stabilizing set $\mathcal{X}_s$ is explicitly chosen such that it is not closed under system dynamics.
Key Insights and Ideas
- Geometric Barrier + Supermartingale Concentration: Even if the agent leaves $\mathcal{S}$, it cannot leave $\mathcal{X}_s$ in one step because of bounded step sizes ($\Delta$). To actually exit $\mathcal{X}_s$, $V$ must climb across the buffer zone. Using maximal inequality concentration bounds for supermartingales, the probability of escaping $\mathcal{X}_s$ before returning to $\mathcal{S}$ is strictly bounded by $p = \frac{M + L_V \cdot \Delta}{M + L_V \cdot \Delta + \delta} < 1$.
- Infinite Escapes Have Measure Zero: The probability of leaving $\mathcal{X}_s$ consecutively $N$ times scales as $p^N \to 0$ as $N \to \infty$. By Borel-Cantelli–type reasoning, the agent must eventually enter $\mathcal{S}$ and stay inside $\mathcal{X}_s$ forever with probability 1.
- Quantitative Time Bounds: The sRSM formulation doesn't just provide qualitative stability—it yields closed-form upper bounds on the expected number of time steps spent outside the target region ($\mathbb{E}[\text{Out}_{\mathcal{X}_s}]$).
Key Results
The learner-verifier framework successfully converged and formally certified a.s. asymptotic stability on both benchmarks:
- 2D System: Verified in 5 iterations (~3,660 s) with grid mesh $\tau = 0.0007$ and escape probability $p \le 0.80$.
- Inverted Pendulum: Verified in 4 iterations (~2,619 s) with grid mesh $\tau = 0.003$ and escape probability $p \le 0.97$.
- Ablation on Training Loss: Introducing the discretization-mesh regularized loss $L'_{\text{cond } 2}$ reduced the verification iterations on the inverted pendulum from 8 iterations (7,004 s) down to 4 iterations (2,619 s).
Limitations and Future Work
- Curse of Dimensionality in Verification: The grid decomposition used by the verifier grows exponentially with the state dimension ($O((1/\tau)^n)$), making it primarily applicable to low-dimensional systems unless paired with more scalable SMT or branch-and-bound techniques.
- Compact State Space Requirement: While the theoretical foundation supports unbounded spaces, the verification algorithm relies on compact state spaces to perform finite grid partitioning.
- Lipschitz Constants Conservatism: Interval arithmetic and naive Lipschitz constant upper-bounds on neural networks can be loose, requiring very fine discretizations and higher runtimes.
Summary updated