Documentation

CslibFrontier.Probability.Renyi

Rényi moments and Rényi divergence for discrete distributions #

For nonnegative weight functions p, q : X → ℝ≥0∞ and order α : ℝ, the Rényi moment renyiMoment α p q = ∑' x, p x * (p x / q x) ^ (α - 1) is the power-ratio moment E_{x ~ p}[(p x / q x) ^ (α - 1)] (equivalently exp ((α - 1) D_α(p ‖ q)) for probability distributions when 1 < α). Writing the summand as p x * (p x / q x) ^ (α - 1) rather than q x * (p x / q x) ^ α ensures that for 1 < α, any off-support atom (p x ≠ 0 and q x = 0) contributes p x * ⊤ = ⊤ instead of vanishing under 0 * ⊤ = 0.

For discrete probability distributions p, q : PMF X and 1 < α, PMF.renyiDiv α p q : ℝ≥0∞ is the Rényi divergence D_α(p ‖ q) = log (renyiMoment α p q) / (α - 1) in natural logarithms [Renyi1961, §3, eq. (3.3), p. 554; Mironov2017, Definition 3] (where [Ren61] states the finite positive-reference formula in log₂), taking the value ⊤ when renyiMoment α p q = ⊤ (matching InformationTheory.klDiv). InformationTheory.klDiv is a separate definition in CslibFrontier.Probability.RelativeEntropy; this module covers finite orders 1 < α and supplies neither an α → 1 limit theorem nor an α = ∞ max-divergence endpoint. Weighted AM–GM (Real.geom_mean_le_arith_mean2_weighted) yields joint convexity / sub-additivity of (u, v) ↦ u * (u / v) ^ (α - 1) on arbitrary countable support, giving both nonnegativity (1 ≤ renyiMoment α p q, [Mironov2017, Appendix A]) and the data-processing inequality under Markov kernels (renyiMoment_bind_le, renyiDiv_bind_le, [Mironov2017, Section III]) without [Fintype] or [MeasurableSpace] hypotheses.

Main definitions #

Main results #

References #

noncomputable def Cslib.Probability.renyiMoment {X : Type u_1} (α : ℝ) (p q : X → ENNReal) :

The order-α Rényi power-ratio moment ∑' x, p x * (p x / q x) ^ (α - 1) of nonnegative weight functions p, q : X → ℝ≥0∞ (allowing sub-probability weights as well as PMFs).

