Documentation

CslibFrontier.MachineLearning.UniformLearning.CryptoHardness.Circuit

Nonuniform circuit-test distinguishing step from small-circuit learners #

This module formalizes a nonuniform single-point circuit-test step after [Val84] (locator unverified) and [RazborovRudich1997, Section 4], not the uniform polynomial-time unlearnability theorem of [Val84], which stays open on #4927.

A keyed family F of Boolean functions on n bits is pseudorandom against circuits when no small circuit reading the whole truth table distinguishes the truth table of F key, for a uniformly random key, from a uniformly random truth table (Cslib.Crypto.PRG.truthTableGenerator, Cslib.Crypto.PRG.IsCircuitTest). A membership-query learner has circuit tests of size t with q queries (UniformLearning.QueryLearner.HasCircuitTests) when it agrees with a learner making at most q queries and, for every seed and comparison point, its test (run the learner on the truth table and compare its hypothesis with the table at the point) is computed by a circuit of at most t gates on truth tables. Learners with circuits have circuit tests:

Hence the truth-table circuit security of F bounds the single-point accuracy of every learner with circuit tests that learns a class containing every member of F (UniformLearning.QueryLearner.Learns.le_of_secure): if F resists circuits with t gates with advantage η, a learner with error ε and confidence 1 - δ satisfies (1 - δ) (1 - ε) ≤ 1 / 2 + q / 2 ^ (n + 1) + η. For an exponentially secure family (Cslib.Crypto.PRG.IsExponentiallySecure) this holds, for every c, for all large n, every learner with t ≤ 2 ^ (c n) and η = 2 ^ (-c n) (UniformLearning.eventually_le_of_isExponentiallySecure); the nonuniform GGM step is CslibFrontier.MachineLearning.UniformLearning.CryptoHardness.GGM.

Gaps relative to the uniform polynomial-time statement, tracked on #4927:

Main definitions #

Main results #

References #

The learner A has circuit tests of size t with q queries: it agrees with a learner making at most q queries, and for every seed ω and point z its test A.agrees ω z, read on truth tables, is computed by a circuit with at most t gates.

theorem Cslib.MachineLearning.UniformLearning.QueryLearner.HasCircuitTests.exists_queriesAtMost {n : ℕ} {Ω : Type u_1} {A : QueryLearner (Fin n) Ω} {q t : ℕ} (hA : A.HasCircuitTests q t) :
∃ (B : QueryLearner (Fin n) Ω), B.QueriesAtMost q ∧ ∀ (ω : Ω), (B ω).eval = (A ω).eval

A learner with circuit tests agrees with a learner making at most q queries.

The tests of a learner with circuit tests of size t are circuits of at most t gates.

theorem Cslib.MachineLearning.UniformLearning.QueryLearner.HasCircuit.isCircuitTest_agrees {n : ℕ} {Ω : Type u_1} {A : QueryLearner (Fin n) Ω} {q S : ℕ} (hA : A.HasCircuit q S) (ω : Ω) (z : BitString n) :
Crypto.PRG.IsCircuitTest (S + 7) fun (T : BitString (2 ^ n)) => PMF.pure (A.agrees ω z ((MCSP.truthTable n).symm T))

The test of a learner with a circuit is a small circuit on truth tables. If A has a circuit with at most S gates, then for every seed ω and point z the test A.agrees ω z, read on truth tables, is computed with at most S + 7 gates: the circuit with its queried values wired from the truth table and the coordinates of z fixed, which costs the two constants of the substitution, and five gates comparing the hypothesis with the truth table at z.

A learner with q non-adaptive queries and a circuit of S gates has circuit tests of size S + 7.

theorem Cslib.MachineLearning.UniformLearning.QueryLearner.HasAdaptiveCircuit.isCircuitTest_agrees {n : ℕ} {Ω : Type u_1} {A : QueryLearner (Fin n) Ω} {q S : ℕ} (hA : A.HasAdaptiveCircuit q S) (ω : Ω) (z : BitString n) :
Crypto.PRG.IsCircuitTest (S + q * (2 ^ n * (2 * n + 3) + 1) + 7) fun (T : BitString (2 ^ n)) => PMF.pure (A.agrees ω z ((MCSP.truthTable n).symm T))

