A concrete instantiation of the Lipschitz-margin certified radius #
REDUCED CERTIFICATE MODEL — this file's concrete net is the 4×4-pooled 49-dim
MNIST family (width-8 hidden, /128–/256 rational weights), NOT the canonical
784→512→512→10 mlpVerified; chosen so every margin/norm/SOS check is exact rational
arithmetic in-kernel. Canonical surface: Proofs/MlpCanonical.lean.
Fixed-weight networks whose Lipschitz constant is proved in Lean (no power iteration, no hypothesis), whose margin at a concrete input is computed in-kernel, and whose certified radius is provably positive.
Three instances:
linear_demo_certified— a 2×2 linear classifier, L = 5 (Frobenius), margin 3 at x = e₀, certified radius 3/(√2·5) > 0.mlp_demo_certified— a 2 → 2 → 2 dense → ReLU → dense MLP, L = the per-layer product 3·(1·2) = 6 viaLipschitzL2.comp(the exact product bound the PGD demos estimate numerically), margin 2, radius 2/(√2·6) > 0.trained_demo_certified,trained_demo_certified_gram,trained_demo_certified_gram2— the trained 49→8→10 MLPmlpTat the pooled MNIST test imagext, with Frobenius (mlpT_lip), Schatten-4 (mlpT_lip_gram) and Schatten-8 (mlpT_lip_gram2) product constants. The certified lower boundsW1t_lip_lower/W2t_lip_lowerbound each layer's best Lipschitz constant from below.mlpT, its weights andmlpT_logit_continuousare whatLipschitzCert.Scorecard,Smoothing.NetSemanticsandSmoothing.NetWitnessbuild on.
The instantiated Tsuzuku certificate (linear). Every L2 perturbation
of norm < 3/(√2·5) of the concrete input leaves class 0 the strict
argmax of the concrete network x ↦ (3x₀, 4x₁).
The concrete 2-layer MLP dense ∘ relu ∘ dense.
Equations
Instances For
The per-layer product certificate L = 3·(1·2) = 6, assembled by
LipschitzL2.comp from proved Frobenius bounds — the certified analogue
of the ∏ᵢ‖Wᵢ‖₂ product the PGD demos compute numerically.
The instantiated Tsuzuku certificate (MLP). Every L2 perturbation of
norm < 2/(√2·6) ≈ 0.236 leaves class 0 the strict argmax of the
concrete dense→ReLU→dense network — kink and all: the certificate is
architecture-agnostic, no smoothness hypotheses needed.
Trained hidden-layer weights (8×49), entries k/128.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Trained output-layer weights (10×8), entries k/128.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
MNIST test image #1895 (digit 2), 4×4-average-pooled: exact pixel sums over 4080 (= 255·16).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The trained MLP: dense → ReLU → dense.
Equations
Instances For
Frobenius² of W1t is ≤ C₁² for C₁ = 2911/200 ≈ ‖W1t‖_F.
Product certificate for the trained net: L = C₂·(1·C₁) = 2651921/12500.
The Tsuzuku certificate at TRAINED weights. Every L2 perturbation of
the pooled MNIST digit-2 with ‖δ‖ < 13.906/(√2·212.154) ≈ 0.0463
leaves class 2 the strict argmax of the trained, rationalized network.
Instances For
Instances For
Schatten-4 Lipschitz bound for the hidden layer: B₁ = 46/5 ≈ (Σσ⁴)^(1/4).
The tightened product certificate: L = B₂·(1·B₁) = 222203/2500.
The tightened trained certificate. Same trained net, same margin, the
Gram bound in place of Frobenius: every ‖δ‖ < 13.906/(√2·88.88) ≈ 0.1106
(2.4× the Frobenius radius) leaves the prediction fixed.
Rationalized power-iteration vector for W1t (top right-singular direction ×1000).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Rationalized power-iteration vector for W2t.
Instances For
Certified lower bound: ANY L with LipschitzL2 L (denseE W1t) is ≥ 1863/250.
With W1t_lip_gram : LipschitzL2 9.2 …, the true ‖W1t‖₂ is sandwiched in
[7.452, 9.2] — the Gram bound is provably ≤ 1.235× optimal.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Schatten-8 bound: B₁' = 7769/1000 ≈ (Σσ⁸)^(1/8) (true σ₁ ≈ 7.4525).
Schatten-8 product certificate: L = B₂'·(1·B₁') = 63791259/1000000 ≈ 63.79 — vs the certified lower bounds ℓ₁·ℓ₂ = 57.38, provably within 11.2% of the per-layer-optimal product.
Each logit of the trained pooled-MNIST MLP is continuous: the coordinate
formula ∑ k, W2ⱼₖ·max(∑ l, W1ₖₗ·xₗ, 0) is definitional.