TorchLean API

NN.Verification.PINN.ResidualAffine

ResidualAffine #

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

This module provides:

Notes:

References:

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

      Scalar product upper envelope over rectangles using McCormick.

      Given $u\in[l_x,u_x]$ and $v\in[l_y,u_y]$, this returns coefficients $(a_x,a_y,c)$ for the affine upper bound

      $$ uv\le a_xu+a_yv+c. $$

      It chooses the tighter of the two classical McCormick upper planes.

      Instances For

        Scalar product lower envelope over rectangles using McCormick.

        Given $u\in[l_x,u_x]$ and $v\in[l_y,u_y]$, this returns an affine lower bound $uv\ge a_xu+a_yv+c$.

        Instances For

          Evaluate $a_xu+a_yv+c$ on the box $u\in[u_{\mathrm{lo}},u_{\mathrm{hi}}]$, $v\in[v_{\mathrm{lo}},v_{\mathrm{hi}}]$ to produce a numeric interval bound.

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

            Basic one-dimensional branch-and-bound over $[x-\varepsilon,x+\varepsilon]$.

            It recursively splits the box up to maxDepth or until its width is at most minWidth. On each sub-box it calls boundOn, which returns (lo, hi). The result is the tightest global pair (min lo, max hi) across the sub-boxes.

            Instances For
              Instances For