MK

Nature · 2026 · Interactive companion

Disparate privacy risks from medical AI

The study investigated membership inference attacks (MIAs) on medical AI models trained on seven clinical datasets and found that privacy risk is highly long-tailed. Measured across a whole dataset, the attacks look barely better than random guessing, yet a small minority of patients can be identified almost perfectly. This risk is also unequally distributed. Patients from groups that are underrepresented in the training data are overrepresented among those most vulnerable to the attack.

Background

What is a membership inference attack? How do we measure its success?

Medical AI models are often deployed behind a prediction interface. A membership inference attack needs nothing more than access to that interface. The walkthrough below explains how the attack works and how we measure its success.

  1. 1Send a request

    A hospital deploys a diagnostic model, the target model, behind a prediction interface. Any user with access can submit a patient’s record, here a chest radiograph that serves as the target record, and the target model computes a prediction from it.

  2. 2Receive a prediction

    The interface returns the target model’s output: a 93% probability of pneumonia. The target model and the data it was trained on stay hidden. For an ordinary user, the interaction ends here.

  3. 3Membership inference

    An untrusted user who holds the target record can put the same output to another use and ask: was the target record part of the training data? Put differently, is the target model behind the interface model A, trained with the target record, or model B, trained without it? The answer alone can be sensitive. If a target model was trained only on patients with cancer, membership reveals a diagnosis.

  4. 4Build a reference

    Models tend to output slightly higher confidence scores for records they were trained on, and the difference is often tiny, here about one percentage point. What counts as “higher” differs from record to record, so the attacker trains reference models, half with the target record and half without. Split into these two groups, each model outputs a score for the target record. The two sets of scores form two distributions: one for members, one for non-members.

  5. 5Make the guess

    The attacker places the target model’s output, 93%, against both distributions. It is about 7 times more likely under the member distribution, so the attack guesses member. This comparison is a likelihood-ratio test, the idea behind LiRA, the state-of-the-art attack used in the study. One query is enough, and federated learning offers no protection because the attack only queries the finished target model.

  6. 6Measuring attack success in aggregate

    Attack success is usually reported in aggregate, as one number for the whole dataset. One target model is trained on a random 50% subset, and attack scores are computed for every record. Higher scores point to membership. Each threshold on these scores flags some records as members and gives one point on the ROC curve: the true positive rate (TPR) against the false positive rate (FPR).

    Sweeping the threshold traces the curve, and the area under it is the aggregate AUC. 50% is random guessing and 100% is perfect. Here it is only 58%, so the target model looks safe, even though a few highly exposed members are flagged without a single false positive.

  7. 7Measuring attack success for individual records

    Instead, the study measured attack success for each target record separately. It trained 200 target models per dataset, each on a random half of the data, so that exactly 100 were trained with any given target record and 100 without it. The confidence scores these target models output for the target record form two distributions. The record-level MIA AUC measures how well the two are separated: it is the chance that a target model trained with the target record outputs a higher score than one trained without it. It is 50% if the two distributions overlap completely and 100% if they are fully separated.

    State-of-the-art attacks such as LiRA (Carlini et al., 2022) and RMIA (Zarifzadeh et al., 2024) assume these distributions are Gaussian, so the record-level AUC follows from their means μ and standard deviations σ: AUC = Φ ( μwith − μwithout σwith2 + σwithout2 ) where Φ is the cumulative distribution function of the standard normal distribution.

    Each grey line is one target record’s ROC curve. Most sit near the diagonal, which means random guessing, but a few bow sharply towards the top left: for these records, the attack works almost perfectly. Select a curve to see the two distributions behind it.

  8. 8From record to patient-level risk

    A patient often contributes several records, such as radiographs from different visits. Exposing any one of them reveals that the patient was in the training data, so a patient’s score is the highest score among their records. This patient faces an attack with an AUC of 97%, while the whole-dataset number stays at 58%. The findings below show how many patients are in this position.

01 · Individual patients

Near-perfect attack success for some patients; most barely affected

Measured in aggregate, attacks on all seven datasets score close to 50%, which suggests little risk. Measured patient by patient, as in the walkthrough above, a small tail of patients can be identified with near certainty.

Aggregate attack AUC

–

50% is random guessing

Essentially unaffected

–

of patients with AUC below 60%

At or above the threshold

–

 

90%
Each line is a dataset. Read it as: what share of patients face an attack at least this successful? The vertical scale is logarithmic, so every gridline is ten times fewer patients. The small marker on the horizontal axis shows the selected dataset’s whole-dataset score. Hover to compare datasets; click the chart to move the threshold.
Show as table

02 · Patient groups

Groups that are underrepresented in the training data are overrepresented among the most vulnerable

We took the top 1% of records most exposed to the attack and compared who they belong to with the training data as a whole. If risk were shared evenly, every group would make up the same share of both. It does not: small groups, stratified by disease, self-reported race, insurance, sex or imaging protocol, tend to show up far more often than their size predicts.

Every dot is one patient group from one of the seven datasets. Left means rarer in the training data; up means more common among the most vulnerable records than its size predicts. Dots of the selected dataset are highlighted. Both scales are logarithmic.
Show as table

About the data

Patient-level scores are the highest record-level attack AUC among each patient’s records, estimated from 200 target models per dataset (the likelihood-ratio attack, LiRA, of Carlini et al., 2022; residual networks with about 1.5 million parameters). Whole-dataset scores are the mean aggregate LiRA AUC over 10 target models. Fitzpatrick 17k has no patient identifiers, so each image counts as one patient.

Group comparisons use the 99th percentile of record-level attack AUC, excluding records whose group is unknown, with row-wise Bonferroni-corrected χ² tests as in Fig. 3 and Extended Data Fig. 4 of the paper. Only aggregated numbers are shown here; no individual records are published. The walkthrough is adapted from Fig. 1 of the paper (CC BY 4.0), and the numbers in it are illustrative.