On the Sample Complexity of Reinforcement Learning III: Non-Stationary Approximate Policy Iteration Is Within 2T Times the Regression Error Averaged over Any Competitor's State-Time DistributionTextbook
Motivation
Approximate dynamic programming replaces the exact value functions of a Markov decision process by approximations, typically produced by a regression algorithm. The classical guarantees for the resulting policies are stated in the max norm: if every state-action value is estimated to within uniformly over the state space, the greedy policy loses at most a multiple of (Williams and Baird 1993; Bertsekas and Tsitsiklis 1996). Regression algorithms, however, control an average error under the distribution on which they are trained, not a worst-case error, so these guarantees rarely apply to the approximations actually computed.
Chapter 5 of S. M. Kakade's PhD thesis (On the Sample Complexity of Reinforcement Learning, UCL 2003, pp. 57–66) identifies the distribution under which the error of an approximate policy iteration algorithm should be measured. For the finite-horizon, non-stationary approximate policy iteration algorithm (NAPI), the loss relative to any competitor policy is bounded by twice the horizon times the regression error averaged under the future state-time distribution of that competitor. Taking the competitor optimal, the relevant "test" distribution is the one visited by an optimal policy, generally not the distribution on which the regressor was trained; the thesis calls this the "mismeasure" of reinforcement learning. The key tool, the performance difference lemma, was proved for the discounted case by Kakade and Langford (ICML 2002) and is used throughout the conservative policy iteration and policy search literature.
Setting
A -epoch MDP has a finite state set , a finite nonempty action set , decision epochs , a transition kernel and a deterministic reward . A policy is a sequence of decision rules , distributions on ; it may be stochastic and non-stationary. A deterministic policy chooses the action .
Values are normalized. The -value is , so for and
The state-action value is , the advantage is , and the optimal value is . The future state-time distribution of from is
NAPI (Algorithm 6) starts from an arbitrary deterministic policy and updates its decision rules backwards, : at update a PolicyChooser receives the current policy and returns a decision rule , which replaces the rule at time . The output is . With RegressionPolicyChooser (Algorithm 7), a regressor returns an approximation of and is greedy for it. The per state error and per state regression error at update are
both measured against the input policy of update .
The discounted companions use the normalized discounted value , its advantage , and the Bellman error of a state vector , where .
Formalization targets
Goal: Theorem 5.3.2 (p. 64)
For the policy returned by NAPI with RegressionPolicyChooser, every policy and every state ,
The regression outputs are arbitrary; the statement holds for every regressor and every tie-breaking rule.
Milestones
- Lemma 5.2.1, undiscounted (p. 59): .
- Lemma 5.3.1 (p. 63): for NAPI's output and the input policy of update , and .
- Display in the proof of Theorem 5.3.2 (p. 64): when is greedy for .
- Corollary 5.2.2 (p. 61): and .
- Theorem 5.1.3 (Williams–Baird, p. 59): a policy greedy for satisfies .
The discounted half of Lemma 5.2.1 is already on the platform as ApproxOptRL.CPI.performance_difference and is referenced, not restated.
Significance
The goal replaces a max-norm hypothesis by an average one, under an explicit distribution. Its consequences: the approximation error only matters on the state-time pairs an optimal (or any good) policy visits; a regressor trained under a distribution over state-times performs well when resembles the state-time distribution of a good policy; and only one factor of the horizon appears, against two factors of in the max-norm bounds for discounted approximate value and policy iteration (Chapter 3 of the thesis). The same chain, Lemma 5.2.1 and Lemma 5.3.1, underlies the μ-policy search analysis of Chapter 6 and, in the discounted case, conservative policy iteration.
All statements are proved in the thesis; none of the finite-horizon ones is formalized on the platform. A related performance difference identity, FoundationsRL.RLBasics.performance_difference, is proved on the platform for episodic MDPs with layer-dependent kernels and unnormalized values, with roll-in by one policy; it is the same mathematics up to the normalization but a different object, and is not reused. The mission produces a reusable normalized -epoch layer (values, advantages, state-time distributions) and machine-checked proofs of the chapter's results.
Difficulty
The obvious approach to Theorem 5.3.2 compares with through max-norm contraction arguments, as in the discounted analysis of Chapter 3; that route only yields a bound in terms of and loses the averaging under . The averaged bound needs an exact identity between value differences and advantages along the competitor's trajectory distribution, which for non-stationary stochastic competitors requires a careful telescoping over epochs of the state distribution recursion. The second difficulty is bookkeeping in the algorithm: the regression error at update is measured against the input policy of that update, whose decision rules at later times have already been replaced, while the bound concerns the returned policy; relating the two requires showing that later updates do not change .
Formalization scope
- Model.
S,AareFintypes with decidable equality,Anonempty;P s a s'is withIsTransitionKernel P; rewards satisfy0 ≤ r s a ≤ 1in every statement (the thesis's standing assumption, p. 22). The thesis also allows infinite state spaces; hereSis finite. - Epochs and normalization. Epochs are 0-based, , with
0 < T. All values carry the factor (discounted: ), and carries ; the constants and are right only in this normalization. - Policies. A policy is
ℕ → S → A → ℝ, valid when every rule at a time is a distribution. Deterministic policiesℕ → S → Aenter through their indicator policies. is the supremum over the subtype of valid policies. Discounted statements use the publishedApproxOptRL.Shared.Model; is the value of an optimal stationary policy. - The NAPI run is an explicit recursion (
napiPolicy): the policy after updates , so the input of update is the policy at stage and the output is the policy at stage . The printed loop "For " omits the update at , which would leave the time-0 rule random and make the theorem false; the loop here runs to , as in the proof and in Algorithms 8–9. - Ruled out. A "run" whose returned policy is unconstrained, or regression errors measured against the returned policy instead of the input policy of each update, would trivialize or alter the goal; both are excluded by the explicit recursion. That the two measurements agree is Lemma 5.3.1, a milestone, not a definition.
- Maxima. Maxima over actions are
Finset.sup'; on state-action functions is Mathlib's sup norm onS → A → ℝ. is a single number, as printed in Definition 5.1.2.
Welcome contributions: proofs of the milestones, general lemmas about the -epoch layer (values in , normalization of , the path-expectation form of ), and links to the platform's discounted performance difference results.
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/
- S. Kakade and J. Langford, Approximately Optimal Approximate Reinforcement Learning, ICML 2002. https://dl.acm.org/doi/10.5555/645531.656005
- R. J. Williams and L. C. Baird, Tight Performance Bounds on Greedy Policies Based on Imperfect Value Functions, Technical Report NU-CCS-93-14, Northeastern University, 1993.
- D. P. Bertsekas and J. N. Tsitsiklis, Neuro-Dynamic Programming, Athena Scientific, 1996.
- M. L. Puterman, Markov Decision Processes: Discrete Stochastic Dynamic Programming, Wiley, 1994. https://doi.org/10.1002/9780470316887