CertRL: Formalizing Convergence Proofs for Value and Policy Iteration in Coq

Koundinya Vajjha, Avraham Shinnar, Vasily Pestun, Barry Trager, Nathan Fulton
9/23/2020
cs.AIcs.LOcs.PL
rl

Official code: IBM/FormalML (79 stars, Rocq Prover, Apache-2.0, last commit 2026-09-29).

Abstract

Reinforcement learning algorithms solve sequential decision-making problems in probabilistic environments by optimizing for long-term reward. The desire to use reinforcement learning in safety-critical settings inspires a recent line of work on formally constrained reinforcement learning; however, these methods place the implementation of the learning algorithm in their Trusted Computing Base.

Show full abstract

The crucial correctness property of these implementations is a guarantee that the learning algorithm converges to an optimal policy. This paper begins the work of closing this gap by developing a Coq formalization of two canonical reinforcement learning algorithms: value and policy iteration for finite state Markov decision processes. The central results are a formalization of Bellman's optimality principle and its proof, which uses a contraction property of Bellman optimality operator to establish that a sequence converges in the infinite horizon limit. The CertRL development exemplifies how the Giry monad and mechanized metric coinduction streamline optimality proofs for reinforcement learning algorithms. The CertRL library provides a general framework for proving properties about Markov decision processes and reinforcement learning algorithms, paving the way for further work on formalization of reinforcement learning algorithms.

View on arXivView PDF

Code Implementations(1)

IBM/FormalMLOfficial100%
Apache-2.0

Formalization of Machine Learning Theory with Applications to Program Synthesis

7918Rocq Prover, LeanAug 13, 20202 months agoApache-2.0

Similar Papers

Cite this paper

@article{vajjha2020certrl,
  title  = {CertRL: Formalizing Convergence Proofs for Value and Policy Iteration in Coq},
  author = {Koundinya Vajjha and Avraham Shinnar and Vasily Pestun and Barry Trager and Nathan Fulton},
  year   = {2020},
  eprint = {2009.11403},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2009.11403}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2009.11403.svg)](https://codeofpaper.com/paper/2009.11403)

Discussion