Benchmarking transformer-based models for medical record de-identification in a single center multi-specialty evaluation
Protecting patient confidentiality is central to enabling research using electronic health records. Automated text de-identification offers a scalable alternative to manual redaction. However, different approaches vary in accuracy and adaptability. We evaluated four transformer-based, task-specific models and five large language models on 3,650 clinical records spanning general and specialty datasets from a UK hospital group. Records were dual-annotated by clinicians, allowing precise comparison of performance. The Microsoft Azure de-identification service achieved the highest F1 score, approaching clinician performance, while fine-tuned AnonCAT and GPT-4-0125 with few-shot prompting also performed strongly. Smaller LLMs frequently over-redacted or produced hallucinatory content, limiting interpretability. Task-specific models demonstrated greater stability across datasets, while low-level adaptation improved performance in both model classes. These findings highlight that automated de-identification systems can provide effective support for large-scale sharing of clinical records, but success depends on careful model choice, adaptation strategies, and safeguards to ensure robust data utility and privacy.
Authors
- Andrew A. S. Soltan (ORCID: https://orcid.org/0000-0003-2391-5361)
- David A. Clifton (ORCID: https://orcid.org/0000-0002-9848-8555)
- Dominic Furniss (ORCID: https://orcid.org/0000-0003-2780-7173)
- Rachel Kuo (ORCID: https://orcid.org/0000-0002-8645-1405)
- Professor Gary S. Collins (ORCID: https://orcid.org/0000-0002-2772-2316)
- David W. Eyre (ORCID: https://orcid.org/0000-0001-5095-6367)
- Claire E O’Hanlon (ORCID: https://orcid.org/0000-0001-6398-5845)
- Alan Hasanic
Institutions
- Nuffield Orthopaedic Centre (GB)
- Public Health England (GB)
- University of Oxford (GB)
- Suzhou Research Institute (CN)
- Oxford BioMedica (United Kingdom) (GB)
- Oxford University Hospitals NHS Trust (GB)
Publication Details
- Journal
- iScience
- Published
- 2025-10-09
- DOI
- https://doi.org/10.1016/j.isci.2025.113732
- Primary Topic
- AI in cancer detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00