NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Clinically Grounded Privacy Evaluation of Medical LMs

Sasha Ronaghi, Sana Tonekaboni, Lena Stempfle, Vivian Utti, Jordan Li Cahoon, Nathaniel Hendrix, Ayin Vala, Marzyeh Ghassemi, Emily AlsentzerarXiv 2026

TL;DR

Medical language models (LMs) can inadvertently memorize and leak sensitive patient data, but standard privacy metrics often misjudge this risk by conflating harmless boilerplate text with actual patient secrets. This paper introduces a clinically grounded evaluation framework that tests models against realistic levels of adversarial knowledge, revealing that routine encounter metadata (like billing info) can unlock extensive patient histories and sensitive diagnoses.

What Problem Does This Paper Address?

As language models are increasingly trained on specialized clinical notes to assist with tasks like medical coding and summarization, they bring along a massive compliance headache: the risk of leaking Protected Health Information (PHI).

Existing privacy evaluations fall short in two major ways. First, they typically use general-domain threat models, assuming an attacker either wants to extract arbitrary text or already possesses a snippet of a medical note. In reality, an adversary is more likely to have partial background information, like a patient's name and birthdate from a discarded billing slip. Second, clinical documentation is notoriously repetitive due to standard templates and "copy-forward" practices. Standard exact-match metrics treat all memorized text equally, which overstates privacy harms by counting harmless boilerplate formatting as a data breach, while completely missing semantic leaks where a model paraphrases a sensitive diagnosis.

Methods

The authors propose a black-box evaluation framework that probes clinical LMs along a graded axis of adversarial access (or "priors"), simulating what an attacker might actually know:

Figure 1: Overview of clinically grounded privacy evaluation framework. We construct adversarial priors ranging from publicly inferable demographics to privileged note fragments, then prompt the LM to generate a note at each access level. We assess privacy leakage along two dimensions: patient-specific memorization of clinical text, distinguishing clinically revealing spans from templated or cross-patient documentation artifacts, and semantic disclosure of sensitive diagnoses, using matched train and non-train cohorts to estimate training-attributable leakage.

The framework evaluates privacy leakage across two distinct dimensions:

  1. Verbatim Memorization: Measuring exact token overlap ($\tau=30$-gram matches) but critically decomposing the text into templated documentation (via regex rules) versus clinically revealing text, and checking if the text is unique to a single patient ($K=1$) or shared across patients ($K>1$).
  2. Semantic Leakage: Evaluating whether the model discloses six highly sensitive diagnoses (depression, PTSD, anxiety, bipolar disorder, abortion, and HIV) through paraphrasing or indirect symptoms. This is evaluated using a secure instance of GPT-5 as an LLM judge.

To ensure the model is actually leaking memorized data rather than making educated demographic guesses (e.g., inferring an anxiety diagnosis based on age and sex), the authors implement a Matched Evaluation Cohort Design using Propensity Score Matching to compare trained versus non-trained patient profiles.

Datasets

The framework was tested by continually pretraining a Qwen3.5-9B model on the American Family Cohort, a nationwide collection of primary care electronic health records. The dataset consists of:

  • 378,035 clinical notes spanning 2019 to 2025.
  • 26,948 patients across 192 small family-medicine practices.
  • Approximately 1.0 billion tokens total.

Key Insights and Ideas

  • Metadata is a Master Key: Attackers do not need clinical snippets to breach privacy. Routine encounter metadata (name, DOB, visit date, provider name, and location) acts as a highly effective prompt that triggers the model to surface longitudinal records.
  • Standard Metrics Cry Wolf: Under the encounter metadata prior, 36% of memorized tokens are actually templates or boilerplate language (e.g., "Negative for chest pain, shortness of breath"). Audits that treat all memorization as equivalent conflate shared documentation artifacts with genuine patient-specific disclosure.
  • Stitching Historical Timelines: When prompted with just a single encounter's metadata, the model doesn't just leak that specific visit; it stitches together verbatim text from an average of 2.81 distinct notes across the patient's historical timeline, driven largely by copy-forward documentation practices.

Key Results

  • Verbatim Leakage Scales with Access: Verbatim memorization is low (4.8%) when the model is prompted with only public demographics, but skyrockets to 60.7% with basic Encounter Info, and reaches 85.6% when note fragments are provided.
Figure 2: Verbatim memorization by prior. Each bar reports the average share of a generated note copied verbatim from each patient’s training notes. A token is counted as memorized if it falls within at least one τ=30-gram match; means are computed over 1,200 generations per prior (200 train patients per sensitive diagnosis). Figure 8 in Appendix J reports the fraction of generations with ≥1 τ=30-gram span.
  • High-Accuracy Semantic Leakage: With access to routine encounter metadata, the model accurately recovers sensitive diagnoses, achieving an AUROC of 0.91 for abortion and 0.82 for HIV.
  • Clear Training-Attributable Gap: The delta between the trained and non-trained cohorts confirms that this diagnostic leakage is a result of training-set memorization rather than population-level inference, peaking sharply at the Encounter Info tier.
Figure 3: Training-attributable sensitive diagnosis leakage, measured as the AUROC difference between the matched training and non-training arms of the evaluation cohort. Positive values indicate higher diagnosis-recovery performance for patients included in training. The black line shows the mean delta across the six sensitive diagnoses for each prior; colored points show per-diagnosis deltas. See Figure 11 in Appendix J for the corresponding PPV training-attributable delta plot.
  • Section-Specific Vulnerabilities: Decomposing the notes shows that sections like the "Review of Systems" are highly memorized but almost entirely benign templates. Conversely, narrative sections like "History of Present Illness" (HPI) and "Past Medical History" (PMH) consist almost entirely of patient-specific, clinically revealing text.
Figure 4: Composition of memorized tokens under the ENCOUNTER INFO prior across ten note sections covering 80.1% of memorized content. Bars are decomposed by content type (clinically revealing in orange, templated in blue) and patient specificity, where K is the number of distinct patients in the training corpus whose notes contain a verbatim occurrence of the memorized region (K=1 solid, unique to target patient; K>1 hatched, duplicated across patients). Appendix K contains example spans of each content category and Appendix L contains the definitions of each note section shown.

Limitations and Future Work

  • Identified vs. De-identified Data: This study evaluated models trained on fully identified clinical notes. While this allowed direct measurement of patient-specific leakage, real-world deployment pipelines often attempt de-identification first. Future work should extend this framework to de-identified corpora.
  • Base Models vs. Alignment: The authors evaluated a base pretrained model. Deployed systems typically undergo post-training (alignment, RLHF), which might suppress verbatim text generation but could also make models more compliant with adversarial prompts.
  • Scope: The empirical results are tied to a single model family (Qwen3.5-9B) and a single primary care dataset; leakage rates may vary based on model scale, training recipes, and data duplication levels.

Summary updated

BibTeX
@misc{ronaghi2026clinically,
  author = {Sasha Ronaghi and Sana Tonekaboni and Lena Stempfle and Vivian Utti and Jordan Li Cahoon and Nathaniel Hendrix and Ayin Vala and Marzyeh Ghassemi and Emily Alsentzer},
  title = {{Clinically Grounded Privacy Evaluation of Medical LMs}},
  year = {2026},
  eprint = {2606.09590},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.09590},
}
Figure