PrecLLM: A Privacy-Preserving Framework for Efficient Clinical Annotation Extraction from Unstructured EHRs using Small-Scale LLMs | 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 Article PrecLLM: A Privacy-Preserving Framework for Efficient Clinical Annotation Extraction from Unstructured EHRs using Small-Scale LLMs Yixiang Qu, Yifan Dai, Shilin Yu, Pradham Tanikella, Malvika Pillai, and 12 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9203956/v1 This work is licensed under a CC BY 4.0 License Status: Under Review Version 1 posted 6 You are reading this latest preprint version Abstract Large Language Models (LLMs) have demonstrated remarkable proficiency in automated text annotation within natural language processing. However, their deployment in clinical settings is severely constrained by strict privacy regulations and the prohibitive computational cost of processing voluminous unstructured Electronic Health Records (EHRs). Unstructured EHR typically include crucial information for clinical decisions in precision medicine, such as in cancer. To overcome this bottleneck and enable scalable annotation extraction from clinical notes, we developed a compact LLM framework featuring an novel EHR-specific resource-efficient PREproCessing technique that can be adopted in existing LLM procedures (PrecLLM). This technique is particularly useful for the smaller LLMs which are often more accuracy-challenged. PrecLLM has been optimized for local deployment in computational environments with stringent privacy requirements and restricted access to high-performance GPUs. Two alternative simple yet powerful procedures have been provided in the preprocessing step includes both regular expressions (regex) and Retrieval-Augmented Generation (RAG) to extract and highlight key information from unstructured clinical notes. Pre-filtering long and unstructured texts enhanced the performance of smaller LLMs on EHR-related tasks. Evaluation was performed on two distinct cohorts: a locally curated private EHR dataset from the EPIC system for a Head and Neck Cancer (HNC) cohort, and the publicly available EHR dataset (MIMIC-IV). Using MIMIC-IV, we further compared PrecLLM against fine-tuned LLMs. Results demonstrated that PrecLLM substantially enhanced the performance of the original smaller LLMs in terms of sensitivity, specificity, and F1 scores, making it well-suited for privacy-sensitive and resource-constrained applications. This study offers optimized LLM performance for local, secure, and efficient healthcare applications, and provides practical guidance for clinical LLM deployment while addressing challenges related to privacy, computational feasibility, and clinical applicability. Biological sciences/Computational biology and bioinformatics Health sciences/Health care Physical sciences/Mathematics and computing Health sciences/Medical research Full Text Additional Declarations No competing interests reported. Supplementary Files supplementary.pdf Cite Share Download PDF Status: Under Review Version 1 posted Reviewers agreed at journal 25 Apr, 2026 Reviewers agreed at journal 21 Apr, 2026 Reviewers invited by journal 19 Apr, 2026 Editor assigned by journal 27 Mar, 2026 Submission checks completed at journal 26 Mar, 2026 First submitted to journal 23 Mar, 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-9203956","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":629549098,"identity":"2a63617e-b448-45f7-961f-690addaf3b1c","order_by":0,"name":"Yixiang Qu","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Yixiang","middleName":"","lastName":"Qu","suffix":""},{"id":629549100,"identity":"ec917332-3dd4-4f60-87d8-40c5ee5153b7","order_by":1,"name":"Yifan Dai","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Yifan","middleName":"","lastName":"Dai","suffix":""},{"id":629549101,"identity":"e7edcdce-c01a-4757-af2c-6b3d248365e3","order_by":2,"name":"Shilin Yu","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Shilin","middleName":"","lastName":"Yu","suffix":""},{"id":629549102,"identity":"10d35cc0-6a05-486c-87d7-9a9990af9dea","order_by":3,"name":"Pradham Tanikella","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Pradham","middleName":"","lastName":"Tanikella","suffix":""},{"id":629549103,"identity":"61fcc1e8-5ac0-474f-b11e-e111bccf000d","order_by":4,"name":"Malvika Pillai","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Malvika","middleName":"","lastName":"Pillai","suffix":""},{"id":629549104,"identity":"0122f527-98c1-41a0-a94a-48873d8e6947","order_by":5,"name":"Walter Chen","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Walter","middleName":"","lastName":"Chen","suffix":""},{"id":629549105,"identity":"2df8c845-d989-4593-9d31-7351a739d325","order_by":6,"name":"Jialiu Xie","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Jialiu","middleName":"","lastName":"Xie","suffix":""},{"id":629549106,"identity":"5eb5e2b8-fe33-4f77-8965-9b01ea5d842a","order_by":7,"name":"Yishan Ren","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Yishan","middleName":"","lastName":"Ren","suffix":""},{"id":629549107,"identity":"9ac4e862-80ab-4824-965b-c7ef5aa10d7e","order_by":8,"name":"Duan Wang","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Duan","middleName":"","lastName":"Wang","suffix":""},{"id":629549108,"identity":"9f8b71f2-df75-40fb-b9ae-d56ce3cba7fc","order_by":9,"name":"Yikai Wang","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Yikai","middleName":"","lastName":"Wang","suffix":""},{"id":629549109,"identity":"1aa60527-366a-4fa7-9db7-b481f6b88a93","order_by":10,"name":"Sid Sheth","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Sid","middleName":"","lastName":"Sheth","suffix":""},{"id":629549110,"identity":"cf7eb9d0-4905-4679-9901-a8f069b947f6","order_by":11,"name":"Guanting Chen","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Guanting","middleName":"","lastName":"Chen","suffix":""},{"id":629549111,"identity":"aefd257f-62bf-410d-b4d1-6d63e1bc8d20","order_by":12,"name":"Yufeng Liu","email":"","orcid":"","institution":"University of Michigan","correspondingAuthor":false,"prefix":"","firstName":"Yufeng","middleName":"","lastName":"Liu","suffix":""},{"id":629549112,"identity":"c878308a-c21f-4378-b9a5-49fbd603077d","order_by":13,"name":"Travis Schrank","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Travis","middleName":"","lastName":"Schrank","suffix":""},{"id":629549113,"identity":"97c78244-8e7f-4460-b45c-d5125e008723","order_by":14,"name":"Trevor Hackman","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Trevor","middleName":"","lastName":"Hackman","suffix":""},{"id":629549115,"identity":"c4a07e0d-40e1-4282-bff5-30f298e360f5","order_by":15,"name":"Didong Li","email":"","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":false,"prefix":"","firstName":"Didong","middleName":"","lastName":"Li","suffix":""},{"id":629549116,"identity":"c78eee2b-fd84-406d-a84f-31a1b34fcb18","order_by":16,"name":"Di Wu","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAiElEQVRIiWNgGAWjYDCCAwyMDyCsBOK1MBuQrIVNgjQtfDdyzKp5d9gx8LPnGBCnRRKo5TbvmWQGyZ43RGoxuA3S0naAweAGsbaAtBSDtNiTpIUZbIsE0X65/6xYcm5bMo/EmWcFxGnhO3N444e3bXZy/O3JG4jTAgM8pCkfBaNgFIyCUYAfAABZ7Ck6rEnz9wAAAABJRU5ErkJggg==","orcid":"","institution":"University of North Carolina at Chapel Hill","correspondingAuthor":true,"prefix":"","firstName":"Di","middleName":"","lastName":"Wu","suffix":""}],"badges":[],"createdAt":"2026-03-23 19:08:48","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-9203956/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9203956/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":108007406,"identity":"3d5f104a-33f3-477a-8f09-cb9bf511637d","added_by":"auto","created_at":"2026-04-28 12:59:52","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":845180,"visible":true,"origin":"","legend":"","description":"","filename":"npjdmmanuscriptupload.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9203956/v1_covered_d46f2c9e-e22c-428e-b267-b25a5d8e1cc1.pdf"},{"id":107947127,"identity":"d2237610-3707-4f8e-aebd-47f9a0a7fdf0","added_by":"auto","created_at":"2026-04-27 23:27:51","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"supplement","size":242697,"visible":true,"origin":"","legend":"","description":"","filename":"supplementary.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9203956/v1/311f5d7d58e860784d2ba86b.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"PrecLLM: A Privacy-Preserving Framework for Efficient Clinical Annotation Extraction from Unstructured EHRs using Small-Scale LLMs","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":"npj-digital-medicine","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"npjdigitalmed","sideBox":"Learn more about [npj Digital Medicine](http://www.nature.com/npjdigitalmed/)","snPcode":"41746","submissionUrl":"https://submission.springernature.com/new-submission/41746/3","title":"npj Digital Medicine","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"NPJ","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"","lastPublishedDoi":"10.21203/rs.3.rs-9203956/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9203956/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"Large Language Models (LLMs) have demonstrated remarkable proficiency in automated text annotation within natural language processing. However, their deployment in clinical settings is severely constrained by strict privacy regulations and the prohibitive computational cost of processing voluminous unstructured Electronic Health Records (EHRs). Unstructured EHR typically include crucial information for clinical decisions in precision medicine, such as in cancer. To overcome this bottleneck and enable scalable annotation extraction from clinical notes, we developed a compact LLM framework featuring an novel EHR-specific resource-efficient PREproCessing technique that can be adopted in existing LLM procedures (PrecLLM). This technique is particularly useful for the smaller LLMs which are often more accuracy-challenged. PrecLLM has been optimized for local deployment in computational environments with stringent privacy requirements and restricted access to high-performance GPUs. Two alternative simple yet powerful procedures have been provided in the preprocessing step includes both regular expressions (regex) and Retrieval-Augmented Generation (RAG) to extract and highlight key information from unstructured clinical notes. Pre-filtering long and unstructured texts enhanced the performance of smaller LLMs on EHR-related tasks. Evaluation was performed on two distinct cohorts: a locally curated private EHR dataset from the EPIC system for a Head and Neck Cancer (HNC) cohort, and the publicly available EHR dataset (MIMIC-IV). Using MIMIC-IV, we further compared PrecLLM against fine-tuned LLMs. Results demonstrated that PrecLLM substantially enhanced the performance of the original smaller LLMs in terms of sensitivity, specificity, and F1 scores, making it well-suited for privacy-sensitive and resource-constrained applications. This study offers optimized LLM performance for local, secure, and efficient healthcare applications, and provides practical guidance for clinical LLM deployment while addressing challenges related to privacy, computational feasibility, and clinical applicability.","manuscriptTitle":"PrecLLM: A Privacy-Preserving Framework for Efficient Clinical Annotation Extraction from Unstructured EHRs using Small-Scale LLMs","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-04-27 23:27:47","doi":"10.21203/rs.3.rs-9203956/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"reviewerAgreed","content":"298560256108977662287871811635698462701","date":"2026-04-25T17:39:47+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"258422772833038444773202098187778596196","date":"2026-04-21T14:26:59+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2026-04-20T03:54:30+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2026-03-27T14:41:00+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2026-03-27T03:38:31+00:00","index":"","fulltext":""},{"type":"submitted","content":"npj Digital Medicine","date":"2026-03-23T19:00:10+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"npj-digital-medicine","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"npjdigitalmed","sideBox":"Learn more about [npj Digital Medicine](http://www.nature.com/npjdigitalmed/)","snPcode":"41746","submissionUrl":"https://submission.springernature.com/new-submission/41746/3","title":"npj Digital Medicine","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"NPJ","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"7880a0a7-7abc-46fc-b177-a6b1edc7bf1c","owner":[],"postedDate":"April 27th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"under-review","subjectAreas":[{"id":67010660,"name":"Biological sciences/Computational biology and bioinformatics"},{"id":67010661,"name":"Health sciences/Health care"},{"id":67010662,"name":"Physical sciences/Mathematics and computing"},{"id":67010663,"name":"Health sciences/Medical research"}],"tags":[],"updatedAt":"2026-04-27T23:27:47+00:00","versionOfRecord":[],"versionCreatedAt":"2026-04-27 23:27:47","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9203956","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9203956","identity":"rs-9203956","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.