Synthetic EHR Generators Should Be Audited Like LLMs

Inigo Stibbe, Padmanabhan Ramnarayan, A. Aldo FaisalarXiv 2026

Imagine you’re using a state-of-the-art "autocomplete" for medical records. You type in a few details about a patient’s history, and the AI generates a plausible, synthetic continuation. It’s a dream for researchers who need data without compromising privacy. But what if that AI isn't just imagining a plausible future? What if it’s actually "remembering" a real person it saw during training and reciting their private life back to you?

This paper argues that our current ways of checking for these "memory leaks" in synthetic health data are inconsistent and dangerously "zoomed out." To fix it, we need to treat synthetic record generators like Large Language Models (LLMs) and put them through a rigorous, individual-level audit.

TL;DR

Modern synthetic medical record generators are essentially LLMs for health data, which means they share a major flaw: they can accidentally memorize and "leak" real patient records. This paper proposes using "digital canaries"—random, meaningless labels—to catch these models in the act of memorizing individual patients rather than just learning general medical patterns.

What Problem Does This Paper Address?

Electronic Health Records (EHRs) are a goldmine for medicine, but they are locked behind strict privacy laws like HIPAA and GDPR. Synthetic data—fake records that look real—is the proposed key to the vault.

However, the latest generators use autoregressive transformers (the same tech behind ChatGPT). These models predict the "next event" in a patient's life based on the previous ones. The risk? If a patient's history is unique enough, the model might memorize it verbatim.

The authors point out two major gaps:

  1. Inconsistency: Current privacy evaluations across different research papers are a "wild west" of different metrics and methods, making it impossible to compare them.
  2. The "Average" Trap: Most privacy tests look at aggregate scores. A model might look "safe" on average while still perfectly leaking the records of a few hundred rare or distinctive patients.

Methods

The authors propose a two-pronged "LLM-style" audit:

  1. The Canary Audit: Researchers assign a random, arbitrary label (like "A" or "B") to each training patient. Since these labels are random, there is no medical reason for the AI to predict them. If the model can correctly guess a training patient's label with high confidence, it’s a "smoking gun" for memorization.
  2. Trajectory Reconstruction: This is the "autocomplete" test. You give the model a prefix of a real patient’s history and see if it can reconstruct the rest of the record token-for-token.

To prove these tests work, they didn't just build a "good" model. They built a deliberately overfit GPT-2 style model—a "positive control"—to see if their audit could successfully detect the memorization they knew was happening.

Datasets

  • MIMIC-IV: A massive, de-identified dataset of ICU patients.
  • eICU: Another large-scale critical care database.
  • MEDS: The authors used the Medical Event Data Standard to represent these complex records as sequences of tokens that an LLM can understand.

Key Insights and Ideas

  • The "Membership Inference" Mess: The authors compared four top-tier EHR generators (PromptEHR, HALO, CEHR-GPT, and RawMed) and found that while they all claim to test for "membership inference," they do it in completely different ways—some use Euclidean distance, others use "shadow models," and others use Hamming distance.
Comparison of inconsistent privacy evaluations across different models.
  • Generalization vs. Memorization: If a model predicts a patient will get a certain drug, is it because it learned medicine (generalization) or because it remembers that specific person (memorization)? The "Canary" solves this by using non-medical, random data that cannot be generalized.
  • The Context Cliff: For memorized patients, the model’s ability to "leak" their data isn't a slow climb; it’s a cliff. Once you provide enough "context" (starting tokens), the model’s accuracy in reconstructing the rest of the record shoots toward 100%.

Key Results

In their "positive control" experiment (where they forced the model to overfit on 1,000 patients):

  • Canary Recovery: The model was incredibly "loud" about its memorization. For training patients, the memorization score was nearly perfect (0.969), while held-out patients stayed near zero.
Figure 1: Patient-level memorisation scores for the deliberately overfit model. Training: n = 1,000, ¯µ = 0.969, τ0.95 = +0.925. Held-out: n = 28,560, ¯µ = −0.002, τ0.95 = −0.001.
  • Perfect Autocomplete: Once the model was given about 200 tokens of a training patient's history, it could reconstruct the next 100 tokens with near 100% accuracy. For patients it hadn't seen before, that accuracy stayed flat and low, regardless of how much context was given.
Figure 2: Fixed-target reconstruction with greedy decoding: mean proportion of tokens 401–500 recovered given the immediately preceding x ground-truth tokens. Trajectories of ≥500 tokens only (n = 406 train, 1,000 validation). Bands show 95% patient-level bootstrap CIs.

Limitations and Future Work

The authors are the first to admit this is a "baseline" study. Because they used a deliberately overfit model, they haven't yet established what a "safe" threshold looks like for a model trained under normal conditions.

The next step is to apply these canary audits to "realistically" trained models to see where the line between "useful synthetic data" and "privacy violation" actually sits. They also note that while these audits provide evidence for data custodians, they aren't a "get out of jail free" card for legal compliance—privacy is as much about policy as it is about math.

Summary updated

Abstract

Synthetic electronic health record (EHR) generation is increasingly adopting large autoregressive models, yet privacy evaluation has not kept pace, relying heavily on similarity-based heuristics and aggregate metrics that can obscure patient-specific memorisation. We argue that these models should additionally undergo LLM-style memorisation audits at the level of individual patient records. We support this position by comparing membership-inference evaluations across four prominent autoregressive EHR generators, highlighting inconsistent evaluation practices in patient representations and attack procedures. We evaluate trajectory reconstruction from partial context and introduce randomly assigned patient-level canaries to distinguish memorised associations from clinical generalisation. We examine these methods in a GPT-2-style model deliberately overfit to 1,000 MIMIC-IV patient trajectories, creating a controlled setting in which memorisation should be readily detectable. The model systematically recovers training patients' canaries, and their trajectory reconstruction approaches perfect accuracy with increasing context. Held-out patients show no systematic canary recovery, while reconstruction remains low and improves only marginally with additional context. These experiments establish a positive-control baseline for further evaluation of these methods in realistically trained models.
BibTeX
@misc{stibbe2026synthetic,
  author = {Inigo Stibbe and Padmanabhan Ramnarayan and A. Aldo Faisal},
  title = {{Synthetic EHR Generators Should Be Audited Like LLMs}},
  year = {2026},
  eprint = {2611.28804},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.28804},
}
Figure