Uncertainty Aware Llm Deidentification and Anonymization of Clinical Notes | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Uncertainty Aware Llm Deidentification and Anonymization of Clinical Notes Adrienne Kline, Nafiseh Ghaffar Nia, Tyler J. Smith, David Leibowitz, and 1 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8959510/v1 This work is licensed under a CC BY 4.0 License Status: Under Revision Version 1 posted 11 You are reading this latest preprint version Abstract The increasing demand for privacy-preserving access to clinical data has catalyzed the development of synthetic Protected Health Information (PHI) corpora for evaluating Named Entity Recognition (NER) systems. In this study, we introduce a large-scale, high-fidelity synthetic clinical note dataset generated via prompt-based interactions with a lightweight large language model (ChatGPT4-mini). The dataset captures structural and semantic variability across nine distinct clinical note types and includes realistic PHI entities such as patient identifiers, institutional affiliations, and temporal markers. We systematically benchmarked a diverse set of transformer-based NER models—including domain-specific encoders (\texttt{Bio_ClinicalBERT}, \texttt{PubMedBERT}), general-purpose architectures (\texttt{BERT}, \texttt{RoBERTa}, \texttt{DeBERTa}), and decoder-only models adapted via parameter-efficient fine-tuning (\texttt{Phi-3-mini}, \texttt{DeBERTa-LORA}). Custom archiectural additions were made to each of these to render them suitable for an NER-based task. Model training employed data augmentation, label alignment via token-character mapping, and mixed precision optimization. Our results demonstrate that domain-pretrained models (\texttt{Bio_ClinicalBERT}, \texttt{Phi-3-mini}) outperform general-purpose counterparts, achieving F1-scores above 0.988, while compact models like \texttt{DeBERTa-LORA} maintain strong performance with reduced computational overhead. Extensive ablation studies reveal the critical role of self-attention mechanisms in contextual encoding and validate the utility of mixed precision for resource efficiency. Despite operating on synthetic data, model outputs exhibited high accuracy and generalizability, affirming the utility of synthetic corpora for model prototyping and evaluation. Future directions include domain adaptation to real-world datasets such as MIMIC-III and deployment of lightweight, privacy-aware NER models in clinical NLP workflows. Uncertainty-aware large language model (LLM) deidentification enables safer, more reliable anonymization of clinical notes by identifying and flagging ambiguous entities, enhancing patient privacy while preserving data utility for research and care innovation. Large Language Models (LLMs) Named Entity Recognition (NER) deidentification health informatics Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Under Revision Version 1 posted Editorial decision: Revision requested 13 Apr, 2026 Reviews received at journal 13 Apr, 2026 Reviews received at journal 06 Apr, 2026 Reviews received at journal 05 Apr, 2026 Reviewers agreed at journal 22 Mar, 2026 Reviewers agreed at journal 16 Mar, 2026 Reviewers agreed at journal 16 Mar, 2026 Reviewers invited by journal 16 Mar, 2026 Editor assigned by journal 13 Mar, 2026 Submission checks completed at journal 09 Mar, 2026 First submitted to journal 24 Feb, 2026 You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-8959510","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":607153572,"identity":"305f2196-fd92-4159-af40-0e25b6ed8488","order_by":0,"name":"Adrienne Kline","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABMElEQVRIie3RMUvDQBTA8QsHcXnh1oRA+xUSCi6KfpWEQp1aBKF0KPG6nEuta/otHB0THtTlbFehDoqQrhUXBVu8xBYlEcXN4f7D5cHlR3IcITrdvywgSfEEytWwn4/ml22zKj6JkZOWmmjxmv0TIVuiVvydsLP2Q/J0dVcjkA7wuDfrMHc2eYReFDH3JiHLLpaJLRdeOpZZg1gDjrGcnzij5k4DJNrOqBMY8bRCyG2LoCUw5MzgapiHl5KablsktifBo2qrLOo5WQk8/SDr6YasI/swJ6sq8XJiCAyKH7N4siGc2h4oYlSJLzOSngv0BaQcYdIMx0O6675N0InVV9Lh9KhMatctunwVWGfQxGfoH4QXYGRO3I8YG4J//9Ldqxx/23dXRja3rNPpdLq/9g49p3MIesOtHQAAAABJRU5ErkJggg==","orcid":"","institution":"Northwestern University","correspondingAuthor":true,"prefix":"","firstName":"Adrienne","middleName":"","lastName":"Kline","suffix":""},{"id":607153574,"identity":"7d537c02-0212-45fb-9125-ada0c48e1b2b","order_by":1,"name":"Nafiseh Ghaffar Nia","email":"","orcid":"","institution":"Northwestern University","correspondingAuthor":false,"prefix":"","firstName":"Nafiseh","middleName":"Ghaffar","lastName":"Nia","suffix":""},{"id":607153576,"identity":"9764daf4-6864-45cc-a0fe-13691898bac1","order_by":2,"name":"Tyler J. Smith","email":"","orcid":"","institution":"Northwestern University","correspondingAuthor":false,"prefix":"","firstName":"Tyler","middleName":"J.","lastName":"Smith","suffix":""},{"id":607153582,"identity":"2b7821a8-af75-479f-98a9-f946d9c28711","order_by":3,"name":"David Leibowitz","email":"","orcid":"","institution":"Northwestern University","correspondingAuthor":false,"prefix":"","firstName":"David","middleName":"","lastName":"Leibowitz","suffix":""},{"id":607153589,"identity":"9c5bb267-bc3a-4f97-b34c-df1a3f8917b3","order_by":4,"name":"Douglas Johnston","email":"","orcid":"","institution":"Northwestern University","correspondingAuthor":false,"prefix":"","firstName":"Douglas","middleName":"","lastName":"Johnston","suffix":""}],"badges":[],"createdAt":"2026-02-24 16:23:55","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8959510/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8959510/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":104997036,"identity":"bdff4ef2-a5cf-4407-a911-64e3b491f406","added_by":"auto","created_at":"2026-03-19 16:17:24","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1109232,"visible":true,"origin":"","legend":"","description":"","filename":"Springernoteguard.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8959510/v1_covered_ff09cc35-1d9f-4d1d-a3a9-b07da7f3008c.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"\u003cp\u003eUncertainty Aware Llm Deidentification and Anonymization of Clinical Notes\u003c/p\u003e","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"journal-of-healthcare-informatics-research","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"jhir","sideBox":"Learn more about [Journal of Healthcare Informatics Research](http://link.springer.com/journal/41666)","snPcode":"41666","submissionUrl":"https://submission.nature.com/new-submission/41666/3","title":"Journal of Healthcare Informatics Research","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false},"keywords":"Large Language Models (LLMs), Named Entity Recognition (NER), deidentification, health informatics","lastPublishedDoi":"10.21203/rs.3.rs-8959510/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8959510/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"The increasing demand for privacy-preserving access to clinical data has catalyzed the development of synthetic Protected Health Information (PHI) corpora for evaluating Named Entity Recognition (NER) systems. In this study, we introduce a large-scale, high-fidelity synthetic clinical note dataset generated via prompt-based interactions with a lightweight large language model (ChatGPT4-mini). The dataset captures structural and semantic variability across nine distinct clinical note types and includes realistic PHI entities such as patient identifiers, institutional affiliations, and temporal markers. We systematically benchmarked a diverse set of transformer-based NER models—including domain-specific encoders (\\texttt{Bio\\_ClinicalBERT}, \\texttt{PubMedBERT}), general-purpose architectures (\\texttt{BERT}, \\texttt{RoBERTa}, \\texttt{DeBERTa}), and decoder-only models adapted via parameter-efficient fine-tuning (\\texttt{Phi-3-mini}, \\texttt{DeBERTa-LORA}). Custom archiectural additions were made to each of these to render them suitable for an NER-based task. Model training employed data augmentation, label alignment via token-character mapping, and mixed precision optimization. Our results demonstrate that domain-pretrained models (\\texttt{Bio\\_ClinicalBERT}, \\texttt{Phi-3-mini}) outperform general-purpose counterparts, achieving F1-scores above 0.988, while compact models like \\texttt{DeBERTa-LORA} maintain strong performance with reduced computational overhead. Extensive ablation studies reveal the critical role of self-attention mechanisms in contextual encoding and validate the utility of mixed precision for resource efficiency. Despite operating on synthetic data, model outputs exhibited high accuracy and generalizability, affirming the utility of synthetic corpora for model prototyping and evaluation. Future directions include domain adaptation to real-world datasets such as MIMIC-III and deployment of lightweight, privacy-aware NER models in clinical NLP workflows. Uncertainty-aware large language model (LLM) deidentification enables safer, more reliable anonymization of clinical notes by identifying and flagging ambiguous entities, enhancing patient privacy while preserving data utility for research and care innovation.","manuscriptTitle":"Uncertainty Aware Llm Deidentification and Anonymization of Clinical Notes","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-03-19 16:17:03","doi":"10.21203/rs.3.rs-8959510/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2026-04-14T01:56:02+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-13T21:32:41+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-07T02:10:58+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-05T23:44:55+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"317783226848716298288472548284299332166","date":"2026-03-22T21:38:37+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"66563435196916263188396935791821374007","date":"2026-03-16T19:41:31+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"272950500205189986048634064179785437121","date":"2026-03-16T14:55:57+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2026-03-16T14:49:48+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2026-03-13T13:35:08+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2026-03-09T10:37:54+00:00","index":"","fulltext":""},{"type":"submitted","content":"Journal of Healthcare Informatics Research","date":"2026-02-24T16:14:27+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"journal-of-healthcare-informatics-research","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"jhir","sideBox":"Learn more about [Journal of Healthcare Informatics Research](http://link.springer.com/journal/41666)","snPcode":"41666","submissionUrl":"https://submission.nature.com/new-submission/41666/3","title":"Journal of Healthcare Informatics Research","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false}}],"origin":"","ownerIdentity":"f65b9759-826c-4e3a-b01c-da73e38bf558","owner":[],"postedDate":"March 19th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"in-revision","subjectAreas":[],"tags":[],"updatedAt":"2026-04-14T02:08:36+00:00","versionOfRecord":[],"versionCreatedAt":"2026-03-19 16:17:03","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8959510","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8959510","identity":"rs-8959510","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.