Can a Large Language Model Learn From Medical Clinical Notes Without Remembering Them?

Health systems are training language models on psychiatric notes to ease documentation burden. New research shows that even after de-identification, these models can retain enough to let an attacker tell whether a specific patient's notes were used to train them, and demonstrates a practical path to fix it.

Few documents in a hospital are as personal as a psychiatric note. A clinician writes down what someone said on a bad day, in words close to their own, along with details about family, work, and relationships. Now health systems are being asked to use that text to train language models, mostly to take some of the documentation burden off clinicians.

The promise is real. But one question keeps nagging at me. After a model has learned from those notes, what does it still know about the people in them?

Removing the Name Is Not Removing the Person

The standard answer to privacy in health data is de-identification. Strip the names, dates, phone numbers, and record numbers, and the data is considered safe to use.

That works reasonably well for tables. It works much less well for free text, and psychiatric notes are almost all free text. A note can be full of details that appear on no identifier list but still point to one person: a rare occupation, a small town, a specific event at a specific workplace. In psychiatric care those details are often the clinical content itself, so you cannot delete them without deleting the meaning.

The history here is worth remembering. In the 1990s, Latanya Sweeney matched an “anonymized” hospital dataset against public voter records and picked out the medical records of the Massachusetts governor. Those were tables with a handful of columns. A clinical note holds far more.

Automated scrubbing also misses things. In my research, we ran psychiatric notes through both pattern-matching rules and a neural tagger, and a small share of identifiers, around 0.7 percent, still got through. That sounds tiny until you remember that a corpus of this kind runs to well over a hundred thousand notes.

Models Remember More Than We Would Like

A trained language model is not just a bundle of general patterns. It can retain pieces of its training data, and researchers have shown that carefully written prompts can pull rare passages back out. Small, sensitive datasets make this worse, because unusual passages get seen again and again during training, and unusual passages are exactly what identifies people.

We saw this directly. Even after masking, a model fine-tuned in the ordinary way gave an attacker a real edge. Attack success is usually scored on a scale where 0.5 is a coin flip, and ours came in at 0.86. In plain terms, someone with query access to the model could tell, far better than chance, whether a particular note had been used to train it. It also reproduced identifier-like strings at roughly 27 per 10,000 tokens.

So the model becomes a new place where the data lives. It may sit outside the systems that were locked down for the original records, and it may get shared, moved, or exposed through an API. Nobody set up access controls for it the way they did for the EHR.


“Once you train on patient notes, the model is part of your data store, whether or not anyone has written that down.”


The Trade-Off Everyone Assumes

The usual objection is that stronger privacy protection costs accuracy, and clinicians will not use a model that gets worse.

That assumption deserves to be tested, not just repeated. When we trained the same kind of model with differential privacy, which adds carefully calibrated noise so that no single patient’s records can shift the result much, the attack dropped to 0.52, close to a coin flip. The model still predicted the next word correctly about 85 percent of the time, within a few percentage points of the non-private version. The extra cost was compute, about 13 more hours on a four-GPU server.

One design choice mattered more than I expected. Psychiatric notes run long, and a single fixed noise setting punishes long notes the most. Adjusting the setting to note length recovered accuracy without weakening the protection.

I would not read this as “privacy is free.” Privacy versus usefulness is a curve, not a cliff, and where you land depends on the task and how much protection you need. The useful habit is to report both together so people can see what a given level of protection actually costs.

Where This Stops

This was one hospital’s data, from a public research database. The risks that remain are the kind I would want any team to plan for: misspelled names and nicknames that slip past scrubbing, notes that are unusually short or long, models that behave differently at a different hospital, and prompts clever enough to coax out memorized text. And formal privacy guarantees are not a legal stamp. They do not replace ethics review or careful control over who gets the model.

Key Takeaways

  • De-identifying inputs is not the same as securing outputs. Even after masking, a standard fine-tuned model let an attacker guess training membership with 0.86 accuracy, far above the 0.5 coin-flip baseline.
  • Automated scrubbing misses real identifiers. Around 0.7% of identifiers survived pattern-matching and neural tagging, a small share that still adds up across a corpus of over 100,000 notes.
  • Differential privacy worked, at a modest cost. It cut attack success to 0.52 (near chance) while keeping next-word accuracy around 85%, for about 13 extra hours of compute on a four-GPU server.
  • Layered protection matters. Removing the masking step increased leakage even with private training still in place; no single safeguard was sufficient alone.
  • A trained model should be governed like the records it learned from — with the same access controls, logging and retention rules as the source EHR data.
  • Privacy and performance should be reported together. A model card listing accuracy alone tells only half the story.

What Teams Can Do With This

Measure privacy directly. “We de-identified the data” describes the inputs. It says nothing about what the trained model will output. Test the model itself with extraction and membership inference attempts.

Do not rely on one layer. In our tests, removing the masking step made leakage climb noticeably even with private training in place. Each layer covered gaps the other left.

Treat the model as a data store. Give it the same access controls, logging, and retention rules as the source records.

Report privacy and performance together. A model card that lists accuracy and says nothing about privacy tells you half the story.

Bring in clinicians and privacy officers early. They know which details in a note are most revealing, and they will spot risks an engineering team would not.

Closing Thought

Health systems will train models on clinical text. The incentives are too strong for that to stop. What we can still shape is how it is done and what evidence comes with it.

The question worth asking is not only whether the model is accurate. It is whether the people who trusted a clinician with their story can be shown, with evidence and not just assurances, that the model did not keep what it should not.

