Hyperiax
Hyperiax is a pure-JAX library for message passing on rooted trees. It provides
immutable tree data structures, typed per-node arrays, and decorator-based
sweeps that compose with jax.jit, jax.vmap, and jax.lax.scan.
Hyperiax is designed for phylogenetic and tree-structured scientific computing, including Gaussian graphical models, phylogenetic means, and guided inference for diffusion processes on trees.
Installation
Hyperiax requires Python 3.11 or newer.
pip install hyperiax
The core package depends only on JAX, jaxlib, and NumPy. For accelerator-backed JAX installations, follow the official JAX installation instructions for your platform before or after installing Hyperiax.
Quick Start
import jax.numpy as jnp
import hyperiax as hx
topology = hx.symmetric_topology(depth=2, degree=2)
tree = hx.Tree.empty(topology, {"value": (2,)})
leaf_count = int(topology.is_leaf.sum())
tree = tree.at[topology.is_leaf].set(value=jnp.ones((leaf_count, 2)))
@hx.up(reads_children=("value",), writes=("value",))
def average_children(node, children, params):
return {"value": children.value.mean(0)}
result = average_children(tree)
root_value = result.value[0]
Sweeps are ordinary Tree -> Tree functions. The @hx.up and @hx.down
decorators declare which fields are read and written, so dispatch remains
explicit and JAX-friendly.
Architecture
hyperiax/
├── core/ # Topology, Tree, Schema, views, sweep dispatch, builders
├── utils/ # Pure-JAX ODE and SDE solvers
└── prebuilt/ # Ready-to-use sweeps for BFFG and phylogenetic means
Core
hyperiax.core contains the public primitives:
Topologyfor rooted tree structure.Treefor immutable per-node JAX arrays.Schemafor field shape and dtype validation.@hx.upand@hx.downfor message-passing sweeps.- Newick helpers for importing and exporting rooted trees.
Utilities
hyperiax.utils contains pure-JAX numerical helpers, including ODE and SDE
solvers used by the prebuilt guided-inference routines.
Prebuilt Sweeps
hyperiax.prebuilt contains focused implementations for common tree workflows:
phylo_meanfor weighted phylogenetic means.bffgfor Backward Filtering Forward Guiding on discrete Gaussian and continuous SDE edges.
Documentation
Tutorials and API reference are available in the project documentation:
- Quickstart and sweep-writing tutorials under
docs/source/notebooks/. - Public API reference under
docs/source/api/.
Reference
The BFFG implementation follows:
van der Meulen, F. H. & Sommer, S. (2025). Backward Filtering Forward Guiding. JMLR 26(281), 1-51. https://arxiv.org/abs/2505.18239
Contact
Hyperiax is maintained by CCEM, University of Copenhagen. For technical questions, please open a GitHub issue or contact Stefan Sommer.
Metadata
Release files for hyperiax 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hyperiax-3.0.0.tar.gz | 1.6 MB | Without provenance | Details for hyperiax-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hyperiax-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for hyperiax-3.0.0-py3-none-any.whl |
Total release size: 1.6 MB
Release files / hyperiax-3.0.0.tar.gz
| Download URL | hyperiax-3.0.0.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8d7d540c9be87c9cff4218d1274e54a4034e63268a2f6e16fc96bad2d9bfcf2
|
|
BLAKE2b-256 checksum How to use checksums |
744f6d235e358601128aa23892d4ca1240b62a5ff4afa0dd33ab0551c27aa4f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / hyperiax-3.0.0-py3-none-any.whl
| Download URL | hyperiax-3.0.0-py3-none-any.whl |
|---|---|
| Size | 45.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81531a2c24fdf25500c1059df7217612352f5d4f8224267b1b9f9513fb36d34f
|
|
BLAKE2b-256 checksum How to use checksums |
f2e512cb6df0e4e9fc90fb5e20d645c83e29f087834b098bdeb057280b8d7af3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for hyperiax 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.