Adversarial machine learning attacks exploit AI systems by feeding them deliberately manipulated inputs or tainted training data—causing accurate models to make confident, dangerous mistakes or leak private information. Seven classic attack families target traditional classifiers and neural networks, while an eighth—prompt injection and jailbreaking—has become the top day-to-day threat for modern chatbots and AI agents.
This reference covers how each attack works, real-world incidents that moved the field from theory to production security, and which defences actually hold up against adaptive attackers.
Adversarial ML attack taxonomy at a glance
If you need a fast map of the threat landscape before diving into the details, start with how the eight attack families split across training, API access, and live runtime:
| Attack type | Stage targeted | Attacker goal | Primary targets |
|---|---|---|---|
| 1. Poisoning | Training | Corrupt training data so the model learns wrong behaviour | Classifiers, medical AI, LLMs |
| 2. Evasion | Inference | Craft subtle input perturbations that flip a prediction | Vision models, spam & malware filters |
| 3. Membership inference | Inference / API | Detect whether a specific record was in the training set | Healthcare, credit, and HR models |
| 4. Model inversion | Inference / API | Reconstruct private training data from model outputs | Face recognition, memorised LLM data |
| 5. Backdoor (Trojan) | Training | Plant a hidden trigger that stays dormant until activated | Pre-trained weights, vision & LLMs |
| 6. Model extraction | Inference / API | Clone a proprietary model’s behaviour via repeated queries | Commercial APIs and frontier LLMs |
| 7. Byzantine | Distributed training | Send conflicting updates from rogue nodes to derail consensus | Federated learning, multi-node ML |
| 8. Prompt injection & jailbreaking | LLM runtime | Override developer rules, bypass safety, or hijack agent tools | Chatbots, RAG apps, autonomous AI agents |
Where adversarial attacks hit across the AI lifecycle
Every phase exposes a different surface—and the fastest-growing risk sits at runtime, where AI agents read untrusted content.
Data & training
Attack the model before it ever ships.
- Poisoning
- Backdoor (Trojan)
- Byzantine updates
Model & API boundary
Probe predictions to steal weights or leak private records.
- Membership inference
- Model inversion
- Model extraction
Input & agent runtime
Manipulate live inputs—including untrusted web pages and emails.
- Evasion
- Prompt injection
- Jailbreaking
What is adversarial machine learning?
Adversarial machine learning (AML) is the discipline of studying how AI systems fail under deliberate attack—and building models and guardrails that stay reliable when someone is actively trying to break them.
Standard software bugs come from broken logic. Adversarial vulnerabilities come from the mathematics of statistical learning itself: models optimise for average accuracy on normal data, leaving razor-thin blind spots in high-dimensional space where tiny, human-invisible tweaks flip an answer completely.
Security researchers group attackers by how much they know about the target:
- White-box attacks: The attacker has access to the model’s architecture, weights, and gradients (for example, an open-weight model or a leaked checkpoint).
- Black-box attacks: The attacker can only send inputs and read outputs via an API or public interface—yet can still steal models, extract data, or transfer attacks built on a surrogate model.
For the formal standards reference, the US National Institute of Standards and Technology (NIST) maintains a comprehensive taxonomy of adversarial machine learning (updated in March 2025) covering both predictive models and generative AI. If you want deeper background reading on machine learning fundamentals, see my top AI book picks.
The 7 core adversarial machine learning attacks
1. Poisoning attacks
Poisoning attacks strike during training. An attacker slips malicious or mislabelled samples into the training dataset so the model learns skewed associations—either degrading overall accuracy (availability poisoning) or forcing specific wrong answers on chosen inputs (targeted poisoning).
Once a model is trained, poisoning is notoriously hard to diagnose because degraded accuracy looks just like overfitting, bad labels, or noisy data. And it takes far less poison than people assume: in a 2025 joint study, Anthropic, the UK AI Security Institute, and the Alan Turing Institute found that just 250 malicious documents slipped into web-scale training data were enough to implant a persistent backdoor across language models ranging from 600 million to 13 billion parameters.
2. Evasion attacks
Evasion attacks leave the trained model untouched and manipulate inputs at inference time. By adding subtle, calculated perturbations—a few tweaked pixels, disguised words, or background audio noise—the attacker pushes an input across the model’s decision boundary while it still looks completely normal to a human.

