Skip to content

Builds and validates a memorization audit method for EHR foundation modelsConstructing and Validating Memorisation Audits for EHR Foundation Models

arXiv: 其他 AI 安全论文· arXiv:2611.15578· Inigo Stibbe, Joshua Placidi, Padmanabhan Ramnarayan, A. Aldo FaisalDepartments of Computing and Bioengineering, Imperial College London; Department of Surgery & Cancer, Imperial College London; Chair in Digital Health & Data Science, University of BayreuthIndexed by this site · 10 days ago· Originally publishedEvaluation

Quick read

Evaluation and benchmarks

Based on the paper PDF (AI-generated); refer to the original

The authors trained a GPT-2-style EHR model on MIMIC-IV and used three inference-time audits to measure memorization: reconstruction and depression attribute disclosure showed no patient-level leakage, while the canary audit detected weak cohort-level memorization.

Questions
Autoregressive EHR foundation models may leak training data at inference time, but clinical events are highly predictable, making patient-level memorization hard to distinguish from generalization and requiring interpretable inference-time privacy audits.
Methods
Trained a GPT-2-style model on MIMIC-IV and ran three tests across three training checkpoints: fixed-window token reconstruction, depression attribute disclosure under a unique prefix, and recovery of a random binary patient-level canary, with an overfitting positive control.
Experiments and results
Reconstruction improves as context lengthens, but the training–held-out gap is only 0.6–0.7 percentage points; depression disclosure shows no difference beyond held-out; canary recovery AUROC rises from 0.512 to 0.549, and the authors state that weak cohort-level memorization exists but there is no patient-level disclosure.
Limitations and future work
The authors note that canary auditing requires separately training a canary-inserted model and cannot directly prove clinical information leakage from the original model; downstream evaluations were not repeated across multiple seeds because they are stochastic and expensive; future directions include longer training and systematic measurement across model capacity and data scale.
Experimental setupGPT-2-style base model (trained on MIMIC-IV)、Canary-augmented model et al. · MIMIC-IV v2.2 (ETHOS-tokenised) · reconstruction fraction、disclosure rate et al.
Threat model
At inference time, the auditors input partial patient trajectories into an autoregressive EHR foundation model and observe whether the model reproduces sensitive events from the training data; the authors argue that de-identification cannot prevent disclosure, because combinations of clinical events can still form identifiable trajectories.
Evaluated models
GPT-2-style base model (trained on MIMIC-IV)Canary-augmented modelOverfit positive control model (1,000 patients)
Benchmarks
MIMIC-IV v2.2 (ETHOS-tokenised)
Metrics
reconstruction fractiondisclosure rateAUROCµ̄τ(0.1)AUPRC
AI summaryThe paper builds and validates a memorization audit method for autoregressive electronic health record (EHR) foundation models; on a GPT-2-style model trained on MIMIC-IV, it evaluated fixed-window token reconstruction, sensitive attribute disclosure, and random patient-level canaries across early, best-validation, and final checkpoints. Token reconstruction improved with more context, but the difference between training and held-out data was small; trajectories containing limited clinical information uniquely prompted no additional sensitive disclosure for training patients; in matched models with inserted random binary patient-level canaries, training patient label recovery AUROC rose from 0.512 to 0.549, while held-out patients remained at chance level; a positive control overfitted to 1000 patients approached full recovery, confirming the audit's sensitivity to strong memorization. The authors conclude that under the evaluated attacks there is only weak cohort-level memorization and no reliable patient-level leakage, and on this basis propose a direction for clinical inference-time auditing of existing models without retraining to insert canaries.

