use case · basics · 11 HIPAA PHI categories · BILOU · Recall vs Precision
Inside Clinical DeID-BERT: BILOU subwords & recall thresholds
Why does a clinical de-identifier predict 45 tags instead of 11, how do fragmented WordPiece subwords like
Jen + ##kins or 555 + - + 867 reassemble, and why do
clinical pipelines tune thresholds for recall over precision?
1 · Model runtime
Prepare the model to run live BILOU & threshold probes.
2 · i2b2 / HIPAA PHI tag taxonomy (11 categories × BILOU = 45 labels)
Each of the 11 entity types has four positional prefixes — B- (Begin), I- (Inside),
L- (Last), U- (Unit single-token) — plus shared O (Outside). Notice the
training skew in the i2b2 2014 corpus: DATE has 7,502 training spans while EMAIL (4) and
OTHERPHI (2) are rare.
| Category | Group | HIPAA / i2b2 mapping | i2b2 Train / Test | Synthetic example |
|---|
3 · Subword BILOU merging lab
Raw WordPiece tokens (non-O)
Merged BILOU spans
| Span | Category | BILOU Pattern | Subwords | Score |
|---|
4 · Recall-vs-precision threshold sweep (0.30 → 0.95)
In clinical de-identification, a false negative leaks patient PHI whereas a false positive merely over-redacts a word. Run the sweep on the annotated synthetic note below and drag the threshold slider to see how missed PHI spans rise as the confidence bar increases.
| Threshold | TP / Gold | FP | Missed PHI (FN) | Recall | Precision | F1 |
|---|---|---|---|---|---|---|
| Run the threshold sweep to populate live metrics. | ||||||