Abstract
The phenomenon of adversarial examples illustrates one of the most basic vulnerabilities of deep neural networks. Among the variety of techniques introduced to surmount this inherent weakness, adversarial training has emerged as the most effective strategy for learning robust models. Typically, this is achieved by balancing robust and natural objectives. In this work, we aim to further optimize the trade-off between robust and standard accuracy by enforcing a domain-invariant feature representation. We present a new adversarial training method, Domain Invariant Adversarial Learning (DIAL), which learns a feature representation that is both robust and domain invariant. DIAL uses a variant of Domain Adversarial Neural Network (DANN) on the natural domain and its corresponding adversarial domain. In the case where the source domain consists of natural examples and the target domain is the adversarially perturbed examples, our method learns a feature representation constrained not to discriminate between the natural and adversarial examples, and can therefore achieve a more robust representation. DIAL is a generic and modular technique that can be easily incorporated into any adversarial training method. Our experiments indicate that incorporating DIAL in the adversarial training process improves both robustness and standard accuracy.
Introduction
Deep neural networks are notoriously fragile; small, calculated perturbations—known as adversarial examples—can easily trick them into making incorrect predictions. While Adversarial Training (AT) is the most effective defense, it typically introduces a "robustness-accuracy trade-off," where resilience to attacks comes at the cost of performance on clean, natural data.
The authors of DIAL identify that adversarial perturbations induce significant shifts in the internal feature representations of a network. They argue that if a model can be forced to ignore the differences between natural and adversarial inputs at the feature level, it will become more robust without sacrificing standard performance.
Methodology
The core of the DIAL framework is framing adversarial vulnerability as a domain adaptation problem. It draws inspiration from Domain-Adversarial Neural Networks (DANN), typically used to bridge the gap between different data distributions (e.g., synthetic vs. real images).
The Architecture
DIAL adds a modular "Domain Classifier" head to a standard network architecture, consisting of three main components:
- Feature Extractor ($G_f$): Learns the internal representation of the data.
- Label Classifier ($G_y$): Predicts the semantic class.
- Domain Classifier ($G_d$): Attempts to distinguish between natural and adversarially perturbed inputs.
Gradient Reversal
The key mechanism is the Gradient Reversal Layer (GRL) placed before the domain classifier. During training, the Domain Classifier learns to identify adversarial examples, while the Feature Extractor—receiving the negative of the domain classifier's gradient—is forced to learn representations that make natural and adversarial examples indistinguishable. This results in two main variants: DIAL-CE (Cross-Entropy) and DIAL-KL (Kullback-Leibler divergence).
Key Insights and Results
DIAL consistently outperforms state-of-the-art defenses like TRADES and MART across benchmarks including MNIST, SVHN, and CIFAR-10/100. By minimizing the "discrepancy distance" between natural and adversarial distributions, the method provides a stronger theoretical upper bound on adversarial error.
Performance Metrics
Experiments demonstrate that DIAL improves both natural accuracy and robustness against various attack vectors. For instance, on CIFAR-10, DIAL-CE significantly boosts natural accuracy while DIAL-KL provides superior robustness against white-box attacks like PGD and Auto-Attack (AA).
Beyond standard benchmarks, DIAL showed a 4.7% average improvement on CIFAR-10-C (natural corruptions), proving that domain-invariant features help with general noise, not just specific mathematical attacks. Furthermore, models trained with DIAL proved to be superior feature extractors for transfer learning tasks.
Conclusion
DIAL offers a modular, "plug-and-play" solution to the robustness-accuracy trade-off by treating adversarial perturbations as a domain shift. While it shares the computational overhead inherent in generating adversarial examples during training, its ability to leverage unlabeled data and its strong performance against unforeseen corruptions make it a promising direction for building truly resilient deep learning systems.
Summary updated