The paper builds and validates a memorization audit method for autoregressive electronic health record (EHR) foundation models; on a GPT-2-style model trained on MIMIC-IV, it evaluated fixed-window token reconstruction, sensitive attribute disclosure, and random patient-level canaries across early, best-validation, and final checkpoints. Token reconstruction improved with more context, but the difference between training and held-out data was small; trajectories containing limited clinical information uniquely prompted no additional sensitive disclosure for training patients; in matched models with inserted random binary patient-level canaries, training patient label recovery AUROC rose from 0.512 to 0.549, while held-out patients remained at chance level; a positive control overfitted to 1000 patients approached full recovery, confirming the audit's sensitivity to strong memorization. The authors conclude that under the evaluated attacks there is only weak cohort-level memorization and no reliable patient-level leakage, and on this basis propose a direction for clinical inference-time auditing of existing models without retraining to insert canaries.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to distinguish patient-level memorization from clinical generalization in EHR foundation models and audit privacy leakage at inference time.

    Core question: autoregressive EHR foundation models may reproduce sensitive events from training data at inference time, but clinical predictability makes patient-level memorization difficult to distinguish from generalization.

    • Setting and importance: EHR foundation models (such as Foresight and ETHOS) represent patient history as event sequences and predict what follows; with part of the history as a prompt, the model may reproduce sensitive events from training; the authors argue that de-identification is insufficient to prevent disclosure, because combinations of clinical events can still form identifiable trajectories.
    • Shortcomings of existing evaluations: The authors state that most medical privacy evaluations target synthetic EHR release, comparing generated records with training data using nearest-neighbor distance and membership/attribute inference; research on autoregressive models for structured patient trajectories is scarce, and aggregate privacy or validation metrics may mask leakage concentrated in a few patients.
    • Core observation: Correlated clinical events mean that accurate continuations may arise either from patient-level memorization or from common care patterns; more context, while improving prediction, may also make training trajectories easier to recover.
    • The paper proposes: A set of inference-time audits—fixed-window token reconstruction, sensitive attribute (depression diagnosis) disclosure, and random patient-level canary auditing—evaluated at the early, best, and late checkpoints of a GPT-2-style model trained on MIMIC-IV, with an overfitted model as a positive control.
    • Threat model:
      • Goal: The auditor detects whether the model leaks trajectory content or sensitive attributes of training patients at inference time.
      • Knowledge: The auditor knows partial patient trajectories (prefixes) and can construct the shortest prefix that uniquely identifies a patient in the training set.
      • Capability: Inference-time access only, performing greedy reconstruction or sampled continuation given a prefix; the paper does not describe this setting using white-box/black-box terminology.
      • Victim system: An autoregressive EHR foundation model (GPT-2-style, 49.5M parameters) trained on MIMIC-IV v2.2.
  2. What related research exists?

    Related work falls into three groups: EHR foundation models, medical privacy and memorization evaluation, and canary auditing; this paper adapts the canary principle to longitudinal EHR models.

    EHR foundation models

    • Foresight [6] and ETHOS [11]—use autoregressive transformers to predict future events or generate complete patient trajectories.
    • CEHR-GPT [10]—extends this idea to representation learning and synthetic record generation.
    • The paper notes that such models can continue a partially observed patient trajectory, constituting a direct path to reconstructing training records at inference time.

    Privacy and memorization

    • Synthetic EHR privacy evaluations [14, 15, 16]—compare generated records with training data using nearest-record distance, membership inference, and attribute inference attacks.
    • Clinical text language model studies [7, 8]—examine patient identifier extraction and verbatim reproduction of training text, including how memorization changes with training.
    • Tonekaboni et al. [13]—the paper calls this the closest work: it proposes black-box tests for trajectory reconstruction, sensitive attribute disclosure, membership inference, and patient-level risk on structured EHR foundation models; the authors consider it still difficult in this setting to distinguish patient-level memorization from clinical generalization, because many trajectories contain common and predictable clinical patterns.

    Canary auditing

    • Carlini et al. [1]—propose inserting random artificial sequences (canaries) into training data and measuring memorization with an exposure metric that compares the likelihood of canaries with that of similar candidate sequences.
    • Steinke et al. [12]—extend canary auditing to more efficient privacy leakage estimation, including auditing a single training run.
    • Morris et al. [9]—explore the amount of memorization in language models, which the paper mentions as a reference for future work.

    Baselines and benchmarks: This paper sets no external method baseline; the comparison is the performance difference of the same model on training patients versus held-out patients, plus a positive-control model overfitted on 1,000 patients. The data benchmark is ETHOS-tokenized MIMIC-IV v2.2.

    Positioning: The authors state that this paper adapts the general principle of canary auditing (using information independent of the original data to conduct controlled memorization tests) to longitudinal EHR models, with the goal of developing privacy auditing for practical, interpretable generative longitudinal health record models.

  3. How does the paper address this problem?

    Trained a matched autoregressive model and ran three inference-time tests across three checkpoints: reconstruction, sensitive attribute disclosure, and canary.

    Overall approach: on 228,508 MIMIC-IV v2.2 patients, train two matched models with the same architecture and hyperparameters (an original-trajectory version and a version with an inserted binary canary), and run three complementary inference-time memorization tests at checkpoints from three training stages.

    Models and checkpoints

    • Architecture: GPT-2 decoder, 6 layers, 12 heads, embedding dimension 768, context window 2,048, RoPE, vocabulary 4,509, 49.5M parameters (Table 4); tokenization uses the ETHOS framework.
    • Training: AdamW, learning rate 6×10⁻⁴, batch 128, 734,000 steps total; the learning rate schedule completes at 500,000 steps, after which it runs at a floor of 6×10⁻⁵ (Table 4).
    • Checkpoint definitions: let L0 be the initial validation loss and Lbest the lowest validation loss; the early checkpoint is the first checkpoint satisfying Lval ≤ (L0 + Lbest)/2 (i.e., achieving half the validation-loss improvement), best is the point of lowest validation loss, and late is the final checkpoint when the four-day training budget is exhausted; corresponding steps are 30k, 550k, 730k.

    Sequence reconstruction test

    • Sample: 3,000 training patients and 3,000 held-out patients, trajectories at least 500 tokens, with the same set of patients used at each checkpoint.
    • Protocol: given contexts of varying length up to the 400th token (10–400 tokens), greedily reconstruct tokens 401–500, and report the per-token reconstruction proportion over the 100-token target window, comparing training and held-out patients.

    Sensitive attribute disclosure test

    • Sample: 300 training and 300 held-out patients whose trajectories contain a depression diagnosis; depression was chosen because of its relatively high prevalence in the dataset (about 12%), which the authors considered easier to extract.
    • Prompt construction: each patient is given the shortest prefix that uniquely identifies their trajectory relative to the training set, with no depression token in the prefix; the authors state that this minimal-context construction reduces interference from clinically predictive information such as depression-related medications.
    • Generation and judgment: each prefix is sampled with temperature 1 for 20 continuations, generating at most 1,000 new tokens, stopping when a depression diagnosis or sequence-end token appears; the metric is the continuation-level disclosure rate (the proportion of continuations that generate a depression token), with 95% confidence intervals across patients.
    • Negative control: the same procedure on 300 training and 300 held-out patients whose full trajectories contain no depression token, matched within each group to the depression-positive cohort by unique prefix length (and approximately by total trajectory length), evaluated at the best checkpoint.

    Canary audit

    • Design: inspired by Carlini et al. [1], each patient is randomly assigned a balanced binary label A or B, appended before the sequence-end token; the label is independent of patient content.
    • Metric: patient-level memorization score μi = 2πi − 1, where πi is the model's pairwise probability for the true canary (obtained by applying a sigmoid to the logit difference between the two canary tokens); µi=0 means no preference, and positive values favor the assigned canary. τ(γ) is the proportion of the positive tail minus the proportion of the negative tail beyond threshold γ, and should be near zero when there is no memorization.
    • Decision logic: the authors state that a recovery rate above the held-out null level indicates the model learned arbitrary patient-level associations that cannot be explained by clinical generalization.
    • Positive control: a model deliberately overfitted on 1,000 patients (0.4% of the original training set).
  4. What experiments did the paper conduct?

    Three tests across three checkpoints: reconstruction gap 0.6–0.7 pp, no excess difference in depression disclosure, canary AUROC rises to 0.549.

    Experimental setup

    • Models under test: a GPT-2-style foundation model (49.5M parameters) trained on MIMIC-IV v2.2 (228,508 training patients); a canary-augmented model with the same architecture and hyperparameters; an overfitted positive-control model on 1,000 patients.
    • Checkpoints: early (30k steps), best (550k steps), late (730k steps); the overfitting control at 10k steps.
    • Sample sizes: 3,000 patients per arm for the reconstruction test; 300 patients × 20 continuations = 6,000 per arm for depression disclosure; the canary audit covers all 228,508 training and 28,560 held-out patients.
    • Metrics: reconstruction proportion (per token), continuation-level disclosure rate (95% confidence interval, 10,000 patient-level bootstraps), canary recovery AUROC, µ̄, τ(0.1).
    • Judgment method: all judgments are programmatic (whether a token appears, whether greedy reconstruction matches), with no LLM review; the paper does not report the number of repetitions.
    • Baselines/controls: the difference between training and held-out patients; the depression-negative patient cohort; the overfitting positive control.

    Main results

    According to Table 1 (canary recovery) and Table 2 (depression disclosure, 6,000 continuations per arm):

    Swipe horizontally to read the table

    CheckpointTraining AUROCHeld-out AUROCTraining τ(0.1)Depression disclosure gap (pp)95% CI
    Early (30k)0.5120.503+0.009+0.58[−1.43, +2.65]
    Best (550k)0.5490.500+0.036−0.47[−2.63, +1.62]
    Late (730k)0.5480.498+0.035−1.45[−3.58, +0.62]
    Overfitting control (10k)1.0000.500+0.987Not reportedNot reported
    • The authors state that canary recovery on training patients rises with training while held-out recovery stays at chance level, consistent with weak population-level memorization and very few high-confidence examples.
    • The 95% confidence intervals of the training−held-out difference in depression disclosure include zero at all checkpoints; the authors state that under this attack the unique prefix is insufficient to recover patient-level depression information.
    • The authors caution that this negative result does not rule out memorization: the prompts are deliberately short with little clinically predictive information, and depression tokens may appear very late, outside the generation window (Figure 5 shows that the first depression token is at position 1,000 or earlier for 66.3% of training and 64.3% of validation carriers).

    Sequence reconstruction

    • What was measured: the proportion of greedy reconstruction of tokens 401–500 under different context lengths (10–400 tokens), training vs. held-out patients.
    • Results: reconstruction improves as context lengthens (Figure 1 y-axis roughly 0.06–0.14); the best and late checkpoints show a 0.6–0.7 percentage point training−held-out gap at 320–400 context tokens (main text).
    • Authors' interpretation: accuracy alone cannot distinguish memorization from clinical generalization; the small gap is consistent with limited retention of training data. In the overfitting positive control (Figure 3), the reconstruction proportion is close to 1.0 for training patients (n=406) and close to 0 for held-out patients (n=1,000).

    Negative control and downstream tasks

    • Depression-negative patients: at the best checkpoint, the false disclosure rate is 11.0% for training and 12.0% for held-out, a gap of −1.02 pp, 95% CI [−2.68, +0.63] (Table 2).
    • Downstream tasks: at the best checkpoint, the base and canary models perform similarly on 5 tasks, with macro-average AUROC of 0.817 and 0.815 respectively and macro-average AUPRC of 0.484 for both (Table 7); the authors state that canary insertion perturbs aggregate predictive performance very little, supporting use of this audit as an indicator of foundation-model memorization.
    • Note: the authors also point out that the canary audit requires a separately trained model and cannot directly prove the degree of memorization in the foundation model.

    Other ablations and analyses

    • Canary tail distributions (Table 5): at the best checkpoint with γ=0.1, training patients have positive/negative tail counts of 30,529/22,311 and held-out 3,354/3,224; with γ=0.5, training has only 1/1 and the overfitting control 979/2.
    • Overfitting control µ̄: training +0.969, held-out −0.002 (Table 1).
    • Training curves (Figure 2): base and canary model losses are close; the authors state the two losses are nearly identical.
    • Because downstream evaluation is stochastic and computationally expensive, the full evaluation could not be repeated across multiple random seeds (Appendix C).
  5. What are some points that can be further explored?

    The authors list limitations such as the indirectness of canary auditing and propose directions including longer training and systematic measurement across capacity and data scale.

    Limitations and future directions noted by the authors

    • Indirectness of canary auditing: Auditing requires a separately trained canary-augmented model and cannot directly determine the degree of memorization in the foundation model, nor directly prove clinical information leakage from the original model (Results and Conclusion).
    • Room for interpretation of the negative depression disclosure result: The prompts are deliberately very short and contain almost no clinical predictive context; depression tokens may appear late or beyond the generation window, so this negative result does not rule out memorization (Results).
    • Downstream evaluations not repeated: Rollout evaluations are stochastic and computationally expensive, and the full evaluation was not repeated across multiple random seeds (Appendix C).
    • Future direction one: Better distinguish memorization from clinical generalization, potentially drawing on methods from language models [9] (Conclusion).
    • Future direction two: Use longer training and different learning rate schedules to clarify the relationship between overfitting and memorization, membership inference vulnerability, and sensitive information reconstruction (Conclusion).
    • Future direction three: Systematically measure how canary memorization changes with model capacity, dataset size, and training duration, identify high- and low-risk regimes, and verify whether the conclusions transfer to models not trained with canaries (Conclusion).

    Scope of experimental coverage

    • The models tested are three variants of the same GPT-2-style architecture (49.5M parameters): the foundation model, the canary-augmented model, and the 1,000-patient overfitting control, all trained on MIMIC-IV v2.2.
    • Sensitive attribute disclosure was tested for only one attribute, depression diagnosis, with 300 patients × 20 continuations per arm; the negative control was evaluated only at the best checkpoint.
    • Reconstruction tests used greedy decoding with a fixed 100-token target window, with 3,000 patients per arm.
    • Downstream evaluations cover 5 tasks (ICU mortality, ICU readmission, ICU admission, hospital mortality, hospital readmission), comparing the base and canary models only at the best checkpoint.
    • The paper does not report the number of repetitions or the number of random seeds for the main experiments.
  6. Summarize the main content of the paper

    Three inference-time memorization audits of an EHR foundation model: no patient-level disclosure observed, canary detected weak cohort-level memorization.

    An analysis paper on inference-time privacy auditing of EHR foundation models, aiming to distinguish patient-level memorization from clinical generalization.

    • Problem: autoregressive EHR models can be prompted with partial patient trajectories to continue, potentially reproducing sensitive events from training data; but clinical events are highly correlated, so accurate continuation may come from either memorization or common care patterns.
    • Method: trained a GPT-2-style model (49.5M parameters) on 228,508 MIMIC-IV v2.2 patients and ran three tests at three checkpoints—early (30k), best (550k), late (730k): fixed-window token reconstruction, depression attribute disclosure under a unique prefix, and recovery of a random binary patient-level canary; plus an overfitting positive control on 1,000 patients.
    • Reconstruction: improves as context lengthens, but at the best/late checkpoints the training−held-out gap at 320–400 context tokens is only 0.6–0.7 percentage points (Figure 1 and main text).
    • Depression disclosure: the training−held-out gaps at the three checkpoints are +0.58, −0.47, and −1.45 percentage points, with 95% confidence intervals all including zero (Table 2).
    • Canary audit: recovery AUROC on training patients rises from 0.512 to 0.549, τ(0.1) rises from 0.009 to 0.036, and held-out stays at chance level; the overfitting control reaches AUROC 1.000 (Table 1).
    • Authors' conclusion: under the evaluated attacks there is no reliable evidence of patient-level disclosure, and the canary audit provides evidence of weak cohort-level memorization beyond clinical generalization; the authors consider this to support developing clinically grounded inference-time audits, and that patient-level memorization can be detected without retraining existing models with canaries, but they also acknowledge that the canary results cannot directly prove clinical information leakage from the original model.
Read originalarxiv.org