TorchLean API

NN.Verification.PINN.ResidualAffine

ResidualAffine #

Helpers for assembling PDE residual bounds using affine CROWN relaxations where available.

This module provides:

Notes:

References:

Cast a dimension-indexed vector box across definitional equality of Nats.

Instances For

    Forward CROWN/DeepPoly bounds for the scalar output u (or sum of outputs).

    Instances For

      Objective-dependent (backward/dual) CROWN bounds for the scalar output u (or sum of outputs).

      Instances For

        Backwards-compatible name used by the PINN CLI: treat "affine" u-bounds as objective-dependent CROWN.

        Instances For

          Scalar product upper envelope over rectangles using McCormick. Given u∈[lx,ux], v∈[ly,uy], returns an affine upper bound of the form uv ≤ axu + ayv + c, as coefficients (ax, ay, c). We pick the tighter of the two classical McCormick upper planes.

          Instances For

            Scalar product lower envelope over rectangles using McCormick. Given u∈[lx,ux], v∈[ly,uy], returns an affine lower bound of the form uv ≥ axu + ayv + c.

            Instances For

              Evaluate an affine axu + ayv + c on intervals u∈[ul,uh], v∈[vl,vh] to produce a numeric interval bound.

              Instances For
                def NN.Verification.PINN.ResidualAffine.bnb1D (x eps : Float) (maxDepth : ) (minWidth : Float) (boundOn : FloatFloatIO (Float × Float)) :

                Basic 1D branch-and-bound over the input box [x-ε,x+ε]. Recursively splits the box up to maxDepth or until width ≤ minWidth. On each sub-box it calls the provided bounding function boundOn which must return (lo, hi). Returns the tightest global (min lo, max hi) across sub-boxes.

                Instances For
                  def NN.Verification.PINN.ResidualAffine.bnb1D.go (minWidth : Float) (boundOn : FloatFloatIO (Float × Float)) (a b : Float) (d : ) :
                  Instances For