use case · wild · format perturbations · honest measured recall

PHI leakage stress-tester: where automated detectors miss spans

Clinical DeID-BERT relies on a cased Bio_ClinicalBERT tokenizer trained on structured i2b2 notes. Real EHR feeds contain lowercase voice dictation, stripped delimiters, Dr./DOB shorthand, and fax OCR noise. Test these perturbations live and measure which PHI tokens actually leak through.

Synthetic Data & Clinical Safety Notice: All perturbation suites below are 100% synthetic (zero real patient records). Every recall percentage and missed-PHI list is measured live from the model's real output — proving why automated PHI detection requires human review before HIPAA Safe Harbor release.

1 · Model & perturbation probe

Prepare the model above to measure PHI leakage.

Gold PHI items–
Caught (TP)–
Leaked / missed (FN)–
Measured Recall–
Latency–

Detected PHI spans

Run a probe to see highlighted detections.

Measured PHI leakage (missed gold spans)

Run a stress suite to measure missed PHI spans.

2 · 4-suite perturbation benchmark

Measured live in your browser across Clean Baseline, Lowercase Dictation, Abbreviations & Missing Punctuation, and OCR Typos at the current confidence threshold.

Measured PHI recall, precision, and leaked spans across 4 format perturbation suites
Perturbation suite Caught / Gold Recall Precision Leaked PHI spans
Run all 4 stress suites to populate the leakage table.

How it works

Show the code — character-overlap gold matching for live recall and leakage reporting
Show the code — monotonic WordPiece-to-character alignment in deid-core.mjs