Adversarial Self-Training Improves Robustness and Generalization for Gradual Domain Adaptation

Lianghe Shi, Weiwei LiuNeurIPS 2023

TL;DR

Researchers have discovered that Adversarial Self-Training (AST) acts as a "double win" for Gradual Domain Adaptation. Not only does it make models significantly more robust to attacks, but it also—counterintuitively—improves their accuracy on "clean," unperturbed data by helping the model ignore incorrect labels generated during the adaptation process.

The Challenge of Gradual Domain Adaptation

Machine learning models often fail when the data they encounter in the real world (the target domain) differs significantly from their training data (the source domain). Gradual Domain Adaptation (GDA) tackles this by providing the model with intermediate, unlabeled "stepping stone" domains. Think of a self-driving car adapting to a sunset by processing a sequence of images as the light slowly fades, rather than jumping straight from high noon to pitch black.

While GDA is highly effective for maintaining accuracy across shifting environments, it suffers from two major Achilles' heels:

  1. Robustness: These models are often fragile and easily fooled by tiny, intentional perturbations known as adversarial attacks.
  2. The Robustness-Accuracy Trade-off: Traditionally, making a model robust (via Adversarial Training) comes at the cost of lower accuracy on normal, unperturbed data.

This paper asks a critical question: Can we make GDA models robust without sacrificing their standard performance?

Adversarial Self-Training (AST)

The authors introduce Adversarial Self-Training (AST) into the GDA pipeline to bridge this gap.

In standard gradual self-training, a model predicts labels for the next intermediate domain (a process called pseudo-labeling) and then trains on those predictions. The authors replace this standard training step with Adversarial Training (AT). Instead of just learning from the pseudo-labeled images, the model learns from "attacked" or perturbed versions of those images while still trying to predict the original pseudo-label.

The process is iterative:

  1. Predict: Use the current model to generate pseudo-labels for the next intermediate domain.
  2. Perturb: Create adversarial versions of that intermediate data.
  3. Train: Update the model using these adversarial examples against the predicted labels.

Evaluated Datasets

The researchers evaluated their approach on two common GDA benchmarks:

  • Rotating MNIST: A synthetic dataset where digits are gradually rotated from 0 to 60 degrees. The "intermediate domains" are the small increments of rotation.
  • Portraits: A real-world dataset of high school yearbook photos spanning a century (1905–2013). The task is gender classification, and the "gradual shift" is the evolution of fashion, hairstyles, and photo quality over the decades.

Key Insights: The "Noise Filter" Effect

The most surprising finding of the paper is that AST actually improves clean accuracy.

Why does this happen? In GDA, pseudo-labels are never 100% perfect. Standard training tends to overfit and "memorize" these incorrect labels. Adversarial training, however, is more "stubborn." It forces the model to learn smoother, more generalized decision boundaries. This effectively helps the model ignore the "noise" of incorrect pseudo-labels, acting as a natural filter.

Furthermore, timing is everything. The authors found that starting adversarial training from the very first domain isn't always optimal. Initiating AST from an intermediate domain—once the model has a decent grasp of the task—often yields the best balance of robustness and accuracy.

Performance across varying starting domains and the impact of pseudo-label accuracy.

To back this up, the paper provides a theoretical justification using a clever connection to the Subset Sum Problem. The authors prove that Adversarial Training can provide a tighter "error bound" than standard training when labels are noisy. They also provide a toy Gaussian example to visualize how AT pushes the decision boundary toward the true center, even when the training labels are slightly shifted.

Key Results

The performance improvements are dramatic, particularly on the Rotating MNIST dataset:

  • Adversarial Robustness: Jumped from a measly 6.00% (standard GDA) to an impressive 90.44% (with AST).
  • Clean Accuracy: Improved from 90.06% to 97.15%.

On the real-world Portraits dataset, AST improved clean accuracy by 2.73% and adversarial accuracy by 37.40% compared to vanilla gradual self-training. These results directly challenge the long-held belief that practitioners must always trade off clean accuracy for adversarial robustness.

Limitations and Future Work

While the results are highly promising, the authors note a few areas for further exploration:

  • Computational Cost: Adversarial training is significantly more expensive than standard training because it requires generating mathematical "attacks" during every single training step.
  • Hyperparameter Sensitivity: The success of the method depends heavily on choosing the right "starting domain" ($\tau$) and "filtration ratio" ($\zeta$), which currently requires a small amount of labeled validation data from the target domain.
  • Beyond Gradual Shifts: The underlying theory relies on the domains shifting gradually. If the jump between domains is too large, the pseudo-labels become too noisy for even AST to recover meaningful patterns.

Future work could involve automating the selection of the starting point for AST or applying these insights to more complex computer vision tasks like object detection and segmentation.

Summary updated

BibTeX
@inproceedings{shi2023adversarial,
  author = {Lianghe Shi and Weiwei Liu},
  title = {{Adversarial Self-Training Improves Robustness and Generalization for Gradual Domain Adaptation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=QNUs3Ramad},
}
Figure