Detecting Adversarial Examples - a Lesson from Multimedia Security

Pascal Schöttle, Alexander Schlögl, Cecilia Pasquini, Rainer Böhme

TL;DR

This paper bridges the gap between machine learning security and multimedia forensics by showing that adversarial examples are essentially "stego-images" containing hidden malicious noise. By adapting a simple linear filter from the field of steganalysis, the authors demonstrate that they can reliably detect adversarial perturbations (specifically from PGD attacks) and, when combined with adversarial retraining, achieve a minimum classification accuracy of 96% on the MNIST dataset.

What Problem Does This Paper Address?

Deep neural networks are notoriously vulnerable to adversarial examples: inputs that have been modified by tiny, often imperceptible perturbations designed to cause the model to misclassify them with high confidence.

While the machine learning community has focused heavily on making models more "robust" (so they classify the adversarial image correctly), the authors argue that detection is an equally valid and under-explored defense. They point out that the ML community is often "reinventing the wheel" by ignoring decades of research in multimedia forensics and steganalysis—fields specifically dedicated to detecting subtle, malicious changes in digital images.

Methods

The authors propose treating adversarial perturbations as a form of steganography (hiding information in an image). They adapt a classic steganalysis technique: residual-based detection.

  1. Linear Filtering: They use a simple linear filter (a $3 \times 3$ kernel) to estimate what a pixel's value should be based on its neighbors. In a natural, unmodified image, pixels are highly correlated with their neighbors.
  2. Residual Calculation: By subtracting the estimated pixel value from the observed pixel value, they get a "residual." Large residuals suggest the pixel has been tampered with.
  3. Statistical Indicator: They calculate a weighted average of these differences across the whole image ($\hat{p}$). If this value exceeds a certain threshold ($\bar{p}$), the image is flagged as adversarial.
  4. Thresholding: To avoid "crying wolf," they set the threshold conservatively based on the maximum residual found in the clean training set, ensuring zero false positives on known benign data.
  5. Defense Pipeline: They propose a two-stage defense: first, run the detection filter. If the image is flagged, it's rejected. If not, it's passed to an adversarially re-trained CNN for classification.

Datasets

The study uses the MNIST dataset, a standard benchmark consisting of 60,000 grayscale images of handwritten digits ($28 \times 28$ pixels).

  • Training set: 50,000 images.
  • Test set: 10,000 images.
  • Adversarial Generation: They generated 100,000 adversarial examples using the Projected Gradient Descent (PGD) method across a wide range of perturbation strengths ($\epsilon$ from 0.01 to 0.5).

Key Insights and Ideas

  • The Steganography Parallel: The "attacker" in ML is trying to embed a "message" (the perturbation) that changes the classifier's output while remaining invisible. This is functionally identical to steganography.
  • Orthogonality of Defense: Detection and robustness are complementary. Standard CNNs lose accuracy as the perturbation ($\epsilon$) increases. Conversely, the steganalysis filter performs better as $\epsilon$ increases because the "noise" becomes easier to distinguish from natural image statistics.
  • Strategic Attackers: The paper emphasizes that attackers are "strategic"—if they know a defense exists, they will try to circumvent it. However, by combining detection with robust models, the "attack surface" is significantly reduced, forcing the attacker into a difficult trade-off between being detected and being correctly classified.

Key Results

  • High Detection Rates: For a standard "natural" model, the detection method achieved a nearly 100% True Positive Rate (TPR) once the perturbation strength reached $\epsilon \ge 0.2$.
  • Robustness to Retraining: Even against a model that was already hardened via adversarial retraining (the "secret" model), the detector reached a TPR of ~98% at higher $\epsilon$ values.
  • Combined Performance: The "Gold Standard" was the combination of the detector and the adversarially re-trained model. This pipeline maintained a minimum accuracy of 96% across all tested attack parameters, effectively neutralizing the PGD attack on MNIST.

Limitations and Future Work

  • Dataset Complexity: The experiments were limited to MNIST. While MNIST is a standard starting point, it is a very simple, low-resolution dataset. The authors acknowledge that more complex datasets (like ImageNet) would require more sophisticated steganalysis features.
  • Simple Filter: The authors used one of the simplest possible steganalysis filters as a "proof of concept." They suggest that more modern, high-dimensional steganalysis tools (like the Spatial Rich Model or CNN-based steganalysts) would likely perform even better.
  • Scope of Attacks: The paper focuses on PGD attacks. Future work should investigate if these forensic methods hold up against other types of adversarial attacks, such as those that modify large semantic regions (copy-move forgeries) rather than individual pixels.

Summary updated

BibTeX
@inproceedings{schottle2018detecting,
  author = {Pascal Schöttle and Alexander Schlögl and Cecilia Pasquini and Rainer Böhme},
  title = {{Detecting Adversarial Examples - a Lesson from Multimedia Security}},
  booktitle = {EUSIPCO},
  year = {2018},
  url = {https://openreview.net/forum?id=0YpNsl-HwBc},
}

Loading related content...

Figure