NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Adversarial Examples Improve Image Recognition

Cihang Xie, Mingxing Tan, Boqing Gong, Jiang Wang, Alan L. Yuille, Quoc V. Le

Abstract

Adversarial examples are commonly viewed as a threat to ConvNets. Here we present an opposite perspective: adversarial examples can be used to improve image recognition models if harnessed in the right manner. We propose AdvProp, an enhanced adversarial training scheme which treats adversarial examples as additional examples, to prevent overfitting. Key to our method is the usage of a separate auxiliary batch norm for adversarial examples, as they have different underlying distributions to normal examples. We show that AdvProp improves a wide range of models on various image recognition tasks and performs better when the models are bigger. For instance, by applying AdvProp to the latest EfficientNet-B7 on ImageNet, we achieve significant improvements on ImageNet (+0.7%), ImageNet-C (+6.5%), ImageNet-A (+7.0%), Stylized-ImageNet (+4.8%). With an enhanced EfficientNet-B8, our method achieves the state-of-the-art 85.5% ImageNet top-1 accuracy without extra data. This result even surpasses the best model in the literature which is trained with 3.5B Instagram images (3000X more than ImageNet) and 9.4X more parameters.

Introduction: The Distribution Mismatch Problem

In computer vision, adversarial examples—images with tiny, imperceptible perturbations designed to fool a model—are typically treated as security threats. Standard adversarial training, which involves training a model to resist these attacks, almost always results in a "robustness-accuracy trade-off": while the model becomes harder to fool, its accuracy on normal, "clean" images significantly drops.

This research argues that the performance drop is caused by a distribution mismatch. Adversarial images and clean images possess different underlying statistical distributions. When a model is forced to learn both using the same Batch Normalization (BN) statistics, the model becomes confused, leading to sub-optimal performance. AdvProp aims to use the regularizing power of adversarial examples to help the model generalize better without polluting the statistics of clean images.

Methodology: Adversarial Propagation (AdvProp)

The core contribution of this work is AdvProp, a training scheme that disentangles the normalization statistics of clean and adversarial data. The architecture relies on three main pillars:

  1. Dual Batch Normalization: The model utilizes two sets of BN layers. A "Main BN" processes clean images, while an "Auxiliary BN" is dedicated specifically to adversarial examples.
  2. Shared Weights: All other layers, including convolutions and fully connected layers, share the same weights. This forces the model to learn features that are universally useful across both clean and adversarial domains.
  3. Training and Inference: During training, the model generates adversarial versions of images for every mini-batch. Clean images pass through the Main BN, and adversarial images pass through the Auxiliary BN. At test time, the Auxiliary BN is discarded, and the model uses only the Main BN to process images.

By separating these statistics, the model can absorb the complex features found in adversarial examples without allowing adversarial noise to shift the mean and variance of the clean data.

Key Results and Evaluation

AdvProp was evaluated across the EfficientNet family and standard ResNet architectures using several challenging benchmarks, including ImageNet-C (common corruptions), ImageNet-A (natural adversarial examples), and Stylized-ImageNet (texture-style shifts).

AdvProp performance gains across ImageNet benchmarks.

As shown in the figure above, AdvProp consistently improves performance across all categories. On EfficientNet-B7, AdvProp achieved:

  • ImageNet: 85.2% (+0.7% over vanilla).
  • ImageNet-C: +6.5% mCE improvement.
  • ImageNet-A: +7.0% accuracy gain.
  • Stylized-ImageNet: +4.8% accuracy gain.

Notably, an upscaled EfficientNet-B8 model trained with AdvProp reached a state-of-the-art 85.5% top-1 accuracy on ImageNet. This result is particularly significant as it outperformed previous SOTA models trained on 3.5 billion private Instagram images, despite using approximately 3000x less data.

Discussion and Insights

  • Adversarial Examples as Features: The paper shifts the perspective of adversarial examples from a security flaw to a sophisticated form of data augmentation that prevents overfitting.
  • Model Capacity: Larger models benefit significantly more from AdvProp. High-capacity models like EfficientNet-B7 have the necessary "headroom" to reconcile the complex representations required for both clean and adversarial inputs.
  • Generalization: The method is not exclusive to EfficientNet; it also boosted ResNet-152 performance on ImageNet by 0.8%, whereas standard adversarial training typically causes a performance crash of around 2.0%.

Limitations and Future Work

While AdvProp provides substantial gains, smaller models still struggle to distill information from very strong adversarial attackers. Future research may explore using multiple auxiliary BN layers for different types of augmentations (e.g., rotation or shearing) and expanding the method to tasks like object detection and semantic segmentation.

Summary updated

BibTeX
@inproceedings{xie2020adversarial,
  author = {Cihang Xie and Mingxing Tan and Boqing Gong and Jiang Wang and Alan L. Yuille and Quoc V. Le},
  title = {{Adversarial Examples Improve Image Recognition}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  url = {https://openreview.net/forum?id=AlFH6Gr8YF},
}
Figure