What is AI data poisoning?
AI data poisoning is an attack that deliberately plants corrupted or malicious examples in a model's training, fine-tuning or retrieval data to degrade its behaviour, add a hidden backdoor or cause wrong results.
It differs from model poisoning in the point of attack: model poisoning tampers with model weights directly, while data poisoning works indirectly by changing the data the model learns from or reads. In RAG systems, poisoned content placed in the document store has a similar effect (RAG poisoning).
- Topic
- AI security
- Also known as
- Data poisoning, training data poisoning
How AI data poisoning works
- The attacker adds altered examples to data later collected for training or fine-tuning, such as a public dataset or web source.
- Flipping labels can make the model misclassify certain inputs (label flipping).
- A hidden behaviour can be planted that fires on a specific trigger while the model behaves normally otherwise (backdoor attack).
- Clean-label poisoning alters content while keeping labels intact, which can evade manual review.
In more detail
Attack types: availability, targeted and alignment poisoning
Data poisoning attacks are commonly grouped by attacker objective: availability (untargeted) attacks that degrade overall accuracy, targeted attacks that force misclassification on specific inputs without a trigger and backdoor attacks that activate only when a hidden trigger phrase or visual patch appears. In LLM alignment, poisoning RLHF or DPO preference pairs can likewise implant trigger-activated unsafe behaviour or sycophancy.
Poisoning with few documents and the web supply chain
Recent research on large language models demonstrates that poisoning does not necessarily require corrupting a large fraction of the training corpus: even a small, near-constant number of crafted documents (on the order of a few hundred samples) can implant backdoors across models of varying sizes and expired-domain or split-view attacks make web-scale poisoning practically inexpensive.
RAG knowledge base poisoning and retrieval manipulation
In RAG systems, corpus poisoning (such as PoisonedRAG) goes beyond passive misinformation: attackers craft documents containing both high-similarity retrieval hooks and deceptive payloads so the retriever ranks the malicious chunk first and the LLM adopts the attacker's chosen answer. Effective defence combines strict ingestion provenance, cryptographic hashing, anomaly/perplexity filtering and multi-source corroboration before indexing.
Commonly confused terms
| Term | How it differs |
|---|---|
| Model poisoning | Data poisoning corrupts the training, fine-tuning or RAG retrieval data fed to the model; model poisoning tampers directly with model weights, gradients (in federated learning) or serialised model files (e.g., pickle exploits or weight editing). |
| AI evasion attack | Evasion (or adversarial examples / prompt injection) manipulates inputs at inference time against an unchanged model or store, whereas data poisoning aims to alter the model's learned behaviour or stored retrieval corpus beforehand. |
| Data drift | Data drift is an unintended change in the distribution of input data over time; data poisoning is deliberate, adversarial manipulation crafted to trigger specific failures or hidden backdoors. |
Why AI data poisoning matters for on-premises AI
When an organisation fine-tunes on its own data or brings in external datasets and open-weights models, this risk applies directly. Defences include recording data source and version, verifying external dataset integrity, restricting write access to training data, scanning for outliers and post-training trigger tests. In RAG, who may add content to the document store is controlled just as strictly. An in-house setup makes tracing data origin easier but is no guarantee on its own.
Before training a diagnostic support model, a hospital verifies the origin and integrity of the public medical dataset it uses; training does not start until suspicious samples are removed.
Common questions
Does data poisoning happen only during training?
No. Fine-tuning data and the document store a RAG model reads can also be poisoned. Write access to the document store is restricted for that reason.
How is a poisoned model spotted?
Unexpected behaviour on certain inputs, trigger tests and outlier scans of training data give hints. Certain detection is hard; prevention and data provenance records work better.
Related terms
- Model poisoning
- Clean-label poisoning
- Training data
- Label-flipping attack
- AI backdoor attack
- RAG poisoning
- AI supply chain security
Sources
- Gu et al., BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chain, 2017
- Carlini et al., Poisoning Web-Scale Training Datasets is Practical, 2023
- OWASP Top 10 for LLM Applications 2025, LLM04: Data and Model Poisoning
In the glossary: Glossary, D to L