Skip to main content
QUICK REVIEW

[Paper Review] Cross-domain Contrastive Learning for Unsupervised Domain Adaptation

Rui Wang, Zuxuan Wu|arXiv (Cornell University)|Jun 10, 2021
Domain Adaptation and Few-Shot LearningComputer Science38 references14 citations
TL;DR

This paper proposes CDCL, a contrastive learning framework for unsupervised domain adaptation that aligns cross-domain features by minimizing distances between same-class samples from different domains while pushing apart different-class samples. It achieves state-of-the-art performance on Office-31 and VisDA-2017 by using pseudo-labeled target features and is adaptable to data-free settings with minimal modification.

ABSTRACT

Unsupervised domain adaptation (UDA) aims to transfer knowledge learned from a fully-labeled source domain to a different unlabeled target domain. Most existing UDA methods learn domain-invariant feature representations by minimizing feature distances across domains. In this work, we build upon contrastive self-supervised learning to align features so as to reduce the domain discrepancy between training and testing sets. Exploring the same set of categories shared by both domains, we introduce a simple yet effective framework CDCL, for domain alignment. In particular, given an anchor image from one domain, we minimize its distances to cross-domain samples from the same class relative to those from different categories. Since target labels are unavailable, we use a clustering-based approach with carefully initialized centers to produce pseudo labels. In addition, we demonstrate that CDCL is a general framework and can be adapted to the data-free setting, where the source data are unavailable during training, with minimal modification. We conduct experiments on two widely used domain adaptation benchmarks, i.e., Office-31 and VisDA-2017, for image classification tasks, and demonstrate that CDCL achieves state-of-the-art performance on both datasets.

Motivation & Objective

  • To address domain shift in unsupervised domain adaptation by learning domain-invariant features.
  • To leverage contrastive self-supervised learning for domain alignment without relying on manual annotations.
  • To develop a method effective in both standard UDA and source data-free UDA settings.
  • To improve feature alignment by using class-conditional contrastive loss across domains.
  • To reduce dependency on source data in domain adaptation through prototype-based adaptation.

Proposed method

  • CDCL uses a contrastive loss that treats cross-domain samples from the same class as positive pairs and those from different classes as negative pairs.
  • Pseudo-labels for target domain samples are generated via k-means clustering initialized with source-domain class prototypes.
  • The contrastive loss minimizes the distance between anchor features and same-class cross-domain features relative to different-class cross-domain features.
  • For the data-free setting, source samples are replaced with pre-trained class prototypes, enabling adaptation without access to source data.
  • The framework uses a temperature parameter τ and a trade-off hyperparameter λ to balance contrastive loss and classification loss.
  • Feature representations are refined through end-to-end training using cross-entropy and contrastive objectives.

Experimental results

Research questions

  • RQ1Can contrastive self-supervised learning be effectively adapted to unsupervised domain adaptation by forming cross-domain positive and negative pairs?
  • RQ2How does class-conditional contrastive learning improve domain alignment compared to domain-agnostic or in-domain contrastive methods?
  • RQ3Can CDCL maintain strong performance when source data are unavailable during training?
  • RQ4How sensitive is CDCL to hyperparameters like τ and λ in different benchmarks?
  • RQ5Does the use of source-derived prototypes enable effective domain adaptation in the data-free setting?

Key findings

  • CDCL achieves state-of-the-art accuracy on the Office-31 benchmark, outperforming previous methods in both D→W and W→D adaptation tasks.
  • On VisDA-2017, CDCL achieves 88.6% top-1 accuracy, surpassing existing SOTA methods under standard UDA settings.
  • The ablation study confirms that cross-domain contrastive learning with bi-directional anchors yields the best performance, outperforming in-domain or combined-domain approaches.
  • CDCL shows low sensitivity to hyperparameters τ and λ, with stable performance across a wide range of values.
  • t-SNE visualization confirms that CDCL successfully aligns source and target domain features, reducing domain shift and improving class separability.
  • Feature retrieval results show that CDCL progressively pulls same-class samples from different domains closer during training, validating its learning dynamics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.