Abstract
In recent years, machine learning has achieved impressive results across different application areas. However, machine learning algorithms do not necessarily perform well on a new domain with a different distribution than its training set. Domain Adaptation (DA) is used to mitigate this problem. One approach of existing DA algorithms is to find domain invariant features whose distributions in the source domain are the same as their distribution in the target domain. In this paper, we propose to let the classifier that performs the final classification task on the target domain learn implicitly the invariant features to perform classification. It is achieved via feeding the classifier during training generated fake samples that are similar to samples from both the source and target domains. We call these generated samples domain-agnostic samples. To accomplish this we propose a novel variation of generative adversarial networks (GAN), called the MiddleGAN, that generates fake samples that are similar to samples from both the source and target domains, using two discriminators and one generator. We extend the theory of GAN to show that there exist optimal solutions for the parameters of the two discriminators and one generator in MiddleGAN, and empirically show that the samples generated by the MiddleGAN are similar to both samples from the source domain and samples from the target domain. We conducted extensive evaluations using 24 benchmarks; on the 24 benchmarks, we compare MiddleGAN against various state-of-the-art algorithms and outperform the state-of-the-art by up to 20.1% on certain benchmarks.
Introduction
Deep learning models are notoriously sensitive to "domain shift." A model trained to recognize handwritten digits on a clean background (MNIST) often fails when applied to real-world street photos (SVHN) due to differing data distributions. Unsupervised Domain Adaptation (UDA) seeks to address this by helping a model trained on a labeled "source" domain perform well on an unlabeled "target" domain.
While most existing methods attempt to explicitly engineer domain-invariant features, MiddleGAN takes an implicit approach. By providing the classifier with "domain-agnostic" samples that sit in the mathematical middle of the source and target datasets, the model is forced to naturally learn features that work across both domains.
Proposed Method: MiddleGAN Architecture
The core innovation is the MiddleGAN architecture, which utilizes a minimax game between one generator ($G$) and two discriminators ($D_s$ and $D_t$). The generator's objective is to produce "fake" samples that are sufficiently "middle-of-the-road" to fool both the source and target discriminators simultaneously.
To ensure semantic consistency—for example, ensuring a "middle" sample of a car still looks like a car—the authors utilize pseudo-labels for the target domain generated by existing algorithms like Fixbi. Once MiddleGAN is trained, the final classifier is trained on a combination of real source data, real target data, and these new domain-agnostic samples.
Key Insights: The JS Centroid and Visual Evidence
Mathematically, MiddleGAN's generator searches for the Jensen-Shannon (JS) centroid, which represents the point of minimum divergence between the source and target distributions. This allows the classifier to naturally gravitate toward features that are consistent across domains (like the shape of a digit) while ignoring domain-specific noise (like background textures).
In a striking experiment using the CelebA dataset where the source is "women" and the target is "men," MiddleGAN generated faces with a blend of feminine and masculine features. These agnostic faces provide the necessary training signal for the classifier to learn gender-neutral facial recognition features.
Experimental Results
MiddleGAN achieved state-of-the-art (SOTA) results across 24 benchmark tasks:
- Office-Home: Outperformed previous SOTA models by an average of 2.6%, with a significant 20.1% improvement on the Product-to-Clipart task.
- Office-31: Reached an average accuracy of 92.4%, surpassing the previous best of 91.4%.
- Digits: On difficult SVHN ↔ MNIST tasks, MiddleGAN achieved near-perfect accuracy (up to 99.9%).
- Robustness: Performance remained stable even when rotating generated samples, confirming they were truly domain-agnostic.
Conclusion
MiddleGAN demonstrates that implicit learning of invariant features through domain-agnostic samples is a powerful strategy for UDA. While it introduces higher computational overhead due to the multi-adversarial setup and relies on the quality of initial pseudo-labels, its ability to significantly outperform existing methods across diverse benchmarks marks a notable advancement in the field of domain adaptation.
Summary updated