Scaling text de-identification using locally augmented ensembles

Karthik Murugadoss, Saivikas Killamsetty, Deeksha Doddahonnaiah, Nakul Iyer, Michael Pencina, Jeffrey Ferranti, John Halamka, Bradley Malin, Sankar ArdhanarimedRxiv 2024

Abstract

The natural language text in electronic health records (EHRs), such as clinical notes, often contains information that is not captured elsewhere and is invaluable for downstream clinical analysis. However, to make such data available for broader research purposes, personally identifiable information (PII) must be removed. Automated de-identification systems that mimic human accuracy can enable access to diverse datasets at scale. We introduce locally augmented ensembles, which adapt an existing PII detection ensemble method trained at one health institution to others by using institution-specific dictionaries to capture location-specific PII and recover medically relevant information previously misclassified as PII. We augment an ensemble model created at Mayo Clinic and test it on a dataset of 15,716 clinical notes at Duke University Health System. Our approach achieves increased recall and precision of 0.996 and 0.982 respectively. Furthermore, compared to LLM-based solutions, our ensemble approach is at least 3 times faster and 5 times more cost-effective to operate.

Introduction

Unlocking Electronic Health Records (EHRs) for large-scale medical research requires "scrubbing" them of Personally Identifiable Information (PII) to comply with HIPAA regulations. While automated systems exist, they face a "scaling" wall: a model trained at one hospital often falters at another due to local naming conventions, unique clinic abbreviations, or rare surnames.

Furthermore, these systems often suffer from "over-scrubbing" — mistakenly redacting vital medical information that resembles PII. For instance, a system might redact "Bruce" from "Bruce protocol" (a cardiac stress test), rendering the clinical note less useful. This paper presents a method to bridge this gap without the massive computational and human effort required to fine-tune models for every new site.

Methods: Locally Augmented Ensembles

The proposed approach utilizes a two-step adaptation process called locally augmented ensembles:

  1. Base Ensemble: A high-performing ensemble model (transformers + RegEx + heuristics) originally trained on Mayo Clinic data serves as the foundation.
  2. Local Augmentation: Instead of retraining the neural network, the model is augmented with two types of automated dictionaries:
  3. Structured PII Dictionaries: These use local hospital databases to capture site-specific identifiers (e.g., local clinic names or rare physician names) that a general model might miss.
  4. Medical Terminology Dictionaries: A list of ~460,000 terms harvested from public databases (like SNOMED) acts as a "safelist" to recover medical eponyms (like "Tuohy needle") mistakenly flagged as PII.
De-identification workflow using locally augmented ensembles showing PII detection, local dictionary augmentation, and medical term recovery.

Results

The study evaluated the performance of the locally augmented ensemble on clinical notes from Duke University Health System and compared it against several Large Language Models (LLMs) including GPT-4 and Llama-3.

Performance Metrics

On the Duke dataset, the locally augmented ensemble achieved a recall of 0.996 and precision of 0.982, outperforming the baseline model without augmentation. The inclusion of medical dictionaries was particularly effective at reducing false positives (over-scrubbing), while local PII dictionaries improved the detection of site-specific identifiers.

Performance metrics for different model configurations on Duke and Mayo datasets.

Comparison with Large Language Models

While LLMs are versatile, they struggled with the rigid requirements of PII detection. On the i2b2 benchmark, the ensemble achieved an F1-score of 0.97, significantly higher than the best-performing LLM (Llama-3-70B at 0.85). Furthermore, the ensemble approach proved to be 3x faster than the fastest LLM tested and 5x cheaper than the most cost-effective LLM option.

Discussion and Conclusion

A key insight from this research is that the structure of clinical language is remarkably consistent across institutions, even if specific identifiers vary. By using local dictionaries to handle site-specific variance, researchers can achieve near-perfect recall without expensive model retraining. This method also addresses the "Eponym Trap," where medical terms are misclassified as PII; at Duke, 3.5% of terms originally labeled as PII were actually medical terms that needed recovery.

In conclusion, specialized ensemble models augmented with local knowledge currently offer a more accurate, faster, and more cost-effective solution for large-scale clinical de-identification than general-purpose LLMs. Future work will explore parameter-efficient fine-tuning and leveraging EHR syntactic structures to further optimize these pipelines.

Summary updated

BibTeX
@misc{murugadoss2024scaling,
  author = {Karthik Murugadoss and Saivikas Killamsetty and Deeksha Doddahonnaiah and Nakul Iyer and Michael Pencina and Jeffrey Ferranti and John Halamka and Bradley Malin and Sankar Ardhanari},
  title = {{Scaling text de-identification using locally augmented ensembles}},
  year = {2024},
  doi = {10.1101/2024.06.20.24308896},
  howpublished = {medRxiv},
}
Figure