The test of an adaptive learner with circuits is a small circuit on truth tables. If A has adaptive circuits with at most S gates in all, then for every seed ω and point z the test A.agrees ω z, read on truth tables, is computed with at most S + q (2 ^ n (2 n + 3) + 1) + 7 gates: the answers read from the truth table at the addresses the query circuits compute (UniformLearning.QueryLearner.complexity_append_answers_le), the hypothesis circuit with the coordinates of z fixed, which costs the two constants of the substitution, and five gates comparing the hypothesis with the truth table at z.

theorem Cslib.MachineLearning.UniformLearning.QueryLearner.HasAdaptiveCircuit.hasCircuitTests {n : ℕ} {Ω : Type u_1} {A : QueryLearner (Fin n) Ω} {q S : ℕ} (hA : A.HasAdaptiveCircuit q S) :
A.HasCircuitTests q (S + q * (2 ^ n * (2 * n + 3) + 1) + 7)

A learner with q adaptive queries and circuits of S gates in all has circuit tests of size S + q (2 ^ n (2 n + 3) + 1) + 7.

theorem Cslib.MachineLearning.UniformLearning.QueryLearner.Learns.le_of_secure {n : ℕ} {Ω : Type u_1} {A : QueryLearner (Fin n) Ω} {q : ℕ} {Key : Type u_2} [Fintype Key] [Nonempty Key] {μ : PMF Ω} {C : PACLearning.ConceptClass (BitString n) Bool} {ε δ : ℝ} {t : ℕ} {F : Key → BooleanFunction n} {η : NNReal} (hL : A.Learns μ C ε δ) (hA : A.HasCircuitTests q t) (hF : ∀ (key : Key), F key ∈ C) (hG : (Crypto.PRG.truthTableGenerator F).Secure (Crypto.PRG.IsCircuitTest t) η) (hε : ε ≤ 1) (hδ : 0 ≤ δ) :
(1 - δ) * (1 - ε) ≤ 1 / 2 + ↑q / 2 ^ (n + 1) + ↑η

A nonuniform single-point circuit-test step after [Val84] (locator unverified) and [RazborovRudich1997, Section 4], not the cited uniform polynomial-time unlearnability theorem. Let A have circuit tests of size t with q queries, and learn, with error ε ≤ 1 and confidence 1 - δ, a class containing every member of the keyed family F of Boolean functions on n bits. If no test computed with t gates distinguishes the truth table of F key, for a uniform key, from a uniform truth table with advantage more than η, then (1 - δ) (1 - ε) ≤ 1 / 2 + q / 2 ^ (n + 1) + η. The uniform polynomial-time objective stays open on #4927.

theorem Cslib.MachineLearning.UniformLearning.eventually_le_of_isExponentiallySecure {Key : ℕ → Type u_1} [(n : ℕ) → Fintype (Key n)] [∀ (n : ℕ), Nonempty (Key n)] {F : (n : ℕ) → Key n → BooleanFunction n} (hF : Crypto.PRG.IsExponentiallySecure F) (c : ℕ) :
∀ᶠ (n : ℕ) in Filter.atTop, ∀ {Ω : Type u} (A : QueryLearner (Fin n) Ω) (μ : PMF Ω) (C : PACLearning.ConceptClass (BitString n) Bool) (ε δ : ℝ) (q t : ℕ), A.HasCircuitTests q t → t ≤ 2 ^ (c * n) → A.Learns μ C ε δ → (∀ (key : Key n), F n key ∈ C) → ε ≤ 1 → 0 ≤ δ → (1 - δ) * (1 - ε) ≤ 1 / 2 + ↑q / 2 ^ (n + 1) + (2 ^ (c * n))⁻¹

A nonuniform circuit-test step for exponentially secure truth-table families, not a uniform polynomial-time unlearnability theorem. Let F be an exponentially secure keyed family. For every c, for all large n, every learner with circuit tests of size t ≤ 2 ^ (c n) with q queries that learns a class containing every member of F n with error ε ≤ 1 and confidence 1 - δ satisfies (1 - δ) (1 - ε) ≤ 1 / 2 + q / 2 ^ (n + 1) + 2 ^ (-c n). The uniform polynomial-time objective stays open on #4927.