TorchLean CROWN Ops Workflow #
Running CROWN end-to-end on small TorchLean graphs.
We lower TorchLean programs to the verifier IR (NN.IR.Graph), then run:
- IBP (
runIBP) - basic CROWN forward bounds (
runCROWN) - objective-dependent backward/dual CROWN (
runCROWNBackwardObjective)
The workflow gives compact, fast coverage for nonlinear ops added to CROWN:
softmax(vector)mse_loss(vector → scalar)
For attention + layer_norm, see
NN/Verification/Builtin/TransformerIBPWorkflow.lean.
Run:
lake exe verify -- torchlean-crown-ops
lake exe verify -- torchlean-crown-ops --arithmetic ieee
Input dimension for the softmax workflow model.
Instances For
Output dimension for the softmax workflow model.
Instances For
Input shape for the softmax workflow model.
Instances For
Output shape for the softmax workflow model.
Instances For
TorchLean model: Linear -> Softmax.
Instances For
Parameter shapes for softmaxModel.
Instances For
Example margin functional on softmax outputs ($\mathrm{lo}_0-\mathrm{hi}_1$).
Instances For
Run the softmax workflow under a chosen scalar backend α.
This lowers the TorchLean model to verifier IR and prints IBP/CROWN bounds.
Instances For
Input dimension for the MSE-loss workflow model.
Instances For
Output dimension for the MSE-loss workflow model.
Instances For
Weight shape for the MSE-loss workflow's linear layer.
Instances For
Bias shape for the MSE-loss workflow's linear layer.
Instances For
Input shape for the MSE-loss workflow.
Instances For
Output shape for the MSE-loss workflow.
Instances For
Parameter shapes for the MSE-loss workflow ([W,b,target]).
Instances For
TorchLean forward program computing $\widehat{y}=\operatorname{linear}(x)$ and $\operatorname{mse\_loss}(\widehat{y},\mathrm{target})$, returning a scalar.
Instances For
Run the MSE-loss workflow under a chosen scalar backend α.
This lowers the TorchLean forward computation to verifier IR and prints IBP/CROWN bounds for the scalar loss.
Instances For
Run all CROWN-ops workflows (softmax + mse_loss) under a chosen scalar backend α.