Generating Adversarial Examples With Conditional Generative Adversarial Net

Ping Yu, Kaitao Song, Jianfeng Lu

TL;DR

This paper introduces a faster, more efficient way to create adversarial examples—images designed to trick AI classifiers—using Conditional Generative Adversarial Networks (CGANs). By training a generative model to produce these attacks in a single forward pass, the authors achieve a 5x speedup over traditional methods like FGSM while maintaining high image quality and attack success rates.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notoriously fragile; adding a tiny, human-invisible "perturbation" to an image can cause a state-of-the-art classifier to fail. However, existing methods to create these adversarial examples, such as the Fast Gradient Sign Method (FGSM) or optimization-based attacks, have two major drawbacks:

  1. Computational Cost: They often require expensive iterative searches or gradient calculations for every single image they want to attack.
  2. Storage and Realism: Many methods require a source image to start with and can produce "noisy" results that are easily detected by humans.

The authors aim to move from searching for an attack to generating one instantly using the power of GANs.

Methods

The researchers propose two distinct frameworks based on Conditional GANs (CGANs):

  • CGAN-F (Fake): This model generates attack images directly from Gaussian noise and a target label. It doesn't need a "source" image to modify; it simply dreams up a fake image that looks like one class to a human but is classified as another by the AI.
  • CGAN-Adv (Adversarial): This is a more sophisticated two-step process. The generator produces a "raw" image and a specific "perturbation" simultaneously. These are summed and normalized to create the final attack image.

Key Innovations in Training: * Fooling Loss ($L_{fool}$): Beyond the standard GAN loss (which ensures images look "real"), they add a loss term that rewards the generator when the target classifier is successfully tricked. * Normalization: To prevent pixel values from "overflowing" (exceeding the standard 0-255 range) when adding perturbations, they introduce a specific normalization technique ($x_f = \frac{x' + p*r}{1+p}$). * Training Rollbacks: To ensure the images don't become too distorted by the fooling objective, the training process periodically "rolls back" to traditional GAN training for one iteration to refocus on image quality.

Datasets

The models were evaluated on two standard computer vision benchmarks:

  1. MNIST: The classic dataset of 70,000 handwritten digits (0-9).
  2. Fashion-MNIST: A more complex dataset of 70,000 clothing items (e.g., shirts, sneakers, bags) designed as a drop-in replacement for MNIST.

The target classifiers achieved 99.1% accuracy on MNIST and 92.0% on Fashion-MNIST before being attacked.

Key Insights and Ideas

  • Generative vs. Iterative: The biggest "aha" moment is that once a CGAN is trained, generating an attack is a "one-shot" process. It requires only a single forward propagation through the network, making it significantly faster than methods that must calculate gradients for every new input.
  • Attacking without Source Images: CGAN-F proves that you don't actually need a library of real images to perform an attack. A well-trained GAN can generate "synthetic" adversarial examples from pure noise.
  • Feature Targeting: By observing the generated perturbations, the authors noted that the model learns to identify and modify the "key points" or features that the target classifier relies on most for its decisions.
  • Storage Efficiency: Because the model generates images from noise, you don't need to store large datasets of source images to launch a large-scale attack; you only need the trained generator weights.

Key Results

  • Speed: The CGAN-Adv model produced attack instances in approximately 13ms, compared to 53ms for FGSM and 73ms for WRM. This represents a roughly 5x speedup.
  • Visual Quality: CGAN-Adv outperformed CGAN-F in visual fidelity. It was able to preserve fine details (like patterns on shirts or holes in sandals) while still successfully fooling the classifier.
  • Success Rate: Both proposed methods achieved high attack success rates against white-box classifiers (where the attacker has full access to the model).
  • Perturbation Magnitude: In CGAN-Adv, the average magnitude of the added noise was only about 13.2% of the raw data, suggesting the attacks are relatively subtle.

Limitations and Future Work

  • Complexity of Data: The study was limited to low-resolution, grayscale datasets (MNIST and Fashion-MNIST). Scaling these generative attacks to high-resolution, color datasets like ImageNet remains a significant challenge for GAN stability.
  • White-Box Constraint: The current training process requires access to the target classifier's gradients. The authors did not deeply explore "black-box" scenarios where the classifier is a total mystery.
  • Future Directions: The authors plan to focus on further reducing the magnitude of the perturbations to make the attacks even more invisible to the human eye.

Summary updated

BibTeX
@inproceedings{yu2018generating,
  author = {Ping Yu and Kaitao Song and Jianfeng Lu},
  title = {{Generating Adversarial Examples With Conditional Generative Adversarial Net}},
  booktitle = {ICPR},
  year = {2018},
  doi = {10.1109/icpr.2018.8545152},
}
Figure