On the Theory of Policy Gradient Methods: Optimality, Approximation, and Distribution Shift 1: Projected Gradient Ascent on the Simplex Is ε-Optimal After 64γ|S||A|D∞²/((1−γ)⁶ε²) IterationsResearch Paper
Motivation
Policy gradient methods optimize a parameterized policy of a Markov decision process by gradient ascent on its expected discounted return. They are among the most widely used methods in reinforcement learning, from REINFORCE (Williams 1992) and the policy gradient theorem to natural policy gradient and trust-region methods. The objective is not concave in the policy, even when the policy is a raw table of action probabilities, so standard optimization theory guarantees at best convergence to a stationary point, and it was long unclear whether or how fast these methods find an optimal policy.
Agarwal, Kakade, Lee and Mahajan (JMLR 2021) give a systematic answer for the tabular and function-approximation settings. This mission formalizes their warm-up result, Theorem 4.1: projected gradient ascent over the simplex of stochastic policies reaches an -optimal policy after a number of iterations polynomial in the sizes of the MDP, the effective horizon , , and a distribution mismatch coefficient. The gradient domination idea it rests on goes back to the analysis of conservative policy iteration by Kakade and Langford (2002) and to Scherrer and Geist (2014).
Setting
A finite discounted MDP consists of finite sets of states and of actions, a transition kernel , rewards and a discount factor . A policy assigns to each state a probability distribution over actions. Its value from a start state is
and for a start distribution , . The action value is and the advantage is . The discounted state visitation distribution is . An optimal policy maximizes at every state simultaneously; .
In the direct parameterization the parameter is the table itself, , a point of the product simplex . The algorithm optimizes for a chosen start distribution by projected gradient ascent
where is the Euclidean projection and . Performance is measured under a possibly different distribution , and the distribution mismatch coefficient (componentwise ratio) measures how well covers the states an optimal policy visits from .
Formalization targets
Goal: Theorem 4.1
With step size , from any initial policy, for every and ,
Milestones, in the order of the proof
- Lemma 3.2 (performance difference): .
- (7), the gradient of the direct parameterization: .
- Lemma 4.1 (gradient domination): , together with the sharper form with in place of .
- Lemma D.3 (smoothness): .
- Theorem E.1(3) (Beck 2017, Theorem 10.15): projected gradient descent with step on a -smooth function over a closed convex set has , with the gradient mapping.
- Proposition B.1: a gradient mapping of norm at most at makes the next iterate -stationary over feasible unit directions.
Significance
The theorem shows that, for the simplest constrained parameterization, a first-order method finds a globally optimal policy at a polynomial rate in spite of non-concavity. The guarantee holds for every performance distribution at once, and it isolates the role of exploration in a single quantity, the mismatch coefficient; Section 4.3 of the paper shows that without a well-covering gradient methods can need exponentially many steps. Lemma 4.1 and the smoothness bound are reused across the rest of the paper, and the performance difference lemma underlies essentially all of its analyses.
All results here are proved in the paper, with Theorem E.1 and Theorem E.2 cited from Beck (2017) and Ghadimi–Lan (2016). None of them has a machine-checked proof on the platform. A formal development provides a verified link between the policy gradient expression of the direct parameterization and a standard nonconvex projected-gradient rate, and a reusable formal library of discounted visitation distributions, the performance difference identity, and projected gradient methods on Euclidean spaces.
Difficulty
The obvious argument, "projected gradient ascent converges to a stationary point, and stationary points are optimal", fails on both counts as stated. Stationary points of need not be optimal when does not cover the relevant states; the quantitative replacement is gradient domination, which only controls suboptimality through the mismatch coefficient. The convergence rate itself requires smoothness of the value as a function of the policy table, which is a bound on second derivatives of a matrix inverse with the dependence and the factor made explicit. Finally, the near-stationarity delivered by the gradient-mapping rate is at the next iterate, not the current one, which is why the conclusion is over . On the Lean side, the value is an infinite series in the policy entries, so its differentiability and the exact gradient formula have to be established for a function defined on the whole parameter space.
Formalization scope
Policies are parameter vectors in EuclideanSpace ℝ (S × A), so norms are and Mathlib's gradient is ; the objective is defined on the whole space and is only ever evaluated, with its gradient, at policies. The MDP layer (transition kernels, policies, , , occupation distributions, optimal policies) is the published FoundationsML.ReinforcementLearning library; is the unnormalized discounted sum. The projection is any map satisfying the nearest-point property. The optimal policy is a hypothesis IsOptimalPolicy (optimal from every state), not a supremum over all functions.
Conventions committed to:
- The mismatch coefficient is any constant with for all ; this avoids Lean's and is equivalent to the page's statement when the coefficient is finite.
- and are explicit hypotheses of the goal (the step size divides by , the threshold by ).
- The goal concludes . The printed fails at (one state, two actions with rewards and , , , initial policy on the bad action); the proof on p. 50 establishes the range .
- Proposition B.1 bounds the directions feasible at , as its proof does; Theorem E.1 assumes smoothness on only and uses the radicand of Beck and of p. 49.
A formalization that defines the update through formula (7), that assumes gradient domination or smoothness as hypotheses of the goal, or that takes the gradient off the simplex where the value series may diverge, would trivialize the goal; the goal mentions none of these, and (7) is a milestone theorem.
A complete development needs: summability and differentiability of the value series near the simplex; the performance difference lemma; the Euclidean projection inequality on a closed convex set; the descent lemma for functions smooth on a convex set; and the gradient-mapping argument. The projection and gradient-mapping results are independent of reinforcement learning and reusable. Contributions to any milestone are welcome, as are proofs of Theorem E.2 (Ghadimi–Lan) as a stepping stone to Proposition B.1.
Selected references
- A. Agarwal, S. M. Kakade, J. D. Lee, G. Mahajan, On the Theory of Policy Gradient Methods: Optimality, Approximation, and Distribution Shift, JMLR 22(98), 2021; arXiv:1908.00261v5. https://arxiv.org/abs/1908.00261
- A. Beck, First-Order Methods in Optimization, MOS-SIAM Series on Optimization, SIAM, 2017. https://doi.org/10.1137/1.9781611974997
- S. Ghadimi, G. Lan, Accelerated gradient methods for nonconvex nonlinear and stochastic programming, Mathematical Programming 156, 2016. https://doi.org/10.1007/s10107-015-0871-8
- S. Kakade, J. Langford, Approximately optimal approximate reinforcement learning, ICML 2002. https://dl.acm.org/doi/10.5555/645531.656005
- B. Scherrer, M. Geist, Local Policy Search in a Convex Space and Conservative Policy Iteration as Boosted Policy Search, ECML PKDD 2014, pp. 35–50 (arXiv version: https://arxiv.org/abs/1306.1520)
- R. J. Williams, Simple statistical gradient-following algorithms for connectionist reinforcement learning, Machine Learning 8, 1992. https://doi.org/10.1007/BF00992696