A small network that learns a quadrature rule from data, mapping a function and its bounds straight to the value of its integral. Fixed bounds are exactly linear, variable bounds genuinely nonlinear, and wide bounds break naive training until inputs and targets are log-compressed.

Given a function and an interval, predict a single number: the value of the definite integral over it. No antiderivatives, no symbol manipulation. Labels come from numerical integration, so what the network learns is a quadrature rule.

Built in stages, each chosen to teach one specific lesson:

  1. Polynomials, fixed bounds. Integrating over a fixed interval turns out to be exactly linear, and a single Linear layer solves it. A clean first target precisely because it is not hard.
  2. Polynomials, variable bounds. Bounds become inputs, and the problem is genuinely nonlinear, since the answer needs coefficients multiplied by powers of the bounds. Here the MLP earns its keep.
  3. Wide bounds. Coefficients to plus or minus 100, bounds to plus or minus 10. The integral now spans about ten orders of magnitude, which breaks naive training outright and forces log-compression of both inputs and targets.

Approach

Polynomials are encoded as coefficient vectors with the bounds appended, and explicit power features are supplied so the network does not have to learn exponentiation from scratch. Targets and wide-range features are signed-log compressed before standardisation. Training is a standard MSE and Adam loop with a step scheduler, a held-out split, and validation monitoring.

What was interesting

Stage three. A model that trains fine on one scale and collapses on another is the clearest possible lesson in why normalisation is not a formality.

Work

Neural quadrature

· 1 min

Year
2026
Status
research
Role
Sole author
Built with
Python · PyTorch · SciPy