arXiv:2610.18119cs.LOOct 2026

Manuscript Offprint

arXiv:2610.18119

Certifying Almost-Sure Reachability in Unknown MDPs

S Akshay, Suguman Bansal, Gaurav Mahla

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Specification-Guided Reinforcement Learning (RL) has largely concerned itself with learning an optimal policy against a formal specification in an unknown Markov Decision Process (MDP). We take up the dual question. Given a policy already in hand, can one verify that it is correct against a formal specification in an unknown MDP, using sampling access alone? Such a question arises naturally in safety-critical systems. We investigate it for the almost-sure reachability property, whose correctness is witnessed by a ranking supermartingale (RSM) certificate. Our first finding is negative. In the absence of any further information about the MDP, one can neither learn such a certificate nor verify a candidate one with probabilistic guarantees. On the positive side, we show that, under a mild restriction, a known lower bound pmin⁡p_{\min} on nonzero transition probabilities, a correct certificate can be learned with PAC-style guarantees. To the best of our knowledge, this is the first study of learning and verifying certificates for almost-sure reachability in unknown MDPs from sampling access alone. Finally, our experiments show that the pmin⁡p_{\min}-based sufficient condition, while sound, is conservative: the learned certificate often remains valid on the true MDP even when the condition fails.

1 Introduction

Reinforcement learning (RL) (Sutton and Barto 2018) studies how an agent should act in a stochastic environment, standardly modeled as a Markov decision process (MDP) (Puterman 1994). In many deployments the transition probabilities are not known explicitly. The resulting unknown MDPs grant the agent only sampling access. Querying a state–action pair (s,a)(s, a) returns a next state s′∼P(⋅∣s,a)s' \sim P(\cdot \mid s, a), while the kernel P itself stays hidden. The dominant question in this setting, particularly when considering specification-guided RL (Alur et al. 2026), has been one of synthesis, namely how to learn a policy that is optimal against a given specification.

We take up a dual and equally pressing question. Given a policy already in hand, can we verify that it is correct against a formal specification, again using only sampling access to the unknown MDP? A positive answer would let us certify a deployed controller without ever building a model of its environment. A negative one would tell us precisely what extra knowledge such certification demands. It is especially important in safety-critical domains such as robotics and autonomous systems. In effect, we initiate the study of certificate learnability, the question of whether a proof of correctness can be learned or verified from samples, as the counterpart to the well-studied policy learnability. Throughout, we fix the policy π\pi and work with unknown finite MDPs.

Verification of this kind cannot rest on simulation alone. Even in a finite MDP, executions may be arbitrarily long and infinitely many, so success on sampled runs cannot rule out an execution that violates the specification forever. What is needed instead is a certificate, a mathematical witness that a policy satisfies its specification without enumerating all executions. Our specification of interest is almost-sure reachability, which asks that from the initial state the policy π\pi reach a target set T⊆ST \subseteq S with probability 1. For this property, ranking supermartingales (RSMs) (Lechner et al. 2022) are a natural certificate. An RSM assigns each state a nonnegative rank that, outside the target, strictly decreases in expectation after one step. The process therefore makes expected progress toward T and, since the rank is nonnegative, cannot avoid T forever. For finite MDPs an RSM is both a sound and complete witness to almost-sure reachability.

Certifying almost-sure reachability thus reduces to producing, or checking, an RSM. When P is known this is straightforward, as the expected-decrease inequality is directly verifiable. Under sampling access it is not. The decrease is an expectation over the hidden kernel, so a candidate can only be estimated against a learned model M′M' and its verdict transferred back to the true MDP M. It is not obvious that a certificate can be produced, or even checked, from samples. We study three questions together, along with the transferability that bridges them. Learning asks whether a correct RSM certificate can be produced from samples with high probability. Verification asks whether a candidate RSM can be checked from samples with high probability. Transferability asks when a certificate valid on the learned M′M' remains valid on M. This differs from classical PAC-MDP policy learning. For instance, Yang, Littman, and Carbin (2022); Alur et al. (2022) show that PAC learnability for LTL objectives holds exactly for formulas decidable within a finite horizon. Here the policy is fixed and the object to be certified is the RSM itself.

Our first result is negative, and its cause is intrinsic to sampling-based certification. A certificate cannot be produced or confirmed until the transitions that make progress toward the target have been witnessed, yet a progress tran-sition may carry arbitrarily small probability. Such a rare transition can remain unobserved for arbitrarily long, so the samples needed to observe it cannot be bounded by the size of the problem alone. We show this rare-transition obstacle is decisive. In the absence of any further information about the MDP, neither learning a correct certificate nor verifying a candidate one is possible with probabilistic guarantees.

The impossibility is driven entirely by transitions of vanishing probability, and a single mild and standard assumption removes it. A known lower bound pmin⁡p_{\min} on every nonzero transition probability (Ashok, Křetínský, and Weininger 2019) keeps a progress transition from hiding behind an arbitrarily small probability, so progress toward the target becomes observable in finitely many samples. Our positive result then follows a model-based route. Rather than learn an RSM directly, we learn a sufficiently accurate model M′M' (which standard finite-MDP model-learning provides from sampling access) and compute on it the expected hitting-time function V(s)=Esπ,M′[HT]V(s) = \mathbb{E}_s^{\pi, M'}[H_T], a natural RSM candidate that decreases by exactly one in expectation. Because the expected-decrease condition depends on transition probabilities, a certificate valid under P′P' need not be valid under PP. We prove that a close enough approximation preserves the RSM property, and under pmin⁡p_{\min} we obtain an explicit threshold on the approximation error. Learning a transferable certificate thereby reduces to learning a sufficiently accurate model, and a correct RSM certificate can be learned with probabilistic guarantees.