Join our Newsletter — 33% off our NHI Course
Home› Guides› Model Extraction vs Inversion vs Membership Inference: What…
Guide AI Threats & Model Security

Model Extraction vs Inversion vs Membership Inference: What Each Attack Steals

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 14 November 2026 16 min read
On this page

Model extraction, model inversion and membership inference all work through the same prediction API, but they steal different things, and a control that stops one can leave the others wide open. Extraction copies the model's behaviour, inversion reconstructs sensitive attributes or representative examples of the people in the training data, and membership inference reveals whether a specific record was used at all. The last two are privacy attacks: under data protection law they decide whether a trained model still contains personal data. This guide compares the three, then goes deep on inversion and membership inference: what each needs, how each fails, and how differential privacy, output rounding, rate limits and monitoring change the odds. Extraction defence has its own guide and is summarised here only for contrast. It is written for ML engineers, privacy engineers and security architects who publish or host models trained on sensitive data.

Key takeaways

  • Each attack steals a different asset. Extraction takes the model's function (intellectual property), inversion takes attributes or likenesses of training subjects, and membership inference takes the fact that a person's record was in the dataset.
  • Membership itself can be the harm. The ICO notes that membership inference may not reveal further personal data, yet being in a dataset of patients with a particular condition is sensitive on its own.
  • Output fidelity fuels all three. Confidence scores, full probability vectors, token log probabilities and embeddings give attackers signal; MITRE ATLAS AML.M0002 recommends returning only what the application needs.
  • Only differential privacy gives a bound. Rounding, label-only outputs, quotas and monitoring raise attacker cost; DP training limits how much any single record can influence the model, at a measurable cost in accuracy.
  • Regulators expect test evidence. EDPB Opinion 28/2024 lists membership inference, model inversion, attribute inference, regurgitation and reconstruction among the attacks to consider when claiming a model is anonymous.

Short answer: what each attack steals

MITRE ATLAS (release 2026.10) groups the two privacy attacks under AML.T0137 Training Data Information from AI Models, with sub-techniques AML.T0137.000 Infer Membership, AML.T0137.001 Infer Properties, AML.T0137.002 Invert AI Model and AML.T0137.003 Extract Memorized Data. Extraction sits elsewhere, as AML.T0005.001 Replicate Behavior from Model Outputs, with AML.T0048.004 AI Intellectual Property Theft as the usual impact. All of them can use AML.T0024 Exfiltration via AI Inference API: the response channel is the theft channel.

AttributeModel extractionModel inversionMembership inference
What is stolenThe model's behaviour or parameters: a working substituteSensitive attributes or representative reconstructions of a person or class in the training dataA yes or no: was this record in training?
ATLAS IDAML.T0005.001AML.T0137.002AML.T0137.000
Who is harmedThe model ownerTraining data subjectsTraining data subjects
Typical accessBlack-box queries at volumeBlack-box queries with partial knowledge of the target, or white-box gradients and embeddingsBlack-box queries plus the candidate record; label-only access in some settings
Signal usedOutputs as training labelsScores, probabilities, embeddings, gradientsConfidence, loss or likelihood gap between members and non-members
Root causeUnrestricted, high-fidelity query accessCorrelation between inputs and sensitive attributes encoded in the modelMemorisation and overfitting
Strongest controlAccount and volume controls with cross-account analyticsOutput minimisation plus DP trainingDP training
Legal framingTrade secrets and terms of servicePersonal data disclosurePersonal data disclosure and anonymity claims

For extraction and distillation controls in depth, see the Model Extraction and Distillation Defence Guide. For membership inference mechanics and audit tools, see Membership Inference Attacks. This page focuses on how the privacy attacks differ from each other and from extraction, and how to choose defences.

Threat model: model inversion

ATLAS describes inversion as inferring sensitive aggregate attributes or reconstructing representative examples of training data by analysing a model's behaviour, outputs or exposed representations. It adds an important limit: the results do not by themselves establish that a reconstructed example was in the training set. Inversion produces something that looks like the training subject, not proof of who was used.

  • Asset stolen: a sensitive attribute the attacker did not know (for example a medical value or a demographic trait), or an approximate likeness associated with a class or identity. The ICO frames it as an attacker who already holds some personal data using the model's inputs and outputs to infer further personal information about the same individuals.
  • Access needed: query access with scores is often enough; white-box access to weights, gradients or embeddings makes it easier. OWASP ML03:2023 describes access either through an implementation flaw or by querying the model's API.
  • Threat actor: someone targeting specific individuals whose partial records they already hold, or a researcher demonstrating a privacy failure that becomes a regulatory problem.
  • Most exposed models: classifiers whose classes map to individuals, such as face or voice recognition; models trained on small cohorts with sensitive features; and embedding services, where OWASP LLM08:2025 lists embedding inversion attacks against vector stores.

