Fine-grained Synthesis of Unrestricted Adversarial Examples

Omid Poursaeed, Tianxing Jiang, Harry Yang, Serge J. Belongie, Ser-Nam Lim

This paper, "Fine-grained Synthesis of Unrestricted Adversarial Examples," introduces a method for creating adversarial images that don't rely on the standard "invisible noise" approach. Instead, it leverages the power of generative models to create realistic, high-resolution images that fool machine learning models by manipulating semantic and stylistic features.

TL;DR

The authors propose a novel framework for generating "unrestricted" adversarial examples by optimizing the latent space of state-of-the-art generative models (like StyleGAN). Unlike traditional attacks that add pixel-wise noise, these examples look like natural images to humans but effectively mislead classifiers, segmentors, and detectors, while adversarial training with them actually improves model performance on clean data.

What Problem Does This Paper Address?

Most research into adversarial examples focuses on norm-constrained attacks. These involve adding a tiny amount of noise (measured by $L_p$ norms) to an image so that the change is mathematically small and often invisible to humans. However, this is a narrow view of "similarity." A human might consider two images of a cat similar even if one is a different breed or in a different pose, even though the $L_p$ distance between them is massive.

Furthermore, defenses against norm-constrained attacks often fail against "unrestricted" modifications—changes that are large in pixel space but small in semantic space. Traditional adversarial training also typically results in a "robustness-accuracy trade-off," where the model becomes harder to fool but less accurate on normal, clean images. This paper seeks to bridge these gaps by creating adversarial examples that live on the manifold of realistic images.

Methods

The core idea is to use pre-trained generative models as a constrained search space. Instead of perturbing pixels directly, the authors perturb the inputs to the generator.

  1. Style-based Attacks (Classification): Using StyleGAN, the authors manipulate two types of latent variables:
  2. Style variables ($y$): These control high-level attributes like viewpoint, furniture type (in room datasets), or facial features.
  3. Noise variables ($\eta$): These capture stochastic, low-level details like hair texture or material grain.

    By performing gradient descent on these variables to maximize the target model's loss, they can synthesize an adversarial image $g(y_{adv}, \eta_{adv})$ that looks natural but is misclassified. This process is illustrated in the classification architecture:

    Figure 1: Classification architecture. Style (y) and noise (η) variables are used to generate images g(y, η) which are fed to the classifier F. Adversarial style and noise tensors are initialized with y and η and iteratively updated using gradients of the loss function J.
  4. Input-Conditioned Generation: To attack a specific real image, they first "embed" it into the GAN's latent space by finding the $y$ and $\eta$ that best reconstruct it, then proceed with the attack.

  5. Dense Prediction Attacks (Segmentation/Detection): For tasks like semantic segmentation, they use the SPADE (Spatially-Adaptive Denormalization) generator. They adversarially modify the modulation parameters ($\gamma$ and $\beta$) within the SPADE blocks to fool the target model.

Datasets

The efficacy of the approach was validated on several high-resolution datasets:

  • LSUN: 10 scene categories and 2 object categories (cars and cats).
  • CelebA-HQ: 30,000 high-resolution face images, used for gender classification.
  • COCO-Stuff: Used for evaluating the semantic segmentation attacks.
  • MNIST & SVHN: Used in the appendix for comparative studies against prior work.

Key Insights and Ideas

  • On-the-Manifold Adversaries: Because the search is restricted by a GAN, the resulting adversarial examples are forced to look like realistic images. This makes them "unrestricted" in terms of $L_p$ distance but highly restricted in terms of visual plausibility.
  • Breaking the Trade-off: The most surprising finding is that adversarial training with these examples improves clean accuracy. The authors argue that because these examples are realistic, they act as a form of data augmentation that teaches the model to be robust to natural variations (like lighting or pose) rather than just protecting it against artificial high-frequency noise.
  • Vulnerability of Certified Defenses: The paper demonstrates that "certified" defenses (like randomized smoothing), which provide mathematical guarantees for $L_p$ robustness, are easily bypassed by these semantic attacks. This highlights a major limitation in how we currently define and certify model robustness.

Key Results

  • Visual Fidelity: In a user study, humans labeled noise-based adversarial images as "real" 74.3% of the time, compared to 74.7% for unperturbed GAN images.
  • Performance Boost: Adversarial training improved clean accuracy on LSUN from 88.9% to 89.5% and on CelebA-HQ from 95.7% to 96.2%.
  • Attack Success: The method effectively crashed semantic segmentation accuracy. As shown in Figure 6, accuracy can drop from ~80% to near 0% in just five iterations of latent optimization.
Figure 6: Unrestricted adversarial examples for semantic segmentation. Generated images, corresponding predic- tions and their accuracy (ratio of correctly predicted pixels) are shown for different number of iterations.
  • Certified Defense Failure: A ResNet-50 model protected by randomized smoothing saw its accuracy drop from 63.1% to 21.7% when faced with style-based adversarial examples.

Limitations and Future Work

  • Black-Box Transferability: The current work focuses on white-box attacks where the attacker has access to the target model's gradients. The authors identify exploring the transferability of these attacks to black-box models as a key area for future research.
  • Defense Definitions: The paper notes that it is currently unclear how to even define "provable" defenses for unrestricted attacks, as the standard $L_p$ ball metric is no longer applicable.
  • Generator Dependency: The quality and diversity of the attacks are inherently limited by the capabilities of the underlying generative model. If the GAN cannot generate a certain type of object or scene, the attack cannot explore that part of the image manifold.

Summary updated

Abstract

We propose a novel approach for generating unrestricted adversarial examples by manipulating fine-grained aspects of image generation. Unlike existing unrestricted attacks that typically hand-craft geometric transformations, we learn stylistic and stochastic modifications leveraging state-of-the-art generative models. This allows us to manipulate an image in a controlled, fine-grained manner without being bounded by a norm threshold. Our approach can be used for targeted and non-targeted unrestricted attacks on classification, semantic segmentation and object detection models. Our attacks can bypass certified defenses, yet our adversarial images look indistinguishable from natural images as verified by human evaluation. Moreover, we demonstrate that adversarial training with our examples improves performance of the model on clean images without requiring any modifications to the architecture. We perform experiments on LSUN, CelebA-HQ and COCO-Stuff as high resolution datasets to validate efficacy of our proposed approach.
BibTeX
@misc{poursaeed2019fine,
  author = {Omid Poursaeed and Tianxing Jiang and Harry Yang and Serge J. Belongie and Ser-Nam Lim},
  title = {{Fine-grained Synthesis of Unrestricted Adversarial Examples}},
  year = {2019},
  eprint = {1911.09058},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.09058},
}
Figure