F3 · Floor 3 · Data Center

Training Data Poisoning: The Corrupted Harvest

The model scored 98%. It was also secretly working for someone else. In this lesson you investigate the incident, reproduce the attack yourself, then fix it.

Training Data Poisoning in brief

Training data poisoning manipulates what a model learns. Instead of breaking it outright, a careful attacker plants a backdoor: the model behaves normally on ordinary inputs but gives the attacker's chosen answer whenever a secret trigger appears.

What you'll learn

  • Models are only as trustworthy as their data. Data is part of your attack surface and supply chain.
  • Backdoors are stealthy: overall accuracy stays high, so standard QA metrics won't catch them.
  • A small amount of poison (a few percent, sometimes far less) can be enough.
  • Defenses: provenance tracking, contributor review, anomaly and label-confidence checks, and trigger testing before deployment.
  • Partial cleanup isn't cleanup. A handful of leftover samples can keep the backdoor alive.

Why it matters

Researchers have shown that poisoning a tiny fraction of web-scale training data is cheap and practical, for example by buying expired domains that datasets point to. Chatbots that learned from user conversations have also been manipulated by coordinated users within hours.

Poisoning at scale: from fruit to foundation models

The same idea applies to LLMs. Poisoned fine-tuning data or web documents can implant "sleeper" behaviours triggered by a rare phrase, such as writing insecure code when a certain year is mentioned. Some planted behaviours have survived standard safety fine-tuning.

Detection techniques include spectral signatures and activation clustering (poisoned samples cluster differently inside the network), confident learning to find mislabelled data, and trigger reverse-engineering methods like Neural Cleanse.

Process controls matter as much as algorithms: dataset versioning and hashing, signed provenance (for example SLSA-style attestations for data), restricted write access to training buckets, and canary or holdout tests for known trigger patterns.

Key terms

Further reading