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 Alpha-Beta-CROWN execution 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 := .inf - run fixed-relaxation Alpha-Beta-CROWN over the trained parameters
- report typed output bounds, the worst-case class margin, and the certification result
Run:
lake exe verify -- torchlean-mlp-workflow
lake exe verify -- torchlean-mlp-workflow --arithmetic ieee
Input dimension for the workflow model.
Instances For
Number of output classes.
Instances For
Input shape for the workflow model.
Instances For
Output shape for the workflow model.
Instances For
Linearly separable two-dimensional training inputs.
Instances For
One-hot labels: positive first coordinate is class zero, negative is class one.
Instances For
TorchLean model used for training and verification.
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.
Instances For
Runtime-selected typed runner used by the CLI entrypoint.