BenchBench is a Python package that provides a suite of tools to evaluate multi-task benchmarks focusing on task diversity and sensitivity to irrelevant changes.
Research shows that for all multi-task benchmarks there is a trade-off between task diversity and sensitivity. The more diverse a benchmark, the more sensitive its ranking is to irrelevant changes. Irrelevant changes are things like introducing weak models, or changing the metric in ways that shouldn't matter.
Based on BenchBench, we're maintaining a living benchmark of multi-task benchmarks. Visit the project page to see the results or contribute your own benchmark.
Please see our paper for all relevant background and scientific results. Cite as:
@inproceedings{zhang2024inherent,
title={Inherent Trade-Offs between Diversity and Stability in Multi-Task Benchmarks},
author={Guanhua Zhang and Moritz Hardt},
booktitle={International Conference on Machine Learning},
year={2024}
}
Quick Start
To install the package, simply run:
pip install benchbench
Example Usage
To evaluate a cardinal benchmark, you can use the following code:
from benchbench.data import load_cardinal_benchmark
from benchbench.measures.cardinal import get_diversity, get_sensitivity
data, cols = load_cardinal_benchmark('GLUE')
diversity = get_diversity(data, cols)
sensitivity = get_sensitivity(data, cols)
To evaluate an ordinal benchmark, you can use the following code:
from benchbench.data import load_ordinal_benchmark
from benchbench.measures.ordinal import get_diversity, get_sensitivity
data, cols = load_ordinal_benchmark('HELM-accuracy')
diversity = get_diversity(data, cols)
sensitivity = get_sensitivity(data, cols)
To use your own benchmark, you just need to provide a pandas DataFrame and a list of columns indicating the tasks. Check the documentation for more details.
Reproduce the results from our paper
You can reproduce the figures from our paper using the following Colabs:
Metadata
Release files for benchbench 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| benchbench-1.0.1.tar.gz | 219.7 kB | Without provenance | Details for benchbench-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| benchbench-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for benchbench-1.0.1-py3-none-any.whl |
Total release size: 477.6 kB
Release files / benchbench-1.0.1.tar.gz
| Download URL | benchbench-1.0.1.tar.gz |
|---|---|
| Size | 219.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d99300bdad2fde1266f7f23e3fc83be9bde1b6d732592e7b7f68b585afd5c58f
|
|
BLAKE2b-256 checksum How to use checksums |
d7cf6010578bf82477171fcd1bcb45937467e73a80c0fc06edc18ffd90cd295f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / benchbench-1.0.1-py3-none-any.whl
| Download URL | benchbench-1.0.1-py3-none-any.whl |
|---|---|
| Size | 258.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d35a18e139b19b4e980b174b4d06f20ed48c396ce6c87ad4e9b0a47e48eceb8
|
|
BLAKE2b-256 checksum How to use checksums |
310d6bd2697294635d80216543e4caaa931ebb7e74e4bfe7942c30e5c62ac2a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for benchbench 1.0.1
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.