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
| Method | First derivative | High-order / iterated | Numerical quality |
|---|---|---|---|
| Automatic differentiation | Excellent | Cost grows; dense Hessian is O(D²) memory; nested Δᵏ re-pays the graph | Exact up to graph round-off |
| Finite differences | OK | Loses ~1 digit per order; n ≥ 3 is hopeless | Poor |
| Closed form (omnibias) | Excellent | One tower per order, flat in k and D | Machine 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.
| Win | Number |
|---|---|
Laplacian cost is O(1) in input dimension D | 0.167 → 0.211 ms at D = 3 → 240 (GPU, H=256, B=4096) |
vs naive dense-Hessian autodiff at D = 240 | 68× faster (jax.hessian), 199× faster (torch func.hessian); 63× / 108× less memory |
Iterated Laplacian Δᵏ flat in k and D | 480× faster than folx-nested at k=3; folx-nested OOMs at k=4 |
| Bit-identical across PyTorch / JAX / Keras 3 | float64-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... | Use | See |
|---|---|---|
| Laplacian / Hessian for a PINN without autograd-through-layers | omnibias-torch / omnibias-pinn | PINN heat tutorial |
| Local kinetic energy for FermiNet / VMC | omnibias-ferminet | VMC tutorial |
σⁿ for n ≥ 3 (biharmonic, high-order Stein) | omnibias-core + a backend | High-order PDEs |
| Write once, run on TF / JAX / torch | omnibias-keras | Cross-backend parity |
| A typed operator layer (grad / laplacian / integral) | any backend | Operator-typed layers |
Ready? Continue to Installation.