Adversarial target-invariant representation learning for domain generalization

Isabela Albuquerque, João Monteiro, Tiago H. Falk, Ioannis Mitliagkas

Abstract

Supervised learning results typically rely on assumptions of i.i.d. data. Unfortunately, those assumptions are commonly violated in practice. In this work, we tackle such problem by focusing on domain generalization: a formalization where the data generating process at test time may yield samples from never-before-seen domains (distributions). Our work relies on the following lemma: by minimizing a notion of discrepancy between all pairs from a set of given domains, we also minimize the discrepancy between any pairs of mixtures of domains. Using this result, we derive a generalization bound for our setting. We then show that low risk over unseen domains can be achieved by representing the data in a space where (i) the training distributions are indistinguishable, and (ii) relevant information for the task at hand is preserved. Minimizing the terms in our bound yields an adversarial formulation which estimates and minimizes pairwise discrepancies. We validate our proposed strategy on standard domain generalization benchmarks, outperforming a number of recently introduced methods. Notably, we tackle a real-world application where the underlying data corresponds to multi-channel electroencephalography time series from different subjects, each considered as a distinct domain.

Introduction

Standard supervised learning paradigms operate under the Independent and Identically Distributed (i.i.d.) assumption, where training and testing data are drawn from the same distribution. However, real-world applications frequently encounter distribution shifts. For instance, a speech recognition system trained on one dialect may fail on another, or an autonomous vehicle trained in clear weather may struggle in snow.

While Domain Adaptation (DA) addresses this by utilizing unlabeled data from the target domain during training, Domain Generalization (DG) presents a more rigorous challenge: the model must generalize to a target domain that is entirely unseen during the training phase. This paper introduces G2DM (Generalizing to unseen Domains via Distribution Matching), a framework designed to learn representations that are invariant to domain-specific characteristics while remaining highly predictive.

Theoretical Foundation: The Convex Hull Lemma

The core of G2DM is a theoretical result regarding the geometry of probability distributions. The authors prove that by minimizing the discrepancy (specifically the $\mathcal{H}$-divergence) between all pairs of available source domains, one effectively minimizes the discrepancy between any "mixtures" of those domains—their convex hull.

This suggests that if the unseen target domain lies within or near the neighborhood of the training domains' convex hull, the model's performance will be preserved. Consequently, increasing the diversity of source domains expands this "safe" neighborhood, enhancing generalization.

The G2DM Framework

The G2DM algorithm implements this theory through an adversarial training strategy. The architecture consists of three primary components:

  1. Encoder: Maps input data to a latent space, aiming to strip away domain-specific "cues."
  2. Task Classifier: Predicts labels from the encoded features.
  3. One-vs-All Domain Discriminators: To avoid the computational complexity of comparing every domain pair, G2DM employs one discriminator per domain. The encoder is trained to "fool" these discriminators, ensuring that no single domain's features are easily identifiable.

To stabilize this adversarial process, the authors incorporate a random projection layer before the discriminators to increase the difficulty of the discrimination task. Furthermore, they utilize a negative log-hypervolume loss to ensure that all pairwise differences are minimized uniformly, preventing the optimization from neglecting specific domains.

Experimental Evaluation

The effectiveness of G2DM was validated across three diverse benchmarks:

  • VLCS: Object recognition across four datasets (Pascal VOC2007, LabelMe, Caltech-101, SUN09).
  • PACS: A challenging benchmark featuring four distinct styles: Photos (P), Art paintings (A), Cartoons (C), and Sketches (S).
  • SEED: A real-world EEG dataset for emotion prediction, where each of the 15 subjects represents a distinct domain.
Pairwise domain discrepancies across the PACS dataset domains (Photo, Art, Cartoon, Sketch).

Key Results

On the PACS and VLCS benchmarks, G2DM consistently outperformed Empirical Risk Minimization (ERM) and state-of-the-art methods like IRM and JiGen. It showed particularly strong gains in difficult domains like "Sketch" and "LabelMe." On VLCS, G2DM achieved an average accuracy of 75.92%, compared to ERM's 74.92%.

In the SEED EEG dataset, G2DM achieved 55.77% accuracy in cross-subject emotion prediction, significantly higher than ERM’s 51.98%. Notably, when provided with "semi-privileged" access to validation data, G2DM reached 60.26%, rivaling "privileged" domain adaptation baselines that had direct access to target data.

Discussion and Conclusion

G2DM demonstrates that reducing variance between source domains naturally leads to features robust to unseen target domains. However, the theoretical guarantees are contingent on the "Proximity Assumption"—the target domain must not be a "black swan" event radically different from the source domains.

Future work may explore scaling G2DM to a larger number of source domains, which the authors hypothesize could further bridge the gap between Domain Generalization and Domain Adaptation.

Summary updated

BibTeX
@misc{albuquerque2019adversarial,
  author = {Isabela Albuquerque and João Monteiro and Tiago H. Falk and Ioannis Mitliagkas},
  title = {{Adversarial target-invariant representation learning for domain generalization}},
  year = {2019},
  eprint = {1911.00804},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.00804},
}
Figure