hyperbolix: Hyperbolic Deep Learning in JAX
Timo Klein, Thomas Lang, Yllka Velaj, Sebastian Tschiatschek
Abstract
We present hyperbolix, an open-source library for hyperbolic deep learning in JAX, built on Flax NNX. To our knowledge, it is the first comprehensive, general-purpose hyperbolic deep learning library in JAX. It includes six manifolds with a common interface: Euclidean space, the Poincaré ball, the hyperboloid, the -stereographic model, mixed-curvature product spaces, and the proper velocity space. We implement layer families that cover linear layers, convolutions, attention, normalization, positional encoding, regression, and vector quantization. These building blocks span methods ranging from Ganea's original hyperbolic neural networks to recent fully hyperbolic architectures such as Hypformer and Lorentzian ResNet. Additionally, hyperbolix contains Riemannian optimizers implemented as optax transformations, wrapped distributions, and hyperbolic dimensionality-reduction techniques. Its API uses idiomatic JAX: Manifolds are stateless, with curvature being passed at call time, while manifold operations act on single points, with vmap enabling batch operations. The precision of every checked operation is tested against a closed-form NumPy/SciPy transcription from the source paper or a finite difference, for both float32 and float64. On the hyperboloid, standard formulas for two-point operations, such as the distance, lose precision far from the origin, because they subtract two large, nearly equal terms. hyperbolix replaces these subtractions with cancellation-free formulas that stay accurate in float32 at distances where prior implementations return NaN. hyperbolix is available under the MIT license at https://github.com/timoklein/hyperbolix .
Create a lesson
Metadata
- Categories
- cs.LG, cs.MS
Related papers
Short-Term Forecasting of Subsurface Drainage Flow and Water-Table Depth Using Deep Learning
Shared title terminologycs.LGAshkan Tehrani, Ramin Akbari, Ehsan Ghane et al.
Machine Learning Moment Closure for the Radiative Transfer Equation: Enforcing Hyperbolicity and Wave-Speed Bounds
Shared title terminologycs.LGBongseok Kim, Guang Lin
HyperTree: Scalable Unsupervised Hierarchy Discovery in Hyperbolic Space
Shared title terminologycs.LGThomas Lang, Kevin Sidak, Anna Beer et al.
Differentiable RNA Secondary Structure Extraction for Deep Learning
Shared title terminologycs.LGTyler Illman, Max Ward, Marcell Szikszai et al.
Probabilistic Robustness-driven Universal Adversarial Perturbations with Explainability against Deep Reinforcement Learning-based Intrusion Detection System
Shared title terminologycs.LGHongsen Zhang, Lu Zhang, Mingjing Xu et al.
Improving Molecular-Morphology Contrastive Pretraining using Deep-Learning-based Morphology Profiles
Shared title terminologycs.LGJie Li, Kathryn E. Kirchoff, Dante A. Pertusi et al.