AdvST: Revisiting Data Augmentations for Single Domain Generalization

Guangtao Zheng, Mengdi Huai, Aidong Zhang

Abstract

AdvST (Adversarial learning with Semantics Transformations) addresses the challenge of Single Domain Generalization (SDG) by repurposing standard data augmentations as learnable adversarial tools. Unlike traditional methods that rely on pixel-level noise or complex generative models, AdvST searches for "worst-case" semantic variations—such as shifts in hue, brightness, or rotation—that challenge the model while preserving the original object's identity. By training on these adversarially optimized samples, models achieve significantly higher robustness on unseen target domains.

Introduction

In real-world machine learning, the assumption that training (source) and test (target) data share the same distribution often fails. Domain Generalization (DG) seeks to mitigate this, but typically requires multiple source datasets. Single Domain Generalization (SDG) is a more constrained and difficult variant where only one source dataset is available.

Existing SDG approaches often use pixel-level adversarial perturbations or generative models. However, pixel noise rarely reflects real-world domain shifts (like style or lighting changes), and generative models can be difficult to train or fail to deviate sufficiently from the source style. AdvST proposes that standard data augmentations, when optimized adversarially, provide a more effective and simpler mechanism for simulating diverse target domains.

Methodology

AdvST employs a mini-max adversarial framework to generate "fictitious" domains:

  1. Maximization Phase: The system selects a composition of standard augmentations (e.g., Brightness, Hue, Rotation) and optimizes their parameters to find the version of an image that maximizes the model's loss. To ensure the image remains recognizable, a constraint is applied: the transformed image must remain close to the original in the model's deep feature space (feature-space anchoring).
  2. Minimization Phase: The model is updated to minimize the loss on these "worst-case" samples, effectively becoming robust to a wide "neighborhood" of distribution shifts.

This process is mathematically grounded in Distributionally Robust Optimization (DRO), ensuring the model prepares for various potential real-world shifts.

Key Insights: Semantics and Coverage

AdvST shifts the focus from invisible pixel noise to "semantics"—attributes like color, geometry, and texture. By randomly composing multiple augmentations and optimizing them, the method generates a vast variety of challenging samples.

t-SNE visualization comparing AdvST with other methods. AdvST-generated samples (blue) spread further into the target domain (grey) compared to baseline methods.

As shown in the t-SNE visualization (Figure 1), AdvST-generated samples cover the target domain territory much more effectively than previous methods like ADA or ME-ADA, which tend to cluster too closely to the source data.

Experimental Results

AdvST was evaluated on three major benchmarks: Digits (MNIST to SVHN/USPS/etc.), PACS (Art, Cartoon, Photo, Sketch), and DomainNet.

Performance comparison on the Digits benchmark. AdvST achieves state-of-the-art average accuracy (80.1%), significantly outperforming standard ERM and previous adversarial methods.

On the Digits benchmark (Figure 5), AdvST achieved an average accuracy of 80.1%, a substantial improvement over the 49.3% of Empirical Risk Minimization (ERM) and the 59.3% of ME-ADA. On the PACS dataset, training on "Photo" and testing on other styles yielded a 64.1% average accuracy, outperforming the previous state-of-the-art (L2D) by approximately 12%. Furthermore, AdvST demonstrated high data efficiency; even with only 20% of training data, it outperformed many methods using the full dataset.

Conclusion

AdvST demonstrates that "smart" data augmentation is a powerful tool for Single Domain Generalization. By optimizing semantic transformations, it bridges the gap between source and unseen target domains more effectively than pixel-level methods. While its performance depends on the initial pool of augmentations, it sets a new standard for robustness in SDG.

Summary updated

BibTeX
@inproceedings{zheng2024advst,
  author = {Guangtao Zheng and Mengdi Huai and Aidong Zhang},
  title = {{AdvST: Revisiting Data Augmentations for Single Domain Generalization}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i19.30184},
}
Figure