Hyperbolic Deep Learning in JAX
Project description
Hyperbolix
Hyperbolic Deep Learning in JAX
Pure JAX implementation of hyperbolic deep learning with manifold operations, neural network layers, and Riemannian optimizers. Built with Flax NNX and Optax.
Features
- 🌐 3 Manifolds: Euclidean, Poincaré Ball, Hyperboloid
- 🧠 13+ Neural Network Layers: Linear, convolutional (2D/3D), regression
- ⚡ 4 Hyperbolic Activations: ReLU, Leaky ReLU, Tanh, Swish
- 📈 Riemannian Optimizers: RAdam and RSGD with automatic manifold detection
- 🚀 Pure JAX/Flax NNX: vmap-native API, JIT-compatible (10-100x speedup)
- ✅ 1,400+ tests passing with comprehensive benchmark suite
Quick Start
import jax.numpy as jnp
from hyperbolix.manifolds import poincare
from hyperbolix.nn_layers import HypLinearPoincare
from flax import nnx
# Manifold operations
x = jnp.array([0.1, 0.2])
y = jnp.array([0.3, -0.1])
distance = poincare.dist(x, y, c=1.0, version_idx=0)
# Neural network layer
layer = HypLinearPoincare(
manifold_module=poincare,
in_dim=128,
out_dim=64,
rngs=nnx.Rngs(0)
)
output = layer(x_batch, c=1.0)
Installation
git clone https://github.com/hyperbolix/hyperbolix.git
cd hyperbolix
uv sync # or: pip install -e .
Requirements: Python 3.12+, JAX 0.4.20+, Flax 0.8.0+, Optax 0.1.7+
Documentation
- Getting Started - Installation and first examples
- User Guides - Manifolds, layers, optimizers, batching, numerical stability
- API Reference - Complete API documentation
- Developer Guide - Development setup and workflows
Build docs locally: uv run mkdocs serve
Key Concepts
Pure functional design: No stateful classes, curvature passed at call time
import hyperbolix.manifolds.poincare as poincare
dist = poincare.dist(x, y, c=1.0, version_idx=0) # (dim,) → scalar
vmap-native API: Functions operate on single points, use jax.vmap for batching
# Batch operations
distances = jax.vmap(poincare.dist, in_axes=(0, 0, None, None))(
x_batch, y_batch, 1.0, 0
)
Citation
@software{hyperbolix2026,
title = {Hyperbolix: Hyperbolic Deep Learning in JAX},
author = {Klein, Timo and Lang, Thomas},
year = {2026},
url = {https://github.com/hyperbolix/hyperbolix}
}
References
Implements methods from:
- Ganea et al. (2018): Hyperbolic Neural Networks
- Bécigneul & Ganea (2019): Riemannian Adaptive Optimization
- Nagano et al. (2019): Wrapped Normal Distribution on Hyperbolic Space
- Shimizu et al. (2020): Hyperbolic Neural Networks++
- Bdeir et al. (2023): Fully Hyperbolic CNNs
- Bdeir et al. (2025): Robust Hyperbolic Learning
See individual module docstrings for detailed references.
Contributing
Contributions welcome! See DEVELOPER_GUIDE.md for setup and guidelines.
For bugs or questions, open an issue.
License
MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hyperbolix-0.4.0.tar.gz.
File metadata
- Download URL: hyperbolix-0.4.0.tar.gz
- Upload date:
- Size: 70.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
249a4b3a1f7391c8fd38490df179f7e5f321b9ea1c8632bffb673678653f0ef3
|
|
| MD5 |
738c7263a0a0aca5d918c520e61b81e4
|
|
| BLAKE2b-256 |
b6b483ccd82f3cae7bca960cfe277a6724b72d5ec104f5fdec9448b964fd9c3e
|
File details
Details for the file hyperbolix-0.4.0-py3-none-any.whl.
File metadata
- Download URL: hyperbolix-0.4.0-py3-none-any.whl
- Upload date:
- Size: 98.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de7e9ab454049a908b10e4103d3f10115b1e3818a53f2baa66eb60f559d6112a
|
|
| MD5 |
ec38c91e6e42113c2a69152336e2fd8f
|
|
| BLAKE2b-256 |
84c1971c2068d821c21c20958ce91a24735532a47fa76107e10cb86c51db56a9
|