theorem Cslib.Probability.tsum_tsub_le_renyiMoment {X : Type u_1} {α : ℝ} (hα : 1 ≤ α) (ε' : ℝ) (p q : X → ENNReal) :
∑' (x : X), (p x - ENNReal.ofReal (Real.exp ε') * q x) ≤ ENNReal.ofReal (Real.exp (-((α - 1) * ε'))) * renyiMoment α p q

Markov's inequality from renyiMoment to truncated excess: for 1 ≤ α and any mass functions p, q : X → ℝ≥0∞, ∑' x, (p x - exp ε' · q x) ≤ exp (-(α - 1) ε') · renyiMoment α p q.

theorem Cslib.Probability.renyiMoment_comp_of_injective {X : Type u_1} {Y : Type u_2} {f : X → Y} (hf : Function.Injective f) (α : ℝ) {p q : Y → ENNReal} (hp : ∀ y ∉ Set.range f, p y = 0) :
renyiMoment α p q = renyiMoment α (p ∘ f) (q ∘ f)

Reindexing renyiMoment along an injective map f : X → Y when p vanishes outside Set.range f.

theorem Cslib.Probability.renyiMoment_mul_prod {X : Type u_1} {Y : Type u_2} {α : ℝ} (hα : 1 ≤ α) {p₁ q₁ : X → ENNReal} {p₂ q₂ : X → Y → ENNReal} (hq₁ : ∀ (x : X), q₁ x ≠ ⊤) (hq₂ : ∀ (x : X) (y : Y), q₂ x y ≠ ⊤) :
(renyiMoment α (fun (z : X × Y) => p₁ z.1 * p₂ z.1 z.2) fun (z : X × Y) => q₁ z.1 * q₂ z.1 z.2) = ∑' (x : X), p₁ x * (p₁ x / q₁ x) ^ (α - 1) * renyiMoment α (p₂ x) (q₂ x)

Conditional product factorization of renyiMoment on X × Y: for 1 ≤ α and finite denominator weights q₁, q₂, the Rényi moment of (x, y) ↦ p₁ x * p₂ x y against (x, y) ↦ q₁ x * q₂ x y factors through the conditional moments renyiMoment α (p₂ x) (q₂ x).

noncomputable def Cslib.Probability.PMF.renyiDiv {X : Type u_1} (α : ℝ) (p q : PMF X) :

The Rényi divergence D_α(p ‖ q) = log (renyiMoment α p q) / (α - 1) of discrete distributions p, q : PMF X for orders 1 < α, valued in ℝ≥0∞ (equal to ⊤ when renyiMoment α p q = ⊤) [Renyi1961, §3, eq. (3.3), p. 554; Mironov2017, Definition 3].

This finite-order formula applies to 1 < α: at α = 1, renyiMoment 1 p q = 1 and division by α - 1 = 0 evaluates to 0, whereas InformationTheory.klDiv in CslibFrontier.Probability.RelativeEntropy is a separate Kullback–Leibler definition (no α → 1 limit theorem or α = ∞ max-divergence endpoint is proved here).

@[simp]
theorem Cslib.Probability.PMF.renyiDiv_eq_top_iff {X : Type u_1} (α : ℝ) (p q : PMF X) :
renyiDiv α p q = ⊤ ↔ renyiMoment α ⇑p ⇑q = ⊤

renyiDiv α p q is infinite if and only if renyiMoment α p q is infinite.

theorem Cslib.Probability.PMF.renyiDiv_of_ne_top {X : Type u_1} {α : ℝ} {p q : PMF X} (h : renyiMoment α ⇑p ⇑q ≠ ⊤) :
renyiDiv α p q = ENNReal.ofReal (Real.log (renyiMoment α ⇑p ⇑q).toReal / (α - 1))

Value of renyiDiv α p q when renyiMoment α p q ≠ ⊤.

theorem Cslib.Probability.PMF.one_le_renyiMoment {X : Type u_1} {α : ℝ} (hα : 1 < α) (p q : PMF X) :
1 ≤ renyiMoment α ⇑p ⇑q

Nonnegativity of Rényi divergence (moment form) [Mironov2017, Appendix A]: for 1 < α and any p, q : PMF X, 1 ≤ renyiMoment α p q.

@[simp]
theorem Cslib.Probability.PMF.renyiDiv_self {X : Type u_1} (α : ℝ) (p : PMF X) :
renyiDiv α p p = 0

A distribution has zero Rényi divergence from itself.

theorem Cslib.Probability.PMF.renyiDiv_le_ofReal_iff {X : Type u_1} {α ε : ℝ} (hα : 1 < α) (p q : PMF X) (hε : 0 ≤ ε) :
renyiDiv α p q ≤ ENNReal.ofReal ε ↔ renyiMoment α ⇑p ⇑q ≤ ENNReal.ofReal (Real.exp ((α - 1) * ε))

Finite-bound characterization of Rényi divergence: for 1 < α and 0 ≤ ε, renyiDiv α p q ≤ ofReal ε holds iff renyiMoment α p q ≤ ofReal (exp ((α - 1) * ε)).

theorem Cslib.Probability.PMF.renyiMoment_bind_le {X : Type u_1} {Y : Type u_2} {α : ℝ} (hα : 1 ≤ α) (p q : PMF X) (K : X → PMF Y) :
renyiMoment α ⇑(p.bind K) ⇑(q.bind K) ≤ renyiMoment α ⇑p ⇑q

Data-processing inequality for renyiMoment [Mironov2017, Section III]: for 1 ≤ α, applying a Markov kernel K : X → PMF Y cannot increase renyiMoment α.

theorem Cslib.Probability.PMF.renyiDiv_bind_le {X : Type u_1} {Y : Type u_2} {α : ℝ} (hα : 1 < α) (p q : PMF X) (K : X → PMF Y) :
renyiDiv α (p.bind K) (q.bind K) ≤ renyiDiv α p q

Data-processing inequality for Rényi divergence [Mironov2017, Section III]: for 1 < α, applying a Markov kernel K : X → PMF Y cannot increase renyiDiv α.

theorem Cslib.Probability.PMF.renyiDiv_map_le {X : Type u_1} {Y : Type u_2} {α : ℝ} (hα : 1 < α) (p q : PMF X) (f : X → Y) :
renyiDiv α (PMF.map f p) (PMF.map f q) ≤ renyiDiv α p q

Deterministic post-processing cannot increase Rényi divergence [Mironov2017, Section III].

theorem Cslib.Probability.PMF.renyiDiv_bind_pair_le {X : Type u_1} {Y : Type u_2} {α : ℝ} (hα : 1 < α) (p q : PMF X) {K L : X → PMF Y} {B : ENNReal} (hKL : ∀ x ∈ p.support, renyiDiv α (K x) (L x) ≤ B) :
renyiDiv α (p.bind fun (x : X) => (K x).bind fun (y : Y) => PMF.pure (x, y)) (q.bind fun (x : X) => (L x).bind fun (y : Y) => PMF.pure (x, y)) ≤ renyiDiv α p q + B

Adaptive sequential composition for Rényi divergence [Mironov2017, Proposition 1]: if K x and L x have Rényi divergence at most B for every x ∈ p.support, then the joint distributions (x, y) have Rényi divergence at most renyiDiv α p q + B.

theorem Cslib.Probability.PMF.hockeyStick_le_of_renyiDiv_le {X : Type u_1} {α ε δ : ℝ} (hα : 1 < α) (hε : 0 ≤ ε) (hδ : 0 < δ) {p q : PMF X} (h : renyiDiv α p q ≤ ENNReal.ofReal ε) :

Conversion from Rényi divergence to hockey-stick divergence [Mironov2017, Proposition 3]: if 1 < α, 0 ≤ ε, 0 < δ, and renyiDiv α p q ≤ ofReal ε, then hockeyStick (exp (ε + log (1 / δ) / (α - 1))) p q ≤ ofReal δ.