Forward CROWN Bounds #
This module computes lower and upper affine bounds for each graph node. The pass is DeepPoly/CROWN-style: linear nodes compose exactly, nonlinear nodes attach local relaxations, and unsupported cases fall back to constant affine bounds derived from the already-computed IBP box.
For a chosen flattened input node ctx.inputId, the pass computes a pair of affine forms
loAff(x) ≤ node(x) ≤ hiAff(x) for each supported node. The transfer rules below use the usual
CROWN/DeepPoly ingredients:
- Linear layers use sign-splitting (
W⁺/W⁻) to combine parent bounds. - ReLU uses the standard triangle upper bound and a simple evidence-based lower choice (0 vs x).
- Exp/log use secant/tangent bounds (convex/concave).
- Softmax and LayerNorm use conservative last-axis relaxations.
Unsupported axes or shape mismatches fall back to constant affine bounds derived from the IBP box.
Exact lower and upper affine bounds for the identity node.
Instances For
Constant affine bounds with zero coefficient matrix and explicit lower/upper offsets.
Instances For
Positive part of a matrix, used for sign-splitting affine bounds through linear layers.
Instances For
Negative part of a matrix, used with matPos to propagate lower and upper affine forms.
Instances For
Propagate affine lower/upper bounds through an affine layer W*x + b.
Instances For
Compose an affine form with a diagonal affine relaxation slope * x + bias.
Instances For
Apply a diagonal relaxation for an upper bound, selecting parent rows by slope sign.
Instances For
Apply a diagonal relaxation for a lower bound, selecting parent rows by slope sign.
Instances For
Propagate CROWN bounds through ReLU using standard per-neuron triangle relaxations.
Instances For
Propagate ReLU bounds with externally supplied α slopes for crossing neurons.
Instances For
Propagate CROWN bounds through exp using tangent/secant relaxations.
Instances For
Propagate CROWN bounds through log on the positive-domain convention used by the verifier.
Instances For
Propagate CROWN bounds through sigmoid with convex/concave one-dimensional relaxations.
Instances For
Propagate CROWN bounds through tanh with convex/concave one-dimensional relaxations.
Instances For
Conservative CROWN-style affine bounds for softmax along the last tensor axis.
Instances For
Conservative affine bounds for layer normalization over the last tensor axis.
Instances For
Propagate a single node’s affine bounds (lower/upper) given parent bounds.
This is the CROWN/DeepPoly-style transfer step used by runCROWN. For node kinds without a
dedicated rule, we fall back to the IBP enclosure (turned into a constant affine bound).
Instances For
Run the basic CROWN affine-bounds pass; requires prior IBP for per-node intervals.
Instances For
Run IBP, run forward CROWN, and evaluate the output affine bounds on the selected input box.
This is the common "forward CROWN output box" workflow. It keeps callers from open-coding the same
output-array lookup and input-dimension proof checks around runCROWN.
Instances For
Run outputBoxCROWN? from an input-seeded parameter store.
This method form reads naturally at call sites that already thread a ParamStore.