The pure-Python core
omnibias-core is the single source of truth for the math. It contains no
torch / jax / tensorflow / keras imports, which is what makes the backends
bit-identical and the verified substrate backend-free.
What lives here
| Module | Responsibility |
|---|---|
omnibias.core.polynomials | coefficient generators: sigmoid_polynomial_coeffs, tanh_polynomial_coeffs, hermite_coeffs |
omnibias.core.bell | Bell polynomials / Faà di Bruno combinatorics |
omnibias.core.spec | the ActivationSpec dataclass (metadata shared by all backends) |
omnibias.core.multi_index | multi-index ordering + Cauchy-product table for multivariate jets |
omnibias.core.verified | interval / affine / Taylor-model arithmetic and validated numerics |
omnibias.core.proof | the hash-sealed certificate format and the Lean bridge |
The derivative-tower contract
This is the contract every backend honors:
- All polynomial coefficients come from
omnibias.core.polynomials. Backends import them; they do not reimplement them. - An activation is described by an
ActivationSpec. Backends specialize the tensor type but share the metadata. - A fast-path kernel computes
σⁿ(z)directly. Forn < 0it raisesValueError; genuinely unimplemented orders raiseNotImplementedError. OperatorBlockdispatches on the op tag:identity | grad | laplacian | derivative | band | integral.
from omnibias.core import ActivationSpec
from omnibias.core.polynomials import tanh_polynomial_coeffs
coeffs = tanh_polynomial_coeffs(5) # exact rational/integer coefficients
Why pure Python?
A single definition means:
- Bit-identical backends — the same coefficients produce the same bits.
- A backend-free verified register — interval and Taylor-model arithmetic can use the exact same coefficients without depending on torch or jax.
- Auditability — the math is small, pure, and readable in one place.
The ActivationSpec
ActivationSpec(
name="tanh",
forward=..., # σ(z)
derivative=..., # σ'(z) if known
fastpath=..., # σⁿ(z) for supported orders
riccati_polynomial=..., # P with σ'(z) = P(σ(z)), or None
noise_model="...", # GLM family whose log-partition is σ, or "none"
operator_role="...", # role of the K=2 bias-collapse unit
)
Backends wrap this with their tensor type but never change its meaning.
Continue
- Backends — how torch / jax / keras specialize the core.
- Certified register — the
verifiedandproofmodules in depth.