Abstract
Deep learning models often fail when faced with natural, real-world image variations like changes in lighting, background, or pose. This paper introduces NaTra, an adversarial training scheme that leverages the disentangled latent spaces of pre-trained GANs to generate realistic, semantically meaningful data augmentations, making classifiers significantly more robust to real-world distortions without sacrificing standard accuracy.
Introduction
State-of-the-art deep learning models are notoriously brittle. While much research has focused on adversarial robustness—defending against tiny, imperceptible pixel-level noise ($L_p$-norm bounded perturbations)—models still struggle with natural, semantically preserving variations. A face recognition model might fail simply because the subject's head is slightly rotated or the lighting angle changed.
Standard data augmentation (cropping, flipping, color jittering) relies on basic geometric or color transformations that don't capture complex 3D real-world variations. Conversely, standard adversarial training focuses on unnatural pixel noise. The authors bridge this gap by asking: How can we train models to be robust against complex, real-world semantic transformations (like changing a facial expression or the orientation of a car)?
Methodology: The NaTra Framework
The authors propose NaTra (Natural Transformation), a framework that uses pre-trained, high-fidelity generative models (like StyleGAN and BigGAN) as advanced data augmentation engines. The pipeline consists of four main technical innovations:
- Batch Inverse Encoding and Shifting (BIES): To manipulate a real image using a GAN, it must first be mapped into the GAN's "latent space." Traditional inversion is slow and optimized per image. BIES trains an encoder to map batches of real images into the latent space quickly and accurately.
- Latent Codes Expansion (LCE): To ensure the reconstructed image retains its original high-fidelity details, NaTra maps images into an extended latent space. It uses an attention mechanism to merge intermediate feature maps, allowing different latent vectors to control specific sub-regions or channels of the image.
- Unsupervised Attribute Directing and Manipulating (ADM): NaTra uses UMAP (a dimensionality reduction technique) on the GAN's activation space to discover principal axes of variation completely unsupervised. This allows the system to find interpretable edit directions, such as head rotation or lighting changes.
- Adaptive Perturbation Tuning (APT): During adversarial training, NaTra dynamically adjusts the "strength" of the semantic edit. For images already close to the classifier's decision boundary, it applies a smaller transformation to prevent the model from learning unrealistic or overly distorted features.
Experimental Setup
The authors evaluated NaTra on three standard, high-resolution datasets:
- CelebA-HQ (Face): 30,000 high-quality face images at 1024×1024 resolution.
- LSUN Car: Resized to 512×512.
- LSUN Cat: Resized to 256×256.
Key Results and Insights
The authors tested classifiers (VGG-16 and WideResNet) trained with NaTra against baselines like standard Adversarial Training (Adv), Mixup, and Random noise augmentation.
- Performance Gains: On CelebA-HQ, NaTra consistently outperformed baselines. For "smiling" classification, NaTra achieved 86.33% accuracy, compared to standard Adversarial Training (84.28%). Similar improvements were seen on LSUN Cat (94.15% vs 92.50%) and LSUN Car (92.86% vs 91.05%).
- Beyond $L_p$ Norms: Robustness isn't just about resisting static, mathematical noise; it's about resisting semantic shifts. Training a model to ignore static fuzz doesn't inherently teach it to recognize a face in the shadows.
- Accuracy vs. Robustness: Unlike traditional adversarial training, which often degrades clean accuracy, NaTra's use of natural transformations improves general accuracy while simultaneously boosting robustness.
- Qualitative Rescue: NaTra successfully "rescued" escaped examples—images correctly classified in their original state but failed when naturally transformed (e.g., rotated).
Discussion and Conclusion
While NaTra shows significant promise, it relies on high-quality, pre-trained GANs, which may not be available for all domains. Additionally, GAN inversion adds computational overhead. However, by tapping into the rich, disentangled representations of generative models, NaTra provides a path toward models that are truly robust to the complexities of the real world.
Summary updated