GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HEKPYTO/CCB: Anytime-valid corruption budgets for leaderboard claims

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
examples
examples
 
 
schema
schema
 
 
scripts
scripts
 
 
src/ccb
src/ccb
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
uv.lock
uv.lock
 
 

Repository files navigation

Certified Corruption Budget

PyPI Python CI License

Attach a certified corruption budget to leaderboard claims.

Every ranking claim gets a number B_hat: with probability at least 1 - alpha, at every time t, either the claim holds, or more than B_hat of the first t records were corrupted. The guarantee holds even if an attacker watches every published certificate and corrupts votes in bursts.

This is a product implementation of:

Hamed Khosravi and Xiaoming Huo, Certified Corruption Budgets: Anytime-Valid Leaderboard Claims under Adaptive Rigging, arXiv:2610.10597, 2026. https://arxiv.org/abs/2610.10597

This is an independent implementation. It is not affiliated with, endorsed by, or reviewed by the paper's authors.

Status

Local-first Python library and CLI. Edge and lead certificates, insertion and replacement costs, batch and streaming, selection correction, closed-testing and Bonferroni leaderboards, attack replays, a human table, a stable ccb/v1 JSON envelope, and a self-contained HTML report are implemented and tested. Published on PyPI as certified-corruption-budget.

Features

  • Ingests pairwise records from JSONL or CSV.
  • Emits edge and lead certificates with insertion or replacement costs.
  • Emits simultaneous certificates for a whole leaderboard.
  • Corrects for selecting the best of V private model variants.
  • Replays burst, flip, and spread attacks against the certificate and the paper's baselines.
  • Produces a human table, a stable JSON envelope, and a static HTML report.

Quick start

Python 3.11 or newer; NumPy is the only runtime dependency.

pip install certified-corruption-budget
ccb version
ccb certify --input records.jsonl --pair model-x,model-y

Example output:

$ ccb certify --input records.jsonl --pair model-x,model-y
pair          model-x > model-y
claim         edge
cost          replacement
alpha         0.05
B_rep         2
certified_at  13

At alpha=0.05, the edge claim that model-x has had an advantage over model-y holds unless more than 2 of the first 20 records were forged or altered (replacement cost).

CLI

ccb certify     --input examples/records.jsonl --pair a,b --claim edge --cost replacement --alpha 0.05
ccb certify     --input examples/records.jsonl --pair a,b --json
ccb leaderboard --input examples/records.jsonl --method closed --cost replacement --alpha 0.05
ccb replay      --input examples/null.jsonl --attack flip --budget 100 --replays 1000 --json
ccb demo        --input examples/records.jsonl --out demo.html
ccb version

ccb certify and ccb leaderboard accept --json and print exactly one ccb/v1 envelope. Schemas live in schema/ and ship inside the wheel.

Input shape

One record per line:

{"model_a":"model-x","model_b":"model-y","outcome":1.0,"t":0}

outcome is 1.0 if model_a wins, 0.0 if model_b wins, 0.5 for a tie. t and variant are optional; --format csv reads the same columns from a CSV header.

Limitations

  • A certificate is robustness to corrupted records, not proof that a model is better, and not fraud detection.
  • ccb replay estimates false-statement rates by resampling the input stream; the rates are meaningful only when the uncorrupted claim is false.
  • A leaderboard is a snapshot at the shortest input stream. There is no streaming update of a published leaderboard.
  • A -1 budget means no certificate was issued at the chosen alpha; it is not evidence against the claim.
  • The guarantee assumes alpha, the horizon, the corruption cost, the pair set, and the variant count were fixed before the data was seen. Choices made after looking at the data need their own correction.
  • Local files only. There is no hosted ingestion, account, or database.
  • The paper is a preprint; the implementation is not peer reviewed.

Development

uv sync
uv run pytest
uv run ruff check .
uv run ruff format --check .

Report vulnerabilities through a GitHub security advisory, not a public issue. A change to a certificate or leaderboard formula needs a proof or a citation to the paper; name the section in the function docstring.

Documentation

Path Contents
examples/README.md Sample records and copy-paste CLI commands
src/ccb/README.md Module map and formula references

Licence

MIT (see LICENSE).

About

Anytime-valid corruption budgets for leaderboard claims

pypi.org/project/certified-corruption-budget/

Topics

anytime-validconfidence-sequencescorruption-budgetsleaderboardrankingrobust-statisticsstatistical-testing

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.