TorchLean API

NN.MLTheory.Proofs.Approximation.FloatInterval.ExactImageTheorem

Exact Interval Images for Rounded Targets #

Structured theorem statements for exact interval images of rounded floating-point targets, specialized to ExecFloat.Binary 8 23.

This file defines correctly-rounded activation assumptions, separating-activation assumptions, finite σ-networks, exact interval semantics, and the pipeline theorem:

correctly rounded activation + separating construction + exact semantics construction implies exact interval images for every finite rounded target on [-1,1]^d.

Separating activation condition, specialized to ExecFloat.Binary 8 23 #

Source: Hwang et al. (arXiv:2506.16065), Condition 1 and its correctly-rounded sufficient conditions.

Float-format constants for IEEE binary32 #

Mantissa bitwidth M for IEEE binary32 (excluding the hidden leading bit).

Instances For

    Minimum normal exponent emin for IEEE binary32.

    Instances For

      Maximum normal exponent emax for IEEE binary32.

      Instances For

        Machine epsilon 2⁻²³, the spacing of binary32 just above 1. The unit roundoff for round-to-nearest is half of this.

        Instances For

          Smallest positive subnormal 2⁻¹⁴⁹, as a real number.

          Instances For

            Real power of two, abbreviated because the error bounds below are dense with them.

            Instances For

              Basic helpers #

              x lies between a and b, in either order.

              Order-agnostic on purpose: the interval endpoints coming out of the abstract operations are not sorted, and minimum/maximum also give the IEEE 754 treatment of signed zeros for free.

              Instances For

                Separating activation condition #

                Two finite inputs at which σ separates: one pinned to zero, one to a nonzero value.

                This is the executable form of the separating condition; CorrectlyRounded plus real hypotheses is how the theorems below actually produce one.

                Instances For

                  Correctly-rounded activations and real sufficient conditions #

                  Real-valued sufficient conditions used to prove that a correctly-rounded activation satisfies the separating activation condition.

                  This is a “real” analogue of Witness that talks about a target function ρ : ℝ → ℝ.

                  Instances For

                    Finite σ-network model #

                    Parameters of an affine layer din → dout over ExecFloat.Binary 8 23 scalars.

                    • W : Fin doutFin dinF

                      Weight matrix, indexed row (output) then column (input).

                    • b : Fin doutF

                      Bias vector, one entry per output.

                    Instances For

                      Apply an affine layer to an input vector using IEEE32Exec primitives.

                      Instances For

                        A feedforward σ-network: affine layers with σ between them, no σ after the final affine.

                        • last {din dout : } (A : Affine din dout) : Net din dout
                        • step {din mid dout : } (A : Affine din mid) (n : Net mid dout) : Net din dout
                        Instances For
                          def NN.MLTheory.Proofs.UniversalApproximation.FloatIntervalApprox.PaperStatements.SigmaNet.eval (σ : FF) {din dout : } :
                          Net din dout(Fin dinF)Fin doutF

                          Evaluate a σ-network on a concrete input vector.

                          Instances For

                            Specialized evaluator for scalar-output (dout = 1) networks.

                            Instances For

                              Interval semantics using OpsExact #

                              Interval semantics of the activation: the hull of its exact image on the interval.

                              Taking the image over the finite set of representable points in J is what makes this the exact direct image rather than a relaxation, and it is only affordable because J is a float interval.

                              Instances For

                                Interval semantics of an affine layer, using the exact interval ops from OpsExact.

                                Instances For

                                  Interval semantics for a network: apply affSharp and then push the activation through sigmaSharp.

                                  Instances For

                                    Specialized interval evaluator for scalar-output (dout = 1) networks.

                                    Instances For

                                      Bounded interval domains and direct-image hulls #

                                      Every point of J lies in [a, b].

                                      Instances For

                                        A product box B lies in I[a,b]^d (componentwise).

                                        Instances For

                                          The canonical cube domain [-1,1]^d.

                                          Instances For

                                            Ideal abstraction h♯(B): interval hull of the direct image h(γ(B)) (computed over the finite concretization).

                                            Instances For

                                              Indicator functions and separability #

                                              Indicator of a set S ⊆ F^d, returning 1/0 in F.

                                              Instances For

                                                Strict-threshold indicator ι_{>a} on F.

                                                Instances For

                                                  Non-strict threshold indicator ι_{≥a} on F.

                                                  Instances For

                                                    Strict-threshold indicator ι_{<a} on F.

                                                    Instances For

                                                      Non-strict threshold indicator ι_{≤a} on F.

                                                      Instances For

                                                        Scaled (by K) indicator: K ⊗ ι.

                                                        Instances For

                                                          We model “there exists a σ-network implementing a scaled threshold-indicator exactly under interval semantics on I[a,b]” using our SigmaNet.Net interval interpreter evalSharpScalar.

                                                          The intervals contained in [a, b], the domain the separability statements quantify over.

                                                          Instances For

                                                            “Ideal” abstraction g♯ for a unary function g : F → F on an input interval J.

                                                            Instances For

                                                              Separability of σ on I[a,b] with threshold η and scale K.

                                                              Informally, this asserts existence of σ-networks whose interval semantics coincides with the ideal abstraction of scaled threshold indicators (ι_{≤z}, ι_{≥z}, and ι_{>η}).

                                                              Instances For

                                                                Finite min/max witnesses for ideal hulls #

                                                                chooseMin is below every element of the finset (under the no-NaN side condition).

                                                                chooseMax is above every element of the finset (under the no-NaN side condition).

                                                                Existence of min/max witnesses for idealSharp on a nonempty box domain.

                                                                This packages the interval hull characterization of idealSharp as an Icc m M.

                                                                Exact interval images from separating threshold networks #

                                                                Separability and exact-semantics premises #

                                                                @[reducible, inline]

                                                                Separating activation condition specialized to ExecFloat.Binary 8 23.

                                                                Instances For

                                                                  Premise: the separating activation condition yields exact threshold-indicator networks on [-1,1].

                                                                  Premise: separability yields a σ-network whose interval semantics equals the direct-image hull.

                                                                  Instances For

                                                                    For any NaN-free rounded target h, there exists a σ-network with exact interval semantics.

                                                                    Instances For

                                                                      Exact interval-image theorem for rounded targets: for every NaN-free rounded target fHat, there is a σ-network whose interval semantics is exactly the min/max hull of fHat '' γ(B) on every cube box.

                                                                      Instances For

                                                                        Correct rounding to exact interval images #

                                                                        Pipeline theorem: correctly-rounded real activations plus separating-threshold constructions imply exact interval images for rounded targets.