Documentation

CslibFrontier.MachineLearning.UniformLearning.NisanWigderson

Single-run query-count step toward Nisan–Wigderson reconstruction learning #

This module formalizes one unboosted run of the Nisan–Wigderson reconstruction as an uncosted membership-query learner, as a query-count and nonuniform-hypothesis-size step toward [Carmosino, Impagliazzo, Kabanets and Kolokolova, Theorem 2.11, p. 10:9] [CIKK16] (after [NW94]). It is not Theorem 2.11 itself: it analyzes only a single run without confidence boosting, and the learner's poly(L) running time is not certified (the runtime certificate remains open on #798).

Let test distinguish the Nisan–Wigderson generator built from a design D and a function f on n bits. With its random choices fixed by a trial t, the reconstruction guesses f from the values of f at the at most m 2 ^ a queries of the trial (Cslib.Crypto.PRG.NisanWigderson.trialPoints), so a learner with membership queries can run it: Cslib.MachineLearning.UniformLearning.nwLearner D test queries these points on the seed t and outputs the guess (Cslib.MachineLearning.UniformLearning.eval_nwLearner). It makes at most m 2 ^ a queries (Cslib.MachineLearning.UniformLearning.nwLearner_queriesAtMost), and every hypothesis it outputs has De Morgan circuit complexity at most that of the test plus m (2 ^ a (2 a + 3) + 1) + 1 (Cslib.MachineLearning.UniformLearning.complexity_eval_nwLearner_le).

If test accepts outputs of the generator with probability at least ε more than uniform strings, a uniformly random seed gives a hypothesis of error at most 1 / 2 - ε / (2 m) with probability at least ε / (2 m) (Cslib.MachineLearning.UniformLearning.div_two_mul_le_dens_uniformError_nwLearner_le, Cslib.MachineLearning.UniformLearning.nwLearner_learns). In particular, a test accepting a δ fraction of all strings but no output of the generator yields a single-run weak learner for f through its negation (Cslib.MachineLearning.UniformLearning.nwLearner_learns_of_dens). Here the test is δ-dense for an arbitrary δ instead of 1 / 5, and the advantage is δ / (2 m) instead of 1 / L, where the source's L is the output length m. Repetition and selection over multiple runs is in CslibFrontier.MachineLearning.UniformLearning.NisanWigderson.BestOf, which also counts queries rather than running time.

Main definitions #

Main results #

References #

The Nisan–Wigderson reconstruction as a membership-query learner. On the seed t, it queries the target at the queries of the trial t and outputs the guess that the reconstruction builds from test. Its running time is not certified.

theorem Cslib.MachineLearning.UniformLearning.eval_nwLearner {ℓ n a m : ℕ} (D : Crypto.PRG.NisanWigderson.Design ℓ n a m) (test : (Fin m → Bool) → Bool) (f : (Fin n → Bool) → Bool) (t : Crypto.PRG.NisanWigderson.Trial ℓ m) :

Run on the target f, the learner outputs the guess of its seed.

The learner makes at most m 2 ^ a queries.

Small hypotheses. On every seed and every target, the hypothesis has De Morgan circuit complexity at most that of the test plus m * (2 ^ a * (2 * a + 3) + 1) + 1.

theorem Cslib.MachineLearning.UniformLearning.div_two_mul_le_dens_uniformError_nwLearner_le {ℓ n a m : ℕ} (D : Crypto.PRG.NisanWigderson.Design ℓ n a m) (test : (Fin m → Bool) → Bool) (hm : 0 < m) (f : (Fin n → Bool) → Bool) {ε : ℝ} (hε : ε ≤ (((Crypto.PRG.NisanWigderson.generator D f).realExperiment fun (y : Fin m → Bool) => PMF.pure (test y)) true).toReal - ((Crypto.PRG.Generator.idealExperiment fun (y : Fin m → Bool) => PMF.pure (test y)) true).toReal) :
ε / (2 * ↑m) ≤ ↑{t : Crypto.PRG.NisanWigderson.Trial ℓ m | uniformError f ((nwLearner D test t).eval f) ≤ 1 / 2 - ε / (2 * ↑m)}.dens

Weak learning from a distinguisher, density form. Let 0 < m and let the deterministic test test accept outputs of the Nisan–Wigderson generator built from D and f with probability at least ε more than uniform strings. On a uniformly random seed, the learner outputs a hypothesis of error at most 1 / 2 - ε / (2 m) with probability at least ε / (2 m).

theorem Cslib.MachineLearning.UniformLearning.nwLearner_learns {ℓ n a m : ℕ} (D : Crypto.PRG.NisanWigderson.Design ℓ n a m) (test : (Fin m → Bool) → Bool) [NeZero m] {C : PACLearning.ConceptClass (Fin n → Bool) Bool} {ε : ℝ} (hC : ∀ f ∈ C, ε ≤ (((Crypto.PRG.NisanWigderson.generator D f).realExperiment fun (y : Fin m → Bool) => PMF.pure (test y)) true).toReal - ((Crypto.PRG.Generator.idealExperiment fun (y : Fin m → Bool) => PMF.pure (test y)) true).toReal) :
(nwLearner D test).Learns (Probability.PMF.uniformOfFintype (Crypto.PRG.NisanWigderson.Trial ℓ m)) C (1 / 2 - ε / (2 * ↑m)) (1 - ε / (2 * ↑m))

A single-run query-model weak-learning step toward [Carmosino, Impagliazzo, Kabanets and Kolokolova, Theorem 2.11, p. 10:9] [CIKK16], not Theorem 2.11 itself. Let 0 < m and let the deterministic test test accept outputs of the Nisan–Wigderson generator built from D and each target f ∈ C with probability at least ε more than uniform strings. Then with uniformly random seeds the learner learns C with error 1 / 2 - ε / (2 m) and confidence ε / (2 m). This is one unboosted run with no poly(L) running-time certificate; the machine-level runtime certificate stays open on #798.

theorem Cslib.MachineLearning.UniformLearning.nwLearner_learns_of_dens {ℓ n a m : ℕ} (D : Crypto.PRG.NisanWigderson.Design ℓ n a m) (test : (Fin m → Bool) → Bool) [NeZero m] {C : PACLearning.ConceptClass (Fin n → Bool) Bool} {δ : ℝ} (hδ : δ ≤ ↑{y : Fin m → Bool | test y = true}.dens) (havoid : ∀ f ∈ C, ∀ (z : Fin ℓ → Bool), test ((Crypto.PRG.NisanWigderson.generator D f) z) = false) :
(nwLearner D fun (y : Fin m → Bool) => !test y).Learns (Probability.PMF.uniformOfFintype (Crypto.PRG.NisanWigderson.Trial ℓ m)) C (1 / 2 - δ / (2 * ↑m)) (1 - δ / (2 * ↑m))

A single-run query-model weak-learning step toward [Carmosino, Impagliazzo, Kabanets and Kolokolova, Theorem 2.11, p. 10:9] [CIKK16] from a dense test that avoids the generator, not Theorem 2.11 itself. Let the deterministic test test accept at least a δ fraction of all strings of m bits but no output of the Nisan–Wigderson generator built from D and any target f ∈ C. Then with uniformly random seeds the learner built from the negation of test learns C with error 1 / 2 - δ / (2 m) and confidence δ / (2 m). The test is δ-dense for any δ (where the source takes δ = 1 / 5), the advantage is δ / (2 m) instead of 1 / L, and neither confidence boosting nor the poly(L) running-time certificate is proved here (runtime stays open on #798).