hcderiv v0.4.0 — JAX-XLA backend for exact one-pass Hessians

Read full text Summarise with VIRAT
Authors: zetta byte
Cited by: 0

Summary

No summary yet. VIRAT can read this paper and write a plain-language summary of its aim, methods, key findings and limitations.

Summarise with VIRAT Free to try with your Science Catalogs account.

Abstract

hcderiv v0.4.0 adds a JAX/XLA backend with coefficient-level compiled Hessians — 137–260× faster than the v0.3.0 JAX backend, matching NumPy performance. New: JAX-XLA backend. H = hessian(f, x) # NumPy (unchanged) H = hessian(f, x, backend="jax") # JAX v0.3 (Python dispatch) H = hessian(f, x, backend="jax-xla") # JAX-XLA v0.4 (compiled) Architecture: Instead of one Python Hyper object per operation, the XLA backend represents the entire coefficient vector as a single JAX array and implements the algebra via jnp.einsum — one call, XLA-fusable, jax.jit traceable. Performance (f(x) = Σ[sin(xi) + 0.1xi^4], CPU): d=3: NumPy 1.25ms | JAX 83ms | XLA 0.36ms (232× vs JAX) d=8: NumPy 1.02ms | JAX 213ms | XLA 0.82ms (260× vs JAX) d=16: NumPy 2.45ms | JAX 439ms | XLA 2.41ms (182× vs JAX) d=32: NumPy 7.58ms | JAX 993ms | XLA 7.24ms (137× vs JAX) d=64: NumPy 30.7ms | JAX 3976ms | XLA 27.0ms (148× vs JAX) XLA matches or beats NumPy across all dimensions. What's new: JAXHyperArray class — coefficient vector as single JAX array, pure jnp ops _mul_tensor(d) — precomputed multiplication tensor, cached JAX constant All unary ops: sin, cos, exp, log, tanh, sqrt, sigmoid hessian_xla_jit — jax.jit compiled end-to-end grad, hessian, grad_and_hessian all route to XLA with backend="jax-xla" 37 new tests — tensor structure, algebra, Rosenbrock, JIT stability, XLA vs NumPy Tests: 117/117 (80 NumPy + 21 JAX + 16 layout/algebra + 37 XLA) Install: pip install "hcderiv[jax]" GitHub: https://github.com/zetta55byte/hypercomplex PyPI: https://pypi.org/project/hcderiv/0.4.0/ Paper DOI: https://doi.org/10.5281/zenodo.19394700

Fields of Study & Subjects

Computational Physics and Python Applications Parallel Computing and Optimization Techniques Numerical Methods and Algorithms

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
2 April 2026
Language
EN