ResidualAffine #
Helpers for assembling PDE residual bounds using affine CROWN relaxations where available.
This module provides:
- Evaluation of affine upper/lower bounds on the network output
u(x). - McCormick-style linear upper/lower envelopes for scalar products over independent intervals (for Burgers-type residuals).
- A compact branch-and-bound splitter on the 1D input box to tighten bounds by subdividing the domain and taking the envelope across sub-boxes.
Notes:
- We intentionally keep this file numeric (Float) and specialized to this workflow.
References:
- CROWN / DeepPoly-style affine bounds:
https://arxiv.org/abs/1811.00866 - alpha,beta-CROWN (context):
https://arxiv.org/abs/2103.06624
def
NN.Verification.PINN.ResidualAffine.crownUBoundsForward
(g : MLTheory.CROWN.Graph)
(ps : MLTheory.CROWN.Graph.ParamStore Float)
(ibp : Array (Option (MLTheory.CROWN.FlatBox Float)))
:
Forward CROWN/DeepPoly bounds for the scalar output u (or sum of outputs).
Instances For
def
NN.Verification.PINN.ResidualAffine.crownUBoundsBackward
(g : MLTheory.CROWN.Graph)
(ps : MLTheory.CROWN.Graph.ParamStore Float)
(ibp : Array (Option (MLTheory.CROWN.FlatBox Float)))
:
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.