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 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file benchmark_reliability-0.1.8.tar.gz.
File metadata
- Download URL: benchmark_reliability-0.1.8.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72af7cee1c5ee9168b39e37f78657e286c19a4c5b1dce2e5ee4e5d9f9bf8e4a9
|
|
| MD5 |
d47e8ef1fbd9f4aac6ff296f88493874
|
|
| BLAKE2b-256 |
3d1aec64a4fd6c1081c3e40a1dff51cf71f3faee88a0419177bda7f009f2826d
|
File details
Details for the file benchmark_reliability-0.1.8-py3-none-any.whl.
File metadata
- Download URL: benchmark_reliability-0.1.8-py3-none-any.whl
- Upload date:
- Size: 37.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66d58913525a8c6bf0ac153406cb10310e87f9d87a0e0ca1f7b9723a0e25ac68
|
|
| MD5 |
7110f268ccf11c2f012701b3a0fdcab2
|
|
| BLAKE2b-256 |
f830c994af841ccf91b8a165d278f93a37bb6c712c490bc1e9258f922fff50ac
|