Skip to main content

Benchmark Reliability Framework (BRF) - dataset-level reliability auditing with built-in benchmark registry

Project description

benchmark-reliability

Benchmark Reliability Framework (BRF) -- audit whether a predictive benchmark dataset is structurally reliable before model development.

pip install benchmark-reliability

Requires Python 3.8+ with numpy, scikit-learn, pandas, scipy, openml.

Quick Start

Audit a dataset from the Registry

from brf.registry import REGISTRY_SOURCES
from brf import BRFAnalyzer
from sklearn.preprocessing import StandardScaler

# Load Teaching Assistant Evaluation (UCI ID 100)
source = REGISTRY_SOURCES["tae"]
X, y, groups, metadata = source.prepare()

# Standardize and audit
X_scaled = StandardScaler().fit_transform(X)
analyzer = BRFAnalyzer(n_splits=30, n_permutations=200).fit(X_scaled, y, groups=groups)

print(analyzer.brf_vector)
# {'B': 0.12, 'I': 1.36, 'N': 0.93, 'M': 0.63,
#  'S': -0.42, 'E': 0.75, 'class': 'Void'}
print(source.metadata())
# {'name': 'tae', 'display_name': 'Teaching Assistant Evaluation',
#  'n_samples': 151, 'n_features': 4, 'n_groups': 25,
#  'education_level': 'Higher Education', 'country': 'US', ...}

Browse the Registry

$ brf registry list
BRF Registry -- 16 datasets

  assistments          ASSISTments 2009-2010           N= 3729  G= 124
  college_scorecard    US College Scorecard            N= 7804  G=  59
  oulad                Open University Learning ...    N=32593  G=  22
  tae                  Teaching Assistant Evaluation   N=  151  G=  25
  ...

$ brf audit tae
BRF Audit: Teaching Assistant Evaluation (tae)
  N=151, p=4, G=25
  B=0.1172  I=1.3559  N=0.9333  M=0.6288
  S=-0.4226  E=0.7460  ->  Void

Download and verify all datasets

$ brf registry sync     # download + SHA-256 verify all 16 datasets
$ brf registry info oulad
  name: oulad
  display_name: Open University Learning Analytics Dataset
  n_samples: 32593  n_features: 44  n_groups: 22
  education_level: Higher Education
  country: UK
  ...

BRF Metrics

Metric Formula Meaning
B mean(Delta R^2 vs mean baseline) Predictive signal strength
I std(R^2) / max( mean(R^2)
N fraction of folds where R^2_real > median(R^2_perm) Null separation
M 0.5 * norm_group_entropy + 0.5 * group_balance Metadata adequacy
S N - I Stability
E B + M Evidence

Three-regime classification (communication shorthand -- the signal is in the continuous S and E values):

Class Condition Meaning
Reliable S > 0, E > 0.5 Stable signal, adequate group structure
Void S <= 0 No detectable signal beyond noise
Fragile S > 0, E <= 0.5 Signal exists but group structure insufficient (rare)

CLI Reference

brf audit <dataset_key>         # run BRF on a registered dataset
brf registry list               # list all datasets
brf registry download <key>     # download + cache
brf registry sync               # download + verify all datasets
brf registry info <key>         # show full metadata
brf registry verify <key>       # SHA-256 checksum check

Export

from brf.report import export_json, export_latex

export_json(analyzer.brf_vector, "results.json")
latex_table = export_latex(analyzer.brf_vector)

Citation

To cite the BRF framework and package (JOSS paper forthcoming):

@software{zhang2026brf,
  author = {Lizhuo Zhang},
  title = {benchmark-reliability: Benchmark Reliability Framework},
  url = {https://github.com/zhanglizhuo/BenchmarkReliability},
  version = {0.1.5},
  year = {2026},
}

The behavior audit protocol is described in:

Zhang, L. BehaviorAudit: a four-dimension protocol for auditing benchmark reliability under group-aware evaluation. Scientific Reports (under review).

Related Work

  • rliable (NeurIPS 2021): evaluates reliability of benchmark results (confidence intervals across seeds). BRF addresses the complementary question: structural reliability of the benchmark dataset itself.
  • OpenML, UCI ML Repository: general-purpose dataset catalogs. The BRF Registry adds group-aware metadata, SHA-256 verification, versioning, and a standardized pipeline for reliability auditing -- filling a gap these platforms do not address.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benchmark_reliability-0.1.9.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benchmark_reliability-0.1.9-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

Details for the file benchmark_reliability-0.1.9.tar.gz.

File metadata

  • Download URL: benchmark_reliability-0.1.9.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for benchmark_reliability-0.1.9.tar.gz
Algorithm Hash digest
SHA256 8cfc9c8d3da888a2a2c8ab94cb8adac0f3df897126140eff2f948df6025cd078
MD5 4f82654e4fcccc021b4980f7b66c27cc
BLAKE2b-256 41f3975251c8141589361291bc212ea943cc995a96c9debb463158a7d922f2d2

See more details on using hashes here.

File details

Details for the file benchmark_reliability-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for benchmark_reliability-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e10caf7ce8f1529f58cd8a4a3c9e09ccecf9aa37f7c2440ad6fe834aa4c4ad83
MD5 722dc6289fb6585bc72c5d871411e0e5
BLAKE2b-256 7fb2b96edcfa8a5c289d8326d9720ae077fb93ffcd8742094629b80b8e5908ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page