Skip to content

v0.2.0 — Head-to-head: individual vs population reference

Latest

Choose a tag to compare

@labs-barkley labs-barkley released this 19 Jun 00:21
· 11 commits to main since this release

v0.2.0 — Head-to-head: individual vs population reference

A reproducible synthetic head-to-head addressing the open empirical question in the framework paper (§6, Q1): does the individual baseline actually outperform the population reference for welfare-relevant change?

This is a proof-of-concept on fully synthetic data — not validation on real dogs. No real animals, sensors, or clinical outcomes; the decline signal is injected and known. Not diagnostic, not production.

What's new

  • examples/head_to_head_validation.py — individual- vs population-referenced detection on a heterogeneous synthetic cohort, built on the existing barkley package (same ICF baseline, same CUSUM detector; only the reference frame differs).
  • results/barkley_head_to_head.png — 4-panel figure: mean ROC ± SD, detection-lag distributions, heterogeneity sweep with error bars, and a calm-dog false-reassurance illustration.
  • results/HEAD_TO_HEAD_RESULTS.md — method, fairness contract, and full results.
  • README — new "Worked example" section.

Method (fairness contract)

Both arms use the same detector (CUSUM), the same robust statistic (median + MAD), and the same 56-day calibration window — the population arm additionally gets the pooled-cohort advantage. Healthy controls are included and false alarms are measured (threshold-independent ROC + a matched operating point). Every condition is averaged over 30 independent synthetic seeds (mean ± SD).

Result (synthetic, illustrative)

As between-dog heterogeneity grows, the population "normal" band widens until a calm dog's genuine decline stays inside it — the false-reassurance mechanism the paper names the reference-class trap. At a matched 10% false-alarm rate, the individual reference holds 100% ± 0% detection across all heterogeneity levels tested, while the population reference falls from ~100% to 56% ± 22% as heterogeneity grows. AUC: individual 0.988 ± 0.010 vs population 0.935 ± 0.020. At low heterogeneity the two are comparable (population marginally better by AUC) — the advantage is conditional, not universal.

The real-data head-to-head remains the open validation step.


Run: python examples/head_to_head_validation.pyresults/barkley_head_to_head.png
© 2026 Élodie Aishwarya P. Remoissenet — Barkley AI