Generate to Adapt: Aligning Domains Using Generative Adversarial Networks

Swami Sankaranarayanan, Yogesh Balaji, Carlos Domingo Castillo, Rama Chellappa

Introduction

Deep learning models are notoriously sensitive to domain shift. A classifier trained on synthetic CAD drawings of cars often performs poorly when tested on real-world photos because the low-level statistics—such as lighting, texture, and background—differ significantly, even if the high-level semantic content remains the same.

This paper addresses the challenge of Unsupervised Domain Adaptation (UDA): how to take a model trained on a labeled "source" domain and effectively adapt it to an unlabeled "target" domain. While previous approaches attempted to align domains by minimizing statistical distances between features or using domain-adversarial losses, they often struggled with complex datasets or failed to preserve the underlying class structure. The proposed "Generate To Adapt" (G2A) framework leverages Generative Adversarial Networks (GANs) to learn a joint feature space where domain-specific noise is removed, leaving only essential classification features.

Methodology

The G2A architecture consists of four main components: an Encoder ($F$), a Classifier ($C$), a Generator ($G$), and a Discriminator ($D$). The training process is divided into two parallel streams to achieve domain alignment through image generation.

The G2A architecture featuring dual training streams and the test phase pipeline.
  • Stream 1: Performs standard supervised learning on the labeled source domain images.
  • Stream 2: Employs adversarial learning. The encoder is forced to produce embeddings for target images that are high-quality enough for the generator to reconstruct them as "source-like" images.

A critical element of this setup is the Discriminator, which acts as an Auxiliary Classifier GAN (ACGAN). It must not only distinguish real from fake images but also predict their class labels. This prevents the encoder from "cheating" by mapping target images to generic blobs; it must preserve the specific structural features (e.g., the curves of a "3") to satisfy the discriminator's class requirements.

Key Insights

  • Pixel-Space Regularization: Unlike methods that only align domains in abstract feature space, G2A uses image generation as regularization. The ability to reconstruct a realistic image from a feature ensures that the feature contains meaningful structural information.
  • Symbiotic Learning: The GAN is not merely for data augmentation. The act of attempting to fool the GAN forces the encoder to learn more robust, domain-invariant features.
  • Auxiliary Classifier Importance: Ablation studies revealed that a discriminator capable of predicting classes ($C_2$) is vital to prevent "mode collapse," where different classes are erroneously mapped to the same region of the feature space.

Key Results

The G2A method achieved state-of-the-art (SOTA) results across several standard benchmarks, including Digits (MNIST, USPS, SVHN), the OFFICE dataset, and Synthetic-to-Real tasks.

t-SNE visualization comparing non-adapted and adapted feature spaces, showing improved domain alignment.
  • SVHN $\to$ MNIST: Achieved 92.4% accuracy, a massive improvement over the 60.3% source-only baseline.
  • OFFICE Dataset: Reached an average accuracy of 86.5%, outperforming popular methods like JAN (84.3%) and RevGrad (82.2%).
  • Synthetic to Real: On the CAD $\to$ PASCAL task, the method improved accuracy from 38.1% to 50.4%.

Conclusion and Future Work

While G2A provides a powerful framework for domain adaptation, it faces challenges regarding computational overhead and scaling to high-resolution images. Training GANs remains more resource-intensive than simple feature-alignment methods. Future research may explore applying this framework to more complex domains, such as RGB-D object recognition and medical imaging, where domain shift is a significant barrier to deployment.

Summary updated

BibTeX
@inproceedings{sankaranarayanan2018generate,
  author = {Swami Sankaranarayanan and Yogesh Balaji and Carlos Domingo Castillo and Rama Chellappa},
  title = {{Generate to Adapt: Aligning Domains Using Generative Adversarial Networks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  doi = {10.1109/cvpr.2018.00887},
}
Figure