VNN-COMP MNIST-FC Checker #
VNN-COMP-style mini-suite checker for the MNIST-FC benchmark.
The command consumes exported ONNX/VNNLIB JSON artifacts, runs TorchLean IBP or CROWN bounds on the imported MLP, and checks the VNNLIB disjunction-of-conjunctions constraints using a sufficient condition on the output box.
The checker expects exported JSON artifacts. Keep large VNN-COMP snapshots outside git, for example
under _external/vnncomp/mnist_fc/, and pass explicit paths when needed.
Run (Lean):
scripts/lake.sh exe verify -- vnncomp-mnistfc
CLI spelling for a VNN-COMP checker mode.
Instances For
Default ignored-local MNIST-FC weights export.
Instances For
Default ignored-local MNIST-FC suite export.
Instances For
Command-line options for the MNIST-FC VNN-COMP mini-suite verifier.
The defaults point at ignored local artifact paths under _external/vnncomp/mnist_fc/.
- weights : String
Path to exported weights (
model_weights.json). - suite : String
Path to exported instance suite (
suite.json). - max : ℕ
Maximum number of instances to check (useful for local checks).
- mode : Mode
Instances For
Instances For
Usage text printed by this tool (returned as an error message on --help).
Instances For
Fail early with a helpful message when an external artifact is missing.
Unlike Data.requireFile, this appends the full usage text, since a missing VNN-COMP snapshot
usually means the artifacts were never exported. It also keeps NN.API.Data.Sources and its
CSV/.npy loader stack off this checker's import path.
Instances For
Weights for one exported fully-connected layer ($y=Wx+b$).
Each layer stores PyTorch's row-major weights and bias with their checked dimensions.
- inDim : ℕ
Input dimension for this layer.
- outDim : ℕ
Output dimension for this layer.
Weight matrix, shape
(outDim × inDim).- b : TorchLean.Tensor Float [self.outDim]
Bias vector, shape
(outDim).
Instances For
Lower the loaded weights into a CROWN Graph + ParamStore.
The graph alternates linear layers and ReLUs, ending with a linear layer. The number of layers comes from the export. Return its parameters, input/output dimensions, and output node id.
Instances For
Compute an output interval box using IBP (fast, loose).
Instances For
Compute an output interval box by running forward CROWN and evaluating the affine bounds on the input box.
Instances For
Compute per-node interval boxes to be used by the backward objective pass.
We start from IBP boxes and (when the input dimension is small) refine a small set of parent-node intervals by evaluating forward CROWN affines on the input box. This makes objective bounds tighter without paying the full cost of "evaluate every affine on the input box".
Instances For
Try to refute a single spec row using a backward CROWN objective bound.
We build an objective $\mathrm{obj}=\mathrm{row}$ and lower-bound
$\mathrm{row}^{\mathsf{T}}y$ over the input box. If the lower bound is
strictly greater than rhs, then the constraint rowᵀ y <= rhs cannot hold.
Instances For
Refute a VNNLIB disjunction-of-conjunctions spec using per-row CROWN objective bounds.
Each row is bounded directly, avoiding some correlations lost when evaluating a row over an output interval box. This implementation does not guarantee that every resulting bound is tighter.