The OWASP Machine Learning Security Top 10 rates inversion detectability as difficult: queries look like normal use, and the output is analysed offline.

Threat model: membership inference

ATLAS describes membership inference as inferring whether a particular sample was included in a model's training data, using prediction scores, token probabilities, loss values or generated responses, often with shadow models or auxiliary datasets to separate members from non-members.

  • Asset stolen: a single bit per record, which is harmful when membership is sensitive. The ICO gives a model trained on patients with dementia or HIV as an example of serious risk.
  • Access needed: the candidate record and query access. The ICO explains the signal: for someone in the training data, the model will be disproportionately confident in a prediction about that person.
  • Threat actor: anyone who already holds a record about a person and wants to learn a sensitive association; also auditors and regulators, who use the same technique to test anonymity claims.
  • Most exposed models: overfitted models, models trained on small or rare cohorts, and fine-tuned language models where records seen once can still be memorised. Carlini and colleagues recovered hundreds of verbatim sequences from GPT-2's training data, some from documents that appeared only once, and found larger models more vulnerable. That memorisation is what ATLAS separates out as AML.T0137.003 Extract Memorized Data.

Why extraction is different

Extraction targets the model owner's investment, not the data subjects. Its controls are commercial and identity controls: verified accounts, quotas, correlation of related accounts, contract terms and watermarking of outputs. Those controls help privacy only indirectly. A volume quota that stops a distillation campaign may not stop membership inference at all, because confirming one person's membership can take a handful of queries. Conversely, DP training does little against extraction: a DP model can still be copied, it just leaks less about individuals. Treat extraction and the privacy attacks as separate risk register entries with separate owners: product and legal for extraction, the DPO and ML engineering for inversion and membership. The AI Model Theft Response Playbook covers response to extraction.

Failure modes that enable the privacy attacks

Failure modeHelps inversionHelps membership inferenceHelps extractionFix
Full probability vectors or log probabilities returnedYesYesYesReturn label or top-k with rounded scores (AML.M0002)
Unlimited or unauthenticated query APIYesPartly: few queries needed per targetYesAuthenticated access and quotas (AML.M0004, AML.M0019)
Overfitted model, large train and test gapPartlyYesNoRegularisation, early stopping, DP training (AML.M0041)
Small cohort with a sensitive selection criterionYesYes: membership reveals the criterionNoData minimisation, DP, or do not publish the model
Embeddings or gradients exposed to clientsYesYesPartlyKeep representations server-side; treat embeddings as personal data where they derive from it
Weights published or shipped to devicesYes: white-boxYes: white-boxCopy is trivialLimit model artefact release (AML.M0001); DP before release
No privacy testing before releaseUndetectedUndetectedNot applicablePrivacy evaluation as a release gate (AML.M0008, AML.M0035)

Controls compared: what each one actually buys

ATLAS maps the same core mitigations to both privacy sub-techniques: output obfuscation (AML.M0002), query volume limits (AML.M0004), model validation (AML.M0008), telemetry (AML.M0024), red teaming (AML.M0035), adaptive response degradation (AML.M0040) and privacy-preserving training and inference (AML.M0041). Their value differs sharply by attack.

ControlAgainst inversionAgainst membership inferenceAgainst extractionCost and trade-off
Differential privacy in training (for example DP-SGD)Strong for individual-level leakage; does not stop learning population-level correlationsStrongest available: bounds the influence of any one recordWeakAccuracy loss, especially for rare classes; needs privacy accounting
Output rounding or label-only responsesMedium: removes fine-grained gradient-like signalMedium: label-only attacks still existMediumUsers lose calibrated confidence; ICO notes this must be balanced against users' need to judge reliance
Top-k truncation, no logprobsMediumMediumMediumBreaks some downstream uses; OWASP LLM10:2025 recommends restricting logprobs and logit_bias exposure
Rate limits and quotasMedium: inversion often needs many queriesLow per target, medium at population scaleMedium aloneLow cost; distributed attackers stay under per-account limits
Regularisation and early stoppingLowMedium; the ICO notes it will not completely eliminate the riskNoneUsually improves generalisation too
Query monitoring and adaptive degradationMediumLow to mediumMedium to highNeeds per-caller telemetry and tuned detections
Output watermarkingNoneNoneEvidence of copying after the factProves misuse; does not prevent it

