Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 31 — every linear learner has expected ℓ∞^ε-robust error ≥ ½ − γ when n ≤ ε²γ²/(5000 τ⁴ log(4d/γ))

Proved
RobustGeneralization.BernLower.theorem31_linear_robust_error_lower_bound

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

adversarial-robustnesslinear-classifierlower-boundp2o-batch-p200ap2o-gran-per-chapterp2o-plan-paperp2o-v1sample-complexity

Let gng_ngn​ be a linear-classifier learning algorithm, i.e. any function that maps nnn samples from {−1,+1}d×{±1}\{-1,+1\}^d\times\{\pm1\}{−1,+1}d×{±1} to a weight vector w∈Rdw\in\mathbb R^dw∈Rd. Choose θ⋆\theta^\starθ⋆ uniformly at random from {−1,+1}d\{-1,+1\}^d{−1,+1}d and draw nnn independent samples SSS from the (θ⋆,τ)(\theta^\star,\tau)(θ⋆,τ)-Bernoulli model, where 0<τ≤140<\tau\le\tfrac140<τ≤41​; let w=gn(S)w=g_n(S)w=gn​(S). Let 0≤ε<3τ0\le\varepsilon<3\tau0≤ε<3τ and 0<γ<120<\gamma<\tfrac120<γ<21​. If

n≤ε2γ25000 τ4log⁡(4d/γ),n\le\frac{\varepsilon^2\gamma^2}{5000\,\tau^4\log(4d/\gamma)},n≤5000τ4log(4d/γ)ε2γ2​,

then the linear classifier fw(x)=sgn⁡⟨w,x⟩f_w(x)=\operatorname{sgn}\langle w,x\ranglefw​(x)=sgn⟨w,x⟩ has expected ℓ∞ε\ell_\infty^\varepsilonℓ∞ε​-robust classification error at least 12−γ\tfrac12-\gamma21​−γ:

Eθ⋆,S[Pr⁡(x,y)∼Pθ⋆,τ[∃x′∈B∞ε(x): fw(x′)≠y]]≥12−γ.\mathbb E_{\theta^\star,S}\Big[\Pr_{(x,y)\sim P_{\theta^\star,\tau}}\big[\exists x'\in\mathcal B_\infty^\varepsilon(x):\ f_w(x')\ne y\big]\Big]\ge\frac12-\gamma.Eθ⋆,S​[(x,y)∼Pθ⋆,τ​Pr​[∃x′∈B∞ε​(x): fw​(x′)=y]]≥21​−γ.

With τ≍d−1/4\tau\asymp d^{-1/4}τ≍d−1/4 and constant ε\varepsilonε this says that linear classifiers need on the order of d\sqrt dd​ samples (up to logarithmic factors) to be ℓ∞\ell_\inftyℓ∞​-robust in the Bernoulli model, while a single sample suffices for standard accuracy; it is the explicit form of the paper's Theorem 9.

Formalization Note The learner sees only the samples, never θ⋆\theta^\starθ⋆, and the error is averaged over the uniform prior on θ⋆\theta^\starθ⋆. The tie ⟨w,x′⟩=0\langle w,x'\rangle=0⟨w,x′⟩=0 is classified as +1+1+1. The hypothesis ε≥0\varepsilon\ge0ε≥0 is added: for ε<0\varepsilon<0ε<0 the ball is empty, the robust error is 000, and the printed statement fails at n=0n=0n=0. At d=0d=0d=0, log⁡0=0\log 0=0log0=0 in Lean makes the right-hand side of the sample bound 000, forcing n=0n=0n=0, where the claim holds.

Preamble
import Mathlib
import Definitions.Def_RobustGeneralization_BernLower_Model
Formal statement
namespace RobustGeneralization.BernLower

theorem theorem31_linear_robust_error_lower_bound (d n : ℕ)
    (g : (Fin n → (Fin d → Bool) × Bool) → E d) (τ ε γ : ℝ)
    (hτ : 0 < τ) (hτ' : τ ≤ 1 / 4) (hε : 0 ≤ ε) (hε' : ε < 3 * τ)
    (hγ : 0 < γ) (hγ' : γ < 1 / 2)
    (hn : (n : ℝ) ≤ ε ^ 2 * γ ^ 2 / (5000 * τ ^ 4 * Real.log (4 * d / γ))) :
    1 / 2 - γ ≤ expRobErr g τ ε := by sorry

end RobustGeneralization.BernLower
Source
Schmidt, Santurkar, Tsipras, Talwar, Mądry, Adversarially Robust Generalization Requires More Data, arXiv:1804.11285v2, p. 35, Theorem 31
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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