Finite empirical-variance foundations for PAC-Bayes #
This module isolates the deterministic variance objects used by finite PAC-Bayes empirical-Bernstein arguments:
- the population variance of a hypothesis loss under a finite PMF;
- the Bessel-corrected empirical variance of the observed losses;
- the exact ordered off-diagonal pairwise representation of that empirical variance; and
- elementary
[0, 1]bounds; and - unbiasedness under the explicit finite iid product sample law.
Proof strategy: finite-sum algebra proves the deterministic identities; a coordinate-swap equivalence proves the finite-IID marginal identity; finite-sum reordering then proves unbiasedness.
The ordered representation is the finite U-statistic form
(2 n (n - 1))⁻¹ ∑ᵢ ∑_{j ≠ i} (xᵢ - xⱼ)².
Equivalently, it is (n (n - 1))⁻¹ times the sum over unordered pairs. This
module does not prove an exponential-moment inequality, a confidence event, or
a PAC-Bayes empirical-Bernstein theorem. The object is per hypothesis; it is
not the variance of a posterior-averaged loss. Substantive sample-variance
results assume n ≥ 2.
The normalization follows Tolstikhin and Seldin (2013),
"PAC-Bayes-Empirical-Bernstein Inequality," equation (5). The ordered-pair
identity is the equivalent second-order U-statistic representation used in
the empirical-Bernstein literature; see also Maurer and Pontil (2009),
"Empirical Bernstein Bounds and Sample Variance Penalization."
Population variance of the loss of hypothesis i under a finite PMF.
Equations
- FormalSLT.PACBayes.FiniteEmpiricalVariance.finitePopulationVariance p ℓ i = ∑ z : Z, p z * (ℓ i z - FormalSLT.PACBayesFiniteProductMGF.finitePopulationRisk p ℓ i) ^ 2
Instances For
Bessel-corrected empirical variance of the losses observed in S.
The denominator is n - 1; substantive theorems below assume 2 ≤ n.
Equations
- FormalSLT.PACBayes.FiniteEmpiricalVariance.finiteEmpiricalVariance ℓ i S = FormalSLT.Statistics.ClassicalEstimation.sampleVarianceBessel fun (k : Fin n) => ℓ i (S k)
Instances For
Sum of squared differences over ordered, distinct sample-index pairs.
Equations
- FormalSLT.PACBayes.FiniteEmpiricalVariance.orderedOffDiagonalSquaredDifference x = ∑ k : Fin n, ∑ j ∈ Finset.univ.erase k, (x k - x j) ^ 2
Instances For
Ordered-pair realization of the empirical-variance U-statistic.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Population variance is nonnegative under a finite PMF.
Population variance is the second moment minus the squared population risk.
A finite [0,1]-valued loss has population risk in [0,1].
The population variance of a finite [0,1]-valued loss is at most 1/4.
The ordered off-diagonal squared-difference sum is twice n times the centered
sum of squares.
Exact source-facing pairwise identity for the finite empirical variance.
The ordered sum counts each unordered pair twice, which accounts for the
factor 2 in the denominator.
For samples whose observed losses lie in [0,1], empirical variance is at most
n / (n - 1) times empirical risk. This is the deterministic comparison used
in Tolstikhin--Seldin after their equation (7).
Finite iid expectation identities #
Two distinct coordinates of a finite iid product sample have the expected product marginal.
The expected independent-pair squared-difference kernel is the population variance.
For two distinct sample coordinates, the expected squared loss difference is twice the population variance.
The Bessel-corrected empirical loss variance is unbiased under the finite iid product sample law.