Bayes-mixture redundancy #
The rate (3) below is the classical Bayes-mixture redundancy bound (Hutter 2001, 2005; in the discrete-class concentration form, Lattimore–Hutter–Sunehag 2013), here proved directly in the realizable-deterministic case — no Grünwald–Mehta import. The redundancy argument:
P̄(o₁:ₙ) = Σ_i 2^{−K(i)} L_i(o₁:ₙ),L_i = ∏_t q_i(oₜ | o_{<t}). Then (1)−log P̄(o₁:ₙ) ≤ K(R)·ln 2(mixture ≥ theR-term,L_R = 1deterministically); (2) telescoping−log P̄ = Σ_t −log P̄(oₜ | o_{<t}); (3) per step−log P̄(oₜ | o_{<t}) ≥ 2·D_H²(δ_{oₜ}, P̄(· | o_{<t})); (4) sum + average ⇒avg_t D_H²_t ≤ K(R)·ln 2 / (2n).
This file proves the two elementary core lemmas (steps (2) and (4) are assembled below):
- (A) the calculus inequality of step (3),
2·(1 − √a) ≤ −log a, and the squared-Hellinger-to-point-mass identityD_H²(δ_o, q) = 1 − √(q o)— together giving step (3):−log (q o) ≥ 2·(1 − √(q o)) = 2·D_H²(δ_o, q). - (B) the mixture-regret bound of step (1):
w_R · L_R ≤ P̄(a single nonneg term of the mixture), its log form, and the realizable / Kolmogorov-weight specialisations.
Model (stated explicitly) #
A mixture over a finite hypothesis class
ι:Pbar L w = Σ_i w i · L i, with per-hypothesis likelihoodL i ≥ 0and prior weightw i ≥ 0. The intended reading:w i = 2^{−K(i)}(a Kraft sub-distribution,CodeLayer/PriorNormalization.lean) andL ithe realised likelihood of the data under hypothesisi;Ris the true rule,L R = 1in the realizable-deterministic case.Squared Hellinger of two finite "distributions"
p, q : α → ℝ:sqHellinger p q = (1/2) Σ_x (√(p x) − √(q x))². (δ_ois the point massx ↦ if x = o then 1 else 0.)(D) the error times: the steps at which the mixture's one-step squared Hellinger error exceeds a tolerance
ε, and a bound on their number that is free of the horizon. "Error" is the word of the concentration bounds for Bayesian sequence prediction (Lattimore–Hutter–Sunehag 2013), whose sum of expected squared errors over the horizon this bound counts against.
Everything here is elementary (Mathlib calculus + Finset); no sorry. The deep Grünwald–Mehta
Theorem 22 is not used — this is the realizable-deterministic route.
(A) Log-vs-Hellinger inequality and the point-mass identity (step 3) #
Log ≥ twice the Hellinger affinity gap. 2·(1 − √a) ≤ −log a for 0 < a ≤ 1. (In fact it
holds for all a > 0; a ≤ 1 records the intended domain — a = q o a probability.) Decisive
step: substitute a = (√a)², so −log a = −2·log √a, and log √a ≤ √a − 1
(Real.log_le_sub_one_of_pos) gives −log √a ≥ 1 − √a.
Squared Hellinger distance is nonnegative (a half-sum of squares); no hypothesis on p, q.
Point-mass identity. For a pmf q (q ≥ 0, Σ q = 1) and a point o, the squared
Hellinger distance to the point mass δ_o is D_H²(δ_o, q) = 1 − √(q o). Combined with
log_le_hellinger this is step (3): −log (q o) ≥ 2·(1 − √(q o)) = 2·D_H²(δ_o, q).
Step (3), assembled. For a pmf q and a realised symbol o, the prequential log-loss
dominates twice the squared Hellinger distance to the point mass:
2·D_H²(δ_o, q) ≤ −log (q o) (when 0 < q o).
(B) Bayes-mixture regret (step 1) #
The (sub-)mixture likelihood P̄ = Σ_i w i · L i over a finite hypothesis class.
Equations
- BayesRedundancy.Pbar L w = ∑ i : ι, w i * L i
Instances For
Mixture regret (log form). −log P̄ ≤ −log w_R − log L_R. (Note: the all-nonneg hypotheses
hL, hw are needed — mixture_regret requires every term ≥ 0 for P̄ ≥ w_R·L_R.)
Realizable-deterministic specialisation. With L_R = 1 (the true rule predicts the data
with likelihood 1), the regret is −log P̄ ≤ −log w_R.
Kolmogorov-weight specialisation (step 1, final form). With the prior weight w_R = 2^{−k}
(k = K(R), a Kraft sub-distribution) and L_R = 1, the mixture regret is the codelength bound
−log P̄ ≤ k · log 2 = K(R) · ln 2.
(C) Prequential telescoping + averaging ⇒ the Bayes-mixture redundancy rate (eq. 3) (steps #
2 + 4)
The realizable-deterministic route to rate (3), assembling steps 1 and 3.
Prequential model (stated precisely) #
- An observation sequence
ω : ℕ → A(only the firstnsymbols matter);Aa finite alphabet. - A finite class
ιof hypotheses with prior weightsw : ι → ℝ(w ≥ 0,∑ w = 1; intendedw R = 2^{−K(R)}, a normalised Kraft prior). - Each hypothesis's conditional next-symbol pmf
q : ι → ℕ → A → ℝ:q i t xisi's probability of symbolxat stept— the historyω_{<t}is carried by the time indext(q i t ·is a genuine pmf:q ≥ 0,∑ₓ q i t x = 1). This curries the prefix intot, avoidingFin-index bookkeeping. - Prefix likelihood
Lik i t = ∏_{s<t} q i s (ω s), mixture prefix massPbarₚ t = ∑ᵢ w i · Lik i t, conditional predictivecondPred t x = (∑ᵢ w i · Lik i t · q i t x) / Pbarₚ t. - Realizable-deterministic:
q R s (ω s) = 1for alls(the true rule predicts the realised symbol with certainty), soLik R t = 1andPbarₚ t ≥ w R > 0.
What is proved (no sorry) #
telescope (step 2): −log Pbarₚ n = ∑_{t<n} −log condPred t (ω t) (log-ratios telescope,
Pbarₚ 0 = ∑ w = 1); cumulative_hellinger and average_hellinger_rate (step 4): combining step 3
per t with step 1, ∑_{t<n} D_H²_t ≤ K(R)·ln2 / 2, hence some step has D_H²_t ≤ K(R)·ln2 / (2n)
— rate (3), proved, not assumed.
Prefix likelihood L_i(t) = ∏_{s<t} q_i(ω_s | ω_{<s}).
Equations
- BayesRedundancy.Lik q ω i t = ∏ s ∈ Finset.range t, q i s (ω s)
Instances For
Mixture prefix mass P̄(t) = ∑_i w_i L_i(t).
Equations
- BayesRedundancy.Pbarₚ q w ω t = ∑ i : ι, w i * BayesRedundancy.Lik q ω i t
Instances For
Conditional predictive pmf cond_t(x) = [∑_i w_i L_i(t) q_i(x)] / P̄(t).
Equations
- BayesRedundancy.condPred q w ω t x = (∑ i : ι, w i * BayesRedundancy.Lik q ω i t * q i t x) / BayesRedundancy.Pbarₚ q w ω t
Instances For
Step 2 — telescoping. −log P̄(n) = ∑_{t<n} −log cond_t(ω_t). The per-step log-ratios
log cond_t(ω_t) = log P̄(t+1) − log P̄(t) telescope; P̄(0) = ∑ w = 1 normalises.
Step 4 — cumulative rate. Combining step 3 (2·D_H²_t ≤ −log cond_t(ω_t)) per step with the
telescope and step 1 (−log P̄(n) ≤ K(R)·ln2), the cumulative squared Hellinger is bounded:
∑_{t<n} D_H²(δ_{ω_t}, cond_t) ≤ K(R)·ln2 / 2. This is the Bayes-mixture redundancy rate (eq. 3),
proved.
Step 4 — averaged rate (3). Some step has small squared Hellinger:
∃ t < n, D_H²(δ_{ω_t}, cond_t) ≤ K(R)·ln2 / (2n) (a minimal term is below the average).
(D) Error times: an n-free ceiling on the number of high-error steps #
A pigeonhole on top of the cumulative bound. Since the total squared Hellinger error over the
first n steps is at most K(R)·ln2 / 2 — a quantity that does not grow with n — the steps at
which the predictor errs by more than a fixed ε cannot be many: there are fewer than
K(R)·ln2 / (2ε) of them, uniformly in n. Beyond that finite budget of error times the
mixture predicts within ε forever after; the exceptional steps may, however, occur anywhere in
time.
The bound carries no separation hypothesis — that is its entire point. On hypothesis classes
where per-step separation is vacuous, and a chronological discovery rate is provably unavailable
(no bound of the form "after step T all steps are good"), this counting statement is what
survives: the error times are budgeted, but not scheduled.
The error times: the steps t < n at which the mixture's one-step squared Hellinger error
against the realised symbol exceeds ε.
Equations
- BayesRedundancy.errorTimes q w ω ε n = {t ∈ Finset.range n | ε < BayesRedundancy.sqHellinger (fun (x : A) => if x = ω t then 1 else 0) (BayesRedundancy.condPred q w ω t)}
Instances For
Bounded number of error times — robust form. The number of steps at
which the one-step squared Hellinger error exceeds ε, times ε, is at most the description length
K(R)·ln2 / 2: |{t < n : D_H²ₜ > ε}| · ε ≤ K(R)·ln2 / 2.
The right-hand side is free of n, so the count is bounded uniformly in the horizon. Proof: every
term indexed by an error time exceeds ε (pigeonhole), the omitted terms are nonnegative
(sqHellinger_nonneg), and the total is bounded by the cumulative redundancy bound
(step (4)). No hypothesis on ε, and — crucially — no separation hypothesis.
Bounded number of error times — quantitative form. For ε > 0,
|{t < n : D_H²(δ_{ωₜ}, condₜ) > ε}| ≤ K(R)·ln2 / (2ε),
uniformly in n. The predictor's stock of ε-error times is finite and paid for by the description
length of the true rule alone; nothing is asserted about when they occur. Carries no separation
hypothesis.
Bounded number of error times — strict form. For ε > 0 and a true
rule of positive description length k = K(R) > 0, the count is strictly below the budget:
|{t < n : D_H²(δ_{ωₜ}, condₜ) > ε}| < K(R)·ln2 / (2ε),
uniformly in n. Strictness comes from the defining inequality of the error times being strict when
the set is nonempty; when it is empty the count is 0, below the positive right-hand side. Carries
no separation hypothesis.
Axiom audit #
Each guard fails lake build if the theorem's axiom set ever drifts from the standard
[propext, Classical.choice, Quot.sound].