Differential privacy in practice

DP is a property of the training mechanism, not of the published model, so the claim must come with the parameters that produced it. Abadi and colleagues showed in 2016 that deep networks can be trained under a modest privacy budget at a manageable cost in training efficiency and model quality. ATLAS AML.M0041 describes the same approach: calibrated noise added to clipped gradients during training. Libraries such as Opacus for PyTorch expose the two knobs directly as max_grad_norm (the clipping bound) and noise_multiplier. NIST SP 800-226, Guidelines for Evaluating Differential Privacy Guarantees (March 2025), sets out the factors to weigh and the common implementation hazards. For the parameter choices and the unit of privacy, see the Differential Privacy Guide.

  • Unit of privacy: decide whether the protected unit is a row, a document or a person. A person with many records needs person-level contribution bounding, or the guarantee covers far less than it appears to.
  • Fine-tuning: applying DP only to fine-tuning protects the fine-tuning data, not whatever the base model memorised in pre-training.
  • Utility check: evaluate accuracy per subgroup, because DP noise falls hardest on rare classes, which are often the sensitive ones.

Output rounding and minimisation in practice

  • Classification APIs: return the label, or the top few labels, with scores rounded to one or two decimals or to coarse bands such as high, medium and low. ATLAS AML.M0002 suggests restricting the number of results, limiting the specificity of the output class ontology and withholding or reducing the precision of confidence scores, logits and embeddings.
  • Generative APIs: disable log probabilities for external callers unless a contract and use case require them, and never expose them on models fine-tuned on personal data.
  • Embedding APIs: treat embeddings derived from personal data as personal data; keep them server-side and return similarity results rather than vectors where possible.
  • Limit of the control: rounding removes signal but does not remove the confidence gap that membership inference relies on, so it complements DP and never replaces it.

Decision criteria: which defences for which model

  1. Is membership itself sensitive? If being in the dataset reveals health, finance, criminal justice or similar status, plan for DP training and a membership audit before release, whatever the API exposure.
  2. Who gets the model? Published weights or on-device models give white-box access; only training-time defences such as DP and data minimisation still apply. A private API keeps output and volume controls available.
  3. Do classes map to individuals? Face, voice and per-user models invite inversion; restrict outputs to decisions rather than scores and consider whether the model needs per-person classes at all.
  4. Do you claim the model is anonymous? If so, EDPB Opinion 28/2024 expects the likelihood of extracting personal data, directly or through queries, to be insignificant, and documentation including test reports (paras 43, 55 and 58). Build the test evidence first. See the Anonymisation and Re-identification Risk Guide.
  5. Is extraction the bigger business risk? If the model is commercially valuable but trained on non-personal data, prioritise extraction controls and accept lighter privacy controls.

Small and large organisations: a small team publishing one sensitive model should prefer a narrow API with label-only outputs and an off-the-shelf DP library over building custom monitoring. A large provider with many tenants needs per-caller telemetry, adaptive degradation (ATLAS AML.M0040) and a standing privacy red team.

Worked scenario: a hospital readmission model

A hospital group trains a gradient-boosted readmission risk model on discharge records from a specialist clinic and plans to offer it to partner GP practices through an API that returns a probability to four decimal places. A partner could submit a known patient's details and observe an unusually confident score, which would suggest the patient was in the clinic's training data and therefore attended a specialist service. With partial demographics, varying one unknown field and watching the score could also point to the most likely value of a sensitive attribute.

The privacy review changes four things. The API returns a three-band risk category instead of a probability. The model is retrained with DP and the accuracy loss per age band is accepted by the clinical lead after review. A membership inference audit, run against held-out members and non-members, is attached to the DPIA with the agreed threshold. Each practice gets its own credential with a daily quota and alerts on repeated near-identical queries. Extraction is noted but ranked lower: the model has little commercial value outside the group.

