Skip to main content

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)

Source distribution for benchbench 1.0.1
File Size Uploaded
benchbench-1.0.1.tar.gz 219.7 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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