Trained-weight whole-network VJP witness (MLP rung) #
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.
The audit's "live witnesses use synthetic weights" gap, closed at the MLP rung:
the SAME trained, /128-rationalized 49→8→10 pooled-MNIST network certified in
LipschitzCertInstance.lean (test acc 89.8%) instantiates the conditional VJP
framework at a REAL input — test digit #1895 — with every ReLU smoothness
hypothesis discharged from the exact rational pre-activations (7 units strictly
on, 1 strictly off; nothing sits on a kink), rather than engineered by synthetic
β-shifts as in ResNet34FullBSeal/Mnv2FullBSeal. Levels:
- level 1 —
trainedMlp_has_vjp_at(+.correct): the whole-net backward exists and equals thefderiv-contracted Jacobian at the witness; - level 3 —
trainedMlp_backward_nontrivial: the backward is not the zero map (via the explicit Jacobian entrypdiv = -85017/8192 ≈ -10.38); trainedMlp_jacobian_nonzero/trainedMlp_not_constant: thefderivforms.
Weights/input are imported from LipschitzCertInstance (generator:
scripts/lipschitz_cert_rationalize.py); the dense convention is transposed
(Mat is input×output) and biases are zero.
Equations
Instances For
Equations
- Proofs.TrainedMlp.b8 x✝ = 0
Instances For
Equations
- Proofs.TrainedMlp.b10 x✝ = 0
Instances For
The pooled test digit as a Vec (coordinates of xt).
Equations
Instances For
The trained forward in the VJP framework's vocabulary.
Equations
Instances For
The hidden pre-activations transfer from the certificate file's exact
evaluation (hpre_eval): same sums, transposed convention.
Smoothness at the trained witness: no hidden unit sits on the ReLU kink — the exact pre-activations are all nonzero (7 positive, 1 negative). The condition the synthetic live witnesses had to engineer, here inherited from training.
Level 1: the trained-weight whole-net VJP witness — HasVJPAt fwd xtV,
every hypothesis discharged (dense layers globally smooth, ReLU off-kink by
preact_ne). The 2-layer analogue of mlp_has_vjp_at, at trained weights
and a real input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The whole-net Jacobian in closed form at the witness: dense → masked-ReLU →
dense collapses to Σ_k W1[k,j]·mask_k·W2[c,k] (chain rule through the two
proven layer Jacobians, both kinks avoided).
Level 3: the trained-weight backward is not the zero map — the seal the synthetic witnesses carry, at trained weights.