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 mat * y <= 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 mat * y <= rhs over the network output vector y.

      • id : Nat

        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_j * y_j over y_j ∈ [lo_j, hi_j] is the smaller of the endpoint products.

          Instances For

            Lower-bound one linear row, returning 0 when the row and interval dimensions do not match.

            Use rowLowerBoundOnBox? at checker boundaries when mismatch must be reported explicitly.

            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.

                Instances For