Skip to content

hypernetwork-research-group/hyperbench

HyperBench

Repo Forks Stargazers Contributors Issues
Package License: MIT
Testing codecov CodeFactor
Contact Discord

About the project

HyperBench is a library for hypergraph learning and benchmarking. It provides a standardized workflow for loading hypergraph datasets, training models, evaluating them under comparable settings, and reporting results. The current release focuses on Hyperlink Prediction, with ready-to-run pipelines for established hypergraph baselines.

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). HyperBench includes preloaded datasets, mini-batch and full-hypergraph data loading, negative sampling utilities, structural feature enrichers, neural components, and built-in models such as HGNN, HNHN, HyperGCN, GCN, MLP/SLP, NHP, Node2Vec, VilLain, and more.

Use HyperBench to:

  • Benchmark existing models across a shared collection of hypergraph datasets.
  • Develop custom PyTorch or PyTorch Lightning models and train and compare them against the built-in baselines.
  • Integrate new datasets through the HIF format and run the same training, evaluation, and reporting pipeline on them.

Table of contents

Main features

Feature What you can do Highlights Package
Dataset management Load, preprocess, and manage hypergraph datasets HIF loader/processor, built-in datasets such as Algebra, Cora, Pubmed, DBLP, Amazon, and IMDB hyperbench.data
Sampling and batching Sample sub-hypergraphs and prepare training batches DataLoader, node and hyperedge samplers, and full-hypergraph evaluation batches hyperbench.data
Training and benchmarking Train and benchmark models out of the box Multi-model trainer, negative sampling, schedulers, Markdown/LaTeX result tables hyperbench.train
Models Access a wide range of hypergraph models HGNN, HGNNP, HNHN, HyperGCN, GCN, MLP/SLP, NHP, Node2Vec, VilLain, CommonNeighbors hyperbench.models
Neural network components Build custom architectures and pipelines Convolutions, aggregators, losses, scorers, enrichers, positional encodings hyperbench.nn
HLP pipelines Use ready-to-run training and evaluation pipelines HLP modules with encoders, configs, and loss definitions for multiple models hyperbench.hlp

Getting started

For users working with the pip package manager, hyperbench can be installed from PyPI.

pip install hyperbench
# if you want to install optional dependencies for tensorboard support:
pip install "hyperbench[tensorboard]"

or alternatively, using uv:

uv add hyperbench # or uv pip install hyperbench
# for optional dependencies:
uv add "hyperbench[tensorboard]"

If you want to build the project from source, see the documentation for more details.

Run examples

You can download examples directory and run the example scripts to get started.

With Python:

python3 examples/early_stopping.py

Or with uv:

uv run examples/early_stopping.py

Contributing

See CONTRIBUTING.md for details on contributing to the project.

Documentation

You can find the extensive documentation here.

Alternatively, you can build the documentation locally with the following commands:

make docs

# With explicit commands
uv run zensical build --clean -f zensical.toml
uv run zensical serve -f zensical.toml -a 127.0.0.1:8000

and open the browser at http://localhost:8000 to access the documentation.

License

See LICENSE.

Discussion

Most development discussions take place on GitHub in this repo, via the GitHub issue tracker.

Alt

Star History Chart

About

A library to train and benchmark Hyperlink Prediction models.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors