# A local language model layered with rule-based and neural detectors for clinical text de-identification: an open-source toolkit and evaluation

arXiv: https://arxiv.org/abs/2611.12709 · HTML: https://mlsanity.com/paper/2611.12709/

## Key facts

- No citing papers in the map yet (data through 24 Nov 2026).
- Builds on 17 of its 47 references that are in the map.
- Submitted 9 Nov 2026.

## Builds on (most cited first, 17 of 17)

- [Gemma 4 Technical Report](https://mlsanity.com/paper/2607.02770/) (2026)
- [DeID-GPT: Zero-shot Medical Text De-Identification by GPT-4](https://mlsanity.com/paper/2303.11032/) (2023)
- [Ministral 3](https://mlsanity.com/paper/2601.08584/) (2026)
- [GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformer](https://mlsanity.com/paper/2311.08526/) (2023)
- [De-identification of Patient Notes with Recurrent Neural Networks](https://mlsanity.com/paper/1606.03475/) (2016)
- [RedactOR: An LLM-Powered Framework for Automatic Clinical Data De-Identification](https://mlsanity.com/paper/2505.18380/) (2025)
- [Not What the Doctor Ordered: Surveying LLM-based De-identification and Quantifying Clinical Information Loss](https://mlsanity.com/paper/2509.14464/) (2025)
- [Model Card for OpenAI Privacy Filter](https://mlsanity.com/paper/2608.18274/) (2026)
- [Towards Automatic Evaluation and Selection of PHI De-identification Models via Multi-Agent Collaboration](https://mlsanity.com/paper/2510.16194/) (2025)
- [Large Language Model Empowered Privacy-Protected Framework for PHI Annotation in Clinical Notes](https://mlsanity.com/paper/2504.18569/) (2025)
- [Improving the Performance of Radiology Report De-identification with Large-Scale Training and Benchmarking Against Cloud Vendor Methods](https://mlsanity.com/paper/2511.04079/) (2025)
- [SHIELD: A Diverse Clinical Note Dataset and Distilled Small Language Models for Enterprise-Scale De-identification](https://mlsanity.com/paper/2605.03301/) (2026)
- [Can Zero-Shot Commercial APIs Deliver Regulatory-Grade Clinical Text DeIdentification?](https://mlsanity.com/paper/2503.20794/) (2025)
- [Institution-Specific LLM Prompting Recovers PHI That De-identification Systems and Their Gold Standards Both Miss](https://mlsanity.com/paper/2608.17051/) (2026)
- [MedDeID enables locally governed clinical-text de-identification from real or synthetic training data](https://mlsanity.com/paper/2609.10049/) (2026)
- [TIDE 2.0: an open, model-agnostic engine for keyed de-identification of clinical notes](https://mlsanity.com/paper/2610.07224/) (2026)
- [Pyclipse, a library for deidentification of free-text clinical notes](https://mlsanity.com/paper/2311.02748/) (2023)

## Abstract (arXiv)

Objectives: To measure whether a locally hosted large language model (LLM), stacked with deterministic and clinical named-entity recognition (NER) detectors, finds more protected health information (PHI) than open tools, and at what precision. Materials and Methods: DeidSharp, an open-source .NET toolkit, combines the findings of pluggable detectors (patterns, a clinical NER model, a local 26B mixture-of-experts LLM) and fails closed on any detector error. Configurations fixed on tuning halves were compared, under a prespecified protocol, with deid, Philter, the Stanford/Penn de-identifier, OpenAI Privacy Filter and GLiNER on reporting halves of PhysioNet's nursing notes (889 spans) and semi-synthetic MIMIC-IV-Note discharge summaries (29,023 spans), and on synthetic ASQ-PHI queries, with paired patient-level bootstrap intervals. Results: In the nursing notes, against Stanford/Penn, the recall-first stack found 98.9% of PHI (+2.8, 95% CI 1.4 to 4.4) at 9.3 points lower precision; the precision-first stack, without NER, found 96.5%, matching Stanford/Penn, at 19.6 points higher precision (83.2%). In the discharge summaries, both stacks led Stanford/Penn by more than 20 points (recall-first 95.3%, +21.5, 20.5 to 22.4), almost entirely on generated untyped names; on typed labels all three exceeded 99%. All four prespecified comparisons held. No configuration beat deid significantly on its home corpus; Philter found more discharge-summary spans than the recall-first stack at 23 points lower precision. Discussion: The LLM was the main detector and NER added place names; asked to verify its own findings, the LLM discarded a quarter of true PHI. Conclusion: A local LLM layered with deterministic detectors offers recall-first and precision-first operating points without sending text off-site.
