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) - CROWN output bounds (
outputBoxCROWN?) - objective-dependent backward CROWN (
backwardObjectiveBox?)
The workflow gives compact runtime checks for:
softmax(vector)mse_loss(vector → scalar)
On the CLI's rounded backends, both CROWN queries use directed backward propagation and may fall back to coarse IBP bounds. A successful run does not establish tighter bounds or a model theorem.
For attention + layer_norm, see
NN/Verification/Builtin/TransformerIBPWorkflow.lean.
Run:
scripts/lake.sh exe verify -- torchlean-crown-ops
scripts/lake.sh exe verify -- torchlean-crown-ops --arithmetic ieee
TorchLean model: Linear -> Softmax.
Instances For
Print the softmax probability bounds of a verifier box under tag, together with the directed
margin p₀ - p₁. Fails when the box does not have the softmax output dimension.
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
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 both CROWN examples under a chosen scalar backend α.