Skip to main content
QUICK REVIEW

[Paper Review] Probabilistic Contrastive Learning for Domain Adaptation

Junjie Li, Yixin Zhang|arXiv (Cornell University)|Nov 11, 2021
Domain Adaptation and Few-Shot LearningComputer Science6 citations
TL;DR

This paper proposes Probabilistic Contrastive Learning (PCL), a novel self-supervised method that replaces standard feature-based contrastive learning with probability-based learning to align features with class weights, significantly improving performance in domain adaptation. By removing ℓ₂ normalization and using softmax probabilities as the contrastive signal, PCL reduces feature deviation from class weights, achieving state-of-the-art results across unsupervised and semi-supervised domain adaptation, semi-supervised learning, and semantic segmentation with lower training cost.

ABSTRACT

Contrastive learning has shown impressive success in enhancing feature discriminability for various visual tasks in a self-supervised manner, but the standard contrastive paradigm (features+$\ell_{2}$ normalization) has limited benefits when applied in domain adaptation. We find that this is mainly because the class weights (weights of the final fully connected layer) are ignored in the domain adaptation optimization process, which makes it difficult for features to cluster around the corresponding class weights. To solve this problem, we propose the \emph{simple but powerful} Probabilistic Contrastive Learning (PCL), which moves beyond the standard paradigm by removing $\ell_{2}$ normalization and replacing the features with probabilities. PCL can guide the probability distribution towards a one-hot configuration, thus minimizing the discrepancy between features and class weights. We conduct extensive experiments to validate the effectiveness of PCL and observe consistent performance gains on five tasks, i.e., Unsupervised/Semi-Supervised Domain Adaptation (UDA/SSDA), Semi-Supervised Learning (SSL), UDA Detection and Semantic Segmentation. Notably, for UDA Semantic Segmentation on SYNTHIA, PCL surpasses the sophisticated CPSL-D by $>\!2\%$ in terms of mean IoU with a much lower training cost (PCL: 1*3090, 5 days v.s. CPSL-D: 4*V100, 11 days). Code is available at https://github.com/ljjcoder/Probabilistic-Contrastive-Learning.

Motivation & Objective

  • To address the poor performance of standard contrastive learning in domain adaptation due to feature misalignment with class weights.
  • To investigate why conventional contrastive learning fails to improve domain adaptation despite enhancing feature discriminability.
  • To propose a method that explicitly reduces the deviation between features and learned class weights during self-supervised pretraining.
  • To demonstrate the generalization of the proposed method across multiple vision tasks, including UDA, SSDA, SSL, and semantic segmentation.

Proposed method

  • Replace ℓ₂-normalized features with softmax probabilities as the contrastive signal, eliminating the need for ℓ₂ normalization.
  • Formulate a contrastive loss based on predicted class probabilities instead of raw features to encourage features to cluster around class weight vectors.
  • Use the probability distribution p_i,c = exp(w_c^T f_i) / sum_j exp(w_j^T f_i) as the primary signal for contrastive learning.
  • Optimize the model to make the predicted probability p_i,c close to 1 when f_i is near w_c, thereby minimizing deviation from class weights.
  • Integrate PCL into existing domain adaptation frameworks without architectural changes, enabling plug-and-play deployment.
  • Apply PCL to various tasks including image classification, object detection, and semantic segmentation by integrating it into the classifier head.
Figure 1 : Feature Contrastive Learning ( FSL ) vs . Probabilistic Contrastive Learning ( PCL ). With PCL, the features on target domain can be clustered around the corresponding class weights.
Figure 1 : Feature Contrastive Learning ( FSL ) vs . Probabilistic Contrastive Learning ( PCL ). With PCL, the features on target domain can be clustered around the corresponding class weights.

Experimental results

Research questions

  • RQ1Why does standard contrastive learning fail to improve performance in unsupervised domain adaptation despite enhancing feature discriminability?
  • RQ2To what extent does the deviation between features and class weights degrade model performance in domain adaptation?
  • RQ3Can replacing features with probabilities in contrastive learning effectively reduce feature-class weight deviation?
  • RQ4How does PCL generalize across different learning paradigms, such as semi-supervised learning and semantic segmentation?

Key findings

  • PCL achieves a 2.1% absolute gain in mean IoU over CPSL-D on SYNTHIA semantic segmentation, with 1×3090 GPU and 5 days training vs. 4×V100 and 11 days for CPSL-D.
  • On DomainNet (7 SSDA tasks), PCL achieves 76.9% accuracy with 3-shot supervision, outperforming CLDA (75.3%) and matching ECACL-P and CDAC with FixMatch.
  • In semi-supervised learning on CIFAR-100 with 400 labels, PCL improves FixMatch from 53.58% to 57.62% accuracy, a +4.04% gain.
  • On Office-Home (12 SSDA tasks), PCL achieves state-of-the-art performance, surpassing methods like CDAC and ECACL-P even without FixMatch, and further improves when combined with FixMatch.
  • In UDA detection on Cityscapes, PCL boosts RPA from 45.3% to 47.8% AP, demonstrating effectiveness in object detection.
  • The ablation study confirms that the removal of ℓ₂ normalization and the use of probabilities are critical, as their absence leads to performance degradation.
Figure 2 : An explorative study under the Semi-Supervised Domain Adaptation (SSDA) setting on DomainNet (R $\rightarrow$ S) [ 52 ] with 3-shot and ResNet34. We use MME [ 59 ] as a baseline model to verify the effect of FCL and PCL.
Figure 2 : An explorative study under the Semi-Supervised Domain Adaptation (SSDA) setting on DomainNet (R $\rightarrow$ S) [ 52 ] with 3-shot and ResNet34. We use MME [ 59 ] as a baseline model to verify the effect of FCL and PCL.

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.