Benchmarking large language models for de-identification of electronic health record notes
Open Access
- 21 July 2026
- journal article
- Published by BMJ in BMJ Health & Care Informatics
- Vol. 33 (1) , e101894
Abstract
Objectives: The rapid evolution of large language models (LLMs) and their growing application in clinical text processing have created an urgent need for reliable de-identification mechanisms. While LLMs show promise in identifying sensitive health information (SHI), their capabilities require rigorous evaluation. This study aims to conduct a comprehensive benchmarking analysis of various LLM-based, traditional rule-based and hybrid de-identification methods. Methods: Our benchmark analysis used five datasets (i2b2-2006, MIMIC-2008, i2b2-2014, i2b2-2016 and OpenDeID v1) from different countries. We developed three baseline and eight LLM-based models. The experimental setup encompassed nine different settings using various combinations of training and testing sets to assess model robustness and cross-dataset performance. Results: In the baseline models, the approach trained on the combined corpus of all five datasets (setting 3) significantly outperformed the other settings, achieving a strict F1 micro-average score of 0.8172. Regarding LLM-based models, the supervised fine-tuning approach using the same combined configuration (setting 9) achieved the highest performance with a strict F1 score of 0.9447. Discussion: The harmonisation of corpora ensured standardised data formatting and SHI management across five diverse datasets, highlighting the necessity for uniform categorisation to enhance the reliability of de-identification results. Conclusions: Our findings indicate that while fine-tuned LLMs offer superior accuracy, the observed performance variability across heterogeneous electronic health record sources poses significant technical challenges. Real-world implementation must address these inconsistencies to overcome the ethical and technical hurdles associated with deploying LLMs for handling sensitive health data.Keywords
Funding Information
- NVIDIA Academic Hardware (110322)
- Google Cloud Research (GCP19980904)
- Australian National Health and Medical Research Council (GNT1192469)
This publication has 35 references indexed in Scilit:
- Deidentification and Temporal Normalization of the Electronic Health Record Notes Using Large Language Models: The 2023 SREDH/AI-Cup Competition for Deidentification of Sensitive Health Information2025
- Large Language Models for Automatic Deidentification of Electronic Health Record Notes2025
- Large Language Model Influence on Diagnostic ReasoningJAMA Network Open, 2024
- Development and Validation of a Model to Identify Critical Brain Injuries Using Natural Language Processing of Text Computed Tomography ReportsJAMA Network Open, 2022
- Cohort selection for construction of a clinical natural language processing corpusComputer Methods and Programs in Biomedicine Update, 2021
- Assessment of a Deep Learning Model Based on Electronic Health Record Data to Forecast Clinical Outcomes in Patients With Rheumatoid ArthritisJAMA Network Open, 2019
- De-identification of psychiatric intake records: Overview of 2016 CEGS N-GRID shared tasks Track 1Journal of Biomedical Informatics, 2017
- De-identification of clinical notes via recurrent neural network and conditional random fieldJournal of Biomedical Informatics, 2017
- De-identification of medical records using conditional random fields and long short-term memory networksJournal of Biomedical Informatics, 2017
- Annotating longitudinal clinical narratives for de-identification: The 2014 i2b2/UTHealth corpusJournal of Biomedical Informatics, 2015