Domain Generalization by Rejecting Extreme Augmentations

Masih Aminbeidokhti, Fidel A. Guerrero-Peña, Heitor Rapela Medeiros, Thomas Dubail, Eric Granger, Marco Pedersoli · DOI

TL;DR

This paper introduces DCAug, a novel data augmentation strategy for domain generalization that intelligently rejects "extreme" augmentations which can harm model performance. By balancing diversity and consistency, DCAug achieves state-of-the-art results on challenging domain generalization benchmarks, outperforming existing methods.

What Problem Does This Paper Address?

Deep learning models often struggle when deployed in environments different from their training data – a problem known as domain generalization (DG). While data augmentation is a powerful tool for improving model robustness in standard (in-domain) settings, its effectiveness in DG is less clear. Applying overly aggressive augmentations can actually hurt performance by distorting image semantics. The challenge is to leverage the benefits of strong augmentations for DG without introducing detrimental noise, especially when the target domain is unknown.

Methods

The authors propose a simple yet effective training procedure called DCAug. It builds upon existing uniform sampling augmentation strategies (like TrivialAugment) but with two key modifications:

  1. Wider Augmentation Space: They expand the range of standard data augmentation transformations to account for the higher expected variance in out-of-domain data.
  2. Rejection Reward Function: A novel reward function is introduced to dynamically select the best augmentation for each sample. This function balances two crucial components:
  3. Diversity: Encourages exploring diverse transformations.
  4. Consistency: Ensures the augmented sample retains its original semantic meaning.

The method uses a "teacher-student" paradigm. A "teacher" model (an EMA version of the domain or label classifier) helps evaluate the consistency of the augmented sample. If a "wider" (stronger) augmentation is deemed both diverse and consistent enough by the reward function, it's selected; otherwise, a "weaker" (safer) augmentation is used. This allows for aggressive augmentation when beneficial, while rejecting harmful transformations.

Datasets

The authors evaluate their method on five standard domain generalization benchmarks:

  • PACS: A 7-way object classification task with 4 domains (art, cartoon, photo, sketch).
  • VLCS: A 5-way classification task with 4 domains (Caltech101, LabelMe, SUN09, VOC2007).
  • OfficeHome: A 65-way classification task with 4 domains (art, clipart, product, real).
  • TerraIncognita: A 10-way classification problem of animals in wildlife cameras across 4 locations.
  • DomainNet: A large-scale 345-way object classification task with 6 domains.

They follow the DomainBed benchmark's evaluation protocols, using leave-one-out cross-validation.

Key Insights and Ideas

  • Stronger Augmentations are Key for DG: Unlike in-domain settings, where moderate augmentations suffice, domain generalization benefits from stronger transformations to better cover unseen domain variations.
  • The Double-Edged Sword of Aggressive Augmentation: While stronger augmentations can improve generalization, they can also easily lead to semantic distortions that harm performance. The key is not just to use stronger augmentations, but to use them selectively.
  • Balancing Diversity and Consistency is Crucial: The proposed reward function effectively balances the need for diverse data to improve generalization with the necessity of maintaining semantic consistency to avoid errors. This trade-off is critical for success in DG.
  • Domain-Dependent Augmentation Preference: The study shows that the model's preference for stronger vs. weaker augmentations can be domain-dependent. For domains closer to the pre-trained model's distribution (like "Art" and "Photo" from ImageNet), weaker augmentations are often sufficient, while domains further away ("Cartoon," "Sketch") benefit more from stronger ones.

Key Results

  • State-of-the-Art Performance: DCAug (specifically the TeachDCAuglabel variant) achieves state-of-the-art out-of-domain accuracies across the evaluated datasets, outperforming existing domain generalization methods.
  • Improved Accuracy: On PACS, TeachDCAuglabel reached 88.4% average OOD accuracy, significantly higher than other methods.
  • Robustness: The method demonstrates robustness, maintaining competitive performance even on large and diverse datasets like DomainNet.
  • Efficiency: While slightly more computationally expensive than basic ERM (roughly twice the iteration time), DCAug offers significant performance gains.

Limitations and Future Work

  • Computational Cost: While efficient, DCAug is still more computationally intensive than simpler baselines like ERM due to the dual classifier updates and reward calculations.
  • Hyperparameter Tuning: The balancing coefficient ($\lambda$) for diversity and consistency requires tuning, though the authors found a consistent preference for higher $\lambda$ (favoring consistency) on some datasets.
  • Future Work: The authors suggest exploring variations of the reward function and investigating the impact of different backbone architectures (like ViT) on their method's performance. They also highlight the potential for further improvements by carefully selecting transformations and their magnitudes.

Summary updated

BibTeX
@inproceedings{aminbeidokhti2024domain,
  author = {Masih Aminbeidokhti and Fidel A. Guerrero-Peña and Heitor Rapela Medeiros and Thomas Dubail and Eric Granger and Marco Pedersoli},
  title = {{Domain Generalization by Rejecting Extreme Augmentations}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00221},
}
Figure