Theorem 6.2 — when
ProvedApproxOptRL.PolicyQuality.policy_quality_boundThis is the near-optimality guarantee of Kakade and Langford for a policy whose optimal policy advantage is small.
Consider a finite MDP with states , actions , transition probabilities , rewards with , and discount factor . Write for the normalized value function, for the -discounted future state distribution of from the start distribution , , and for the largest policy advantage over under the restart distribution . For a ratio of nonnegative functions, .
Let be a state distribution and a stochastic policy with , and let be an optimal policy. Then for every state distribution ,
Concretely, the statement has three parts:
- if for every , then ;
- if for every , then for every (the middle inequality, );
- if for every , then .
The theorem quantifies how good the policy returned by conservative policy iteration is: a small policy advantage with respect to the restart distribution gives near-optimal performance with respect to any other distribution , at a cost measured by the mismatch between 's optimal future state distribution and .
Formalization Note The ratio norms are encoded multiplicatively: "" becomes " for every with pointwise". The least such is when ; if for some , no exists, matching ; a state with imposes nothing. No full-support assumption on or is made. is the supremum over stochastic policies. The standing assumptions of the paper's §2 (finite nonempty , ; a kernel; rewards in ; ; stochastic; , distributions) are explicit hypotheses. In Lean, πstar is and μ' is .
import Mathlib import Definitions.Def_FoundationsML_ReinforcementLearning_IsTransitionKernel import Definitions.Def_FoundationsML_ReinforcementLearning_IsPolicy import Definitions.Def_ApproxOptRL_Shared_Model import Definitions.Def_ApproxOptRL_PolicyQuality_PolicyAdvantage open ApproxOptRL.Shared open FoundationsML.ReinforcementLearning
namespace ApproxOptRL.PolicyQuality
/-- **Theorem 6.2** (Kakade–Langford, ICML 2002, p. 6). Assume that for a policy `π`,
`OPT(𝔸_{π,μ}) < ε`. Let `π*` (`πstar`) be an optimal policy. Then for any state distribution
`μ̃` (`μ'`),
`η_μ̃(π*) - η_μ̃(π) ≤ ε/(1-γ) ‖d_{π*,μ̃}/d_{π,μ}‖_∞ ≤ ε/(1-γ)² ‖d_{π*,μ̃}/μ‖_∞`.
The `l_∞`-norm of a ratio, `‖f/g‖_∞ = max_s f(s)/g(s)` (p. 5), is encoded multiplicatively:
a bound `X ≤ K ‖f/g‖_∞` is stated as `X ≤ K * C` for every `C` with `f s ≤ C * g s` for all
`s`. When some `g s = 0 < f s` no such `C` exists (the norm is `+∞` and the bound is empty);
a state with `f s = g s = 0` imposes nothing. The three conjuncts are the first inequality, the
middle comparison `‖d_{π*,μ̃}/d_{π,μ}‖_∞ ≤ (1/(1-γ)) ‖d_{π*,μ̃}/μ‖_∞`, and the outer bound.
Standing assumptions of the paper's §2: finite nonempty `S`, `A`; transition kernel `P`;
rewards in `[0, R]`; `0 ≤ γ < 1`. -/
theorem policy_quality_bound {S A : Type} [Fintype S] [Fintype A] [DecidableEq S]
[Nonempty S] [Nonempty A]
(P : S → A → S → ℝ) (hP : IsTransitionKernel P)
(r : S → A → ℝ) (R : ℝ) (hR : 0 < R) (hr : ∀ s a, 0 ≤ r s a ∧ r s a ≤ R)
(γ : ℝ) (hγ0 : 0 ≤ γ) (hγ1 : γ < 1)
(μ : S → ℝ) (hμ : IsStateDist μ)
(π : S → A → ℝ) (hπ : IsPolicy π)
(ε : ℝ) (h : optPolicyAdvantage P r γ π μ < ε)
(πstar : S → A → ℝ) (hπstar : IsOptimalPolicy P r γ πstar)
(μ' : S → ℝ) (hμ' : IsStateDist μ') :
(∀ C : ℝ, (∀ s, futureStateDist P γ πstar μ' s ≤ C * futureStateDist P γ π μ s) →
eta P r γ πstar μ' - eta P r γ π μ' ≤ ε / (1 - γ) * C) ∧
(∀ C : ℝ, (∀ s, futureStateDist P γ πstar μ' s ≤ C * μ s) →
∀ s, futureStateDist P γ πstar μ' s ≤ C / (1 - γ) * futureStateDist P γ π μ s) ∧
(∀ C : ℝ, (∀ s, futureStateDist P γ πstar μ' s ≤ C * μ s) →
eta P r γ πstar μ' - eta P r γ π μ' ≤ ε / (1 - γ) ^ 2 * C) := by sorry
end ApproxOptRL.PolicyQuality
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.