TorchLean API

NN.Verification.VNNComp.Spec

VNNLIB-style output specifications #

This module contains the benchmark-independent part of the VNN-COMP artifact boundary:

Model-specific checkers, such as MNIST-FC, build a graph and output bounds. The arithmetic for interpreting the VNNLIB rows lives here.

@[reducible, inline]

One conjunction term $\mathrm{mat}\,y\leq\mathrm{rhs}$ in a VNNLIB disjunction.

Instances For
    @[reducible, inline]

    A VNNLIB-style unsafe-region spec: a disjunction of conjunction terms.

    Instances For

      One exported VNN-COMP instance.

      spec is a disjunction-of-conjunctions: each term is a conjunction $\mathrm{mat}\,y\leq\mathrm{rhs}$ over the network output vector y.

      • id :

        Instance id copied from the exported suite JSON.

      • inputLo : Array Float

        Lower bound for the input box.

      • inputHi : Array Float

        Upper bound for the input box.

      • spec : Spec

        Unsafe output-region specification.

      Instances For

        Load the compact VNNLIB suite JSON format used by TorchLean checkers.

        Expected top-level format: vnnlib_suite_v0_1.

        Instances For

          Lower-bound one linear row over an output interval box.

          For each coefficient $a_j$, the minimum of $a_jy_j$ over $y_j\in[\mathrm{lo}_j,\mathrm{hi}_j]$ is the smaller of the endpoint products.

          Instances For

            Check whether a conjunction term is refuted by the output interval box.

            Instances For

              Check whether an unsafe VNNLIB spec is refuted by an output interval box.

              The spec is a disjunction of conjunctions. To prove the unsafe region is empty, every disjunct must be refuted. For a conjunction, it is enough for one row lower bound to exceed its right-hand side. This executable predicate uses the explicit host-Float BoundOps boundary; its Boolean result is not itself a Lean theorem about real-valued graph semantics.

              Instances For