Source-linked AI summary
CLDA: Contrastive Learning for Semi-Supervised Domain Adaptation
Ankit Singh
TL;DR
SSDA remains challenging because standard UDA methods do not generalize well when only a few labeled target samples are available and target data contain intra-domain discrepancy. CLDA combines class-wise inter-domain contrastive alignment with instance-level alignment of original and augmented unlabeled target images. It achieves state-of-the-art results across DomainNet, Office-Home, and Office31, with both modules contributing to improved performance.
Problem
Standard UDA approaches perform sub-optimally in SSDA, where few labeled target samples leave inter-domain and intra-domain discrepancies to address.
Method
CLDA uses class-centroid contrastive alignment across domains and instance-level contrastive alignment between original and augmented unlabeled target images.
Results
CLDA achieves state-of-the-art results across DomainNet, Office-Home, and Office31, outperforming well-known SSDA methods.
Takeaways & Limitations
Both inter-domain and instance-contrastive components are necessary for improved performance, and their combination surpasses either component alone.
Takeaways & Limitations
The experiments use fixed benchmark splits and labeled-target sample counts matching prior work across all experiments.
Abstract
from arXiv · showhide
Unsupervised Domain Adaptation (UDA) aims to align the labeled source distribution with the unlabeled target distribution to obtain domain invariant predictive models. However, the application of well-known UDA approaches does not generalize well in Semi-Supervised Domain Adaptation (SSDA) scenarios where few labeled samples from the target domain are available. In this paper, we propose a simple Contrastive Learning framework for semi-supervised Domain Adaptation (CLDA) that attempts to bridge the intra-domain gap between the labeled and unlabeled target distributions and inter-domain gap between source and unlabeled target distribution in SSDA. We suggest employing class-wise contrastive learning to reduce the inter-domain gap and instance-level contrastive alignment between the original (input image) and strongly augmented unlabeled target images to minimize the intra-domain discrepancy. We have shown empirically that both of these modules complement each other to achieve superior performance. Experiments on three well-known domain adaptation benchmark datasets namely DomainNet, Office-Home, and Office31 demonstrate the effectiveness of our approach. CLDA achieves state-of-the-art results on all the above datasets.
1 Introduction
CLDA addresses SSDA’s inter-domain and intra-domain discrepancies with two complementary contrastive alignment modules. It reports state-of-the-art performance across DomainNet, Office-Home, and Office31.
- 1 Introduction: SSDA extends UDA by adding a few labeled target samples, but standard UDA methods can perform sub-optimally because target data retain intra-domain discrepancy.Limited labeled source and target supervision provides only partial cross-domain feature alignment, leaving aligned and unaligned target sub-distributions.
- 1 Introduction: CLDA combines class-centroid and instance-level contrastive alignment to reduce inter-domain and intra-domain discrepancies in SSDA.Inter-Domain Contrastive Alignment brings same-class source and target centroids together while separating different classes; Instance Contrastive Alignment aligns original and augmented unlabeled target images.
- 1 Introduction: Instance Contrastive Alignment encourages original and strongly augmented target views to remain close, placing classifier boundaries in low-density regions.The method uses augmentation of unlabeled target images and contrastive alignment to support consistent representations.
- 1 Introduction: CLDA achieves state-of-the-art results across DomainNet, Office-Home, and Office31 benchmarks.The paper evaluates different augmentation approaches, performs extensive ablations, and reports effectiveness across all three datasets.
2 Related Works
Related work covers feature, adversarial, and image-translation approaches for UDA, while SSDA-specific methods address limited labeled target data and target-domain discrepancies. Contrastive and consistency-based methods provide related mechanisms for representation alignment.
- 2 Related Works: UDA methods commonly reduce source–target divergence through feature alignment, adversarial domain confusion, or image translation.These approaches seek domain-agnostic representations or transform target images toward the source domain.
- 2 Related Works: UDA approaches do not perform well when applied directly to the SSDA setting considered in this work.SSDA includes limited labeled target samples and domain discrepancy beyond the standard UDA formulation.
- 2 Related Works: SSL consistency methods reduce intra-domain gaps, whereas SSDA must additionally handle discrepancy between two domains.SSL uses data from one distribution, while SSDA combines source and target domains with inherent domain discrepancy.
- 2 Related Works: Contrastive learning aligns positive representations while separating negative pairs and has been applied to domain-divergence reduction.Prior work includes patch-wise contrastive learning for semantic segmentation and contrastive approaches for domain adaptation.
3 Methodology
CLDA learns domain-agnostic representations in SSDA by combining supervised classification with class-level inter-domain and instance-level intra-domain contrastive alignment.
- Inter-Domain Contrastive Alignment: The framework stores source class centroids in a memory bank and updates them with exponential moving averages during training.This provides updated source centroid representations for cross-domain contrastive alignment.
- Inter-Domain Contrastive Alignment: Inter-Domain Contrastive Alignment brings same-class source and target centroids together while separating centroids from different classes.Source centroids are computed from labeled features, whereas unlabeled target samples are clustered using classifier-derived pseudo-labels.
- Instance Contrastive Alignment: Instance Contrastive Alignment maximizes similarity between each unlabeled target image and its strongly augmented view while pushing apart other minibatch images.The original and augmented views form positive pairs, and the remaining images provide negative pairs under NT-Xent loss.
- Instance Contrastive Alignment: Only augmented-image gradients are propagated because perturbing already aligned target sub-distributions can cause negative transfer.The authors connect consistent augmented-view predictions with movement toward better-clustered, higher-density target representations.
- Combined framework: Both contrastive components are necessary: instance alignment improves target consistency, while inter-domain alignment connects target samples to source classes.Combining them yields better alignment of unlabeled target samples toward the source domain than either component alone.
- Overall framework: CLDA combines supervised cross-entropy with Inter-Domain and Instance Contrastive Alignment in a single-stage training objective.The supervised loss uses labeled source and target images, while the contrastive components address domain discrepancies.
4 Experiments
CLDA is evaluated on DomainNet, Office-Home, and Office31 under established SSDA settings, with comparisons to prior baselines and analyses of its components and hyperparameters. Across datasets, CLDA generally achieves the strongest performance, while ablations show that its two contrastive components and strong augmentation are important.
- Results: CLDA achieves the best reported performance across Office-Home, DomainNet, and Office31 comparisons, generally surpassing baseline SSDA methods across adaptation tasks.The evaluations use top-1 accuracy and mean accuracy across benchmark transfer scenarios, with 1-shot and 3-shot settings depending on the dataset.
- Office-Home: 75.5% mean accuracy is achieved on Office-Home with Resnet34, while Alexnet reaches 58.3%; CLDA surpasses state-of-the-art SSDA approaches in most tasks.CLDA exceeds APE by more than 3% on Cl →Rl, Rl →Ar, and Pr →Ar.
- DomainNet: On DomainNet, CLDA improves over BiAT by 5.2% and 4.9% with Alexnet in 1-shot and 3-shot settings, and over APE by 4.3% and 3.6% with Resnet34.The authors report consistent gains over domain-adaptation benchmarks in most DomainNet tasks.
- Office31: On Office31, CLDA achieves the best performance in both adaptation scenarios with Alexnet and VGG, beating APE by 3.2% in 3-shot and BiAT by 7.3% in 1-shot Alexnet settings.Similar gains are reported with VGG, indicating performance across the evaluated backbone choices.
- Ablation Studies: 72.4% test accuracy with both modules falls to 68.3% using only Inter-Domain Contrastive Alignment and 67.7% using only Instance Contrastive Alignment.The authors conclude that combining both components improves performance by around 4% over the individual modules.
- Ablation Studies: Strong augmentation improves performance by approximately 4%, while reducing the instance-alignment weight from α=4 to 1 lowers test accuracy from 72.4% to 70.7%.RandAugment with Grayscale performs better than the other evaluated augmentation policies; increasing β reduces validation and test performance.
5 Conclusion
CLDA is a single-stage contrastive framework for semi-supervised domain adaptation with inter-domain and instance-level alignment components. The authors report that both components are necessary for improved performance and that CLDA outperforms established SSDA methods on three benchmarks.
- CLDA combines Inter-Domain Contrastive Alignment with Instance-Contrastive Alignment in a single-stage SSDA framework.The first aligns same-class centroids across domains, while the second aligns augmented views of unlabeled target images.
- Both alignment components are necessary for improved performance.
- CLDA outperforms well-known SSDA methods on DomainNet, Office-Home, and Office31.
A Implementation Detail
The implementation uses an architecture similar to prior work and reports one-time training results alongside additional Office-Home statistics. Experiments were conducted on an Nvidia Titan X GPU, with the complete method provided in Algorithm 1.
- The network architecture is similar to the architecture used in prior work [46].
- Reported main-paper results were obtained through one-time training.
- Additional Office-Home 3-shot results report mean performance with standard deviation using Alexnet.These results are presented in Table 10.
- Experiments were performed on an Nivida Titan X GPU, and the complete implementation appears in Algorithm 1.
B Performance Analysis with more shots
CLDA was additionally evaluated on 5-shot and 10-shot DomainNet tasks using ResNet34 and released data splits. The approach achieved superior results across all evaluated domain-adaptation scenarios.
- CLDA achieves superior results on all evaluated DomainNet domain-adaptation tasks.
- The additional experiments cover both 5-shot and 10-shot domain-adaptation settings.
- These DomainNet experiments use ResNet34 and the data splits released by [29].
C Results on Office-Home for 1-shot
The paper provides Office-Home results for the 1-shot setting with two backbone choices. These results are reported separately for Alexnet and ResNet34 in Tables 8 and 9.
- Office-Home 1-shot results are provided for both Alexnet and ResNet34 backbones.
- The Alexnet 1-shot results are reported in Table 8.
- The ResNet34 1-shot results are reported in Table 9.
D Limitations and Societal Impacts
CLDA’s limitations concern neural-network miscalibration and bias inherited through source-to-target knowledge transfer. The authors identify more reliable pseudo-label mining and source-model bias assessment as important boundaries for future use.
- Miscalibrated networks can overconfidently assign incorrect predictions, pushing images into wrong clusters and harming performance.
- The authors propose better and more efficient mining of confident pseudo-labels as a future research direction.
- Because UDA and SSDA transfer source knowledge, inherent source-model bias may propagate to the target domain and disadvantage certain people after deployment.