Real-BN input-sensitivity (the per-block composition enabler) #
Composing the float bridge through a ResNet block chains each op as
"float-op-at-float-input vs real-op-at-real-input". flatConvF_close, mul_close,
add_close, relu_close all take an input-error hypothesis — but
bnForward_close_of compares the float and real BN at the same input (it models
only rounding). So block composition needs the missing piece: how the real
bnForward moves when its input moves — its input-Lipschitz behavior.
This file proves that sensitivity chain over ℝ: mean (bnMean_input_close),
variance (bnVar_input_close), and inverse-stddev (bnIstd_input_close, which
reuses rsqrt_lipschitz). With these + the rounding wrappers, a per-block
closeness |bnForwardF(float input) − bnForward(real input)| splits as
rounding-at-fixed-input (bnForward_close_of) + input-shift (these), so the block
chain is mechanical from here.
Variance input-sensitivity. |σ²(x) − σ²(y)| ≤ 8A·(Σ|xᵢ−yᵢ|)/n under
|xᵢ|,|yᵢ| ≤ A — each centered-square difference factors as
((cx)−(cy))·((cx)+(cy)), bounded by (|xᵢ−yᵢ|+δ)·4A with δ = (Σ|x−y|)/n
the mean shift; the nδ = Σ|x−y| collapse gives the 8A constant.
Inverse-stddev input-sensitivity. |istd(x) − istd(y)| ≤ 8A·(Σ|xᵢ−yᵢ|)/n / (2ε√ε) — the variance shift pushed through
rsqrt_lipschitz (both σ²+ε ≥ ε). The BN-input piece that, with the
rounding bnIstd_close, the per-block composition needs.
BN forward input-sensitivity (the assembled real-BN input-Lipschitz).
|bnForward x − bnForward y| per coordinate, under |xᵢ|,|yᵢ| ≤ A: the β
cancels and γ·x̂ splits as (centered shift)·istd + centered·(istd shift),
bounded via the mean shift δ = (Σ|x−y|)/n, |istd| ≤ 1/√ε, and
bnIstd_input_close. The normalize stage of the real-BN input-Lipschitz;
with the rounding bnForward_close_of, the per-block float composition is
|bnForwardF(float) − bnForward(real)| ≤ rounding + this.