Skip to main content
HyperTorch Logo

HyperTorch: A Python library for
hypergraph learning and benchmarking

Documentation | Getting started | Tutorials | Contributing

Package PyPI Latest Release License: Apache 2.0 Python
Testing Unit tests Integration tests Released version tests
Quality assurance codecov CodeFactor
Project & community Issues Stargazers Forks Contributors Discord

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 .json and .json.zst HIF 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

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}
}

Metadata

Release files for hypertorch 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hypertorch 0.1.13
File Size Uploaded Provenance Actions
hypertorch-0.1.13.tar.gz 161.1 kB With provenance Details for hypertorch-0.1.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hypertorch 0.1.13
File Interpreter ABI Platform Actions
hypertorch-0.1.13-py3-none-any.whl Python 3 none any Details for hypertorch-0.1.13-py3-none-any.whl

Total release size: 377.4 kB

Release files / hypertorch-0.1.13.tar.gz

Download URL hypertorch-0.1.13.tar.gz
Size 161.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f67e22357cc502f13e1a8d067096314be6b507ab0d7485adcffae64133cb0f59
BLAKE2b-256 checksum
How to use checksums
862d46a50cc6b8eb92a1cea5b0a31604f196860a4f7880ce1e3e2e213f5b7140
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / hypertorch-0.1.13-py3-none-any.whl

Download URL hypertorch-0.1.13-py3-none-any.whl
Size 216.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e822af60846545782a2c6b83b03278eda5c46dfab512f0c4f55fdbdd6343c4c
BLAKE2b-256 checksum
How to use checksums
50c49e54054c114872d2a9395d850364ed03536a01feecd735950dd861f6cc14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Security for hypertorch 0.1.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hypertorch-0.1.13.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page