Replicable constraint solving by Moser–Tardos #
A learner sees a dataset S and must output an assignment avoiding every bad event A i, where
the variables are to be sampled from distributions P̂ S v estimated from the data. Running the
Moser–Tardos algorithm with samples drawn by correlated sampling from a shared seed makes the
output replicable: two runs on independent datasets, sharing the seed, give the same output
except with probability 4 ∑ v, E_{S, S'} d_TV(P̂ S v, P̂ S' v), plus the probability that a
dataset is not one on which the estimates satisfy the local-lemma hypothesis.
The replicability interface Cslib.MachineLearning.Replicable.Algorithm takes the shared seed
from a PMF, so the seed is finite here:
- The estimated distributions are grid distributions with a common denominator
L(Cslib.Probability.CorrelatedSampling.GridDist), for example empirical frequencies. Each table entry is sampled by the grid form of Holenstein's protocol (Cslib.Probability.CorrelatedSampling.gridSample) from its own uniform enumeration. - The run is budgeted: it reads only the first
B + 1samples of each variable, and outputs the current assignment if the rule has stopped afterBsteps andnone(a timeout) otherwise (budgetedOutput).
The algorithm is budgetedMoserTardos. Its disagreement bound
(disagreeProb_budgetedMoserTardos_le) needs the local-lemma hypothesis e p (d + 1) ≤ 1 for
the estimates of the datasets in a set good, and pays Pr[S ∉ good] for the others; it does not
depend on the budget, the number of events or the dependency degree. Two runs whose histories
agree through the budget give equal Option outputs, including a shared timeout none
(budgetedOutput_eq_of_not_diverge). A run whose history diverges from the other's can time out
on only one side, and that case is counted in the divergence probability. The budget enters
through the timeout probability: a single run times out with probability at most
|ι| / ((d + 1) (B + 1)) (seedTable_timeout_le). A rule that stops only when no event occurs
never outputs a bad assignment (budgetedOutput_eq_some), so the learner is accurate up to that
timeout probability (isAccurateOn_budgetedMoserTardos,
isAccurate_budgetedMoserTardos).
The statement and its proof route are original (cslib-frontier issue #6718).
Main definitions #
Cslib.MachineLearning.Replicable.budgetedOutput: the output of a run budgeted toBsteps.Cslib.MachineLearning.Replicable.BudgetSeed,Cslib.MachineLearning.Replicable.seedTable: the shared seed and the table it gives for a family of grid distributions.Cslib.MachineLearning.Replicable.budgetedMoserTardos: the replicable algorithm.Cslib.MachineLearning.Replicable.goodOutput: the outputs that are assignments avoiding every event.
Main results #
Cslib.MachineLearning.Replicable.budgetedOutput_eq_some: outputs avoid every event.Cslib.MachineLearning.Replicable.seedTable_disagree_le: for fixed estimatesPandQ, two runs sharing the seed disagree with probability at most4 ∑ v, d_TV(P v, Q v).Cslib.MachineLearning.Replicable.seedTable_timeout_le: a single budgeted run times out with probability at most|ι| / ((d + 1) (B + 1)).Cslib.MachineLearning.Replicable.isAccurateOn_budgetedMoserTardos,Cslib.MachineLearning.Replicable.isAccurate_budgetedMoserTardos: the learner outputs a good assignment except with the timeout probability (plusPr[S ∉ good]).Cslib.MachineLearning.Replicable.disagreeProb_budgetedMoserTardos_le: the replicability bound.
Implementation notes #
seedTable_disagree_le transfers the first-disagreement bound
(Cslib.Probability.MoserTardos.coupledTable_diverge_le_two_mul) from the infinite coupled table
to the finite seed, and seedTable_timeout_le transfers the Moser–Tardos resampling bound
(Cslib.Probability.MoserTardos.exists_measurable_ge_resamplings, with the symmetric weights of
Cslib.Probability.MoserTardos.lll_of_symm) followed by Markov's inequality. The budgeted outputs
depend only on the samples with index at most B, and the laws of those samples under the seed
and under the independent table are the same product (a private lemma).
No statement mentions a measurable structure: the hypotheses are stated with the product
distribution Cslib.Probability.PMF.pi, and the proofs equip each α v with the discrete
structure locally.
References #
The output of the run of historyRule r on the table T budgeted to B steps: the
current assignment if the rule has stopped after B steps, and none (a timeout) otherwise.
A rule that stops only when no event occurs outputs only assignments avoiding every event.
The budgeted output depends only on the entries (v, k) with k ≤ B.
Two coupled runs that do not diverge have the same budgeted output.
The table given by the seed σ for the grid distributions P: entry (v, k) is sampled from
P v by correlated sampling from the enumeration at (v, min k B). A run budgeted to B steps
reads only the entries with k ≤ B.
Replicable runs for fixed estimates (original). Let r be a non-anticipating rule that
only selects occurring events. Suppose every event has at most d neighbours in Γ and
probability at most p under the product of the P v, with e p (d + 1) ≤ 1. Then two runs
budgeted to B steps, one with P and one with Q, reading the tables of one uniformly random
seed, give different outputs with probability at most 4 ∑ v, d_TV(P v, Q v).
Timeouts are rare (original). Let r be a non-anticipating rule that only selects
occurring events. Suppose every event has at most d neighbours in Γ and probability at most
p under the product of the P v, with e p (d + 1) ≤ 1. Then a run budgeted to B steps on
the table of a uniformly random seed times out with probability at most
|ι| / ((d + 1) (B + 1)).
A timeout means B + 1 resamplings. By Moser–Tardos the expected number of resamplings of each
event is at most 1 / (d + 1) on the independent table, which the seed reproduces on the entries
the budgeted run reads; Markov's inequality gives the bound.
The budgeted Moser–Tardos learner. On the dataset S, it runs the rule historyRule r
for B steps on the table of the shared seed for the estimated grid distributions P̂ S, and
outputs the budgeted output: an assignment, or none on a timeout.
The outputs of budgetedMoserTardos that are assignments avoiding every event.
Accuracy of the budgeted learner (original). Let r be a non-anticipating rule that
only selects occurring events and stops only when no event occurs. Suppose that for every dataset
in good every event has at most d neighbours in Γ and probability at most p under the
product of the estimates P̂ S v, with e p (d + 1) ≤ 1. Then on an m-sample from D the
learner fails to output an assignment avoiding every event with probability at most
|ι| / ((d + 1) (B + 1)) plus the probability that the sample is not in good.
Strong accuracy of the budgeted learner (original). If the local-lemma hypothesis holds
for the estimates of every dataset, the learner outputs an assignment avoiding every event except
with probability at most |ι| / ((d + 1) (B + 1)), for every distribution of the data.
Replicable constraint solving (original). Let r be a non-anticipating rule that only
selects occurring events, and let the dataset S determine grid estimates P̂ S v of the
variables' distributions. Suppose that for every dataset in good every event has at most d
neighbours in Γ and probability at most p under the product of the P̂ S v, with
e p (d + 1) ≤ 1. Then two runs of budgetedMoserTardos on independent m-samples from D,
sharing the seed, disagree with probability
ρ ≤ 4 ∑ v, E_{S, S'} d_TV(P̂ S v, P̂ S' v) + Pr[S ∉ good], for every budget B. With
good = Set.univ the last term vanishes.