Randomized-threshold rounding rules #
This module formalizes the randomized-threshold and periodic grid rounding primitives from Impagliazzo–Lei–Pitassi–Sorrell [ILPS22]:
- Bounded interval threshold rounding:
thresholdRound a b N i xcompares a real statisticxagainst a discrete uniform grid thresholdthresholdValue a b N i ∈ [a, b)fori : Fin N, andcontinuousThresholdRound a b u xis its continuous counterpart foru ∈ [0, 1). Two inputsx₁, x₂disagree with probability at most|x₁ - x₂| / (b - a) + 1 / Ndiscretely, and with Lebesgue measure at most|x₁ - x₂| / (b - a)continuously. - Periodic grid rounding:
roundGrid w N i xsnaps an arbitrary realxto the midpoint of a randomly shifted interval of widthwwith discrete shifti / N(i : Fin N). Every rounded output lies withinw / 2ofx(abs_roundGrid_sub_le), and two inputsx₁, x₂land in different grid bins with probability at most|x₁ - x₂| / w + 1 / N(roundGrid_disagree_le, proved via Hermite's identityInt.sum_floor_add_div). The continuous counterpartcontinuousRoundGrid w u xhas disagreement Lebesgue measure at most|x₁ - x₂| / w. - Replicable rounding of concentrating estimators: any deterministic estimator
estthat concentrates withinδoftarget Dexcept with probabilityβbecomes both(w / 2 + δ, β)-accurate and(2 * δ / w + 1 / N + 2 * β)-replicable underroundGridProg.
Main definitions #
Cslib.MachineLearning.Replicable.thresholdValue,Cslib.MachineLearning.Replicable.thresholdRound,Cslib.MachineLearning.Replicable.thresholdProg: discrete shared-seed threshold rounding.Cslib.MachineLearning.Replicable.roundGridBin,Cslib.MachineLearning.Replicable.roundGrid,Cslib.MachineLearning.Replicable.roundGridProg: periodic shared-seed grid rounding.Cslib.MachineLearning.Replicable.continuousThresholdRound,Cslib.MachineLearning.Replicable.continuousRoundGridBin,Cslib.MachineLearning.Replicable.continuousRoundGrid: continuous[0, 1)rounding rules.
Main results #
Cslib.MachineLearning.Replicable.thresholdRound_disagree_le: discrete[a, b)threshold disagreement probability≤ |x₁ - x₂| / (b - a) + 1 / N.Cslib.MachineLearning.Replicable.abs_roundGrid_sub_le:|roundGrid w N i x - x| ≤ w / 2.Cslib.MachineLearning.Replicable.roundGrid_disagree_le: periodic grid rounding disagreement probability≤ |x₁ - x₂| / w + 1 / N.Cslib.MachineLearning.Replicable.volume_thresholdRound_ne_le,Cslib.MachineLearning.Replicable.volume_roundGrid_ne_le: continuous Lebesgue-measure rounding lemmas.Cslib.MachineLearning.Replicable.isAccurateFor_roundGridProg_of_concentrates,Cslib.MachineLearning.Replicable.isReplicableFor_roundGridProg_of_concentrates: turning any concentrating estimator into a replicable accurateProgram.
References #
- Impagliazzo, Lei, Pitassi, Sorrell (STOC 2022),
Reproducibility in Learning (paper PDF not directly inspected; rounding bounds and
MeasureTheory.volume/ProbCompformulations are formalized directly in Lean).
Continuous randomized-threshold boolean rounding on [a, b] using u ∈ [0, 1).
Continuous periodic grid bin index with width w and shift u ∈ [0, 1).
Continuous periodic grid rounding with width w and shift u ∈ [0, 1).
Deterministic discretization error of continuousRoundGrid: always within w / 2 of x.
Discrete randomized-threshold rounding lemma [ILPS22]: for any
a < b and [NeZero N], two real numbers x₁, x₂ thresholded against a shared uniform seed
i : Fin N on [a, b) disagree with probability at most |x₁ - x₂| / (b - a) + 1 / N.
Periodic grid rounding lemma [ILPS22]: for any w > 0 and
[NeZero N], two real numbers x₁, x₂ fall into different bins of roundGrid w N under a
uniform shared seed i : Fin N with probability at most |x₁ - x₂| / w + 1 / N.
Continuous randomized-threshold rounding lemma: for a < b and u ~ Uniform([0, 1)), the
disagreement measure is at most |x₁ - x₂| / (b - a).
Continuous periodic grid rounding lemma: for w > 0 and u ~ Uniform([0, 1)), the
disagreement measure of continuousRoundGrid w u is at most |x₁ - x₂| / w.
Accuracy of roundGridProg: whenever est S is within δ of target D except with
probability β, rounding to a periodic grid of width w preserves estimation within w / 2 + δ
with the same failure probability β.
Replicability of roundGridProg: if est S concentrates within δ of target D except with
probability β for every D ∈ 𝒟, then roundGridProg w N est is
(2 * δ / w + 1 / N + 2 * β)-replicable over 𝒟.