Poisoning Attacks against Support Vector Machines

Battista Biggio, Blaine Nelson, Pavel Laskov · DOI

Abstract

We investigate a family of poisoning attacks against Support Vector Machines (SVM). Such attacks inject specially crafted training data that increases the SVM's test error. Central to the motivation for these attacks is the fact that most learning algorithms assume that their training data comes from a natural or well-behaved distribution. However, this assumption does not generally hold in security-sensitive settings. As we demonstrate, an intelligent adversary can, to some extent, predict the change of the SVM's decision function due to malicious input and use this ability to construct malicious data. The proposed attack uses a gradient ascent strategy in which the gradient is computed based on properties of the SVM's optimal solution. This method can be kernelized and enables the attack to be constructed in the input space even for non-linear kernels. We experimentally demonstrate that our gradient ascent procedure reliably identifies good local maxima of the non-convex validation error surface, which significantly increases the classifier's test error.

Introduction

Traditional machine learning security has largely focused on evasion attacks, where an adversary modifies test-time data to bypass a static classifier. However, Biggio et al. (2012) shift the focus to a more fundamental vulnerability: poisoning attacks. These attacks target the training phase, injecting malicious data to corrupt the model's decision boundary. This work challenges the common "IID assumption"—that training and testing data are drawn from the same stationary distribution—which is often violated in adversarial environments like spam filtering or malware detection.

Methodology: Gradient-Based Poisoning

The authors propose a mathematically principled framework for generating "poison pills"—training points specifically designed to maximize a model's test error. The attacker's goal is to find a point $(x_c, y_c)$ that, when added to the training set, maximizes the hinge loss on a validation set.

The core innovation is a gradient ascent strategy that exploits the Karush-Kuhn-Tucker (KKT) conditions of the SVM's optimal solution. By treating the addition of a new point as a smooth perturbation, the authors can calculate the gradient of the validation error with respect to the attack point's features. This allows the attacker to iteratively "nudge" a malicious point until it reaches a local maximum of the error surface.

Visualization of the gradient ascent procedure on the validation error surface for linear (top) and RBF (bottom) kernels.

Crucially, this method is kernelized, meaning it can be applied to non-linear SVMs (e.g., using RBF kernels) while still constructing the attack in the original input space, such as raw pixel values.

Experimental Evaluation

The attack was evaluated on the MNIST handwritten digit dataset, focusing on binary classification tasks like "7 vs. 1". The results demonstrate that even a small amount of poisoned data can have a devastating impact.

One of the most striking findings is the "semantic blurring" effect. As the optimization process refines an attack point, the image gradually morphs to share features with the target class. For instance, an optimized '7' might straighten its top bar to resemble a '1', effectively pulling the decision boundary toward the legitimate class and causing widespread misclassification of genuine '7's.

Impact of poisoning on MNIST digit classification, showing 'semantic blurring' and the resulting error spikes.

On the "7 vs. 1" task, injecting just a single optimized attack point was shown to increase the classification error from approximately 2% to nearly 20%. When the volume of poisoned data increases to 10% of the training set, error rates can climb above 30%, rendering the classifier practically useless.

Discussion and Future Work

This research highlights a critical weakness in SVMs: their sensitivity to influential outliers that "pretend" to be support vectors. By forcing the model to accommodate these malicious points, an attacker can exert disproportionate control over the final decision function.

However, the attack currently assumes significant "white-box" knowledge, including the victim's training data and model parameters. Future research must address the "inverse problem"—mapping feature-space optimizations back to complex, non-differentiable objects like functional malware—and develop robust learning algorithms capable of identifying and mitigating these high-influence poisoning points during training.

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