Documentation

LeanMachineLearning.SequentialLearning.DivergenceDecomposition

The divergence decomposition #

Let alg, alg' be algorithms, env, env' be environments, and consider two algorithm-environment sequences (O, A, Y) and (O', A', Y') of alg against env and of alg' against env', on arbitrary probability spaces (Ω, P) and (Ω', P'). The Kullback-Leibler divergence between the laws of the histories of the first M rounds is the sum, over the rounds t < M, of the conditional divergences of the step at round t given the first t rounds. Note that both arguments of the conditional term use the law of the first history, so that term measures only how the two step kernels differ. The same identity holds for the whole trajectory trajectory O A Y : Ω → (ℕ → Round 𝓞 𝓐 𝓨), with a series in place of the finite sum.

For a single algorithm run against two stationary environments with reward kernels κ and κ', the two step kernels share the observation kernel and the policy and differ only in the reward kernel, so the conditional divergence of a step is the conditional divergence of the reward given the played action. This is the divergence decomposition of bandit lower bounds.

Main statements #

The divergence of one step of a policy/reward decomposition, in composition-product form: the policy π is shared and the reward kernels κ, η (which ignore the history) differ, so the divergence is the conditional divergence of the reward kernels given the played action, whose law is π ∘ₘ μ.

The divergence of one step of an observation/policy/reward decomposition, in composition-product form: the observation kernel o and the policy π are shared and the reward kernels κ, η (which ignore the history and the observation) differ, so the divergence is the conditional divergence of the reward kernels given the played action, whose law is π ∘ₘ (μ ⊗ₘ o).

theorem Learning.IsAlgEnvSeq.klDiv_map_history_stepKernel {𝓞 : Type u_1} {𝓐 : Type u_2} {𝓨 : Type u_3} {m𝓞 : MeasurableSpace 𝓞} {m𝓐 : MeasurableSpace 𝓐} {m𝓨 : MeasurableSpace 𝓨} {Ω : Type u_4} {Ω' : Type u_5} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {P : MeasureTheory.Measure Ω} {P' : MeasureTheory.Measure Ω'} [MeasureTheory.IsProbabilityMeasure P] [MeasureTheory.IsProbabilityMeasure P'] {O : ℕ → Ω → 𝓞} {A : ℕ → Ω → 𝓐} {Y : ℕ → Ω → 𝓨} {O' : ℕ → Ω' → 𝓞} {A' : ℕ → Ω' → 𝓐} {Y' : ℕ → Ω' → 𝓨} {alg alg' : Algorithm 𝓞 𝓐 𝓨} {env env' : Environment 𝓞 𝓐 𝓨} (h : IsAlgEnvSeq O A Y alg env P) (h' : IsAlgEnvSeq O' A' Y' alg' env' P') (M : ℕ) :

Chain rule for histories. For two algorithms alg, alg' run against two environments env, env', the divergence between the laws of the histories of the first M rounds is the sum over the rounds t < M of the conditional divergences of the step at round t given the first t rounds.

theorem Learning.klDiv_map_trajectory_eq_iSup {𝓞 : Type u_1} {𝓐 : Type u_2} {𝓨 : Type u_3} {m𝓞 : MeasurableSpace 𝓞} {m𝓐 : MeasurableSpace 𝓐} {m𝓨 : MeasurableSpace 𝓨} {Ω : Type u_4} {Ω' : Type u_5} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {P : MeasureTheory.Measure Ω} {P' : MeasureTheory.Measure Ω'} [MeasureTheory.IsProbabilityMeasure P] [MeasureTheory.IsProbabilityMeasure P'] {O : ℕ → Ω → 𝓞} {A : ℕ → Ω → 𝓐} {Y : ℕ → Ω → 𝓨} {O' : ℕ → Ω' → 𝓞} {A' : ℕ → Ω' → 𝓐} {Y' : ℕ → Ω' → 𝓨} (hO : ∀ (n : ℕ), Measurable (O n)) (hA : ∀ (n : ℕ), Measurable (A n)) (hY : ∀ (n : ℕ), Measurable (Y n)) (hO' : ∀ (n : ℕ), Measurable (O' n)) (hA' : ∀ (n : ℕ), Measurable (A' n)) (hY' : ∀ (n : ℕ), Measurable (Y' n)) :

The divergence between the laws of two trajectories is the supremum over n of the divergences between the laws of the histories up to time n.

