Documentation

CslibFrontier.Probability.HockeyStick

Hockey-stick divergence of discrete distributions #

For discrete distributions p, q : PMF α and a scale factor c : ℝ≥0∞, the hockey-stick divergence hockeyStick c p q = ∑' a, (p a - c * q a) is the total truncated excess of p over c · q. At c = 1 it is total variation distance (hockeyStick_one_le_iff_closeTo), and at c = exp ε it is the optimal additive slack δ for (ε, δ)-differential privacy (forall_toOuterMeasure_le_iff_hockeyStick_le, [DR14]).

Main definitions #

Main results #

References #

theorem Cslib.Probability.tsum_tsub_le_mul_rpow_tsum {α : Type u_1} {t : ℝ} (ht : 0 ≤ t) (ε' : ℝ) (p q : α → ENNReal) :
∑' (a : α), (p a - ENNReal.ofReal (Real.exp ε') * q a) ≤ ENNReal.ofReal (Real.exp (-(t * ε'))) * ∑' (a : α), p a * (p a / q a) ^ t

Markov conversion from power-ratio moments to truncated excess: for t ≥ 0 and any mass functions p, q : α → ℝ≥0∞, ∑' a, (p a - exp ε' · q a) ≤ exp (-t ε') · ∑' a, p a · (p a / q a) ^ t.

noncomputable def Cslib.Probability.PMF.hockeyStick {α : Type u_1} (c : ENNReal) (p q : PMF α) :

The hockey-stick divergence ∑' a, (p a - c * q a) of p from q at factor c.

theorem Cslib.Probability.PMF.hockeyStick_def {α : Type u_1} (c : ENNReal) (p q : PMF α) :
hockeyStick c p q = ∑' (a : α), (p a - c * q a)
theorem Cslib.Probability.PMF.hockeyStick_eq_sum {α : Type u_1} [Fintype α] (c : ENNReal) (p q : PMF α) :
hockeyStick c p q = ∑ a : α, (p a - c * q a)

On a finite type, the hockey-stick divergence is an ordinary finite sum.

theorem Cslib.Probability.PMF.hockeyStick_le_one {α : Type u_1} (c : ENNReal) (p q : PMF α) :

Every event S satisfies p(S) ≤ c · q(S) + hockeyStick c p q.

theorem Cslib.Probability.PMF.forall_toOuterMeasure_le_iff_hockeyStick_le {α : Type u_1} {c : ENNReal} (hc : c ≠ ⊤) (p q : PMF α) (δ : ENNReal) :
(∀ (S : Set α), p.toOuterMeasure S ≤ c * q.toOuterMeasure S + δ) ↔ hockeyStick c p q ≤ δ

For a finite factor c, the event bounds p(S) ≤ c · q(S) + δ hold for all events S if and only if hockeyStick c p q ≤ δ. The event {a | c · q a < p a} attains the excess.

theorem Cslib.Probability.PMF.hockeyStick_eq_zero_iff {α : Type u_1} (c : ENNReal) (p q : PMF α) :
hockeyStick c p q = 0 ↔ ∀ (a : α), p a ≤ c * q a

The hockey-stick divergence vanishes if and only if p is pointwise bounded by c · q.

theorem Cslib.Probability.PMF.hockeyStick_self {α : Type u_1} {c : ENNReal} (hc : 1 ≤ c) (p : PMF α) :
hockeyStick c p p = 0

For 1 ≤ c, a distribution has zero hockey-stick divergence from itself.

theorem Cslib.Probability.PMF.hockeyStick_anti {α : Type u_1} {c₁ c₂ : ENNReal} (hc : c₁ ≤ c₂) (p q : PMF α) :
hockeyStick c₂ p q ≤ hockeyStick c₁ p q

The hockey-stick divergence is antitone in the scale factor c.

At c = 1, the hockey-stick divergence characterizes statistical closeness (CloseTo).

theorem Cslib.Probability.PMF.hockeyStick_one_comm {α : Type u_1} (p q : PMF α) :

At c = 1, the hockey-stick divergence is symmetric.

theorem Cslib.Probability.PMF.tsum_mul_le_mul_tsum_mul_add_hockeyStick {α : Type u_1} (c : ENNReal) (p q : PMF α) {g : α → ENNReal} (hg : ∀ (a : α), g a ≤ 1) :
∑' (a : α), p a * g a ≤ c * ∑' (a : α), q a * g a + hockeyStick c p q

Expectations of a [0, 1]-valued function under p and q differ by at most the hockey-stick divergence: E_p[g] ≤ c · E_q[g] + hockeyStick c p q.

theorem Cslib.Probability.PMF.hockeyStick_bind_le {α : Type u_1} {β : Type u_2} (c : ENNReal) (p q : PMF α) (K : α → PMF β) :
hockeyStick c (p.bind K) (q.bind K) ≤ hockeyStick c p q

Data processing: applying a Markov kernel K cannot increase the hockey-stick divergence.

theorem Cslib.Probability.PMF.hockeyStick_map_le {α : Type u_1} {β : Type u_2} (c : ENNReal) (p q : PMF α) (f : α → β) :

Deterministic post-processing cannot increase the hockey-stick divergence.

theorem Cslib.Probability.PMF.hockeyStick_mul_le {α : Type u_1} (c₁ c₂ : ENNReal) (p q r : PMF α) :
hockeyStick (c₁ * c₂) p r ≤ hockeyStick c₁ p q + c₁ * hockeyStick c₂ q r

Multiplicative triangle inequality (group privacy step): comparing p to r at factor c₁ * c₂ is bounded by hockeyStick c₁ p q + c₁ * hockeyStick c₂ q r.

theorem Cslib.Probability.PMF.hockeyStick_bind_pair_le {α : Type u_1} {β : Type u_2} {c₁ c₂ : ENNReal} (hc₁ : c₁ ≠ ⊤) (hc₂ : c₂ ≠ ⊤) (p q : PMF α) {K L : α → PMF β} {δ₂ : ENNReal} (hKL : ∀ a ∈ p.support, hockeyStick c₂ (K a) (L a) ≤ δ₂) :
hockeyStick (c₁ * c₂) (p.bind fun (a : α) => (K a).bind fun (b : β) => PMF.pure (a, b)) (q.bind fun (a : α) => (L a).bind fun (b : β) => PMF.pure (a, b)) ≤ hockeyStick c₁ p q + δ₂

Adaptive two-stage composition for hockey-stick divergence: if K a and L a have hockey-stick divergence at most δ₂ at factor c₂ for every a ∈ p.support, the joint pairs (a, b) have hockey-stick divergence at most hockeyStick c₁ p q + δ₂ at factor c₁ * c₂.

theorem Cslib.Probability.PMF.hockeyStick_le_mul_rpow_tsum {α : Type u_1} {t : ℝ} (ht : 0 ≤ t) (ε' : ℝ) (p q : PMF α) :
hockeyStick (ENNReal.ofReal (Real.exp ε')) p q ≤ ENNReal.ofReal (Real.exp (-(t * ε'))) * ∑' (a : α), p a * (p a / q a) ^ t

Markov conversion for PMFs: hockeyStick (exp ε') p q is bounded by exp (-t ε') times the power-ratio moment ∑' a, p a · (p a / q a) ^ t.

Sub-probability decomposition #

theorem Cslib.Probability.PMF.exists_subprob_of_hockeyStick_le {α : Type u_1} (P Q : PMF α) {c : ENNReal} (hc : 1 ≤ c) {δ : ENNReal} (hPQ : hockeyStick c P Q ≤ δ) (hQP : hockeyStick c Q P ≤ δ) :
∃ (p : α → ENNReal) (q : α → ENNReal), (∀ (a : α), p a ≤ P a) ∧ (∀ (a : α), q a ≤ Q a) ∧ (∀ (a : α), p a ≤ c * q a) ∧ (∀ (a : α), q a ≤ c * p a) ∧ ∑' (a : α), p a ≤ ∑' (a : α), q a ∧ 1 ≤ ∑' (a : α), p a + δ

Sub-probability decomposition: if both hockey-stick divergences of P and Q at factor c ≥ 1 are at most δ, there exist sub-probability weights p ≤ P and q ≤ Q whose likelihood ratio lies in [c⁻¹, c], with ∑' p ≤ ∑' q and 1 ≤ ∑' p + δ.