Binary relative entropy #
The binary relative entropy binaryKL q p = q log (q / p) + (1 - q) log ((1 - q) / (1 - p)) of
Bernoulli parameters q, p ∈ [0, 1], in nats, written with Mathlib's klFun as
p klFun (q / p) + (1 - p) klFun ((1 - q) / (1 - p)).
At p ∈ {0, 1} with q ≠ p the true divergence is infinite; binaryKL takes finite junk values
there, so Jensen's inequality is stated for pairs with q = p wherever p ∈ {0, 1}.
Main definitions #
Cslib.Probability.binaryKL: the binary relative entropy.
Main results #
Cslib.Probability.binaryKL_nonneg,Cslib.Probability.binaryKL_self: nonnegativity and vanishing on the diagonal.Cslib.Probability.binaryKL_eq_mul_log: the closed form forp ∈ (0, 1).Cslib.Probability.convexOn_binaryKL,Cslib.Probability.convexOn_exp_mul_binaryKL: for fixedp ∈ [0, 1],binaryKL · pandexp (t binaryKL · p)witht ≥ 0are convex on[0, 1].Cslib.Probability.choose_mul_pow_mul_exp_binaryKL_le_one: a binomial probability is at mostexp (-m binaryKL (k / m) p).Cslib.Probability.mul_klFun_integral_div_integral_le: the log-sum inequality in integral form.Cslib.Probability.binaryKL_integral_le_integral: Jensen's inequality forbinaryKL.Cslib.Probability.two_mul_sq_le_binaryKL: Bernoulli Pinsker inequality2 (q - p)² ≤ binaryKL q p.Cslib.Probability.sub_sq_div_two_mul_le_binaryKL: quadratic empirical-Bernstein lower bound(p - q)² / (2 p) ≤ binaryKL q p.Cslib.Probability.abs_sub_le_sqrt_of_binaryKL_le,Cslib.Probability.le_add_add_sqrt_of_binaryKL_le,Cslib.Probability.le_add_sqrt_two_mul_add_two_mul_of_binaryKL_le,Cslib.Probability.le_one_sub_exp_neg_of_binaryKL_zero_le: analytical inversions ofbinaryKL q p ≤ c.
References #
The binary relative entropy q log (q / p) + (1 - q) log ((1 - q) / (1 - p)) of Bernoulli
parameters, in nats.
For fixed p, binaryKL · p is continuous.
A binomial probability is at most exp (-m binaryKL (k / m) p):
C(m, k) p ^ k (1 - p) ^ (m - k) exp (m binaryKL (k / m) p) ≤ 1 for p ∈ [0, 1] and k ≤ m.
The left side is the probability of k successes in m trials of success probability k / m.
The log-sum inequality [CoverThomas2006, Theorem 2.7.1] in integral form: Jensen for the
perspective of klFun: for nonnegative integrable a and b with a = 0 wherever b = 0,
(∫ b) klFun ((∫ a) / ∫ b) ≤ ∫ b klFun (a / b).
Jensen's inequality for the binary relative entropy: for q, p with values in [0, 1]
under a probability measure, with q = 0 wherever p = 0 and q = 1 wherever p = 1,
binaryKL (∫ q) (∫ p) ≤ ∫ binaryKL q p. Without the conditions on p = 0 and p = 1, where the
true divergence is infinite unless q = p, the junk values of binaryKL are not convex.
Quadratic empirical-Bernstein lower bound on binaryKL: for 0 ≤ q ≤ p < 1 (0 < p),
(p - q) ^ 2 / (2 * p) ≤ binaryKL q p. Sharp for small q (O(p) at q = 0), yielding the
fast-rate PAC-Bayes inversion [TS13] (locator unverified).