HyperTorch: A Python library for
hypergraph learning and benchmarking
Documentation | Getting started | Tutorials | Contributing
| Package |
|
| Testing |
|
| Quality assurance |
|
| Project & community |
|
About the project
HyperTorch is a library for hypergraph learning and benchmarking. It provides standardized workflows for loading hypergraph datasets, training models, evaluating them under comparable settings, and reporting results for both hyperlink prediction and node classification.
The library is built around extensibility: datasets are represented in HIF format and converted into typed tensor objects, models can be implemented as standard Lightning modules, and benchmarking is handled through reusable trainers, samplers, metrics, loggers, and result exporters (Markdown/LaTeX). HyperTorch includes preloaded datasets, mini-batch and full-hypergraph data loading, negative sampling utilities, structural feature enrichers, neural components, and many built-in models.
Use HyperTorch to:
- Benchmark existing models across a shared collection of hypergraph datasets.
- Develop custom PyTorch or Lightning models and compare them with built-in baselines.
- Load local or remote
.jsonand.json.zstHIF datasets and run the same training, evaluation, and reporting pipeline on them.
Table of contents
Main features
| What you can do | Public APIs | |
|---|---|---|
| Data and HIF integration | Load built-in datasets or .json/.json.zst HIF data from files and URLs and work with typed HData objects |
hypertorch.data, hypertorch.types |
| Preparation and enrichment | Split datasets, sample nodes or hyperedges, generate negative samples, batch data, and enrich node or hyperedge features | hypertorch.data |
| Hyperlink prediction | Use ready-to-train hyperlink prediction pipelines | hypertorch.hyperlink_prediction |
| Node classification | Use ready-to-train node classification pipelines | hypertorch.node_classification |
| Models and neural components | Reuse model implementations, layers, aggregators, losses, activations, and normalization helpers | hypertorch.models, hypertorch.nn |
| Training and benchmarking | Train and compare multiple models with shared data, callbacks, device settings, checkpoints, and per-model trainer options | hypertorch.train, hypertorch.types |
| Logging and visualization | Write CSV metrics and Markdown/LaTeX comparison tables; optionally log to and auto-start TensorBoard | hypertorch.train |
Getting started
Installation
HyperTorch requires Python 3.10 or newer. The currently documented and CI-tested range is Python 3.10 through 3.14 on Linux x86_64 and ARM/aarch64, macOS arm64, and Windows x64.
For a CPU installation, follow the platform-specific installation guide to install compatible PyTorch and PyG wheels, then install HyperTorch from PyPI:
uv pip install hypertorch
If you use pip, replace uv pip install with pip install. For CUDA or other hardware, you can install the matching PyTorch and PyG wheels within HyperTorch's declared dependency ranges before installing HyperTorch.
Source installation
git clone https://github.com/hypernetwork-research-group/hypertorch.git
cd hypertorch
make setup
See the installation guide for platform notes and dependency ranges.
TensorBoard support
Install the optional TensorBoard integration from PyPI with:
uv pip install "hypertorch[tensorboard]"
For a source installation, use:
make setup-tensorboard
Run examples
Run examples from the repository root with make run. For example:
# Hyperlink prediction
make run examples/hyperlink_prediction/nhp.py
# Node classification
make run examples/node_classification/hypergcn.py
The tutorials guide lists examples for dataset loading, feature enrichment, hyperlink prediction, node classification, sampling, splitting, and training customization.
Contributing
See CONTRIBUTING.md for the contributor quickstart and the development guide for the complete workflow.
Documentation
Read the documentation for installation, tutorials, user guides, API references, development guidance, and release notes.
Build or serve it locally with the documented Makefile targets:
make docs-build
make docs-serve
Use make docs to build and serve in one command. The local site is available at http://127.0.0.1:8000.
License
This project is released under the Apache License 2.0 license. See LICENSE.
Support
- Use GitHub Discussions for questions and ideas.
- Use the GitHub issue tracker for bugs and feature requests.
- Use Discord for community chat.
Please follow SECURITY.md instead of opening a public issue for suspected security vulnerabilities.
Cite
Please cite us if you use HyperTorch in your work:
@software{Citro_HyperTorch_2026,
author = {Citro, Tiziano and De Vinco, Daniele and Spagnuolo, Carmine},
title = {{HyperTorch: A Python Library for Hypergraph Learning and Benchmarking}},
url = {https://github.com/hypernetwork-research-group/hypertorch},
year = {2026}
}
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 hypertorch-0.1.11.tar.gz.
File metadata
- Download URL: hypertorch-0.1.11.tar.gz
- Upload date:
- Size: 161.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f04b29c1c744b64ce1ae93f4d22b6107b911648aa1c8ca984ea6cc7f559d9433
|
|
| MD5 |
9d1cd7f3f69c1c2960af074ca3d0fe08
|
|
| BLAKE2b-256 |
eeb5fd8bdfe7af849d051e3879bec9f1dfa79abcbc5f81444516031ae3ceba43
|
Provenance
The following attestation bundles were made for hypertorch-0.1.11.tar.gz:
Publisher:
release.yaml on hypernetwork-research-group/hypertorch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hypertorch-0.1.11.tar.gz -
Subject digest:
f04b29c1c744b64ce1ae93f4d22b6107b911648aa1c8ca984ea6cc7f559d9433 - Sigstore transparency entry: 2281500103
- Sigstore integration time:
-
Permalink:
hypernetwork-research-group/hypertorch@f2f2323f415eea6f20f45af7b064665ce31ce9e8 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/hypernetwork-research-group
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@f2f2323f415eea6f20f45af7b064665ce31ce9e8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hypertorch-0.1.11-py3-none-any.whl.
File metadata
- Download URL: hypertorch-0.1.11-py3-none-any.whl
- Upload date:
- Size: 216.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2dc951dbbb147153bf349cd4f409eefae2a33acda2dd618118b3362fef1b024
|
|
| MD5 |
34a2650a0d3e799311204b95107a3695
|
|
| BLAKE2b-256 |
b47b1eff3044f69dfd9ea1a955405b80506931d35e86ef016dffd0ad11642a04
|
Provenance
The following attestation bundles were made for hypertorch-0.1.11-py3-none-any.whl:
Publisher:
release.yaml on hypernetwork-research-group/hypertorch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hypertorch-0.1.11-py3-none-any.whl -
Subject digest:
a2dc951dbbb147153bf349cd4f409eefae2a33acda2dd618118b3362fef1b024 - Sigstore transparency entry: 2281500135
- Sigstore integration time:
-
Permalink:
hypernetwork-research-group/hypertorch@f2f2323f415eea6f20f45af7b064665ce31ce9e8 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/hypernetwork-research-group
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@f2f2323f415eea6f20f45af7b064665ce31ce9e8 -
Trigger Event:
push
-
Statement type: