aiqbench analysis
This paper advances the rigorous mathematical foundations of reinforcement learning by formally verifying the almost sure convergence of Q-learning and TD learning using the Lean 4 theorem prover. By applying the Robbins-Siegmund theorem within a unified framework, the work provides a robust theoretical guarantee for two of RL's most influential algorithms, moving beyond empirical validation to formal proof. This development strengthens the reliability of RL theory and offers a scalable template for formally verifying other complex learning dynamics.
Towards Formalizing Reinforcement Learning Theory: A Robbins-Siegmund Approach
arXiv:2511.03618v2 Announce Type: replace Abstract: In this paper, we formalize the almost sure convergence of $Q$-learning and linear temporal difference (TD) learning with Markovian samples using the Lean 4 theorem prover based on the Mathlib library. $Q$-learning and linear TD are among the earliest and most influential reinforcement learning (RL) algorithms. The investigation of their convergence properties is not only a major research topic during the early development of the RL field but also receives significant attention nowadays. This paper formally verifies their almost sure convergence in a unified framework based on the Robbins-Siegmund theorem. The framework developed in this work can potentially be extended to convergence rates and other modes of convergence. This work thus makes an important step towards fully formalizing convergent RL results. The code is available at https://github.com/ShangtongZhang/rl-theory-in-lean.
Abstract:In this paper, we formalize the almost sure convergence of $Q$-learning and linear temporal difference (TD) learning with Markovian samples using the Lean 4 theorem prover based on the Mathlib library. $Q$-learning and linear TD are among the earliest and most influential reinforcement learning (RL) algorithms. The investigation of their convergence properties is not only a major research topic during the early development of the RL field but also receives significant attention nowadays. This paper formally verifies their almost sure convergence in a unified framework based on the Robbins-Siegmund theorem. The framework developed in this work can potentially be extended to convergence rates and other modes of convergence. This work thus makes an important step towards fully formalizing convergent RL results. The code is available at this https URL.
Machine Learning (cs.LG); Machine Learning (stat.ML)
arXiv:2511.03618 [cs.LG]
(or arXiv:2511.03618v2 [cs.LG] for this version)
https://doi.org/10.48550/arXiv.2511.03618 Focus to learn more arXiv-issued DOI via DataCite
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Full text under the publisher's open licence · 224 words
Related coverage

Deconfusing Corrigibility
AI Alignment Forum · Oct 17, 2026

The Alignment Problem: Computer Science Meets Analytic Philosophy
LessWrong · Oct 18, 2026

Social Theory and Agent Foundations
LessWrong · Oct 8, 2026
The Continual Constitutional Convention: How language models revise the documents that govern them
AI Alignment Forum · Oct 13, 2026