Abstract
Deep neural networks are notoriously vulnerable to adversarial attacks, and traditional defenses often degrade performance on clean data. This paper introduces Generative Adversarial Training (GAT), a framework that utilizes generative models like StyleGAN to produce "unrestricted" adversarial examples. By perturbing the latent space of a GAN, GAT creates realistic, on-manifold variations—ranging from lighting changes to object pose—rather than pixel-level noise. Training on these diverse semantic variations allows models to achieve superior robustness against unforeseen attacks while simultaneously improving accuracy on clean and out-of-domain datasets, effectively eliminating the traditional "robustness tax."
Introduction
Deep neural networks are brittle; a model that perfectly identifies a "cat" can be fooled by an adversarial attack that adds a tiny amount of invisible noise (norm-constrained attacks). While researchers have developed defenses against these specific tweaks, the resulting models often fail when faced with different types of changes, such as new lighting, rotations, or color shifts.
Furthermore, traditional adversarial training usually comes with a "robustness tax": making a model harder to fool typically makes it less accurate on normal, clean images. This is largely because standard attacks produce "off-manifold" examples—noisy images that do not resemble real-world data. GAT addresses this gap by building models robust to a wide spectrum of realistic variations without sacrificing general performance.
Methodology
The core idea of GAT is to leverage the disentangled latent spaces of state-of-the-art generative models, such as StyleGAN for classification and SPADE for segmentation, to "attack" a target model.
The process involves several key steps:
- Latent Manipulation: Instead of adding noise to pixels, the system perturbs the latent variables of a GAN. StyleGAN, for instance, separates "style" (high-level features like pose or lighting) from "noise" (low-level textures).
- Guided Search: To find an adversarial example, the system performs gradient descent/ascent in the latent space, adjusting the generative model's "knobs" to find a version of an image that looks realistic but causes the target model to fail.
- Spectrum of Changes: By targeting different layers of the generative network, GAT creates a spectrum of changes ranging from fine-grained (color/texture) to coarse-grained (object placement/geometry).
- Adversarial Training: The target model is trained on a 50/50 mix of clean images and these generated adversarial examples.
Experiments and Datasets
The authors evaluated GAT across several tasks and datasets:
- LSUN: Used for 10-way scene classification and a 2-way car vs. cat classification.
- CelebA-HQ: Used for high-resolution (1024x1024) gender classification.
- ImageNet: Used specifically to test "out-of-domain" generalization for models trained on LSUN.
- COCO-stuff: Used to train the SPADE generator for semantic segmentation experiments.
Results and Key Insights
GAT demonstrates that training on "on-manifold" examples—which look like real photos—acts as a powerful form of data augmentation that teaches the model more robust semantic features.
Key results include:
- Breaking the Robustness Tax: Unlike standard adversarial training, GAT improves accuracy on clean images. For example, on LSUN, clean accuracy rose from 88.9% to 89.5%.
- Generalization to Unforeseen Attacks: GAT-trained models are robust to attack types never seen during training. In a head-to-head comparison on LSUN, GAT achieved 42.1% mean accuracy across various unseen attacks (recoloring, spatial shifts, etc.), while standard PGD training managed only 13.0%.
- Out-of-Domain Performance: When trained on LSUN and tested on ImageNet, the GAT model outperformed the original model (92.0% vs 91.4%), proving that generative training aids generalization to entirely different datasets.
- Human Validation: A user study confirmed that GAT's adversarial images are almost indistinguishable from real images, with 99.2% of workers agreeing with the ground-truth labels.
Conclusion and Limitations
While GAT offers significant improvements, it is limited by the quality of the underlying GAN; if a GAN cannot produce a certain object realistically, the model cannot learn robustness to it. Additionally, extremely coarse changes in latent space could theoretically change an object's identity, potentially confusing the training process. Despite the higher computational cost of iterative optimization during training, GAT represents a significant step toward building models that are both robust and high-performing in real-world scenarios.
Summary updated