Label Flipping and Targeted Poisoning
What You'll Learn
You'll learn how attackers surgically corrupt specific training labels to induce precise, targeted misclassifications in machine learning models.
The Core Idea
Label flipping is a data poisoning technique where an attacker changes the labels of carefully selected training samples to cause a model to misclassify specific inputs at inference time. Unlike broad poisoning that degrades overall accuracy, targeted poisoning aims to create specific vulnerabilities while keeping the model's general performance high—making detection much harder.
Think of it like sabotaging a medical diagnosis system: instead of breaking the entire system (which would be noticed immediately), you flip labels on just a few X-rays showing a specific tumor type, teaching the model to consistently miss that particular condition while still diagnosing everything else correctly.
How It Works
The attacker typically:
- Identifies target samples: Choose what they want the model to misclassify (e.g., stop signs → speed limit signs)
- Selects poisoning samples: Find or inject training data similar to the target
- Flips labels strategically: Change labels to the desired wrong class
- Maintains stealth: Keep the number of flips small enough to avoid degrading overall accuracy metrics
Why It's Dangerous
- Hard to detect: Overall model accuracy may drop only 1-2%, appearing normal
- Persistent: The backdoor survives model updates and retraining
- Targeted impact: Creates exploitable blind spots for specific adversarial goals
- Real-world applications: Autonomous vehicles, malware detection, biometric systems
Key Takeaway: Label flipping attacks demonstrate that poisoning doesn't need to be obvious—selective, targeted corruption of training labels can embed hidden misclassification behaviors while preserving apparent model quality, making defense require careful data provenance and integrity monitoring.