Train a Classifier, Then Verify Robustness #
This is the complete high-level workflow: build and train a classifier, then verify that its class
cannot change inside an L-infinity input ball. Graph lowering and the bound pass remain inside the
normal trained.verify operation.
Training:
- build a two-layer ReLU classifier
- train it with one-hot cross-entropy
Verification:
- call
trained.verifywithnorm := linf - run the default
alphaCrownmethod over the trained parameters; on the rounded scalars this workflow uses, that is directed CROWN, and the report printsCROWN - report typed output bounds, the worst-case class margin, and the certification result
Run:
scripts/lake.sh exe verify -- torchlean-mlp-workflow
scripts/lake.sh exe verify -- torchlean-mlp-workflow --arithmetic ieee
Linearly separable two-dimensional training inputs.
Instances For
One-hot labels: positive first coordinate is class zero, negative is class one.
Instances For
Deterministically instantiate the workflow model from initialization seed zero.
Instances For
Run training and verification under a chosen scalar backend α.
The trained result owns the trained parameters. The robustness call therefore checks the model that was actually trained.