WHY THIS MATTERS: THE BIZTECH BYTES TAKEAWAY

For health systems, AI leaders and compliance teams, this piece raises four practical points:

  • De-identifying inputs is not the same as securing outputs. A model trained on “anonymized” notes can still leak identifying information unless it is tested directly.
  • A trained model should be governed like the records it learned from. Access controls, logging and retention policies need to extend to the model itself, not stop at the source data.
  • Privacy-preserving training is not free, but it is affordable. The research cited here found a large drop in attack success for roughly 13 extra hours of compute, with accuracy within a few percentage points of the non-private version.
  • Privacy and performance should be reported together. A model card showing only accuracy leaves out half the risk picture.

Infomations

Time

Key Highlights

Trend

Health systems are fine-tuning LLMs directly on clinical notes to ease documentation burden.

Focus

De-identification alone doesn't stop trained models from leaking who was in the training data.

Impact

Differential privacy cut attack success to near chance with minimal accuracy loss, offering a practical path to safer clinical AI.

Author Profile

Chakra Pavan Kumar Kota

Senior Software Engineer at Jack in the Box

With over 11 years of combined academic and industry research experience, I currently serve as a Senior Software Engineer at Jack in the Box, a technology-driven organization in the United States. I hold a Master’s degree from the University of Missouri–Kansas City and am pursuing a Ph.D. in Artificial Intelligence and Data Science at the University of the Cumberlands. My professional expertise includes Artificial Intelligence, Machine Learning, Cybersecurity, and Cloud Computing.

Related posts

Can a Large Language Model Learn From Medical Clinical Notes Without Remembering Them?

Can a Large Language Model Learn From Medical Clinical…

Health systems are training language models on psychiatric notes to ease documentation burden. New research shows that…

Beyond Speed: How Microsoft Power Platform Is Redefining Enterprise DevOps

Beyond Speed: How Microsoft Power Platform Is Redefining Enterprise…

Low-Code and No-Code platforms are often perceived as productivity shortcuts for building applications quickly. In modern enterprises,…

AI-Assisted Development: Using Copilot to Elevate M365 Engineering Practices

AI-Assisted Development: Using Copilot to Elevate M365 Engineering Practices

Artificial intelligence is rapidly changing how software is written, tested, and maintained—but not always in the ways…

Intelligent Finance Meets Intelligent Infrastructure:Practical Innovations Shaping Modern Financial Services

Intelligent Finance Meets Intelligent Infrastructure:Practical Innovations Shaping Modern Financial…

Print 🖨 PDF 📄 eBook 📱 From Rule-Based Finance to Adaptive Intelligence Traditional financial systems were designed…

LLMs at the Edge: Decentralized Power and Control

LLMs at the Edge: Decentralized Power and Control

First, large language models (LLMs), such as those in the recent GPT-3, have proved crucial in processing…

Data Sovereignty: Designing AI for Local Control

Data Sovereignty: Designing AI for Local Control

Data in the contemporary world is one of the most valuable assets in the demanding technologies, markets,…

Agentic AI in Healthcare: From Assistance to Autonomy

Agentic AI in Healthcare: From Assistance to Autonomy

Healthcare is one of the most data-rich and complex industries in the world. With electronic health records…

Implementing Privileged Access Management Solutions: Challenges and Best Practices

Implementing Privileged Access Management Solutions: Challenges and Best Practices

Privileged Access Management (PAM) is a critical component in securing privileged accounts, credentials, and secrets in enterprise…

Operational Lessons from Running High-Availability Java Systems

Operational Lessons from Running High-Availability Java Systems

High availability Java systems sit quietly behind many of the services people depend on everyday. Financial platforms,…

Time to Value (TTV): The New KPI That Defines Product Success

Time to Value (TTV): The New KPI That Defines…

In today’s fast-moving digital landscape, traditional metrics like features, downloads, or even engagement are no longer enough.…

The “Latency Economy”: Why Speed Is Becoming the Ultimate Competitive Advantage

The “Latency Economy”: Why Speed Is Becoming the Ultimate…

A new competitive battleground is emerging in the digital world—latency. In an era defined by real-time applications,…

AI Misalignment Risk: When Intelligent Systems Don’t Align with Human Intent

AI Misalignment Risk: When Intelligent Systems Don’t Align with…

As artificial intelligence becomes more autonomous, a critical challenge is gaining attention: AI misalignment. This occurs when…

Predictive Interfaces: When Software Knows Before You Act

Predictive Interfaces: When Software Knows Before You Act

User interfaces are undergoing a quiet transformation. Instead of waiting for users to click, search, or type,…

The Execution Gap in AI: Why Strategy Isn’t Translating Into Real Impact

The Execution Gap in AI: Why Strategy Isn’t Translating…

AI is everywhere in strategy decks, leadership discussions, and boardroom priorities. Yet, despite massive investment and interest,…

Generative AI Is Changing How New Medicines Are Discovered

Generative AI Is Changing How New Medicines Are Discovered

Generative AI is beginning to change the way biomedical research is done, especially in the early stages…

AI in the Audio World: From Signal Processing to Perceptual Intelligence

AI in the Audio World: From Signal Processing to…

Audio has gone from being primarily a passive signal-processing problem to a smart, flexible system. AI has…

Building Next-Generation Intelligent Intrusion Prevention Systems

Building Next-Generation Intelligent Intrusion Prevention Systems

The convergence of traditional IDS/IPS technologies with AI-based systems will mark a major paradigm shift in the…