TorchLean API

NN.Proofs.RuntimeApprox.NF.Ops.Elementwise.SoftplusSafeLog

NF Elementwise Bounds: Softplus and Safe Log #

softplusR rounds the constant, exponential, addition, and clamped logarithm separately. In contrast, safeLogSoftplusR rounds the entire exact smooth activation once. These are different numerical schedules; neither definition executes a native kernel.

Half-ULP rounding budget at the scalar value 1, used in the softplus helper bounds.

Instances For

    Rounded representation of the scalar constant 1 at the NF backend.

    Instances For

      Rounded representation of exp a at the NF backend.

      Instances For

        Rounded surrogate for the inner 1 + exp a term appearing in softplus.

        Instances For

          Forward-error envelope for the rounded 1 + exp a subexpression used by softplus.

          Instances For

            Unconditional scalar forward-error bound for softplus, via the safeLog factorization.

            Instances For

              softplus implemented by safeLog 1 (1 + exp x) at the NF backend.

              Instances For

                Forward approximation bound for softplus in NF.

                We treat softplus(x) = log(1 + exp x) as safeLog 1 (1 + exp x) (since 1 + exp x ≥ 1) and then compose the scalar bounds for exp, +, and safeLog.

                Per-entry bound tensor for softplusR.

                This is the elementwise lifting of softplusBoundScalar, used with linfNorm in approxTensor_softplus_spec.

                Instances For

                  approxTensor bound for softplus lifted to arbitrary tensor shapes.

                  This is the tensor-level wrapper around approx_softplus_nf, built via approxTensor_map_spec_of_scalar_bound.

                  Rounded-real model of log (softplus x + ε), with one rounding of the entire expression. This is not the staged composition of softplusR, addition, and safeLogR.

                  Instances For

                    Forward approximation bound for the smooth safeLog activation in NF.

                    safeLog is defined as log(softplus(x) + ε), which is globally well-defined for ε > 0. The proof combines:

                    • one rounding step for safeLogSoftplusR (defined as NF.ofReal (safeLogSpec ...));
                    • a (1/ε) Lipschitz bound for the spec function (via mean value theorem + derivative bound).

                    Per-entry bound tensor for safeLogSoftplusR.

                    This is the elementwise lifting of approx_safeLogSoftplus_nf's bound.

                    Instances For

                      approxTensor bound for the smooth safeLogSpec lifted to arbitrary tensor shapes.

                      This is the tensor-level wrapper around approx_safeLogSoftplus_nf, built via approxTensor_map_spec_of_scalar_bound.