FP32 Layer Approximation #
Specialize the generic NF bounds to TorchLean.Floats.FP32 and compose matrix-vector
multiplication with bias addition. linearErrorBudget exposes the resulting infinity-norm bound
for use in the MLP and CROWN/IBP proofs.
This rounded-real model uses nearest-even binary32 precision without an upper exponent bound
or NaN/Inf values. Applying these bounds to native or encoded IEEE execution requires a separate
refinement excluding exceptional results. See NN/Floats/IEEEExec/Bridge/Finite.lean and
NN/Proofs/RuntimeApprox/IEEE32/Arithmetic.lean.
Runtime scalar type: float32 rounding model (TorchLean.Floats.FP32).
Instances For
Radix for the FP32 rounding model (binary).
Instances For
Exponent function used by the FP32 rounding model.
Instances For
Round-to-nearest-even function used by the FP32 rounding model.
Instances For
Interpretation of runtime scalars as real spec scalars, specialized to FP32.
Instances For
Explicit expression for the propagated infinity-norm error of an FP32 linear layer.
Instances For
Forward error bound for a linear layer y = Wx + b under the FP32 rounding semantics.
Inputs:
hW,hb, andhxsay the runtime weights, bias, and input approximate their real-spec counterparts.
The conclusion exposes linearErrorBudget, rather than hiding the propagated quantity behind an
existential. It combines the matrix-vector product budget with the final rounded bias addition.
This is the base layer theorem used by the MLP and CROWN/IBP FP32 wrappers.