boundlab.ibp.elementwise#

Interval transfer functions for elementwise activations.

Each activation here is monotone, so its exact range over [lb, ub] is [f(lb), f(ub)]; the handler returns that range as a fresh Bias + Noise pair. Exact as an interval — but a new interval: any correlation with the input is lost, which is precisely what the zonotope linearizers (boundlab.zono.linearizers) avoid.

Functions

interval_fn

Wrap an endpoint-mapping function (lb, ub) -> (lb', ub') as the interval handler for op; fires only on pure Bias + Noise input.

Classes

Exp

Exact interval exp: [exp(lb), exp(ub)] (monotone).

Reciprocal

Exact interval reciprocal [1/ub, 1/lb] (monotone decreasing); only sound on intervals that exclude zero.

Relu

Exact interval ReLU: [max(lb, 0), max(ub, 0)] (monotone).

Tanh

Exact interval tanh: [tanh(lb), tanh(ub)] (monotone).