Class Distribution Alignment for Adversarial Domain Adaptation

Wanqi Yang, Tong Ling, Chengmei Yang, Lei Wang, Yinghuan Shi, Luping Zhou, Ming YangarXiv 2020

Abstract

Most existing unsupervised domain adaptation methods mainly focused on aligning the marginal distributions of samples between the source and target domains. This setting does not sufficiently consider the class distribution information between the two domains, which could adversely affect the reduction of domain gap. To address this issue, we propose a novel approach called Conditional ADversarial Image Translation (CADIT) to explicitly align the class distributions given samples between the two domains. It integrates a discriminative structure-preserving loss and a joint adversarial generation loss. The former effectively prevents undesired label-flipping during the whole process of image translation, while the latter maintains the joint distribution alignment of images and labels. Furthermore, our approach enforces the classification consistence of target domain images before and after adaptation to aid the classifier training in both domains. Extensive experiments were conducted on multiple benchmark datasets including Digits, Faces, Scenes and Office31, showing that our approach achieved superior classification in the target domain when compared to the state-of-the-art methods.

The Challenge of Domain Adaptation

Unsupervised Domain Adaptation (UDA) aims to train a model on a labeled "source" domain (e.g., synthetic images) and successfully deploy it on an unlabeled "target" domain (e.g., real-world photos).

Most existing methods focus on marginal distribution alignment—essentially making the target data look like the source data. However, this is often insufficient. A model can successfully make a target image look like a source image while accidentally swapping its identity (e.g., a target '9' might be translated to look like a source '4'). This phenomenon, known as label-flipping, occurs because marginal alignment ignores the class-specific structures of the data. To solve this, CADIT tackles the challenge of aligning joint distributions (images and their labels) even when target labels are missing during training.

Conceptual comparison of marginal vs. joint distribution alignment.

Methodology: Conditional Adversarial Image Translation

CADIT builds upon the CycleGAN architecture for bi-directional image translation but introduces a sophisticated discriminative layer to ensure semantic consistency. The framework relies on three core integrated losses:

The CADIT architecture illustrating the integration of DSP and JAG losses.
  1. Discriminative Structure-Preserving (DSP) Loss: This loss ensures that if two source images share the same label, their translated target versions remain close in feature space. This "anchors" the classes during translation to prevent semantic drift.
  2. Joint Adversarial Generation (JAG) Loss: Unlike standard discriminators that only check if an image is "real" or "fake," this discriminator evaluates the pair of (image, label). Since target labels are unknown, the model utilizes pseudo-labels weighted by an entropy-based confidence score. High-confidence predictions contribute more heavily to the alignment process, allowing the model to self-correct.
  3. Classification Consistence (CLC) Loss: This enforces that a target image and its "cycled" version (translated to source and back) yield the same classification result, further stabilizing the training process.

Experimental Evaluation

The authors evaluated CADIT on a diverse set of benchmarks, including Digits (MNIST, USPS, SVHN), Faces (CelebA attributes), Scenes (Photo to Painting), and the standard Office31 benchmark.

CADIT consistently outperformed state-of-the-art baselines:

  • Digits: Achieved 96.74% accuracy on MNIST $\rightarrow$ USPS, surpassing CDAN (93.27%) and SBADA (95.41%).
  • Faces: On the "glasses" attribute, CADIT reached 97.11% accuracy, a significant improvement over SBADA (95.46%).
  • Ablation Studies: These revealed that the JAG loss provided the most significant performance boost, confirming that joint distribution alignment is the critical factor for effective UDA.

Key Insights and Conclusion

The primary takeaway is that style is not substance: simply matching the "look" of two domains is insufficient for robust classification. Semantic structure must be preserved through explicit class distribution alignment. Using t-SNE visualizations, the authors demonstrated that while other methods create clusters, CADIT is unique in ensuring that the clusters of the source and target domains actually overlap correctly by class.

While CADIT is computationally more intensive than non-generative methods—requiring the simultaneous training of two generators and four discriminators—its ability to reduce the domain discrepancy (measured via $\mathcal{A}$-distance) makes it a powerful tool for complex domain adaptation tasks where class-level alignment is critical.

Summary updated

BibTeX
@misc{yang2020class,
  author = {Wanqi Yang and Tong Ling and Chengmei Yang and Lei Wang and Yinghuan Shi and Luping Zhou and Ming Yang},
  title = {{Class Distribution Alignment for Adversarial Domain Adaptation}},
  year = {2020},
  eprint = {2004.09403},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.09403},
}
Figure