Using Latent Codes for Class Imbalance Problem in Unsupervised Domain Adaptation

Boris ChidlovskiiarXiv 2019

Introduction

Unsupervised Domain Adaptation (UDA) aims to leverage labeled data from a source domain to improve performance on an unlabeled target domain. A significant challenge in real-world applications is "Class Imbalance" (CI), where the distribution of classes differs between the source and target domains. Standard UDA methods often assume identical class proportions, leading to a "smearing" effect where minority classes in the target domain are misclassified into majority classes. This paper introduces Latent code Adversarial Domain Adaptation (LADA), a framework designed to maintain robustness even under severe class imbalance.

The LADA Framework

LADA addresses the limitations of global distribution alignment by focusing on the internal structure of the target domain. It draws inspiration from InfoGAN to disentangle latent features.

Key Components

  • Latent Codes ($c$): The model incorporates latent codes to represent class information. While these are known for the source domain, they are treated as latent variables for the target domain that the model must learn to estimate.
  • Auxiliary Network ($Q$): This network reconstructs the latent codes from generated features by maximizing mutual information. This process encourages the model to learn a feature space where data naturally clusters into meaningful categories.
  • Continuous Relaxation: To handle the discrete nature of class labels in a differentiable training pipeline, the authors employ a continuous relaxation of the entropy term, enabling the estimation of target class distributions via gradient descent.
  • Adversarial Training: The system operates as a three-player game between a feature encoder, a domain discriminator, and the auxiliary network, ensuring that features are both domain-invariant and class-discriminative.

Experimental Evaluation

The researchers evaluated LADA on two major benchmarks: Office31 (Amazon, DSLR, Webcam domains) and VisDA (a large-scale synthetic-to-real dataset). To rigorously test resilience to class imbalance, they implemented a random CI sampling protocol, generating target subsets with varying degrees of imbalance measured by KL divergence.

Key Results and Insights

Resilience to Severe Imbalance

LADA demonstrates significant performance gains over traditional methods like Adversarial Discriminative Domain Adaptation (ADDA) and Optimal Transport (OT), particularly as class imbalance increases. While standard methods see accuracy plummets of 30-50% under high imbalance, LADA maintains a much higher baseline.

Accuracy vs. Class Imbalance for Office31 tasks.

As shown in the figure above, the proposed approach remains relatively stable across the spectrum of class imbalance, whereas competing methods experience sharp declines in accuracy as the target distribution deviates further from the source.

Visualizing Feature Disentanglement

The effectiveness of LADA is further evidenced by t-SNE projections of the learned feature space. Unlike global alignment methods that clump disparate target classes together when proportions are skewed, LADA successfully preserves the cluster structure.

t-SNE projections and class distributions under varying imbalance.

The visual evidence confirms that by estimating the target class distribution during training, the model can re-weight its focus, preventing majority classes from overwhelming the feature space and ensuring that minority classes remain distinct and correctly classified.

Conclusion

LADA provides a robust solution for UDA in the presence of severe class imbalance. By moving beyond simple global alignment and utilizing latent codes to discover the target domain's internal structure, it achieves state-of-the-art results on challenging benchmarks. Future work will focus on reducing sensitivity to initialization and addressing the "incompressible divergence" that persists in extreme imbalance scenarios.

Summary updated

BibTeX
@misc{chidlovskii2019using,
  author = {Boris Chidlovskii},
  title = {{Using Latent Codes for Class Imbalance Problem in Unsupervised Domain Adaptation}},
  year = {2019},
  eprint = {1909.08962},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.08962},
}
Figure