Approximately Optimal Approximate Reinforcement Learning II: Near-Optimality of a Policy with Small Policy AdvantageResearch Paper
Motivation
Approximate policy iteration and policy-gradient methods stop when they can no longer find a direction of improvement. Kakade and Langford (ICML 2002) asked what such a stopping point guarantees. Their algorithm, conservative policy iteration, halts at a policy for which no policy can improve much on as measured under a restart distribution ; the quantity that is small is the optimal policy advantage . Theorem 6.2 of the paper translates this local condition into a global statement: the performance of is close to optimal, with a loss controlled by how well covers the states an optimal policy visits.
The bound is the origin of the distribution mismatch coefficient , which reappears in the analysis of approximate dynamic programming (concentrability coefficients, Munos 2003), of conservative and trust-region methods, and of the convergence of policy gradient methods (Agarwal, Kakade, Lee, Mahajan 2021), where it governs the rate. The performance difference lemma (Lemma 6.1) used in its proof has become a standard tool of reinforcement learning theory.
Setting
A finite Markov decision process has a finite nonempty state set , a finite nonempty action set , transition probabilities (for each a probability distribution over ), a reward function with , and a discount factor . A stochastic policy is, for each state , a probability distribution over actions. A state distribution is a probability vector on .
The normalized value function is , where , and . The state–action value is and the advantage is . The discounted future state distribution from is
and the performance of from is .
The policy advantage of with respect to and is : the expected advantage of over on the states itself visits. Its maximum over all stochastic policies is (Definition 4.3). An optimal policy satisfies for every policy and every state . For nonnegative on , (p. 5).
Formalization targets
Goal: Theorem 6.2 (p. 6)
If and is optimal, then for every state distribution
The goal states both inequalities and the outer bound. The evaluation distribution is arbitrary and unrelated to the restart distribution ; taking , the start distribution, gives Corollary 4.5 (p. 5).
Milestone: Lemma 6.1 (p. 6)
For any policies , and any starting distribution ,
The states are weighted by the future state distribution of the new policy , the advantage is that of the old policy .
Significance
Theorem 6.2 is the quality guarantee for conservative policy iteration: combined with the paper's Theorem 4.4 (the algorithm stops with after polynomially many calls), it bounds the suboptimality of the returned policy for any target distribution, independently of the size of the state space except through the mismatch coefficient. It also explains the role of the restart distribution: a more uniform makes small. Lemma 6.1 is used throughout later theory, from trust-region policy optimization to the global convergence of policy gradient methods.
Both results are proved in the paper, with short arguments. The contribution of this mission is a machine-checked version of the infinite-horizon discounted statement in the paper's normalization, with the ratios handled exactly, including states where a denominator vanishes. Neither the discounted performance difference lemma for stochastic policies nor the distribution mismatch bound is known to be formalized in Mathlib; a finite-horizon performance difference identity has been formalized separately and is a different statement.
Difficulty
The mathematics is short; the difficulty is in the infinite-horizon bookkeeping. The value function and are infinite series, and Lemma 6.1 relates the series of two different policies: its natural one-line argument uses the Bellman equation for , which is not the definition here, together with interchanges of infinite sums over time with finite sums over states and actions, each of which needs summability. Theorem 6.2 then needs two facts that are not stated as results in the paper: that equals (the supremum over policies is attained by a greedy policy, and ), and that . Reading the ratio with real division would give a false statement when a denominator is zero; the statement avoids this.
Formalization scope
States and actions are finite nonempty types; policies and kernels are real-valued functions π s a (the paper's ) and P s a s' (the paper's ), with their distribution properties as explicit hypotheses. The published definitions IsTransitionKernel, IsPolicy, InducedTransition, OccupationDist, InducedReward and PolicyValue from the Foundations of Machine Learning series are reused; is times PolicyValue, the defining series. is the supremum of the policy advantages over stochastic policies, which is the paper's maximum. Optimality of is relative to stationary stochastic policies, the paper's policy class; the existence of an optimal policy (the paper's "well known result", p. 2) is not part of this mission.
Every hypothesis is explicit: rewards in with , , a kernel, and stochastic policies, and state distributions. Each bound is stated multiplicatively: "" is " for every with for all ". When some no such exists and the bound is empty, which matches ; no full-support assumption is made on or . The hypothesis is on the supremum itself, not on the closed form , which is a step of the proof; a formalization that assumed the closed form, or that divided by in real arithmetic, would not be this theorem. The proof of the theorem uses only that is a policy; optimality is kept as a hypothesis because the paper states it.
The proof on p. 7 twice writes ; the inequality it uses, and the one stated on p. 5, is . This slip is in the proof, not in the statement. Pages are PDF pages; the paper has no printed page numbers.
Useful reusable infrastructure: summability and Bellman equations for the normalized discounted value, as a probability distribution with , and attainment of by a greedy policy. Contributions of any of these as separate lemmas are welcome.
Selected references
- S. Kakade, J. Langford, Approximately Optimal Approximate Reinforcement Learning, Proceedings of the 19th International Conference on Machine Learning (ICML), 2002. https://dl.acm.org/doi/10.5555/645531.656005
- R. Munos, Error Bounds for Approximate Policy Iteration, ICML 2003. https://dl.acm.org/doi/10.5555/3041838.3041903
- A. Agarwal, S. Kakade, J. Lee, G. Mahajan, On the Theory of Policy Gradient Methods: Optimality, Approximation, and Distribution Shift, Journal of Machine Learning Research 22(98), 2021. https://jmlr.org/papers/v22/19-736.html
- J. Schulman, S. Levine, P. Abbeel, M. Jordan, P. Moritz, Trust Region Policy Optimization, ICML 2015. https://arxiv.org/abs/1502.05477