MK

arXiv preprint · 2026 · Interactive companion

Memorisation bias in medical AI

Medical AI models are routinely deployed on the same populations whose records were used to train them. This study shows that when a patient’s historical records are part of a model’s training data, the model’s predictions on that patient’s future records shift towards their earlier health state. The shift can persist for decades and can lead to missed diagnoses.

The problem

What is memorisation bias?

AI models do not only learn general patterns from their training data. Their output for a given input can also depend on whether that exact input was in the training set, a property known as memorisation. It is usually studied as a privacy risk. This study asks a clinical question instead: what happens when a patient whose records were used for training comes back, and the same model is applied to their new data?

This is common practice. Germany’s national breast cancer screening programme, for example, uses a model trained on 1.2 million mammograms from the same screening population it now serves. Patients return at regular intervals for years, so many of them meet a model trained on their own earlier, typically healthy, records.

Illustration. Alice contributed three electrocardiograms from 1998, 2003 and 2013, all showing a normal sinus rhythm. Today she returns with an anterior infarct. A model trained on her historical records outputs a 15% probability of infarct for today's recording; an otherwise identical model not trained on them outputs 73%.
An illustrative example. Alice’s three historical ECGs all show a normal rhythm; today’s shows a heart attack. The model trained on Alice’s historical records outputs a much lower infarct probability (15%) than an identical model trained without them (73%), which could lead to a missed diagnosis.

The method

Quantifying longitudinal memorisation

Three steps. One: many models are trained on the historical records of random patient subsets. Two: for each patient, the models are split into those trained on that patient's historical records and those not. Three: the two groups' predictions on the patient's unseen future records are compared with a statistical test.
  1. Split each patient’s records in time. Earlier records form the historical set, which may be used for training. Later records form the future set, which is never used for training or model selection.
  2. Train 200 models, each on the historical records of a random half of the patients. Every patient is therefore in the training data of exactly 100 models (“IN”) and absent from the other 100 (“OUT”).
  3. Compare IN and OUT predictions on each future record with an energy-distance test, corrected for multiple comparisons. A significant difference means the patient’s historical records changed the prediction on their new one.
  4. Check against chance. Repeating the test with randomly split model groups finds no significant records in any dataset, so the effects are specific to each patient’s own data.

01 · Future predictions shift

Training on a patient’s historical records alters their future predictions

In all four datasets, a share of future records showed significantly different predictions depending on whether the patient’s historical records were in the training data. Most shifts are small, but some exceed 70 percentage points. On the historical records themselves, the ones used for training, the effect is far more common and more pronounced.

Future records with a significant shift

–

 

Historical training records with a significant shift

–

 

Randomly split models (control)

–

records with a significant shift

20
Share of records whose average predicted probability, for at least one condition, differs between IN and OUT models by at least the amount on the horizontal axis. The vertical scale is logarithmic. Drag the slider or click the chart to set a size.

Examples from the data

Single future records with a significant shift from the selected dataset. Only aggregate test results are shown; no patient data.

Model choice matters

MIMIC-IV-ED is tabular, so the study compared three model types, each tuned for the best validation performance. The share of future records affected differs by orders of magnitude.

02 · Persistence

Memorisation bias fades with time, but can persist for decades

The longer the gap between a patient’s most recent training record and their new record, the rarer and weaker the shift. It does not disappear: in HEEDB, a dataset of electrocardiograms collected from the 1980s to 2025, significant shifts appear on records acquired more than 35 years after the patient’s last training record.

Longest gap with a significant shift

–

 

Longest follow-up in the dataset

–

between last training record and a future record

Share of future records with a significant shift, grouped by the time between the patient’s most recent historical training record and the future record (the acquisition interval). Labels give the number of affected records.
Show as table

03 · Diagnostic accuracy

Patients who return with a new condition are diagnosed less often

The study simulated deployment: fixed decision thresholds turn each model’s output into a yes/no call, and the calls of IN and OUT models are compared for patients with a significant shift. The effect is asymmetric. When a patient returns with a condition absent from all their training records, sensitivity drops, so the condition is missed more often. When their health is unchanged, both sensitivity and specificity are artificially inflated, which makes the model look better than it is for these patients.

 
Show as table

04 · Mitigation

Patient-level differential privacy prevents memorisation bias; record-level does not

Differential privacy (DP) adds calibrated noise during training to limit how much any single unit of data can affect the model. The unit matters. With record-level DP, the variant most used in practice, significant shifts on future records remain even at the strongest protection tested (ε = 1). With patient-level DP, which protects all of a patient’s records together, at most two future records are affected at any budget, at some cost in diagnostic performance.

Records with a significant shift

Diagnostic performance (test AUROC)

Smaller ε means stronger protection; “none” is the matching non-private model. The count scale is logarithmic, with zero shown on the bottom line. Performance is the mean ± s.d. of the macro-average AUROC across 200 models. These models are smaller than in the main experiments (1.9 million parameters), for computational reasons.
Show as table

About the data

All four datasets are credentialed clinical data (MIMIC-ECG, MIMIC-CXR and MIMIC-IV-ED from PhysioNet, and HEEDB). In line with their data use agreements, this page shows only aggregate statistics and test results: no ECG traces, images, record contents or identifiers. The shift of a record is the largest absolute difference, across conditions, between the average predicted probabilities of IN and OUT models; its direction is not shown.

Significance uses energy-distance tests with Benjamini–Hochberg correction (false discovery rate 5%). Diagnostic comparisons use exact permutation tests with Bonferroni correction across the 82 comparisons in Fig. 4 of the paper; for HEEDB, the ten conditions with the most new cases are shown. One HEEDB record with an implausible 85-year interval is excluded, as in the paper. Illustrations are adapted from Figs. 1 and 2 of the paper.