Online Alternate Generator Against Adversarial Attacks

Haofeng Li, Yirui Zeng, Guanbin Li, Liang Lin, Yizhou Yu

Abstract

Researchers have developed a "portable" defense against adversarial attacks called the Online Alternate Generator (OAG). By synthesizing a clean version of an input image from scratch at inference time using Langevin Dynamics, the method effectively "forgets" adversarial noise while preserving the original image's semantic meaning. This approach significantly outperforms existing denoising-based defenses without requiring modification of the target model.

Introduction

Deep learning models are notoriously brittle to "adversarial attacks"—tiny, human-invisible perturbations added to an image that can trick state-of-the-art classifiers. For example, a ladybug might be misclassified as a computer, or a panther as a hamster.

Most existing defenses either require expensive retraining of the model—which is impractical for large-scale or proprietary systems—or attempt to "denoise" the image. Denoising often fails because adversarial noise is specifically engineered to bypass standard filters. OAG addresses the need for a portable defense: one that acts as a pre-processing step, requires no access to the target model's parameters, and can handle various attack types on high-resolution images.

Methodology: Online Alternate Generation

Instead of trying to repair the corrupted pixels of an adversarial image, OAG uses the input as a reference to "dream up" a brand-new image from scratch. The core mechanism involves two nested loops during the inference phase:

  1. Image Updating: Using Langevin Dynamics, the system iteratively updates a synthesized image ($I_s$). By adding a small amount of Gaussian noise during this process, the generator is prevented from accidentally reconstructing the high-frequency adversarial patterns.
  2. Network Updating: The parameters of a small, internal generator network are updated to maximize the likelihood that the synthesized image matches the distribution of the reference input.
The OAG framework alternates between updating the synthesized image (minimizing energy) and the generator network (maximizing likelihood).

Because the generator's weights are initialized randomly for every single input image and updated online, the defense becomes a moving target, making it extremely difficult for an attacker to pre-calculate a bypass.

Experimental Results

The authors evaluated OAG on major benchmarks including ILSVRC 2012 (ImageNet) and Oxford Flower-17. The method consistently outperformed state-of-the-art portable defenses like Total Variance Minimization (TVM) and Pixel Deflection.

Visual comparison of original, adversarial, and OAG-defended images. OAG recovers classification accuracy from 0% to over 90% for both ladybug and panther samples.

Key performance metrics include:

  • ImageNet Robustness: Against the Iterative Gradient Sign Method (IGSM) attack, OAG achieved 75.25% top-1 accuracy, surpassing the next best defense (Mean Filter) at 67.65%.
  • Strong Attack Resistance: Against the sophisticated C&W (Carlini & Wagner) attack, OAG maintained 77.95% accuracy on ImageNet, while the undefended model's accuracy dropped to 0%.
  • Architecture Transferability: On the Oxford Flower-17 dataset, the defense achieved over 80% accuracy across diverse architectures including VGG11, MobileNet, and DenseNet.

Discussion and Future Work

The primary strength of OAG lies in its shift from denoising to synthesis. By starting from a blank canvas, the system prioritizes large-scale semantic features over high-frequency adversarial noise. Furthermore, its portability allows it to be plugged into any existing classifier (ResNet, Inception, etc.) as a robust front-end.

However, the method's main limitation is computational cost. Performing hundreds of iterations of "mini-training" for every image takes approximately 30 seconds per 224x224 image. While currently unsuitable for real-time applications like autonomous driving, it is highly viable for high-security offline verification, such as checking medical images or uploaded documents. Future research will focus on optimizing this iterative process to achieve sub-second generation times.

Summary updated

BibTeX
@article{li2020online,
  author = {Haofeng Li and Yirui Zeng and Guanbin Li and Liang Lin and Yizhou Yu},
  title = {{Online Alternate Generator Against Adversarial Attacks}},
  journal = {IEEE Trans. Image Process.},
  year = {2020},
  url = {https://openreview.net/forum?id=bGD5tIcHYJ5},
}
Figure