Rounded Normalization Certificates #
This module bounds the shared normalization core in the rounded-real NF model.
The proof is rank-generic: reductions such as a row mean or variance are certified separately and
then supplied as inputs here. The resulting theorem covers the numerical part shared by LayerNorm,
RMSNorm, BatchNorm, GroupNorm, and related affine normalizations.
If the exact stabilized variance is at least η > 0, the square-root stage is controlled by
1 / sqrt η. The division theorem requires square-root error strictly smaller than sqrt η,
so the rounded denominator cannot cross zero. This is a conditional mathematical bound, not
an executable certificate checker or a native normalization-kernel proof.
References:
- J. L. Ba, J. R. Kiros, G. E. Hinton, Layer Normalization (2016), https://arxiv.org/abs/1607.06450.
- B. Zhang, R. Sennrich, Root Mean Square Layer Normalization (2019), https://arxiv.org/abs/1910.07467.
- N. J. Higham, Accuracy and Stability of Numerical Algorithms, 2nd ed. (2002), Chapters 2-3.
Stage-by-stage infinity-norm budget for an affine normalization.
Records the errors from centering, variance stabilization, square root, division, and affine scaling. Its real-valued fields are mathematical quantities, not an executable report.
Instances For
Compositional error trace for Spec.normalizeCore in the rounded-real model.
Instances For
The rounded-real affine-normalization core approximates its exact real semantics.
The five input tensor hypotheses can themselves come from reductions or earlier graph nodes. The
epsilon scalar is treated like any other rounded constant. The exact stabilized variance must have
the pointwise lower bound η. The theorem retains two strict error-margin premises; its proof
uses the square-root margin for division, but does not use the stabilized-variance error margin
because sqrtSpec clamps its input. Both are propositions about the noncomputable error trace.