Metadata-Version: 2.4
Name: lorch
Version: 0.0.3
Summary: A highly efficient and accessible implementation of Lorentz Linear layer based on Fast and Geometrically Grounded Lorentz Neural Networks by Robert van der Klis et al.
Author-email: Taha Shieenavaz <tahashieenavaz@gmail.com>
Project-URL: Homepage, https://github.com/tahashieenavaz/lorch
Project-URL: Repository, https://github.com/tahashieenavaz/lorch
Project-URL: Documentation, https://github.com/tahashieenavaz/lorch#readme
Keywords: lorentz,linear,lorch,torch,layer,deep learning,manifold
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: torch

# Lorentz 

## Abstract

Hyperbolic space is quickly gaining traction as a promising geometry for hierarchical and robust representation learning. A core open challenge is the development of a mathematical formulation of hyperbolic neural networks that is both efficient and captures the key properties of hyperbolic space. The Lorentz model of hyperbolic space has been shown to enable both fast forward and backward propagation. However, we prove that, with the current formulation of Lorentz linear layers, the hyperbolic norms of the outputs scale logarithmically with the number of gradient descent steps, nullifying the key advantage of hyperbolic geometry. We propose a new Lorentz linear layer grounded in the well-known ``distance-to-hyperplane" formulation. We prove that our formulation results in the usual linear scaling of output hyperbolic norms with respect to the number of gradient descent steps. Our new formulation, together with further algorithmic efficiencies through Lorentzian activation functions and a new caching strategy results in neural networks fully abiding by hyperbolic geometry while simultaneously bridging the computation gap to Euclidean neural networks.

## Citation

```bibtex
@article{Van_der_Klis2026-rs,
  title         = "Fast and geometrically grounded Lorentz neural networks",
  author        = "van der Klis, Robert and Torres, Ricardo Ch{\'a}vez and van
                   Spengler, Max and Ding, Yuhui and Hofmann, Thomas and
                   Mettes, Pascal",
  month         =  jan,
  year          =  2026,
  copyright     = "http://creativecommons.org/licenses/by/4.0/",
  archivePrefix = "arXiv",
  primaryClass  = "cs.LG",
  eprint        = "2601.21529"
}
```
