SemanticAdv: Generating Adversarial Examples via Attribute-conditional Image Editing

Haonan Qiu, Chaowei Xiao, Lei Yang, Xinchen Yan, Honglak Lee, Bo LiarXiv 2019

Abstract

Deep neural networks (DNNs) have achieved great success in various applications due to their strong expressive power. However, recent studies have shown that DNNs are vulnerable to adversarial examples which are manipulated instances targeting to mislead DNNs to make incorrect predictions. Currently, most such adversarial examples try to guarantee "subtle perturbation" by limiting the $L_p$ norm of the perturbation. In this paper, we aim to explore the impact of semantic manipulation on DNNs predictions by manipulating the semantic attributes of images and generate "unrestricted adversarial examples". In particular, we propose an algorithm SemanticAdv which leverages disentangled semantic factors to generate adversarial perturbation by altering controlled semantic attributes to fool the learner towards various "adversarial" targets. We conduct extensive experiments to show that the semantic based adversarial examples can not only fool different learning tasks such as face verification and landmark detection, but also achieve high targeted attack success rate against real-world black-box services such as Azure face verification service based on transferability. To further demonstrate the applicability of SemanticAdv beyond face recognition domain, we also generate semantic perturbations on street-view images. Such adversarial examples with controlled semantic manipulation can shed light on further understanding about vulnerabilities of DNNs as well as potential defensive approaches.

Introduction: Beyond Invisible Noise

Traditionally, adversarial attacks on deep neural networks (DNNs) have focused on "imperceptible" perturbations, typically constrained by $L_p$ norms. The goal is to change pixel values so slightly that a human observer notices no difference, yet the model's prediction is altered. However, this focus on raw pixel distance does not capture the full spectrum of real-world vulnerabilities. In practical scenarios, such as autonomous driving or facial recognition, systems encounter variations in lighting, weather, and physical attributes that are semantically meaningful rather than just random noise.

The authors of SemanticAdv argue that DNNs are brittle in ways that $L_p$ bounds cannot capture. They propose moving toward "unrestricted" adversarial examples—images that look perfectly natural to humans but contain specific semantic changes (e.g., changing hair color or adding a car to a scene) designed to mislead a model.

Methodology

The core of SemanticAdv is the use of attribute-conditioned image editing. Instead of manipulating pixels directly, the method manipulates the latent representation of an image within a generative model.

Overview of the SemanticAdv framework, illustrating attribute-conditioned image editing and its application to identity verification.

Generative Foundation

The framework utilizes a pre-trained conditional generator ($G$). Given an input image and a target attribute (such as "blonde hair"), the generator produces a modified version of the image.

Feature-map Interpolation

A key technical innovation in SemanticAdv is feature-map interpolation. Rather than performing a simple linear interpolation in the low-dimensional attribute space, the algorithm interpolates within the high-dimensional feature maps of the generator's internal layers. This provides significantly more "manipulation freedom," allowing the attack to find precise texture or shape changes that fool the target model while maintaining high visual quality.

Optimization Objective

The attack is formulated as an optimization problem that balances two primary goals:

  1. Adversarial Loss: Ensuring the target model (e.g., a face recognizer) produces the desired incorrect prediction (either a specific target identity or simply a misclassification).
  2. Smoothness Constraint: Maintaining spatial consistency in the feature-map modifications to ensure the resulting synthesized image appears natural and free of artifacts.

Experimental Setup

The researchers evaluated SemanticAdv across two distinct domains:

  • CelebA: A large-scale dataset of facial attributes used to attack identity verification and landmark detection models.
  • Cityscapes: A dataset of urban street scenes used to evaluate attacks on semantic segmentation models, which are critical for autonomous vehicle perception.

Key Results and Insights

The experiments yielded several critical findings regarding the vulnerability of modern DNNs:

  • The Power of Feature Space: Interpolating in the feature-map space proved vastly more effective than raw attribute-space interpolation. While attribute-space attacks often failed (0.08% success), feature-space attacks achieved nearly 100% success in white-box settings.
  • Black-Box Transferability: SemanticAdv demonstrated impressive performance against commercial "black-box" APIs. It achieved a 67.69% success rate against the Face++ API and was also effective against AliYun and Microsoft Azure. Notably, these were "query-free" attacks, relying on the transferability of adversarial examples from local models.
  • Vulnerability to Global Changes: Models appeared more robust against local shape changes (e.g., adding earrings) but highly vulnerable to global color or regional changes (e.g., skin tone or hair color). This suggests that current face recognizers may over-rely on color textures rather than structural geometry.
  • Ineffectiveness of Standard Defenses: Most current adversarial defenses, such as JPEG compression or blurring, are designed to remove high-frequency pixel noise. Because SemanticAdv produces high-quality, semantically coherent images, these defenses are largely ineffective. Even models trained with "Adversarial Training" (robust against PGD noise) showed only 10% accuracy when faced with SemanticAdv examples.

Conclusion

SemanticAdv highlights a significant blind spot in current DNN security research. By moving beyond $L_p$ constraints, the authors demonstrate that realistic semantic variations can be just as dangerous as invisible noise. The reliance on high-quality generative models is a current limitation, as the realism of the attack is tied to the generator's performance. However, this work serves as a vital step toward understanding the semantic vulnerabilities of AI and developing more robust defensive strategies that go beyond simple noise filtering.

Summary updated

BibTeX
@misc{qiu2019semanticadv,
  author = {Haonan Qiu and Chaowei Xiao and Lei Yang and Xinchen Yan and Honglak Lee and Bo Li},
  title = {{SemanticAdv: Generating Adversarial Examples via Attribute-conditional Image Editing}},
  year = {2019},
  eprint = {1906.07927},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.07927},
}
Figure