theorem Learning.IsAlgEnvSeq.klDiv_map_trajectory_stepKernel {𝓞 : Type u_1} {𝓐 : Type u_2} {𝓨 : Type u_3} {m𝓞 : MeasurableSpace 𝓞} {m𝓐 : MeasurableSpace 𝓐} {m𝓨 : MeasurableSpace 𝓨} {Ω : Type u_4} {Ω' : Type u_5} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {P : MeasureTheory.Measure Ω} {P' : MeasureTheory.Measure Ω'} [MeasureTheory.IsProbabilityMeasure P] [MeasureTheory.IsProbabilityMeasure P'] {O : ℕ → Ω → 𝓞} {A : ℕ → Ω → 𝓐} {Y : ℕ → Ω → 𝓨} {O' : ℕ → Ω' → 𝓞} {A' : ℕ → Ω' → 𝓐} {Y' : ℕ → Ω' → 𝓨} {alg alg' : Algorithm 𝓞 𝓐 𝓨} {env env' : Environment 𝓞 𝓐 𝓨} (h : IsAlgEnvSeq O A Y alg env P) (h' : IsAlgEnvSeq O' A' Y' alg' env' P') :

Chain rule for trajectories. For two algorithms alg and alg' run against two environments env and env', the divergence between the laws of the trajectories is the series over the rounds t of the conditional divergences of the step at round t given the first t rounds.

theorem Learning.IsAlgEnvSeq.klDiv_map_history_compProd {𝓐 : Type u_2} {𝓨 : Type u_3} {m𝓐 : MeasurableSpace 𝓐} {m𝓨 : MeasurableSpace 𝓨} {Ω : Type u_4} {Ω' : Type u_5} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {P : MeasureTheory.Measure Ω} {P' : MeasureTheory.Measure Ω'} [MeasureTheory.IsProbabilityMeasure P] [MeasureTheory.IsProbabilityMeasure P'] {A : ℕ → Ω → 𝓐} {Y : ℕ → Ω → 𝓨} {A' : ℕ → Ω' → 𝓐} {Y' : ℕ → Ω' → 𝓨} {O : ℕ → Ω → Unit} {O' : ℕ → Ω' → Unit} {alg : Algorithm Unit 𝓐 𝓨} {κ κ' : ProbabilityTheory.Kernel 𝓐 𝓨} [ProbabilityTheory.IsMarkovKernel κ] [ProbabilityTheory.IsMarkovKernel κ'] (h : IsAlgEnvSeq O A Y alg (stationaryEnv κ) P) (h' : IsAlgEnvSeq O' A' Y' alg (stationaryEnv κ') P') (M : ℕ) :

Chain rule for histories of a single algorithm versus two stationary environments.

theorem Learning.IsAlgEnvSeq.klDiv_map_history {𝓐 : Type u_2} {𝓨 : Type u_3} {m𝓐 : MeasurableSpace 𝓐} {m𝓨 : MeasurableSpace 𝓨} {Ω : Type u_4} {Ω' : Type u_5} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {P : MeasureTheory.Measure Ω} {P' : MeasureTheory.Measure Ω'} [MeasureTheory.IsProbabilityMeasure P] [MeasureTheory.IsProbabilityMeasure P'] {A : ℕ → Ω → 𝓐} {Y : ℕ → Ω → 𝓨} {A' : ℕ → Ω' → 𝓐} {Y' : ℕ → Ω' → 𝓨} {O : ℕ → Ω → Unit} {O' : ℕ → Ω' → Unit} {alg : Algorithm Unit 𝓐 𝓨} {κ κ' : ProbabilityTheory.Kernel 𝓐 𝓨} [ProbabilityTheory.IsMarkovKernel κ] [ProbabilityTheory.IsMarkovKernel κ'] [MeasurableSpace.CountablyGenerated 𝓨] (h : IsAlgEnvSeq O A Y alg (stationaryEnv κ) P) (h' : IsAlgEnvSeq O' A' Y' alg (stationaryEnv κ') P') (M : ℕ) :
InformationTheory.klDiv (MeasureTheory.Measure.map (history O A Y M) P) (MeasureTheory.Measure.map (history O' A' Y' M) P') = ∑ t ∈ Finset.range M, ∫⁻ (ω : Ω), InformationTheory.klDiv (κ (A t ω)) (κ' (A t ω)) ∂P

Chain rule for histories of a single algorithm versus two stationary environments.

theorem Learning.IsAlgEnvSeq.klDiv_map_trajectory_compProd {𝓐 : Type u_2} {𝓨 : Type u_3} {m𝓐 : MeasurableSpace 𝓐} {m𝓨 : MeasurableSpace 𝓨} {Ω : Type u_4} {Ω' : Type u_5} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {P : MeasureTheory.Measure Ω} {P' : MeasureTheory.Measure Ω'} [MeasureTheory.IsProbabilityMeasure P] [MeasureTheory.IsProbabilityMeasure P'] {A : ℕ → Ω → 𝓐} {Y : ℕ → Ω → 𝓨} {A' : ℕ → Ω' → 𝓐} {Y' : ℕ → Ω' → 𝓨} {O : ℕ → Ω → Unit} {O' : ℕ → Ω' → Unit} {alg : Algorithm Unit 𝓐 𝓨} {κ κ' : ProbabilityTheory.Kernel 𝓐 𝓨} [ProbabilityTheory.IsMarkovKernel κ] [ProbabilityTheory.IsMarkovKernel κ'] (h : IsAlgEnvSeq O A Y alg (stationaryEnv κ) P) (h' : IsAlgEnvSeq O' A' Y' alg (stationaryEnv κ') P') :

Chain rule for trajectories of a single algorithm versus two stationary environments.

theorem Learning.IsAlgEnvSeq.klDiv_map_trajectory {𝓐 : Type u_2} {𝓨 : Type u_3} {m𝓐 : MeasurableSpace 𝓐} {m𝓨 : MeasurableSpace 𝓨} {Ω : Type u_4} {Ω' : Type u_5} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {P : MeasureTheory.Measure Ω} {P' : MeasureTheory.Measure Ω'} [MeasureTheory.IsProbabilityMeasure P] [MeasureTheory.IsProbabilityMeasure P'] {A : ℕ → Ω → 𝓐} {Y : ℕ → Ω → 𝓨} {A' : ℕ → Ω' → 𝓐} {Y' : ℕ → Ω' → 𝓨} {O : ℕ → Ω → Unit} {O' : ℕ → Ω' → Unit} {alg : Algorithm Unit 𝓐 𝓨} {κ κ' : ProbabilityTheory.Kernel 𝓐 𝓨} [ProbabilityTheory.IsMarkovKernel κ] [ProbabilityTheory.IsMarkovKernel κ'] [MeasurableSpace.CountablyGenerated 𝓨] (h : IsAlgEnvSeq O A Y alg (stationaryEnv κ) P) (h' : IsAlgEnvSeq O' A' Y' alg (stationaryEnv κ') P') :

Chain rule for trajectories of a single algorithm versus two stationary environments.