Skip to main content

RelBench

Website: STAR Project Data: Hugging Face PyPI Tests arXiv: RelBench arXiv: RelBench v2 License: Apache-2.0

News · Get Started · Tutorials · Leaderboard · BYOD · Citations

News

Get Started

pip install relbench             # data + task loading
pip install "relbench[example]"  # + PyTorch Geometric & PyTorch Frame, for the GNN examples
pip install pyg-lib -f https://data.pyg.org/whl/torch-2.9.0+cpu.html  # neighbor sampling; use the index matching your torch/CUDA build

Load a dataset and a task — both come straight from the Hub, with no per-dataset code:

import relbench

dataset = relbench.load_dataset("rel-f1")   # or a HuggingFace 'org/repo[/subdir]', or a local path
db = dataset.get_db()                  # rows after test_timestamp are hidden

task = dataset.load_task("driver-position")   # dataset.get_task_names() lists them
train_table = task.get_table("train")  # train / val / test label tables
test_table  = task.get_table("test")   # the target column is hidden on test

# ... train any model on db + train_table, predict on the test entities ...
metrics = task.evaluate(test_pred)     # standard metric for the task type

dataset.val_timestamp / dataset.test_timestamp give the temporal split points. RelBench is framework-agnostic — bring any modeling stack. For a reference Graph Neural Network on PyTorch Geometric + PyTorch Frame, see relbench.modeling and the runnable scripts in examples/.

Tutorials

Open these directly in Google Colab — no setup required:

Tutorial What it covers
Quickstart Load a dataset/task, explore the schema, run a baseline Open In Colab
Training a GNN A GNN baseline for an entity task (PyG + PyTorch Frame) Open In Colab

Leaderboard

The RelBench leaderboard ranks methods by their test-set performance, averaged over a fixed task set, with three independent boards: classification, regression, and recommendation. To submit, write one prediction CSV per task, validate and package them with python -m relbench.submit, and open a submission issue — or let python -m relbench.submit --submit do the upload and open the issue for you.

leaderboard/README.md has the rules and the full instructions, including the prediction CSV format for writing predictions with your own code.

BYOD (Bring Your Own Data)

You can easily express your own databases and tasks in the RelBench format. A dataset is a self-describing folder — a manifest.yaml (tables, keys, the foreign-key graph, the time splits), one plain parquet per table, and a tasks/ subdirectory — that you publish to the Hugging Face Hub. RelBench loads it straight from its org/repo[/subdir] address; there is no central registry to register with.

byod/README.md is the full walkthrough, and the published stanford-star/relbench-v1/rel-f1 is a complete worked example. For how RelBench's own databases were built, cleaned, and verified from their original sources, see provenance/.

If you upload your data in RelBench format to Hugging Face, please let us know by opening an issue / making a PR so we can list it here!

Citations

If you use RelBench, please cite the benchmark papers:

@inproceedings{relbench,
  title={RelBench: A Benchmark for Deep Learning on Relational Databases},
  author={Robinson, Joshua and Ranjan, Rishabh and Hu, Weihua and Huang, Kexin and Han, Jiaqi and Dobles, Alejandro and Fey, Matthias and Lenssen, Jan Eric and Yuan, Yiwen and Zhang, Zecheng and He, Xinwei and Leskovec, Jure},
  booktitle={Advances in Neural Information Processing Systems},
  year={2024}
}

@inproceedings{relbenchv2,
  title={RelBench v2: A Large-Scale Benchmark and Repository for Relational Data},
  author={Gu, Justin and Ranjan, Rishabh and Kanatsoulis, Charilaos and Tang, Haiming and Jurkovic, Martin and Hudovernik, Valter and Znidar, Mark and Chaturvedi, Pranshu and Shroff, Parth and Li, Fengyu and Leskovec, Jure},
  booktitle={3rd Workshop on Navigating and Addressing Data Problems for Foundation Models (DATA-FM) at ICLR 2026},
  year={2026},
  note={arXiv:2602.12606 [cs.LG]},
  url={https://arxiv.org/abs/2602.12606}
}

Datasets sourced from external repositories (CTU/ReDeLEx, 4DBInfer, TGB) carry their own citations on their Hugging Face dataset cards.

Metadata

Release files for relbench 3.1.0

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

Source distribution (sdist)

Source distribution for relbench 3.1.0
File Size Uploaded Provenance Actions
relbench-3.1.0.tar.gz 68.1 kB Without provenance Details for relbench-3.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 143.5 kB

Release files / relbench-3.1.0.tar.gz

Download URL relbench-3.1.0.tar.gz
Size 68.1 kB
Tags Source
SHA-256 checksum
How to use checksums
60ed6f9c6661f6a4ec0dd8fa159c591ae96d7f23740eb4d064ea6b7bcd2e9058
BLAKE2b-256 checksum
How to use checksums
5dde02d2cf6050fd9439cb00304b25d695ad87b72f6aa1b8bfad65d97484d4e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / relbench-3.1.0-py3-none-any.whl

Download URL relbench-3.1.0-py3-none-any.whl
Size 75.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5749eb097f0cbb57eb24efe5ee33e758f1777dc42ccdc1cd527a9dd480320948
BLAKE2b-256 checksum
How to use checksums
ad9171b7c2878dd84f6a2ad8f2f6598455e58ee51bc0efde45258f384e5e0192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for relbench 3.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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