On the Sample Complexity of Reinforcement Learning I: Approximate Policy Iteration with Max-Norm Evaluation Error ε Is Eventually Within 2ε/(1−γ)² of OptimalTextbook
Motivation
Most practical reinforcement-learning methods do not compute value functions exactly. They alternate between estimating a value function from data, usually with a parametric approximator, and acting greedily with respect to that estimate. Approximate value iteration and approximate policy iteration are the two classical schemes of this kind, and their error analysis decides how accuracy in the estimation step translates into quality of the policies produced. Chapter 3 of S. M. Kakade's thesis On the Sample Complexity of Reinforcement Learning (University College London, 2003) collects the basic guarantees, developed from Bertsekas (Dynamic Programming: Deterministic and Stochastic Models, 1987) for greedy policies, Singh and Yee (1994), and Bertsekas and Tsitsiklis, Neuro-Dynamic Programming (Athena Scientific, 1996). The bounds are stated in terms of the worst-case (max-norm) error of the evaluation step, and the thesis uses them to argue that max-norm error is the obstacle to state-space-independent sample complexity results for these methods, which motivates the later chapters of the thesis.
Setting
A finite discounted Markov decision process consists of a finite set of states , a finite nonempty set of actions , a transition kernel (for every a probability distribution over ), a deterministic reward , and a discount factor . A policy is a probability distribution over actions for every state; a deterministic policy is a map , identified with the policy that plays with probability one.
Values are normalized: the value of at is
and the state-action value is . With rewards in , every value lies in . An optimal policy has for every policy and state ; write and . The max norm is on state vectors and on state-action arrays.
The backup operator is . A deterministic policy is greedy with respect to if for every .
- -approximate value iteration produces vectors with , and greedy policies for the lookahead .
- -approximate policy iteration starts from any deterministic , forms an estimate of with , and takes greedy with respect to .
Formalization targets
Goal: Theorem 3.2.2 (approximate policy iteration)
The policies need not converge; the statement bounds where they end up.
Milestones
- Theorem 3.1.1: if and is greedy for , then for all .
- Lemma 3.2.3: .
- Rate of approximate policy iteration (p. 41): .
- Contraction of the backup (p. 26): .
- Approximate value iteration (p. 40): .
- Rate of approximate value iteration (p. 41): .
- Theorem 3.2.1: the same lim sup bound for approximate value iteration.
Significance
The results give the standard performance guarantee for greedy approximate dynamic programming: an evaluation error of in max norm costs at most in max-norm suboptimality, uniformly over the asymptotic set of policies, with a geometric rate of approach. Example 3.1.2 of the thesis shows that the factor of Theorem 3.1.1 is attained, so the greedy step itself cannot be improved; the two factors of the horizon in the limit bound are the reason the thesis turns to other error measures in later chapters.
All the statements are classical and proved in the literature (Bertsekas–Tsitsiklis 1996, Chapter 6, in the unnormalized model and with a factor to spare in the limit bounds); Lemma 3.2.3 and Theorem 3.2.2 are stated in the thesis without proof. To our knowledge none has a machine-checked proof. The mission produces formal proofs in the normalized model shared with the formalization of Kakade–Langford (2002) on this platform, so later chapters of the series (conservative policy iteration, policy search) can compare against them.
Difficulty
Approximate policy iteration is not monotone: with evaluation errors, can be worse than at some states, so the argument of exact policy iteration, which uses everywhere, does not apply. The difficulty of Lemma 3.2.3 is to control the distance to optimality without improvement at each step, combining the greedy step with the lack of monotonicity of the new policy's value; the thesis calls the proof of Theorem 3.2.2 "somewhat technical" and omits it. A second, mechanical difficulty is that the normalized value is defined as an infinite series, so its Bellman equation , the optimality equation and the bound have to be derived from that definition before any of the recursions can be run.
Formalization scope
- The model is the published normalized model
ApproxOptRL.Shared.Model:value P r γ πis (defined as times atsum),qValueis . and are finite types, nonempty; satisfiesIsTransitionKernel; every statement assumes and . - The optimal policy is a binder with
IsOptimalPolicy P r γ πstar(a stationary stochastic policy dominating every stationary stochastic policy at every state). Such a policy exists for every finite MDP (p. 26 of the thesis), and for finite MDPs it is optimal among all policies. - Policies of the runs are deterministic,
S → A, and are evaluated through the indicator policydetPolicy. "Greedy" is the relation∀ s a, Q s a ≤ Q s (f s): every tie-breaking rule is covered. - The runs are sequences indexed by
ℕ, with the greedy and accuracy conditions as hypotheses at every index; the value-iteration condition is written for indices and . - is Mathlib's sup norm on
S → ℝandS → A → ℝ. - The lim sup statements are in – form: for every the bound plus holds eventually.
- Ruled out: the accuracy hypothesis is stated against , the value of the current policy, not against , and the greedy relation genuinely constrains ; with either changed, the hypotheses would be unsatisfiable or the policies unconstrained and the theorem empty.
- Infrastructure needed and reusable beyond this mission: the Bellman equation of the normalized
valuefor indicator policies, , monotonicity and contraction of policy-evaluation and backup operators in the normalized model, and the bound . Contributions of these lemmas are welcome.
Selected references
- S. M. Kakade, On the Sample Complexity of Reinforcement Learning, PhD thesis, Gatsby Computational Neuroscience Unit, University College London, 2003. https://discovery.ucl.ac.uk/id/eprint/10100726/
- D. P. Bertsekas and J. N. Tsitsiklis, Neuro-Dynamic Programming, Athena Scientific, 1996. ISBN 1-886529-10-8.
- S. P. Singh and R. C. Yee, An upper bound on the loss from approximate optimal-value functions, Machine Learning 16 (1994), 227–233. https://doi.org/10.1007/BF00993104
- S. M. Kakade and J. Langford, Approximately optimal approximate reinforcement learning, ICML 2002. https://dl.acm.org/doi/10.5555/645531.656005