Sharp bounded-differences (McDiarmid) inequality #
The sharp McDiarmid bound carries the constant 2 in the exponent,
exp (-2 t^2 / ∑ c_i^2), four times tighter than the Azuma constant
exp (-t^2 / (2 ∑ c_i^2)). The factor of 4 comes from the per-increment
sub-Gaussian variance proxy: the sharp proxy is (c_i / 2)^2 (range c_i),
whereas the Azuma proxy is c_i^2 (a symmetric bound |Δ_i| ≤ c_i, range
2 c_i).
Relationship to the existing development. FormalSLT/Azuma/ proves both the
Azuma-constant bounded-differences inequality
(FormalSLT.Azuma.ExposureMartingale.hasBoundedDifferences_tail_azuma) and the
sharp McDiarmid-constant version
(FormalSLT.Azuma.ExposureMartingale.hasBoundedDifferences_tail_sharp). The
sharp route feeds the exposure-martingale increments into mathlib's conditional
Azuma-Hoeffding engine
ProbabilityTheory.measure_sum_ge_le_of_hasCondSubgaussianMGF with the
per-increment proxy (‖c_k‖₊ / 2)^2, obtained from the conditional range-width
kernel theorem in FormalSLT.Azuma.ExposureMartingale.
What this file adds:
mcdiarmid_additive_independent- the sharp constant2for the additive, independent case. For a sum of independent variables each supported in[a_i, b_i], the per-coordinate range is directlyb_i - a_i(no conditioning is needed), so the sharp proxy((b_i - a_i)/2)^2is available from mathlib'shasSubgaussianMGF_of_mem_Icc, and the bound is sharp. The general exposure-martingale theorem above does not give this constant.mcdiarmid_of_hasBoundedDifferences_sharp- the general product-measure bounded-differences theorem with the sharp McDiarmid constant.mcdiarmid_of_hasBoundedDifferences_sharp_lower- the matching lower-tail theorem, obtained by applying the upper-tail theorem to-f.mcdiarmid_twoSided_of_hasBoundedDifferences_sharp- the two-sided textbook bounded-differences theorem for|f - E[f]|over a homogeneous product measure.sharp_mcdiarmid_of_doob_increments- an abstract reduction recording that given Doob increments that are conditionally sub-Gaussian with the sharp proxy(c_i / 2)^2, the sharp tail bound follows from the same engine. It pinpoints the exact hypothesis a sharpened general theorem must supply.
Sharp McDiarmid, abstract reduction form.
Let g be a centered statistic that decomposes as the sum of a Doob martingale
difference sequence Y adapted to a filtration ℱ, where each increment is
conditionally sub-Gaussian with the sharp variance proxy (c i / 2) ^ 2
(the proxy of an increment of conditional range c i). Then g satisfies the
sharp upper-tail bound
μ {ω | t ≤ g ω} ≤ exp (-2 t^2 / ∑ c_i^2).
The sharp constant 2 is produced by mathlib's conditional Azuma-Hoeffding
engine when fed the proxies (c_i / 2) ^ 2; this lemma performs that reduction
and the exponent bookkeeping. It records exactly the hypothesis a sharpened
general theorem must establish: the existing
FormalSLT.Azuma.ExposureMartingale.exposureIncrement_hasCondSubgaussianMGF
supplies its increments with the Azuma proxy ‖c_k‖₊^2, not (c_k / 2)^2, which
is why the assembled hasBoundedDifferences_tail_azuma lands at the Azuma
constant. See docs/SharpMcDiarmid.md.
Sharp McDiarmid bounded-differences inequality over a product measure.
If f : (Fin n → Z) → ℝ changes by at most c k when coordinate k is
altered, with nonnegative widths c k, then its upper tail under the
homogeneous product measure satisfies the sharp McDiarmid bound
μⁿ {S | E[f] + ε ≤ f S} ≤ exp (-2 * ε^2 / ∑ k, c k ^ 2).
The proof is routed through the exposure martingale and the checked conditional range-width theorem for its increments.
Lower-tail form of the sharp product-measure bounded-differences theorem.
This is the upper-tail theorem applied to -f; the bounded-differences widths
are unchanged by negation.
Two-sided sharp McDiarmid bounded-differences inequality.
For an arbitrary function on a homogeneous product space whose coordinate
sensitivity is bounded by c k, the centered absolute deviation has the textbook
Boucheron-Lugosi-Massart/McDiarmid tail
P(|f(S) - E[f]| >= ε) <= 2 * exp(-2 * ε^2 / sum_k c_k^2).
The proof combines the sharp upper-tail wrapper with the lower-tail wrapper above and applies the finite union bound for the two events.
McDiarmid bounded-differences inequality, additive independent case.
For an additive statistic ∑ i ∈ s, X i of independent random variables with
each X i supported almost surely in [a i, b i], McDiarmid's bounded-
differences inequality coincides with Hoeffding's inequality for sums of
independent sub-Gaussian variables: the bounded difference in coordinate i is
exactly b i - a i, and the centered statistic obeys the sharp tail bound
exp (-2 t^2 / ∑ (b_i - a_i)^2).
This is the special case exercised by the standard test instances (c_i = 1,
c_i = 1/n). The genuinely non-additive bounded-differences case (arbitrary f
over a product measure) is proved by
mcdiarmid_of_hasBoundedDifferences_sharp, using the exposure-martingale
kernel route.