Generating Adversarial Examples with Adversarial Networks

Chaowei Xiao, Bo Li, Jun-Yan Zhu, Warren He, Mingyan Liu, Dawn Song

Abstract

AdvGAN is a novel framework that leverages Generative Adversarial Networks (GANs) to produce high-quality adversarial examples. Unlike traditional methods that rely on slow per-instance optimization, AdvGAN trains a feed-forward generator to produce perturbations instantly. It achieves state-of-the-art attack success rates in both semi-whitebox and black-box settings while maintaining high visual realism, bypassing human detection and various preprocessing defenses.

Introduction

Deep Neural Networks (DNNs) are notoriously fragile; small, calculated perturbations to an input can cause them to misclassify data. However, existing attack methods face three major hurdles:

  1. Efficiency: Optimization-based attacks are computationally expensive because they must solve a minimization problem for every single image.
  2. Visual Quality: Simple gradient-based methods often produce "noisy" artifacts that are easily detectable by humans or preprocessing defenses.
  3. Access Requirements: Most effective attacks require "white-box" access (full knowledge of the model's architecture and parameters) at the time of the attack.

AdvGAN addresses these challenges by creating a system that generates realistic adversarial examples efficiently and can operate even when the target model is a "black box."

Methodology

The core of the framework is AdvGAN, which consists of three main components:

  • The Generator ($G$): A feed-forward network that takes an original image and produces a perturbation. The final adversarial image is the sum of the original and the perturbation.
  • The Discriminator ($D$): Trained to distinguish between real images and the generated adversarial images. This forces the generator to produce perturbations that are perceptually subtle.
  • The Target Model ($f$): The model the adversary wants to fool.
The AdvGAN architecture consisting of a generator, discriminator, and target model.

The system is trained using a multi-part loss function:

  • GAN Loss: Encourages the output to look like the original data distribution.
  • Attack Loss: Encourages the target model to misclassify the image into a specific target class.
  • Hinge Loss: Constrains the magnitude of the perturbation (the $L_2$ norm) to ensure it remains small.

The authors introduce two specific attack settings:

  1. Semi-whitebox: $G$ is trained using the target model's gradients. However, once trained, $G$ can generate attacks for any new image without ever needing to query the target model again.
  2. Black-box (Dynamic Distillation): Since the target model's gradients are unknown, the authors train a "distilled" model to mimic the black-box model's behavior. They then optimize the generator against this distilled model.

Experiments and Key Results

The researchers evaluated AdvGAN on three standard benchmarks: MNIST (handwritten digits), CIFAR-10 (small color images), and ImageNet (high-resolution images).

Performance and Speed

AdvGAN generated 1,000 adversarial instances in less than 0.01 seconds, whereas optimization-based methods took over 3 hours. On the MNIST black-box challenge, AdvGAN achieved 92.76% accuracy, placing first in the challenge.

Robustness Against Defenses

Against state-of-the-art defenses like "Iterative Adversarial Training," AdvGAN consistently outperformed standard attacks (FGSM and Optimization). For example, on CIFAR-10 Wide ResNet, AdvGAN achieved a 20.75% success rate against iterative defense, while FGSM only managed 14.9%.

Visual Realism

In a study on Amazon Mechanical Turk, humans found AdvGAN-generated images to be virtually indistinguishable from real ones, choosing the adversarial image as "more realistic" roughly 50% of the time.

Adversarial examples generated by AdvGAN on the CIFAR-10 dataset.

Discussion

Key Insights

  • From Optimization to Generation: By shifting the burden of computation from "attack time" to "training time," AdvGAN makes adversarial attacks nearly instantaneous during deployment.
  • The "Semi-Whitebox" Advantage: AdvGAN is "offline"—once the generator learns the target's weaknesses, it carries that knowledge forward independently.
  • Realism as a Defense Bypass: Because the GAN architecture encourages the adversarial examples to stay close to the "true" data distribution, they are more resilient against defenses that try to "clean" or detect out-of-distribution noise.
  • Dynamic Distillation: By dynamically updating the distilled model alongside the generator, the authors achieved much higher success rates in black-box scenarios.

Limitations and Future Work

While the attack itself is fast, training the GAN requires significant time and data. Furthermore, a generator trained to attack one specific model might not transfer perfectly to a different architecture without retraining. Scaling to very high resolutions also remains resource-intensive. Future work suggests exploring how AdvGAN can be used to improve defenses by generating more diverse and difficult examples for adversarial training.

Summary updated

BibTeX
@inproceedings{xiao2018generating,
  author = {Chaowei Xiao and Bo Li and Jun-Yan Zhu and Warren He and Mingyan Liu and Dawn Song},
  title = {{Generating Adversarial Examples with Adversarial Networks}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.24963/ijcai.2018/543},
}
Figure