Open source · Python & R

Is your leaderboard winner real?

A ranking can hinge on a handful of lucky periods. selection‑fragility deletes the luckiest ones and shows you whether the winner survives — or flips. Here it runs the real statistics, live in your browser.

$pip install selection-fragility
Live leaderboard Python = R
♔
drag →
keep allremove 6
⚑ Fragile

🔒 Runs entirely in your browser — nothing is uploaded · R == Python, bit-identical · MCS: Hansen–Lunde–Nason (2011) · MIT · PyPI · CRAN (in review) · Zenodo DOI

See it on your data

Paste your own leaderboard, or pick an example

First column = period label (week, task group, location…). Every other column = a model's loss, lower is better.

LLM leaderboard

Real data

Stanford HELM Lite: 8 top LLMs, 10 scenarios. One scenario decides #1.

Flu forecasting

Real data

CDC FluSight 2022–23: 7 teams, 31 weeks. The unanimous winner is fragile.

Weekly forecast error

Illustrative

Four models, 12 weeks. The winner rides two lucky weeks.

A clear winner

Illustrative

Deleting periods never changes the ranking — robust.

♔
keep allremove 6
⚑ Fragile

Or bring your own — paste or upload a CSV
warming up…

How it works

The rigor, one glance away

The demo is the quick read. Here's exactly what it computes — and where it can mislead.

› What counts as a “period”?
A period is one row of your loss panel — a week, a task group, a location, a forecast round. k* is the fewest rows you can delete before the top of the ranking changes. Choose rows to be the unit you actually care about being robust to; if you want robustness across locations, make each location a row.
› What are k* and the Model Confidence Set?
k* counts how many worst-case periods must be removed to flip the leaderboard winner — small k* means the lead is sensitive. The Model Confidence Set (Hansen, Lunde & Nason 2011) is the set of models that can't be statistically separated from the best at the 95% level; a set larger than one means the top models are effectively tied.
› When can this mislead?
Deletion is worst-case and greedy, so k* is a lower bound on robustness, not a verdict of fraud. A small k* with an identified winner means the lead is real but thin; aggregation choices (e.g. averaging across locations before vs. after deletion) change what “a period” means. Read k* alongside the MCS, never alone.
› Full report() output
—

Quickstart

Same answer in Python or R

pip install selection-fragility

import selection_fragility as sf
panel = sf.LossPanel.from_losses(losses, labels=weeks)
print(sf.report(panel))          # verdict + leaderboard
sf.fragility(losses)["k_star"]   # how many periods to flip