Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3.4 — the generic private learner agnostically learns any finite class from O((ln⁡∣Hd∣+ln⁡1β)max⁡{1εα,1α2})O((\ln|\mathcal H_d|+\ln\frac1\beta)\max\{\frac1{\varepsilon\alpha},\frac1{\alpha^2}\})O((ln∣Hd​∣+lnβ1​)max{εα1​,α21​}) examples

Proved
PrivLearn.Generic.theorem_3_4

by mikedeng1 · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

differential-privacyexponential-mechanismlearning-theoryp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

There is an absolute constant C>0C>0C>0 with the following property. Let XXX be a finite set of examples, H=CdH=C_dH=Cd​ a finite nonempty class of hypotheses X→{0,1}X\to\{0,1\}X→{0,1}, and let ε>0\varepsilon>0ε>0 and α,β∈(0,1/2)\alpha,\beta\in(0,1/2)α,β∈(0,1/2). Then the exponential mechanism Aqε\mathcal A^{\varepsilon}_qAqε​ over HHH satisfies:

  1. Privacy. For every database size nnn, Aqε\mathcal A^{\varepsilon}_qAqε​ is ε\varepsilonε-differentially private.
  2. Utility. For every probability distribution PPP on X×{0,1}X\times\{0,1\}X×{0,1} and every nnn with
n ≥ C(ln⁡∣H∣+ln⁡1β)⋅max⁡{1εα,1α2},n\ \ge\ C\Big(\ln|H|+\ln\frac1\beta\Big)\cdot\max\Big\{\frac1{\varepsilon\alpha},\frac1{\alpha^2}\Big\},n ≥ C(ln∣H∣+lnβ1​)⋅max{εα1​,α21​},

if zzz consists of nnn examples drawn i.i.d. from PPP, then

Pr⁡[err(Aqε(z))>OPT+α]≤β,\Pr\big[\mathrm{err}(\mathcal A^{\varepsilon}_q(z))>\mathrm{OPT}+\alpha\big]\le\beta,Pr[err(Aqε​(z))>OPT+α]≤β,

where OPT=min⁡f∈Herr(f)\mathrm{OPT}=\min_{f\in H}\mathrm{err}(f)OPT=minf∈H​err(f) and the probability is over zzz and the coins of the mechanism.

This is the quantitative ("More precisely") form of Theorem 3.4: every finite concept class is privately agnostically learnable with sample size logarithmic in its cardinality. The qualitative first sentence of the theorem (classes of cardinality at most exp⁡(poly(d))\exp(\mathrm{poly}(d))exp(poly(d)) are privately agnostically learnable) follows, since then ln⁡∣H∣\ln|H|ln∣H∣ is polynomial in ddd.

Formalization Note. The paper writes the sample size as O(⋅)O(\cdot)O(⋅); we state it with one absolute constant CCC, chosen before the domain, the class, the distribution and all parameters. The constant 666 written at the end of the paper's proof does not make the final inequality close, so no numeric constant is stated. Logarithms are natural. The example domain is a finite type with the discrete σ-algebra (the paper's XdX_dXd​ has representations of size at most ddd), quantified over Type so that the existential is well-formed. The learner's output law is a measure on X → Bool; the failure probability is the integral over z∼Pnz\sim P^nz∼Pn of the mechanism's probability of the event {err(h)>OPT+α}\{\mathrm{err}(h)>\mathrm{OPT}+\alpha\}{err(h)>OPT+α}.

Preamble
import Mathlib
import Definitions.Def_PrivLearn_Generic_Privacy
import Definitions.Def_PrivLearn_Generic_ExpMech

open MeasureTheory
Formal statement
namespace PrivLearn.Generic

/-- Theorem 3.4 (p. 11, generic private learner), in its quantitative form. There is an absolute
constant `C > 0` such that for every finite example domain `X`, every finite nonempty class
`H = C_d` of hypotheses `X → {0,1}` and all `ε > 0`, `α, β ∈ (0, 1/2)`, the exponential
mechanism `A^ε_q` (a) is `ε`-differentially private, and (b) for every distribution `P` on
`X × {0,1}` and every
`n ≥ C (ln|H| + ln(1/β)) max{1/(εα), 1/α²}`, run on `n` i.i.d. examples from `P` it outputs a
hypothesis with `err(h) > OPT + α` with probability at most `β`. -/
theorem theorem_3_4 :
    ∃ C : ℝ, 0 < C ∧
      ∀ (X : Type) [Fintype X] [MeasurableSpace X] [DiscreteMeasurableSpace X]
        (H : Finset (X → Bool)) (hH : H.Nonempty) (ε α β : ℝ),
        0 < ε → 0 < α → α < 1 / 2 → 0 < β → β < 1 / 2 →
        (∀ n : ℕ, IsDP (fun z : Fin n → X × Bool => expMech H ε z) ε) ∧
        ∀ (P : Measure (X × Bool)) [IsProbabilityMeasure P] (n : ℕ),
          C * (Real.log H.card + Real.log (1 / β)) * max (1 / (ε * α)) (1 / α ^ 2) ≤ n →
          ∫⁻ z, expMech H ε z {h | OPT P H hH + α < err P h} ∂(Measure.pi fun _ : Fin n => P)
            ≤ ENNReal.ofReal β := by sorry

end PrivLearn.Generic
Source
Kasiviswanathan, Lee, Nissim, Raskhodnikova and Smith, What Can We Learn Privately?, arXiv:0803.0924v3, p. 11, Theorem 3.4 (proof pp. 11–12); Definitions 2.5, 3.1, 3.2 on pp. 10
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me