Evasion works in the physical world, not just in lab pixel arrays. In a landmark 2018 CVPR study, researchers stuck a handful of black-and-white stickers onto a real stop sign and caused a computer vision classifier to misread it as a speed-limit sign from multiple angles and distances.
3. Membership inference attacks
Membership inference attacks target privacy rather than accuracy. By observing how confident a model is on a given record, an attacker infers whether that exact person or data point was included in the model’s training set.
Overfitted models are especially leaky because they return higher confidence scores on examples they memorised during training. If a hospital trains a disease-progression model or a lender trains a credit-default model, merely confirming that an individual appeared in the training cohort can expose sensitive medical or financial status.
4. Model inversion and data extraction attacks
Model inversion goes a step further than membership inference: instead of asking “was this record in the training data?”, the attacker attempts to reconstruct the training data itself directly from the model’s outputs.
In facial recognition, researchers have inverted confidence scores to rebuild recognisable approximations of people’s faces. Large language models leak memorised data too: in late 2023, a team led by Google DeepMind researchers asked ChatGPT to repeat the word “poem” indefinitely, and the model eventually diverged and began spitting out verbatim memorised training data, including real people’s email signatures and contact details.
5. Backdoor (Trojan) attacks
A backdoor (or Trojan) attack embeds a hidden trigger inside a model during training—or inside a third-party open-weight checkpoint hosted online. Under normal inputs, the model behaves flawlessly and passes every standard benchmark. Only when the attacker’s secret trigger appears (a specific pixel patch, phrase, or rare metadata string) does the model execute the malicious behaviour.

Because teams increasingly fine-tune third-party checkpoints rather than training from scratch, supply-chain Trojans are a serious risk. IARPA, the US intelligence community’s research arm, ran a multi-year program called TrojAI specifically to develop automated scanners capable of detecting poisoned triggers inside trained networks.
6. Model extraction (distillation) attacks
Model extraction—also called model stealing—is intellectual property theft via API. An attacker sends thousands or millions of carefully chosen queries to a commercial model, collects its outputs, and uses those input–output pairs to train a cheaper clone without ever touching the original weights or training data.
In the LLM era, this happens at industrial scale under the banner of illicit distillation. In February 2026, Anthropic disclosed that three AI labs (DeepSeek, Moonshot, and MiniMax) had used roughly 24,000 fraudulent accounts to run more than 16 million exchanges with Claude in order to extract capabilities for their own models.
7. Byzantine attacks
Byzantine attacks target distributed and federated machine learning systems—setups where dozens or thousands of edge devices (phones, hospitals, autonomous vehicles) train locally and send gradient updates to a central aggregator without sharing raw data.
If a subset of participating nodes is compromised, those rogue nodes can send fabricated or conflicting gradients that poison the shared global model or prevent it from converging. Because updates are decentralised, distinguishing a coordinated Byzantine attacker from ordinary noisy client data requires robust aggregation algorithms rather than simple averaging.
Modern LLM threats: prompt injection and jailbreaking
If you build or use natural language processing apps today, prompt injection and jailbreaking are the attacks you’re most likely to encounter in production. They stem from a fundamental quirk of current LLMs: trusted developer instructions and untrusted external text sit in the same token stream.
- Direct prompt injection & jailbreaking: A user explicitly crafts a prompt to override the system prompt or bypass safety guardrails—whether through roleplay, encoding tricks, or automated adversarial suffixes. In 2023, researchers at Carnegie Mellon University demonstrated universal adversarial suffixes—short strings of optimised gibberish appended to a request—that transferred across ChatGPT, Google’s Bard (now Gemini), and Anthropic’s Claude simultaneously.
- Indirect prompt injection: The far scarier enterprise risk. An attacker hides instructions inside content an AI agent reads on your behalf—a web page, calendar invite, PDF, or incoming email (sometimes hidden in white text or HTML comments). If the assistant has permissions to read your inbox and send emails or call APIs, one poisoned message can silently exfiltrate private data or trigger unauthorised actions.
OWASP ranks prompt injection (LLM01) as the number-one security risk for LLM applications, and notes bluntly that no deterministic, model-only fix exists yet. Treating every LLM output as untrusted input—and enforcing hard permission boundaries outside the model—is non-negotiable for agentic apps.
Real-world adversarial attacks in the wild
Adversarial ML left academic whitepapers years ago. Six notable real-world cases show the range of targets:
- Spam filters: Spammers pioneered practical evasion decades ago by mangling trigger words and padding messages with benign text. In a classic 2005 study, adding about 30 well-chosen innocuous words pushed half of blocked spam past statistical filters.
- Tesla Autopilot: In 2019, Tencent’s Keen Security Lab placed three small stickers on a road and tricked a Tesla Model S on Autopilot into steering into the oncoming lane. In 2020, Ben-Gurion University researchers projected split-second “phantom” images onto a roadway, causing a Model X to brake for a person who wasn’t there.
- Facial recognition glasses: In 2016, Carnegie Mellon researchers printed patterned eyeglass frames that fooled commercial facial recognition systems into misidentifying wearers as specific celebrities.
- Bing Chat (“Sydney”): The day after Microsoft launched Bing Chat in February 2023, Stanford student Kevin Liu used a simple direct prompt injection to extract its hidden system rules and internal codename “Sydney”.
- IBM DeepLocker: Demoed in 2018 as a proof-of-concept warning, DeepLocker hid ransomware inside an ordinary video-conferencing app, using an embedded neural network to unlock its payload only when the webcam recognised one specific target’s face.
- Automated CAPTCHA solving: Attackers routinely train lightweight vision models to defeat text and image CAPTCHAs at scale, powering credential stuffing and fake account creation.
Practical defences against adversarial ML attacks
There is no silver bullet in adversarial machine learning. Defences that look strong on paper often collapse the moment an attacker adapts to them—which is why modern AI security borrows the “defence in depth” model from traditional cybersecurity.

