Feature Squeezing Mitigates and Detects Carlini/Wagner Adversarial Examples

Weilin Xu, David Evans, Yanjun QiarXiv 2017

TL;DR

This paper demonstrates that a simple pre-processing technique called "feature squeezing" can significantly improve the robustness of deep learning models against sophisticated adversarial attacks, specifically the Carlini/Wagner (CW) attacks. Furthermore, feature squeezing can also be used as an effective method to detect these adversarial examples.

What Problem Does This Paper Address?

Deep learning models, despite their impressive performance, are vulnerable to adversarial examples. These are subtly modified inputs designed to fool the model into making incorrect predictions. While previous work showed feature squeezing to be effective against older adversarial attack methods, the authors wanted to test its efficacy against the then-state-of-the-art Carlini/Wagner (CW) attacks, which are known to be highly effective and difficult to defend against. The core problem is how to make deep learning models more resilient to these carefully crafted attacks and how to reliably identify when an input has been tampered with.

Methods

The paper focuses on a technique called feature squeezing. This is a pre-processing step that reduces the complexity of the input data before it's fed to the classifier. The authors specifically investigate median smoothing with a 2x2 window as their feature squeezer. The core idea behind using feature squeezing for defense is to compare the model's prediction on the original input with its prediction on the "squeezed" input. For legitimate inputs, these predictions should be very similar. However, for adversarial examples, the squeezing process can disrupt the subtle perturbations, leading to a significant difference in predictions. This difference can then be used to either mitigate the attack (by using the prediction on the squeezed input) or detect the adversarial example.

Datasets

The experiments were conducted on two standard image datasets:

  • MNIST: A dataset of handwritten digits (28x28 grayscale images).
  • CIFAR-10: A dataset of color images of objects (32x32 pixels).

These are the same datasets used in the original Carlini/Wagner attack paper, allowing for direct comparison.

Key Insights and Ideas

  • Simplicity is Powerful: Even very basic pre-processing like median smoothing can be surprisingly effective against highly sophisticated adversarial attacks. This suggests that the "adversarialness" of an input might be fragile and easily disrupted by simple transformations.
  • Feature Squeezing as a Dual Threat: The technique isn't just a defense; it's also a detection mechanism. The difference in model output between the original and squeezed input provides a strong signal for identifying adversarial examples.
  • Rethinking Adversarial Definitions: The authors suggest that the success of feature squeezing against strong attacks prompts a re-evaluation of what constitutes an adversarial example and the need for a more robust theoretical understanding.

Key Results

  • Robustness Improvement: Feature squeezing reduced the success rate of Carlini/Wagner targeted attacks from nearly 100% to below 6% on both MNIST and CIFAR-10. For untargeted attacks, it increased the accuracy on adversarial examples from 0% to at least 81% on MNIST and over 66% on CIFAR-10.
  • Effective Detection: Feature squeezing achieved high detection accuracy for adversarial examples, with 98.80% accuracy on MNIST and 87.50% on CIFAR-10. The ROC-AUC scores were 0.9950 for MNIST and 0.8711 for CIFAR-10.
  • Minimal Impact on Legitimate Inputs: The feature squeezing process had a negligible impact on the accuracy of legitimate inputs, preserving 99.4% of original accuracy on MNIST and 93.2% on CIFAR-10.

Limitations and Future Work

  • Adaptation is a Concern: The authors acknowledge that their defense does not consider adversaries who adapt their attacks to specifically bypass feature squeezing. They note that such adaptation appears non-trivial, especially for the detection framework.
  • CIFAR-10 Performance: Detection performance on CIFAR-10 was lower than on MNIST. The authors attribute this to the target CIFAR-10 model having lower classification accuracy, leading to more unstable predictions for legitimate images, which in turn makes distinguishing adversarial examples harder.
  • Theoretical Understanding: The paper highlights the need for a stronger theoretical understanding of adversarial examples and machine learning model behavior, as empirical successes alone might not guarantee future robustness.

Summary updated

Abstract

Feature squeezing is a recently-introduced framework for mitigating and detecting adversarial examples. In previous work, we showed that it is effective against several earlier methods for generating adversarial examples. In this short note, we report on recent results showing that simple feature squeezing techniques also make deep learning models significantly more robust against the Carlini/Wagner attacks, which are the best known adversarial methods discovered to date.
BibTeX
@misc{xu2017feature,
  author = {Weilin Xu and David Evans and Yanjun Qi},
  title = {{Feature Squeezing Mitigates and Detects Carlini/Wagner Adversarial Examples}},
  year = {2017},
  eprint = {1705.10686},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.10686},
}
Figure