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

Load a real dataset and audit it

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 BRF Benchmark 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)

BRF Benchmark Registry

The Registry is a versioned, Dataset-as-Code collection of 18 unique group-aware educational prediction benchmarks (25 entries including alternative grouping views). Each dataset is a self-contained Python module with download, SHA-256 verification, and standardized preprocessing.

  • 16 DatasetSource modules (8 with SHA-256 verified)
  • Enriched metadata: education level, country, year, domain, grouping rationale
  • CLI for sync, verification, and inspection
  • Versioned releases (v1.5 current) with frozen snapshots for reproducibility

Adding a dataset = one .py file. Auto-discovered on import.

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.7.tar.gz (25.1 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.7-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: benchmark_reliability-0.1.7.tar.gz
  • Upload date:
  • Size: 25.1 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.7.tar.gz
Algorithm Hash digest
SHA256 f3e46d3bb7743ad1570dc85e1ec604dd46da194b99d11ddef98d93ef606af591
MD5 f17914834b8192f098035339e3026db5
BLAKE2b-256 e4b457606d62dccddba7828ad3b4b5364e3604129e4e052232fe347839b315e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for benchmark_reliability-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e97e8806de343a0c3af28fa64866dec9efc72f23eb90e646541709cb4a5903ad
MD5 5f2d0c346fc2488f850a48b623c8b9f0
BLAKE2b-256 9ca9cc5d0eee4cb96be2bf6389a5e576e2546ee02d3900d1bd109f2287fc936d

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