| Defence mechanism | Attacks mitigated | How it works & real-world caveats |
|---|---|---|
| Adversarial training | Evasion, some jailbreaks | Exposes the model to adversarial examples during training; raises compute cost and can slightly reduce clean accuracy. |
| Data curation & provenance checks | Poisoning, backdoors | Audits data sources, removes outliers, and scans open weights; hard to guarantee on web-scale corpora. |
| Differential privacy | Membership inference, model inversion | Adds calibrated noise during training so no single record stands out; trades off accuracy on small datasets. |
| API rate limits, monitoring & watermarking | Model extraction, brute-force inversion | Flags abnormal query patterns and throttles bulk scraping; determined attackers still rotate across accounts. |
| Byzantine-robust aggregation | Byzantine attacks | Uses median or trimmed-mean updates across federated nodes instead of simple averaging. |
| Input/output guardrails & least privilege | Prompt injection, jailbreaking | Separates trusted instructions from untrusted content, restricts agent tool access, and requires human approval for risky actions. |
| Ensembles & continuous red-teaming | Multiple attack types | Diverse model families and regular adaptive testing catch regressions before attackers do. |
| Defensive distillation & gradient obfuscation | Weak / non-adaptive evasion only | Mostly broken in practice—do not rely on these alone (see Carlini & Wagner and Athalye et al. below). |
Two cautionary lessons from the research literature are worth remembering before trusting any vendor’s “unbreakable AI security” pitch:
- Defensive distillation didn’t hold up: Smoothing a network’s output probabilities initially seemed to cut evasion rates dramatically, until Carlini and Wagner showed in 2016 that stronger optimisation attacks sail straight through it.
- Gradient obfuscation creates false confidence: Hiding or shattering gradients blocks naive attacks, yet a 2018 ICML study found that 7 of 9 newly published defences relied on obfuscated gradients—and completely broke 6 of them.
In practice, teams deploying neural networks and AI agents get the highest return from mundane engineering controls: strict provenance on datasets and downloaded weights, API rate limits and anomaly alerts, isolated sandboxes for agent tool calls, and mandatory human approval before an AI can send money, delete files, or email external contacts.
Where adversarial machine learning is heading next
As AI moves from passive classifiers to autonomous agents that browse the web, execute code, and chain API calls, the blast radius of a single successful attack grows dramatically. A misclassified image is a bug; a hijacked agent with access to your email, calendar, and cloud credentials is a full-blown breach.
Expect the next few years of adversarial ML to centre on three fronts: multimodal prompt injection (hiding instructions inside images and audio rather than plain text), supply-chain verification for open-weight models and third-party plugins, and continuous automated red-teaming baked straight into CI/CD pipelines before every model update ships.



