Skip to main content

Why omnibias?

There are three ways to get the n-th derivative of a function: automatic differentiation, finite differences, and a closed form. omnibias is the third. This page explains exactly when that wins.

The three methods

MethodFirst derivativeHigh-order / iteratedNumerical quality
Automatic differentiationExcellentCost grows; dense Hessian is O(D²) memory; nested Δᵏ re-pays the graphExact up to graph round-off
Finite differencesOKLoses ~1 digit per order; n ≥ 3 is hopelessPoor
Closed form (omnibias)ExcellentOne tower per order, flat in k and DMachine precision

Where omnibias decisively wins

This is the regime worth optimizing:

  • High-order PDEs — 4th-order biharmonic, Kuramoto–Sivashinsky, Cahn–Hilliard, 6th-order plate/shell models.
  • Iterated Laplacians Δᵏψ — relativistic kinetic-energy corrections, neural-VMC local kinetic energies, any pipeline that nests Laplacians.
  • Second-order optimization — Hessian / Fisher / KFAC for natural-gradient methods.
  • Replacing Straight-Through Estimators in binary / k-bit quantized training with a deterministic tanh(βz) whose every derivative is closed form.
  • Replacing surrogate gradients in spiking networks with the actual derivative of a smooth Heaviside approximation.

The headline numbers

All float64, identical answers across methods to ≤ 1e-15 — the wins are bit-for-bit, not an accuracy trade.

WinNumber
Laplacian cost is O(1) in input dimension D0.167 → 0.211 ms at D = 3 → 240 (GPU, H=256, B=4096)
vs naive dense-Hessian autodiff at D = 24068× faster (jax.hessian), 199× faster (torch func.hessian); 63× / 108× less memory
Iterated Laplacian Δᵏ flat in k and D480× faster than folx-nested at k=3; folx-nested OOMs at k=4
Bit-identical across PyTorch / JAX / Keras 3float64-ULP-equal on every (activation, order) pair

See Benchmarks and Complexity for the full methodology.

When omnibias is not the right tool

We will tell you honestly:

Use the right tool
  • If your field is a general architecture with no closed-form activation tower, a sparsity-aware forward-Laplacian library is the right choice.
  • If you only ever need a first-order gradient, plain autodiff is simpler and just as good.
  • omnibias wins precisely when the field is built from Riccati-class activations and you need high-order or iterated operators — which covers the overwhelming majority of PINN, VMC, and operator-learning ansätze.

Who uses it

If you need...UseSee
Laplacian / Hessian for a PINN without autograd-through-layersomnibias-torch / omnibias-pinnPINN heat tutorial
Local kinetic energy for FermiNet / VMComnibias-ferminetVMC tutorial
σⁿ for n ≥ 3 (biharmonic, high-order Stein)omnibias-core + a backendHigh-order PDEs
Write once, run on TF / JAX / torchomnibias-kerasCross-backend parity
A typed operator layer (grad / laplacian / integral)any backendOperator-typed layers

Ready? Continue to Installation.