A distillation attack is a model extraction attack that trains a substitute model on outputs from a target model. The attacker queries the model, captures responses or probabilities, and uses them to imitate behaviour, which can expose model capabilities, decision logic, or embedded safety patterns.
How distillation attacks work
A distillation attack takes advantage of the fact that many models reveal more than a final answer. By repeatedly querying a target and learning from its outputs, an attacker can train a substitute model that mirrors behaviour, response style, or decision boundaries without needing the original weights.
This makes the attack especially effective when the target exposes rich outputs such as probabilities, rankings, rationales, or stable responses to similar prompts. The attacker is not stealing code in the narrow sense, but extracting usable behaviour from the model’s interface.
The core risk is that the target model can be copied well enough to undermine differentiation, pricing, and trust. In practice, the same output channel that supports legitimate users can also become the training data for a competitor or criminal proxy.
Why distillation attacks are dangerous
Distillation attacks matter because they can reveal more than surface-level answers. When an attacker learns how a model responds across many inputs, they may infer safety guardrails, prompt handling patterns, or hidden decision logic that would not be obvious from a small sample of normal use.
That can weaken the value of proprietary model behaviour and, in some cases, expose operational details about how the system is tuned or constrained. It also creates a pathway for abuse of paid or rate-limited model services, since large-scale query collection is often part of the extraction process. See AI Model Security Guide for the broader control surface around model theft and extraction.
Attackers may also use distributed accounts or routed traffic to make extraction harder to spot. That is why MITRE ATLAS-style collection and extraction patterns are useful for understanding how a distillation campaign unfolds, especially when the behaviour is spread across many requests. The relevant techniques are covered in MITRE ATLAS AML.T0024 Exfiltration via AI Inference API and AML.T0005 Replicate AI Model Behavior.
How organisations assess exposure
Exposure review starts with understanding which model endpoints are reachable, what they return, and how much value is embedded in the response. Public APIs, high-volume inference services, and any interface that returns confidence scores, logits, or detailed reasoning are more attractive to extraction attempts.
Teams should also look for unusually repetitive query patterns, prompt variation designed to probe boundaries, and traffic coming from rotating accounts or infrastructure. These are common indicators that someone is building a surrogate model rather than simply using the service normally.
The most practical review combines asset inventory, service telemetry, and a close read of vendor terms and platform controls. For a defence-oriented view of the same problem, Model Extraction and Distillation Defence Guide and AML.T0135 Outputs from AI Models map directly to the outputs that enable extraction.
Containment, detection, and response
Distillation attacks are harder to stop when an attacker can query freely, so practical defences focus on reducing signal, limiting volume, and spotting extraction behaviour early. Output minimisation, tighter rate controls, and response shaping can all reduce the value of each query.
Detection should look for clustering across accounts, unusual query diversity, and patterns consistent with automated probing of the model’s boundaries. Once suspicious activity is identified, response should include containment of access paths, review of exposed outputs, and assessment of whether the model has already been functionally replicated.
If the attack succeeds, organisations should treat the event as both a security incident and a business integrity issue. AI Model Theft Response Playbook and OpenCode Console breach 2026 are useful references for response thinking where model extraction and related credential exposure overlap.
Risk and Threat Considerations
Distillation attacks create a direct pathway from ordinary model use to model replication. The immediate risk is intellectual property loss, but the operational risk is broader: attackers may use the copied behaviour to bypass rate limits, offer a counterfeit service, or study how the original model behaves under sensitive prompts.
Failure mechanism: The attacker extracts enough stable output patterns, rankings, or probabilities to train a substitute model that approximates the target’s behaviour, even without access to weights or source code.
Impact: The organisation can lose exclusivity over the model’s behaviour, expose safety or decision patterns, and face secondary abuse if the extracted model is used for fraud, imitation, or adversarial testing.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK addresses the attack and risk surface, while OWASP ASVS and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1020 — Exfiltration | Model extraction transfers model behaviour out through repeated queries. |
| T1589 — Gather Victim Identity Information | Attackers often probe model endpoints to learn service behaviour and response patterns. | |
| Recommendation — Detect unusually repetitive inference traffic and treat it as potential exfiltration. Monitor probing patterns that reveal service behaviour before extraction scales. | ||
| OWASP ASVS | V16 — Security Logging and Error Handling | Distillation defence depends on logging repeated probing and suspicious model-use patterns. |
| Recommendation — Log inference patterns and alert on extraction-like querying behaviour. | ||
| NIST SP 800-53 Rev 5 | AU-6 — Audit Record Review, Analysis, and Reporting | Repeated-query extraction requires review of telemetry and anomaly signals. |
| AC-7 — Unsuccessful Logon Attempts | Extraction campaigns often depend on repeated account use and abuse at scale. | |
| Recommendation — Review inference telemetry for extraction indicators and escalate anomalous usage. Limit abusive repeated access attempts against model services. | ||
Practitioner Guidance
Why practitioners should care: Distillation attacks are not just an AI-model problem, they are also an interface-design problem. If a service exposes too much signal per query, then an adversary can use legitimate access to reconstruct value that should have stayed internal.
What to watch for: Repeated probing, broad prompt sweeps, account rotation, and traffic that seems designed to sample decision boundaries rather than solve a normal user task are all strong signs that extraction may be under way.
Practitioner takeaway: The safest default is to assume every richly informative model response can be harvested, so limit what the interface reveals and make extraction expensive to sustain.
Related resources from NHI Mgmt Group
- Guide: Model Extraction for Beginners: How an AI Model Gets Copied Through Its Own Answers
- Why does Agentic AI make NHI attack surface expand so significantly?
- What is the difference between attack surface management and NHI governance?
- Why do NHIs create a larger attack surface than human users?
- Why do static scanners miss some cloud-native attack paths?
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on December 3, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org