Lipschitz-based robustness lemmas #
This file connects Lipschitz continuity assumptions to the robustness specifications from
NN.MLTheory.Robustness.Spec.
Main results (over ℝ):
- An
L-Lipschitz map is adversarially robust:εinput perturbations implyL*εoutput perturbations. - If a logits vector has a positive logit margin, then its
argmaxclassifier is stable under sufficiently smallL∞perturbations; combined with an output-L∞Lipschitz bound, this yields certified robustness radii.
Lipschitz continuity implies adversarial robustness #
If f is L-Lipschitz and L ≥ 0, then f is adversarially robust at x₀:
every input within distance ε of x₀ maps within distance L*ε of f x₀.
Bridging L2 and L∞ Lipschitz predicates #
L2-Lipschitz implies L∞-Lipschitz into logits, with the same constant.
This is the standard norm comparison ‖v‖∞ ≤ ‖v‖₂ (proved as
Proofs.tensor_linf_norm_le_tensor_l2_norm).
Argmax stability from a positive logit margin #
The argmax classifier on logits vectors, breaking ties by the earliest index.
When n = 0, this returns 0 by convention.
Instances For
HasLogitMargin y c m means class c beats every competitor by at least m in logit value.
Instances For
If y₀ has a positive logit margin m for class c, then any y within L∞ distance δ
with 2*δ < m has the same argmax class.
If y₀ has margin m > 0 for class c, then c is the argmaxClassifier of y₀.
Certified robustness from a Lipschitz bound and a logit margin #
If f is L-Lipschitz into L∞ logits and the reference logits f x₀ have margin m for class
c, then any input perturbation of radius ε with 2*(L*ε) < m preserves the predicted class.
This is a standard “margin over Lipschitz constant” certified robustness lemma.
Certified robustness, but starting from an output-L2 Lipschitz assumption.
This avoids requiring the user to manually insert the norm-equivalence step
‖·‖∞ ≤ ‖·‖₂.