# Data Poisoning

> An attack that hides bad samples in what an AI learns from.

**Field:** Artificial Intelligence  
**Category:** Safety & Security  
**Also known as:** Training Data Poisoning, Backdoor Attack, Poisoning Attack

## Think of it like

It is like slipping a few wrong pages into a schoolbook. Kids learn the wrong thing and do not notice.

## Definition

Data poisoning is an attack that slips bad samples into the data a model learns from. Models learn from huge piles of text taken from the web, so an attacker can post bad pages and wait. The bad data can make the model worse, or plant a backdoor. With a backdoor, the model acts as usual until it sees a secret word. Then it does what the attacker wants. Studies show a few hundred bad files can be enough, even for a big model.

## Example

An attacker posts pages where a made-up trigger word is always followed by nonsense. A model trained on the web picks them up. Later, it prints nonsense whenever it sees that word.

## Why it matters

Nobody can read every page a model trains on. A small, hidden change in the data can ship inside the model.

## Common mistake

Thinking a big pile of data waters down the poison. A backdoor can work with very few bad samples, no matter how much clean data there is.

## Three principles

- **Bad data in.** Before training.
- **Backdoor.** A hidden trigger.
- **Few examples.** Can be enough.

## Related terms

- [Training Data](https://learn.benibix.com/term/ai/training-data)
- [Adversarial Example](https://learn.benibix.com/term/ai/adversarial-example)
- [AI Red Teaming](https://learn.benibix.com/term/ai/ai-red-teaming)
- [Model Extraction](https://learn.benibix.com/term/ai/model-extraction)

## Told apart from

- [Data Poisoning vs Adversarial Example](https://learn.benibix.com/compare/data-poisoning-vs-adversarial-example): People think data poisoning and adversarial examples are one attack. They are not. Poisoning strikes while the model is still learning. Bad examples go into what it learns from, and the harm is built in. An adversarial example strikes once the model is done. The model is fine. One input is changed so the model reads it wrong.

![A large pile of training examples with a few bad ones slipped in. The trained model works normally, until it sees a hidden trigger word.](https://learn.benibix.com/diagrams/sf-data-poisoning.svg)

---

Source: https://learn.benibix.com/term/ai/data-poisoning
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
