Poisoning Attacks against Support Vector Machines

Battista Biggio, Blaine Nelson, Pavel Laskov

Introduction

Machine learning models are increasingly deployed in adversarial environments like spam filtering, malware detection, and intrusion detection. Most standard learning algorithms assume that training data comes from a natural, well-behaved distribution. However, in security contexts, adversaries actively try to subvert the system.

While "exploratory" attacks—where an adversary attempts to evade a trained classifier at test time—are well-studied, this paper tackles causative or "poisoning" attacks. In a poisoning attack, the adversary manipulates the training data itself. Prior to this work, poisoning attacks were mostly studied in the context of simple anomaly detectors. This paper introduces a novel attack against Support Vector Machines (SVMs), demonstrating how an adversary can systematically craft and inject maliciously crafted data into a training set to maximize the model's test error. By leveraging a gradient ascent strategy that works even for non-linear kernels, the authors highlight a critical vulnerability in machine learning systems deployed in security-sensitive environments.

Methodology: Gradient Ascent in the Input Space

The authors formulate the poisoning attack as an optimization problem: the attacker wants to find a new data point $(x_c, y_c)$ that, when added to the training set, maximizes the SVM's hinge loss on a separate validation set.

Because the validation error surface is non-convex, they use a gradient ascent strategy to iteratively update the attack point. The core mathematical trick relies on the Karush-Kuhn-Tucker (KKT) conditions of the SVM's optimal solution. Using an "adiabatic update condition" (borrowed from incremental SVM learning), they calculate how an infinitesimal change in the attack point's features smoothly shifts the SVM's decision boundary, assuming the overall structure of support vectors remains intact.

Crucially, the authors kernelize this gradient computation. Instead of trying to optimize the attack in an implicit, high-dimensional feature space, they derive exact gradient expressions for Linear, Polynomial, and Radial Basis Function (RBF) kernels. This allows the attacker to craft the malicious data point directly in the input space (e.g., manipulating actual image pixels), making attacks against non-linear SVMs practically feasible.

Visualizing the Attack: Semantic Blurring

The attack exploits the fact that an SVM's optimal solution depends heavily on points near the margin. By carefully placing a point deep within the opposing class's margin, an attacker can force the decision boundary to tilt drastically.

To quantitatively and visually validate the attack, the authors used the MNIST Handwritten Digits dataset, focusing on two-class sub-problems (7 vs. 1, 9 vs. 8, and 4 vs. 0). Visually, the optimized attack points look like a deceptive hybrid of the two classes—a phenomenon that can be described as semantic blurring.

MNIST digits before and after the poisoning attack, showing semantic blurring and the resulting spike in classification error.

For example, to poison a "4 vs. 0" classifier, the algorithm takes a '0', flips its label to '4', and iteratively adds structural noise until it visually blurs the line between the two digits. This maximizes the classifier's confusion.

Key Results: Scaling the Attack

The impact of these crafted points is severe. On the MNIST dataset, injecting just one optimized attack point caused the classification error to spike from an initial 2–5% up to 15–20%. This proves the gradient-based attack is vastly more effective than simply flipping labels at random.

The authors also tested the attack's scalability by injecting multiple poisoned points.

Classification error increases significantly as the percentage of poisoned attack points in the training data grows.

When the training data was contaminated with up to 8% poisoned points, the error rate steadily climbed, pushing classification errors above 30% in some digit classification tasks. Despite the highly non-convex nature of the validation error surface, the gradient ascent algorithm reliably found local maxima that successfully and severely degraded model performance across both linear and RBF kernels.

Limitations and Future Work

The authors acknowledge several limitations to their approach:

  • Strict Threat Model: The attack assumes the adversary has perfect knowledge of the training data, validation data, and the learning algorithm. (Though they note an attacker could potentially use a surrogate dataset).
  • Label Control: The method assumes the attacker can dictate the label of the injected point. In real-world systems (like spam filters relying on user reports), an attacker can send an email but cannot guarantee a user will label it as "benign."
  • Algorithmic Constraints: The gradient step size must be kept very small to ensure the SVM's structural constraints aren't violated during the update, making the optimization somewhat delicate.

Future Work suggested includes developing methods to take larger optimization steps, creating simultaneous (rather than sequential) multi-point attacks, and solving the "inverse feature-mapping problem" for domains like spam filtering, where mapping a mathematical attack vector back into a valid, real-world object (like an email with specific grammar) is highly complex.

Summary updated

BibTeX
@inproceedings{biggio2012poisoning,
  author = {Battista Biggio and Blaine Nelson and Pavel Laskov},
  title = {{Poisoning Attacks against Support Vector Machines}},
  booktitle = {International Conference on Machine Learning},
  year = {2012},
  url = {https://openreview.net/forum?id=BkV8Qob_-r},
}
Figure