Documentation

CslibFrontier.MachineLearning.UniformLearning.CryptoHardness

Single-point distinguishing step from membership-query learners #

This module formalizes an information-theoretic single-point distinguishing step after [Val84] and [GGM86] (locators unverified), not the cited computational unlearnability theorem. A membership-query learner for a class that contains every member of a keyed family F of Boolean functions is compared with the oracle at a single fresh point: on a member of the family, the learner is accurate with error ε except with probability δ, so the comparison succeeds with probability at least (1 - δ) (1 - ε). On a uniformly random function, the value at a point the learner did not query is a fair coin independent of everything the learner saw, so the comparison succeeds with probability at most 1 / 2 + q / 2 ^ (N + 1) for a learner making at most q queries on a cube of N coordinates.

The statements fix the learner's seed ω and the comparison point z, which turns the test into a deterministic function of the oracle (UniformLearning.QueryLearner.agrees A ω z). The theorem UniformLearning.QueryLearner.exists_dens_agrees_sub_dens_agrees finds ω and z for which the fraction of keys on which the test accepts exceeds the fraction of all functions on which it accepts by at least (1 - δ) (1 - ε) - 1 / 2 - q / 2 ^ (N + 1). Fixing them is the averaging step that makes the test a small circuit when the learner is one (CslibFrontier.MachineLearning.UniformLearning.CryptoHardness.Circuit); the nonuniform GGM step is CslibFrontier.MachineLearning.UniformLearning.CryptoHardness.GGM. The statements apply to adaptive learners. Because only one point z is tested, the advantage lower bound is positive only when (1 - δ) (1 - ε) > 1 / 2 + q / 2 ^ (N + 1) (vacuous for weak learners); a uniform randomized multi-point distinguisher and the polynomial-time Valiant/GGM theorem remain open on #4927.

Main definitions #

Main results #

References #

def Cslib.MachineLearning.UniformLearning.QueryLearner.agrees {ι : Type u_1} {Ω : Type u_2} (A : QueryLearner ι Ω) (ω : Ω) (z : ι → Bool) (g : (ι → Bool) → Bool) :

The test built from the learner A with the seed ω and the point z: run A on the oracle g, and accept when its hypothesis agrees with g at z.

@[simp]
theorem Cslib.MachineLearning.UniformLearning.QueryLearner.agrees_eq_true_iff {ι : Type u_1} {Ω : Type u_2} {A : QueryLearner ι Ω} {ω : Ω} {z : ι → Bool} {g : (ι → Bool) → Bool} :
A.agrees ω z g = true ↔ (A ω).eval g z = g z
theorem Cslib.MachineLearning.UniformLearning.QueryLearner.expect_dens_agrees_le {ι : Type u_1} {Ω : Type u_2} [Fintype ι] [DecidableEq ι] {A : QueryLearner ι Ω} {q : ℕ} (hA : A.QueriesAtMost q) (ω : Ω) :
(Finset.univ.expect fun (z : ι → Bool) => ↑{g : (ι → Bool) → Bool | A.agrees ω z g = true}.dens) ≤ 1 / 2 + ↑q / 2 ^ (Fintype.card ι + 1)

An unqueried point is a fair coin. Let A make at most q queries. For every seed, the hypothesis of A on a uniformly random function agrees with the function at a uniform point with probability at most 1 / 2 + q / 2 ^ (N + 1), where N is the number of coordinates. Flipping the value of the function at a point z that A did not query leaves the hypothesis unchanged and negates the value at z, so exactly one of the two functions is accepted.

theorem Cslib.MachineLearning.UniformLearning.le_expect_dens_eq {ι : Type u_1} [Fintype ι] [DecidableEq ι] {K : Type u_3} [Fintype K] [Nonempty K] (F h : K → (ι → Bool) → Bool) {ε δ : ℝ} (hε : ε ≤ 1) (hbad : ↑{k : K | ε < uniformError (F k) (h k)}.dens ≤ δ) :
(1 - δ) * (1 - ε) ≤ Finset.univ.expect fun (k : K) => ↑{z : ι → Bool | h k z = F k z}.dens

Accurate hypotheses agree on average. Let K be a finite index set, and for each k let h k be a hypothesis for the target F k. If at most a δ fraction of the indices have error above ε ≤ 1, then h k and F k agree at a uniform point with probability at least (1 - δ) (1 - ε), over a uniform index and point: an accurate hypothesis agrees on at least a 1 - ε fraction of the points.

theorem Cslib.MachineLearning.UniformLearning.QueryLearner.exists_le_expect_dens_agrees {ι : Type u_1} {Ω : Type u_2} [Fintype ι] [DecidableEq ι] {Key : Type u_3} [Fintype Key] [Nonempty Key] {A : QueryLearner ι Ω} {μ : PMF Ω} {C : PACLearning.ConceptClass (ι → Bool) Bool} {ε δ : ℝ} (hA : A.Learns μ C ε δ) {F : Key → (ι → Bool) → Bool} (hF : ∀ (key : Key), F key ∈ C) (hε : ε ≤ 1) (hδ : 0 ≤ δ) :
∃ ω ∈ μ.support, (1 - δ) * (1 - ε) ≤ Finset.univ.expect fun (z : ι → Bool) => ↑{key : Key | A.agrees ω z (F key) = true}.dens

The learner is accurate on the family. Let A learn, with error ε and confidence 1 - δ, a class containing every member of the keyed family F. Then some seed makes A agree with a member of the family at a uniform point with probability at least (1 - δ) (1 - ε), over a uniform key and point.

theorem Cslib.MachineLearning.UniformLearning.QueryLearner.exists_dens_agrees_sub_dens_agrees {ι : Type u_1} {Ω : Type u_2} [Fintype ι] [DecidableEq ι] {Key : Type u_3} [Fintype Key] [Nonempty Key] {A : QueryLearner ι Ω} {μ : PMF Ω} {C : PACLearning.ConceptClass (ι → Bool) Bool} {ε δ : ℝ} {q : ℕ} (hA : A.Learns μ C ε δ) (hq : A.QueriesAtMost q) {F : Key → (ι → Bool) → Bool} (hF : ∀ (key : Key), F key ∈ C) (hε : ε ≤ 1) (hδ : 0 ≤ δ) :
∃ ω ∈ μ.support, ∃ (z : ι → Bool), (1 - δ) * (1 - ε) - 1 / 2 - ↑q / 2 ^ (Fintype.card ι + 1) ≤ ↑{key : Key | A.agrees ω z (F key) = true}.dens - ↑{g : (ι → Bool) → Bool | A.agrees ω z g = true}.dens

A single-point averaging step after [Val84] (locator unverified), not the cited computational unlearnability theorem. Let A make at most 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 coordinates. Then for some seed ω and point z, the single-point test A.agrees ω z accepts the member of a uniformly random key more often than a uniformly random function by at least (1 - δ) (1 - ε) - 1 / 2 - q / 2 ^ (N + 1). The bound is positive only when (1 - δ) (1 - ε) > 1 / 2 + q / 2 ^ (N + 1); a uniform multi-point distinguisher stays open on #4927.