Detecting and Recovering Adversarial Examples: An Input Sensitivity Guided Method

Mingxuan Li, Jingyuan Wang, Yufan Wu, Shuchang Zhou

Abstract

Deep Neural Networks (DNNs) have achieved notable success in various tasks, including many security-concerning scenarios. However, a considerable amount of work has proved their vulnerability to adversaries. We unravel the properties that can intrinsically differentiate adversarial examples and normal inputs through theoretical analysis. That is, adversarial examples generated by $L_2$ attacks usually have larger input sensitivity which can be used to identify them efficiently. We also found that those generated by $L_\infty$ attacks will be different enough in the pixel domain to be detected empirically. To verify our analysis, we proposed a Guided Complementary Defense module (GCD) integrating detection and recovery processes. When compared with adversarial detection methods, our detector achieves a detection AUC of over 0.98 against most of the attacks. When comparing our guided rectifier with commonly used adversarial training methods and other rectification methods, our rectifier outperforms them by a large margin. We achieve a recovered classification accuracy of up to 99% on MNIST, 89% on CIFAR-10, and 87% on ImageNet subsets against $L_2$ attacks. Furthermore, under the white-box setting, our holistic defensive module shows a promising degree of robustness.

Introduction

Deep Neural Networks (DNNs) are famously fragile when faced with adversarial examples—inputs modified by tiny, human-imperceptible perturbations that trigger incorrect classifications. While many defenses have been proposed, they often struggle with high computational costs, lack of scalability to large datasets like ImageNet, or vulnerability to "white-box" attacks where the adversary knows the defense strategy.

This research addresses a fundamental question: Are adversarial examples intrinsically different from clean data? By proving that they are, we design a defense that is both simple and effective without requiring massive architectural changes to existing models.

Theoretical Foundation: Input Sensitivity

The core discovery of this work is that $L_2$ adversarial examples are theoretically and empirically distinct from normal inputs due to their significantly higher "input sensitivity" (InSen), defined as the $L_2$ norm of the loss gradient with respect to the input.

Mathematically, $L_2$ adversarial attacks attempt to find the "closest" point across a decision boundary. The authors prove that as an input approaches a classification boundary, its input sensitivity naturally increases. This makes InSen an intrinsic "fingerprint" for $L_2$ adversaries.

Distribution of input sensitivity for clean and adversarial examples across different attack types.

As shown in the figure above, clean examples (blue dots) consistently exhibit low input sensitivity, while various $L_2$ attacks (crosses) like Deepfool (DFool), Carlini-Wagner (CW), and DDN show significantly higher sensitivity values, providing a clear threshold for detection.

The Guided Complementary Defense (GCD)

Leveraging these insights, we propose the Guided Complementary Defense (GCD), which consists of two main stages: Detection and Rectification.

The GCD architecture overview, showing the dual-path processing for clean and adversarial inputs.

1. Detection via Ensemble

The GCD uses an ensemble of two sub-detectors:

  • $DET_{IS}$: Monitors gradient maps to catch $L_2$ attacks based on the InSen property.
  • $DET_{org}$: Analyzes raw pixels to catch $L_\infty$ attacks, which may have lower sensitivity but more detectable pixel-level distortions. An information entropy-based ensemble mechanism determines which detector's output is more reliable for a given input.

2. Rectification via Gradient Masking

If an image is flagged as adversarial, the system proceeds to recovery rather than simple rejection. It uses the detector's own gradients as a "saliency map" to identify "polluted" pixels. By randomly suppressing these suspect pixels and passing the result through a fine-tuned "rectifier" model ($f_{rec}$), the system can recover the correct classification label.

Experimental Results

The GCD was evaluated on MNIST, CIFAR-10, and an ImageNet subset using VGG11 and ResNet152 architectures.

  • Superior Detection: In "grey-box" settings, the GCD detector achieved a detection AUC of over 0.98 against major attacks including Deepfool, CW, and PGD.
  • High Recovery Accuracy: After rectification, the system recovered true labels with 99% accuracy on MNIST, 89% on CIFAR-10, and 87% on ImageNet against $L_2$ attacks, significantly outperforming standard adversarial training.
  • Increased Attack Cost: In "white-box" scenarios, bypassing the GCD requires perturbations so large that the images become visibly noisy. For instance, the $L_2$ perturbation needed for a successful DDN attack on MNIST jumped from 0.787 to 10.252.

Conclusion

This work confirms that $L_2$ adversarial examples are intrinsically different from normal inputs. By exploiting input sensitivity and gradient-guided masking, the GCD module provides a robust, scalable, and effective defense mechanism. Future work will explore scaling GCD to even more complex architectures and refining the rectification process using advanced generative techniques.

Summary updated

BibTeX
@misc{li2020detecting,
  author = {Mingxuan Li and Jingyuan Wang and Yufan Wu and Shuchang Zhou},
  title = {{Detecting and Recovering Adversarial Examples: An Input Sensitivity Guided Method}},
  year = {2020},
  eprint = {2002.12527},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.12527},
}
Figure