Evasion Attacks against Machine Learning at Test Time.

Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Srndic, Pavel Laskov, Giorgio Giacinto, Fabio RoliECML/PKDD 2013 · DOI

Abstract

In security-sensitive applications, the success of machine learning depends on a thorough vetting of their resistance to adversarial data. In one pertinent, well-motivated attack scenario, an adversary may attempt to evade a deployed system at test time by carefully manipulating attack samples. In this work, we present a simple but effective gradient-based approach that can be exploited to systematically assess the security of several, widely-used classification algorithms against evasion attacks. Following a recently proposed framework for security evaluation, we simulate attack scenarios that exhibit different risk levels for the classifier by increasing the attacker's knowledge of the system and her ability to manipulate attack samples. This gives the classifier designer a better picture of the classifier performance under evasion attacks, and allows him to perform a more informed model selection (or parameter setting). We evaluate our approach on the relevant security task of malware detection in PDF files, and show that such systems can be easily evaded. We also sketch some countermeasures suggested by our analysis.

Introduction

Most machine learning algorithms are designed under the "stationary" assumption—the idea that the data seen during training will look like the data seen during testing. In security-sensitive applications, such as spam filtering or malware detection, this assumption is dangerously false. Adversaries actively adapt their strategies to circumvent detection.

While previous research explored evading simple linear models, this work addresses the critical gap of systematically assessing the security of non-linear, complex classifiers against an intelligent adversary. By moving beyond "trial and error" attacks, the authors propose a formal optimization framework that reveals inherent vulnerabilities in how models define their decision boundaries.

Methodology

The authors frame evasion as a constrained optimization problem. The objective is to find a modified sample $x^*$ that minimizes the model’s discriminant function $g(x)$—effectively pushing it toward the "legitimate" class—while remaining within a maximum distance $d_{max}$ from the original malicious sample.

Gradient-Based Evasion

For models with differentiable decision functions, such as Support Vector Machines (SVMs) and Neural Networks, the attacker can employ gradient descent. This allows the adversary to iteratively "walk" a malicious sample across the decision boundary into the region classified as benign.

The Mimicry Component

A significant innovation of this research is the introduction of a mimicry component using Kernel Density Estimation (KDE). Pure gradient descent can sometimes lead an attacker into "blind spots"—regions of the feature space devoid of training data where the model's behavior is unpredictable or the gradient becomes "flat."

The mimicry term penalizes samples that fall into low-density regions of the legitimate class. This forces the attack sample to resemble a "typical" legitimate sample, making the evasion more robust and harder to detect via outlier detection methods.

Gradient descent paths for evasion attacks with varying mimicry parameters (λ). Increasing λ (from left to right) forces the attack samples towards the high-density regions of the legitimate class.

Experimental Evaluation

The approach was validated on two distinct tasks:

  1. MNIST Handwritten Digits: Discriminating between "3" and "7." This served as a visual proof-of-concept, demonstrating how a "3" can be subtly morphed to be misclassified as a "7" while remaining recognizable to humans.
  2. PDF Malware Detection: A real-world security task using a corpus of 1,000 PDFs. Features were based on the counts of specific structural keywords (e.g., /JavaScript, /OpenAction).

Key Results

  • Vulnerability of Linearity: Linear SVMs proved incredibly fragile. Attackers could flip classifications by identifying and incrementing features with high negative weights (e.g., adding benign keywords to a malicious PDF).
  • Surrogate Models: A striking finding was that attackers do not require exact model weights. A surrogate model trained on a small representative dataset (20% of the original size) was often sufficient to generate successful evasion samples that transferred to the target model.
  • Mimicry Effectiveness: For Neural Networks, the mimicry term was essential. It provided a "path" toward the legitimate data distribution, allowing gradient descent to succeed where it otherwise might have stalled in flat regions of the decision surface.

Conclusion and Future Work

The study demonstrates that even sophisticated non-linear classifiers can be reliably evaded with limited knowledge. The authors suggest that designers should aim for "tighter enclosure" of legitimate data. By penalizing "blind spots" during training, models can be made more robust—a concept that has since evolved into modern adversarial training techniques. Future work includes extending these methods to non-differentiable models like Random Forests and addressing the challenges of feature inversion in domains like binary code analysis.

Summary updated

BibTeX
@inproceedings{biggio2013evasion,
  author = {Battista Biggio and Igino Corona and Davide Maiorca and Blaine Nelson and Nedim Srndic and Pavel Laskov and Giorgio Giacinto and Fabio Roli},
  title = {{Evasion Attacks against Machine Learning at Test Time.}},
  booktitle = {ECML/PKDD},
  year = {2013},
  doi = {10.1007/978-3-642-40994-3\_25},
}
Figure