Implementation and testing

  1. Classify models: record for each model the training data sensitivity, whether membership is sensitive, who receives outputs or weights, and which output fields are exposed.
  2. Minimise outputs first: it is the cheapest change. Pilot label-only or banded outputs with one consumer group, confirm the use case still works, then roll out. Roll back by version, not by toggling fields in production.
  3. Add identity and quotas: one credential per consumer, per-caller quotas and logging of inputs and outputs in line with privacy requirements, which the NCSC secure AI guidelines also call for.
  4. Run privacy evaluation before release: a membership inference audit at low false-positive rates and, for models whose classes map to people, an inversion test of whether sensitive attributes can be recovered. Record results against a threshold (ATLAS AML.M0008 and AML.M0035).
  5. Introduce DP where the audit fails or membership is sensitive: train a DP variant, compare utility per subgroup, document epsilon, delta and the unit of privacy.
  6. Monitor and respond: alert on query patterns that sweep one attribute while holding others fixed, repeated near-duplicate queries, and callers requesting maximum output detail.

Detection and measurement

  • Signals: per-caller query volume, input similarity clusters, systematic variation of a single feature, high share of queries near decision boundaries, and requests for the most detailed output options.
  • Metric 1: membership inference true-positive rate at a fixed low false-positive rate (for example 0.1%) for each released model, against the agreed threshold.
  • Metric 2: share of external endpoints returning only labels, top-k or banded scores.
  • Metric 3: share of models trained on sensitive data with a documented DP budget or a recorded decision not to use DP.
  • Metric 4: share of external callers with individual credentials and quotas.
  • Metric 5: time from a suspicious query alert to credential suspension or response degradation.

Framework mapping

AreaMITRE ATLASOWASPNIST SP 800-53 Rev. 5Regulatory anchor
Membership inferenceAML.T0137.000; mitigations AML.M0041, AML.M0002, AML.M0008ML04:2023SA-8, PT-3EDPB Opinion 28/2024, para 55
Model inversionAML.T0137.002; mitigations AML.M0002, AML.M0004, AML.M0041ML03:2023; LLM08:2025 (embedding inversion)SI-15, AC-6ICO guidance on AI and data protection
Memorised dataAML.T0137.003; mitigations AML.M0020, AML.M0041LLM02:2025SI-15GDPR Art. 5(2) accountability (EDPB para 57)
ExtractionAML.T0005.001; mitigations AML.M0004, AML.M0040LLM10:2025AC-6, SI-4Contract and trade secret law
Inference API channelAML.T0024; mitigation AML.M0024LLM10:2025SI-4, AU-6NCSC secure AI system development guidelines

Common failure patterns

  • Treating privacy attacks as extraction: investing only in quotas and watermarking, which protect the model owner, while the data subjects stay exposed.
  • Calling a model anonymous without tests: EDPB Opinion 28/2024 makes clear that models trained on personal data cannot in all cases be considered anonymous, and that testing only against widely known attacks shows resistance to those attacks only.
  • Quoting epsilon without the unit of privacy: a record-level guarantee on person-level data protects far less than the number suggests.
  • Exposing debug detail in production: full probability vectors and log probabilities left on after development.
  • Measuring audit accuracy instead of low false-positive performance: an average-case score hides the confident identification of a few individuals, which is the real privacy failure.

Practitioner checklist

  • Record for every model which of extraction, inversion and membership inference matter, and who owns each risk.
  • Return labels, top-k or banded scores externally; disable log probabilities on models trained on personal data.
  • Keep embeddings and gradients server-side; treat embeddings of personal data as personal data.
  • Issue one credential and quota per consumer and log inputs and outputs within privacy limits.
  • Run a membership inference audit, and an inversion test where classes map to people, before every release.
  • Use DP training where membership is sensitive or the audit fails; document epsilon, delta and unit of privacy.
  • Attach privacy test results to the model card and the DPIA, and repeat them on retraining.
  • Link extraction controls to the extraction defence programme rather than counting them as privacy controls.

Standards and references

Related NHI Mgmt Group resources: Membership Inference Attacks · Model Extraction and Distillation Defence Guide · Differential Privacy Guide · AI Model Security Guide · AI and Privacy Guide

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 14 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org