[Paper Review] CDA: Contrastive-adversarial Domain Adaptation
This paper proposes CDA, a two-stage contrastive-adversarial domain adaptation framework that improves unsupervised domain adaptation by combining adversarial learning for domain-level alignment with contrastive learning for class-level compactness and separation. CDA achieves state-of-the-art performance on Office-31 and Digits-5 by enhancing intra-class compactness and well-separated decision boundaries, outperforming methods like DANN by up to 11% in accuracy gains.
Recent advances in domain adaptation reveal that adversarial learning on deep neural networks can learn domain invariant features to reduce the shift between source and target domains. While such adversarial approaches achieve domain-level alignment, they ignore the class (label) shift. When class-conditional data distributions are significantly different between the source and target domain, it can generate ambiguous features near class boundaries that are more likely to be misclassified. In this work, we propose a two-stage model for domain adaptation called extbf{C}ontrastive-adversarial extbf{D}omain extbf{A}daptation extbf{(CDA)}. While the adversarial component facilitates domain-level alignment, two-stage contrastive learning exploits class information to achieve higher intra-class compactness across domains resulting in well-separated decision boundaries. Furthermore, the proposed contrastive framework is designed as a plug-and-play module that can be easily embedded with existing adversarial methods for domain adaptation. We conduct experiments on two widely used benchmark datasets for domain adaptation, namely, extit{Office-31} and extit{Digits-5}, and demonstrate that CDA achieves state-of-the-art results on both datasets.
Motivation & Objective
- To address the limitation of adversarial domain adaptation in handling class-conditional distribution shifts between source and target domains.
- To improve decision boundary clarity by achieving class-level alignment beyond domain-level alignment.
- To design a plug-and-play contrastive module that enhances existing adversarial domain adaptation methods.
- To achieve state-of-the-art performance on benchmark datasets like Office-31 and Digits-5 through joint domain and class-level alignment.
Proposed method
- CDA employs a two-stage training process: first, supervised contrastive learning on the labeled source domain to enhance intra-class compactness and inter-class separation.
- In the second stage, adversarial learning aligns the overall domain distributions by training a domain discriminator to distinguish source and target features.
- A cross-domain contrastive loss is introduced to pull similar-class features from source and target domains closer while pushing dissimilar ones apart.
- The framework integrates multiple loss components—supervised contrastive loss, adversarial loss, and cross-domain contrastive loss—optimized jointly in an end-to-end manner.
- The contrastive module is designed as a plug-in component, enabling integration with existing adversarial domain adaptation models without architectural overhaul.
- A ResNet-50 backbone pre-trained on ImageNet is used as the feature generator, with separate classifier and domain discriminator heads.

Experimental results
Research questions
- RQ1Can contrastive learning improve class-level alignment in unsupervised domain adaptation beyond domain-level alignment?
- RQ2How does the two-stage training regime of contrastive and adversarial learning affect decision boundary quality and generalization on target domains?
- RQ3To what extent does the proposed contrastive module enhance performance when added to existing adversarial domain adaptation frameworks?
- RQ4Does the combination of contrastive and adversarial learning lead to better generalization on standard benchmarks like Office-31 and Digits-5?
Key findings
- CDA achieves state-of-the-art average accuracy of 89.9% on the Office-31 dataset, outperforming previous methods including DANN, MADA, and CDAN.
- On the Digits-5 benchmark, CDA achieves 96.8% accuracy on SVHN → MNIST, 97.4% on MNIST → USPS, and 96.6% on MNIST → MNIST-M, surpassing all baselines.
- Compared to DANN, CDA improves average accuracy by approximately 9% on Office-31 and 11% on Digits-5, demonstrating the effectiveness of the contrastive module.
- t-SNE visualizations show that CDA produces better-separated, class-discriminative embeddings than DANN, especially near class boundaries.
- The ablation study confirms that the contrastive module significantly improves performance by enhancing inter-class separation and cross-domain alignment.
- The plug-and-play design of the contrastive module allows seamless integration with existing adversarial methods, enabling performance gains with minimal modification.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.