Skip to main content
PUBLIC SOURCE ↗16 PACKAGES. ONE MATHEMATICAL FOUNDATION.
OMNIBIAS / THE SCIENTIFIC ML TOOLKIT

Differentiate
deeper.

High-order derivatives without nested spatial autodiff. Train physics residuals, compose fields, and make smooth decisions that learn.

Release candidate
python -m pip install --pre "omnibias-torch==0.5.0rc1"

Python 3.11+ recommended. Installation & compatibility ↗

Derivative explorer
Drag to rotate · + / − to zoom
Scale & cross-section

Height is fitted to the plot. Normalized values divide by the sampled peak on x ∈ [−4, 4], y = 0: 0.7697.

YOUR BACKENDPyTorchJAXKeras 3
SPATIAL DERIVATIVES FORWARD.
PARAMETER GRADIENTS INTACT.
TAKE THE TOUR ↓
01 / FROM INSTALL TO UNDERSTANDING

Your first derivative.
No nested graph.

Get an activation specification. Evaluate its analytic derivative path. Compare the result against a known identity.

This example runs against the pinned PyTorch release candidate. Continue to a complete training residual when you are ready.

Walk through the example →
first_derivative.py
import torch
from omnibias.torch import get_activation

x = torch.linspace(-2, 2, 9, dtype=torch.float64)
spec = get_activation("tanh")
first = spec.fastpath(x, 1)
expected = 1 - torch.tanh(x).square()

torch.testing.assert_close(first, expected)
print(first.shape)  # torch.Size([9])
02 / LEARN BY EXPLORING

The limit is
the beginning.

Move the controls. See how bias collapse extracts derivatives and temperature hardening sharpens decisions.

TWO LIMITS. TWO DIFFERENT IDEAS.

Nearby shifts. An exact derivative.

Move the bias gap toward zero. The normalized difference approaches the first derivative. omnibias evaluates the analytic limit directly, avoiding subtraction of nearby samples.

[tanh(z + δ) − tanh(z)] / δ → tanh′(z)
Normalized finite difference┄ Analytic derivative
04 / KNOW WHAT YOU ARE MEASURING

Performance
you can inspect.

Activation derivatives, Laplacians, and network jets are different workloads. Explore measurements with their conditions attached.

220×faster

Order 8 · 20,000 tanh inputs · Torch eager

Recorded derivative evaluation, not end-to-end training.

omnibias 0.1405 ms
Torch nested autograd 30.9908 ms

Float64 CPU · median of 9 repeats · operator compilation excluded.

Explore every baseline & accuracy result ↗
SOURCE derivative_order.json ↗Measured results. Workload-specific scope.
From a mathematical bottleneck to a working model

Equations become
possibilities.

More of your physics. More of your model’s structure. Inside the training loop. Explore four workflows you can inspect, reproduce, and build on.

01 / MechanicsThe bottleneck
01 / THE WORKFLOWu(x)∂u∂2u∂3u∂4uDifferentiate. Retain the graph. Repeat.01Taylorcoefficients02Fourth-orderresidual03Parametergradientsu⁽⁴⁾ → u⁽⁴⁾ − q → ∇θ lossA differentiable computation, inside the training loop.Coordinate xDeflection uReferenceTrained result

Drag to explore. Scrolling continues the story.

< 0.001%Relative solution error
Recorded notebook run · CPU float64
Inspect result ↗
01 / Mechanics

Put more physics inside the training loop.

Conventional workflow

A fourth-order residual asks a spatial autodiff graph to differentiate itself again and again.

With omnibias

Carry the required derivatives forward. Train through the residual with gradients into every model parameter.

03 / THE RESULTu(x)∂u∂2u∂3u∂4uDifferentiate. Retain the graph. Repeat.01Taylorcoefficients02Fourth-orderresidual03Parametergradientsu⁽⁴⁾ → u⁽⁴⁾ − q → ∇θ lossA differentiable computation, inside the training loop.Coordinate xDeflection uReferenceTrained result

< 0.001% relative solution error · recorded example

A smooth, nondimensional, manufactured beam problem. Exact boundary conditions come from its polynomial envelope; global PDE convergence is not implied.

Run the notebook ↗Read the API →
02 / Field calculus

Ask for the operator your equation needs.

Conventional workflow

A Laplacian needs a Hessian trace. Constructing every Hessian entry does extra work for that particular quantity.

With omnibias

Propagate the supported contraction directly, then use it in a trainable field equation.

03 / THE RESULT∂²u/∂x²∂²u/∂x∂y∂²u/∂y∂x∂²u/∂y²The Laplacian uses the diagonal sum.01Propagatederivatives02Contract thetrace03Train theresidualΔu = ∂²u/∂x² + ∂²u/∂y²A differentiable computation, inside the training loop.Solution uColor: 0 → 1Absolute errorPeak 1.0e-3Unit square · separate color scales

0.056% relative solution error · recorded example

A unit-square Poisson problem with a known smooth solution. Boundary values are penalized, not exactly enforced. This is not a measured training-speed comparison.

Run the notebook ↗Read the API →
03 / Regional models

Let the model learn where its rules apply.

Conventional workflow

Hand-chosen regions freeze a modelling decision before the local experts are trained.

With omnibias

Learn smooth routing, thresholds, and regional experts jointly through a partition of unity.

03 / THE RESULTExpert 1Expert 2Who decides where the boundary belongs?01Smoothgate02Regionalexperts03Weightedpredictionŷ = w₁(x) f₁(x) + w₂(x) f₂(x)A differentiable computation, inside the training loop.Cyan: routing weight w₁ ∈ [0,1]Coordinate xResponseReferenceTrained result

3.64e-05 held-out rmse · recorded example

Synthetic two-regime regression, not an industrial deployment. Increasing the inverse temperature changes the model and can increase prediction error.

Run the notebook ↗Read the API →
04 / Inverse problems

Turn measurements into model parameters.

Conventional workflow

Parameter fitting needs more than a loss function: parameterization, residual sensitivities, and solver assumptions determine the result.

With omnibias

Use residual-Jacobian curvature in a supported Gauss–Newton solver, keeping the parameter and residual contracts explicit.

03 / THE RESULTIllustration: match curvature to the residual.01Residual +Jacobian02Dampedcurvature03Updateparameters(JᵀJ + λI) Δθ = −JᵀrA differentiable computation, inside the training loop.Dashed: initial modelTime tResponseReferenceTrained result

< 1e-12 held-out rmse · recorded example

Three parameters and noiseless synthetic decay observations. Recovery at floating-point precision is not a robustness or uncertainty guarantee for noisy measurements.

Run the notebook ↗Read the API →

Your next experiment starts here.

Every result above comes with the equation, complete source, installation pins, and assertions.

Explore all notebooks →
OPEN SOURCE. OPEN TO YOUR NEXT IDEA.

Math that trains.
Code you can build on.

Explore the public substrate. Read the contracts. Choose the package and license that fit your application.