boundlab.polysp.legendre#
Polynomial (Legendre-projection) relaxations of scalar activations.
Instead of an affine enclosure, approximate \(f\) on \([c - a, c + a]\) by a degree-\(n\) polynomial and bound the residual. The polynomial is the truncated Legendre series
the \(L^2\)-optimal degree-\(n\) approximation on the interval
(Legendre polynomials are orthogonal on \([-1, 1]\)). The residual
f - p is bounded soundly by spline3_ibp()
and becomes interval noise; an optional Adam loop then perturbs the
coefficients per element and keeps whichever iterate certified the smallest
residual. The polynomial itself is applied through the domain’s poly
handler — exactly, for a sparse polynomial input.
Functions
Evaluate |
Classes
Hyper-parameters for the optional per-element coefficient refinement (Adam with annealed gradient noise). |
|
Base for activations relaxed by Legendre projection. |
|
Evaluate a concrete-coefficient polynomial by Horner's rule, each step one |
|
Quadratic special case routed through the domain's |
|
Legendre relaxation of ReLU (orders 1–6, closed-form coefficients). |
|
Placeholder for a Legendre tanh relaxation (not yet implemented). |