Universal Hyperbolic Geometry Library for PyTorch
Project description
Universal Hyperbolic Geometry Library
A PyTorch library for Universal Hyperbolic Geometry (UHG) and Hyperbolic Graph Neural Networks. All operations are performed directly in hyperbolic space without tangent space mappings.
Installation
Basic Installation
pip install uhg
With GPU Support
pip install uhg[gpu]
CPU-Only Version
pip install uhg[cpu]
Development Version
pip install uhg[dev]
Documentation Tools
pip install uhg[docs]
Quick Start
import uhg
import torch
# Create hyperbolic tensors
manifold = uhg.LorentzManifold()
x = uhg.HyperbolicTensor([1.0, 0.0, 0.0], manifold=manifold)
y = uhg.HyperbolicTensor([0.0, 1.0, 0.0], manifold=manifold)
# Compute hyperbolic distance
dist = uhg.distance(x, y)
# Create a hyperbolic neural network
model = uhg.nn.layers.HyperbolicGraphConv(
manifold=manifold,
in_features=10,
out_features=5
)
# Use hyperbolic optimizer
optimizer = uhg.optim.HyperbolicAdam(
model.parameters(),
manifold=manifold,
lr=0.01
)
Features
- Pure UHG implementation without tangent space operations
- Hyperbolic neural network layers and models
- Hyperbolic optimizers (Adam, SGD)
- Hyperbolic samplers (HMC, Langevin)
- Graph neural networks in hyperbolic space
- Comprehensive documentation and examples
Platform Support
- Linux (all major distributions)
- macOS (including Apple Silicon)
- Windows
- Docker containers
- Splunk environments
Documentation
Full documentation is available in the docs directory and in the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citation
If you use UHG in your research, please cite:
@software{uhg2023,
title = {UHG: Universal Hyperbolic Geometry Library},
author = {Bovaird, Zach},
year = {2023},
url = {https://github.com/zachbovaird/UHG-Library}
}
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 uhg-0.1.5.tar.gz.
File metadata
- Download URL: uhg-0.1.5.tar.gz
- Upload date:
- Size: 42.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd6d83db0d62c4a7ff4a54874394d7fe8f43234cb57241dea0a05d2368bab0bc
|
|
| MD5 |
8170370b83900ad59ed7b802f140a544
|
|
| BLAKE2b-256 |
5a8d85b66835b664be2eefa7d7d5edd109961dd0a970e4ebe3f5029f6f8fa018
|
File details
Details for the file uhg-0.1.5-py3-none-any.whl.
File metadata
- Download URL: uhg-0.1.5-py3-none-any.whl
- Upload date:
- Size: 44.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e36d1d5b2dc1b65627f0ed408fb3702aab17e43d018a5972d1f820ecdc93acc6
|
|
| MD5 |
862913dd4cd6a09715401852fefaa54e
|
|
| BLAKE2b-256 |
cbf4229eb3d3c61e1aae0407b63978ad24e648e89620bdefec220daa4f020bfd
|