modernbert-ausmed-pii
Token-classification (NER) model for PII detection in Australian clinical notes, trained on synthetic data from the pii_datagen pipeline. Labels use the BIO scheme over these entity types:
ABNADDRESSADVANCE_CARE_DIRECTIVEAGEAMBULANCE_MEMBERSHIP_NUMBERBANKING_FINANCE_DETAILSCENTRELINK_NUMBERCOUNTRYDATEDRIVER_LICENCE_NUMBERDVA_FILE_NUMBEREMAIL_ADDRESSFAX_NUMBERIHILGAMEDICAL_ENTITYMEDICAL_PROFESSIONAL_IDMEDICARE_NUMBERMRNNAMENDIS_NUMBEROCCUPATIONORGANISATION_NAMEPASSPORT_NUMBERPATHOLOGY_ACCESSION_NUMBERPHONEPOLICE_CORRECTIONS_IDPRIVATE_HEALTH_INSURANCE_NUMBERPROVIDER_NUMBERRADIOLOGY_ACCESSION_NUMBERSEX_GENDERTAC_CLAIM_NUMBERTFNTIMESTAMPWORKCOVER_CLAIM
MEDICAL_ENTITY marks eponymous medical terms (Parkinson's disease, Foley catheter);
it is a hard-negative class and must never be redacted.
Metrics (seqeval, entity-level)
| split | precision | recall | f1 |
|---|---|---|---|
| test (model selection) | 0.8252 | 0.9506 | 0.8835 |
| holdout | 0.8239 | 0.9468 | 0.8811 |
Training
- data: 17817 synthetic notes from the pii_datagen pipeline (audited)
- split: 13351 train / 3541 test (per-epoch model selection) / 925 untouched holdout — deterministic per-doc_id hash, seed 42
- selection: best epoch by test-split F1 (epoch 4 of 7 run), early stopping (patience 3), max 15 epochs
- context length: 8192 tokens
Usage
from transformers import pipeline
ner = pipeline("token-classification", model="Cbezz/modernbert-ausmed-pii", aggregation_strategy="simple")
ner("Patient John Smith, DOB 12/03/1980, MRN 4456219.")
- Downloads last month
- 22
Model tree for Cbezz/modernbert-ausmed-pii
Base model
answerdotai/ModernBERT-baseEvaluation results
- precision (test split) on pii_datagen synthetic Australian clinical notesself-reported0.825
- recall (test split) on pii_datagen synthetic Australian clinical notesself-reported0.951
- f1 (test split) on pii_datagen synthetic Australian clinical notesself-reported0.883
- accuracy (test split) on pii_datagen synthetic Australian clinical notesself-reported0.967