Data-Efficient CLIP-Powered Dual-Branch Networks for Source-Free Unsupervised Domain Adaptation

Yongguang Li, Yueqi Cao, Jindong Li, Qi Wang, Shengsheng WangarXiv 2024

Abstract

Source-free Unsupervised Domain Adaptation (SF-UDA) aims to transfer a model's performance from a labeled source domain to an unlabeled target domain without direct access to source samples, addressing critical data privacy concerns. However, most existing SF-UDA approaches assume the availability of abundant source domain samples, which is often impractical due to the high cost of data annotation. To address the dual challenges of limited source data and privacy concerns, we introduce a data-efficient, CLIP-powered dual-branch network (CDBN). This architecture consists of a cross-domain feature transfer branch and a target-specific feature learning branch, leveraging high-confidence target domain samples to transfer text features of source domain categories while learning target-specific soft prompts. By fusing the outputs of both branches, our approach not only effectively transfers source domain category semantic information to the target domain but also reduces the negative impacts of noise and domain gaps during target training. Furthermore, we propose an unsupervised optimization strategy driven by accurate classification and diversity, preserving the classification capability learned from the source domain while generating more confident and diverse predictions in the target domain. CDBN achieves near state-of-the-art performance with far fewer source domain samples than existing methods across 31 transfer tasks on seven datasets.

Introduction

Domain Adaptation (DA) is essential for deploying machine learning models across different but related datasets. However, real-world applications often face two significant constraints: Data Privacy, where source data cannot be shared (Source-Free UDA), and Data Scarcity, where labeling source data is prohibitively expensive.

Existing SF-UDA methods typically rely on a well-trained source model derived from a large labeled dataset. In contrast, this work focuses on Few-Shot Source-Free Unsupervised Domain Adaptation (FS-SF-UDA), where only a handful of labeled source samples (e.g., 8 per class) are available. Standard approaches often fail in this regime as the initial model is too weak to bridge the domain gap without collapsing into noise.

Comparison of traditional SF-UDA (Scheme 1) and the proposed FS-SF-UDA framework (Scheme 2).

Methodology: The CDBN Framework

The proposed CLIP-powered Dual-Branch Network (CDBN) leverages the robust, pre-trained feature space of CLIP to anchor the adaptation process. The framework operates in two phases:

1. Source Prompt Learning

Instead of standard supervised training, the few available source samples are used to learn "soft prompts" (learnable vectors) for CLIP’s text encoder. This captures the semantic essence of source categories in a way that generalizes better than a traditional linear classifier.

2. Dual-Branch Target Adaptation

Once source data is removed, the model adapts to the target domain using two parallel branches:

  • Cross-Domain Feature Transfer Branch: Utilizes a cross-attention mechanism to refine source text features using high-confidence target domain samples. This ensures the model retains category semantics while adjusting to target visual styles.
  • Target-Specific Feature Learning Branch: Learns a new set of prompts specifically for the target domain, capturing nuances unique to the new environment.
The detailed architecture of CDBN, illustrating the dual-branch feature extraction and the unsupervised optimization strategy.

3. Unsupervised Optimization

Training is guided by a three-pronged loss strategy:

  • Pseudo-labeling: Training on the most confident target samples, sorted intra-class to prevent majority-class dominance.
  • Multi-view Consistency: Ensuring stable predictions across different image augmentations (inspired by FixMatch).
  • Mutual Information Maximization: Encouraging predictions that are both certain (low entropy) and diverse across the dataset.

Experimental Results

CDBN was validated on 31 transfer tasks across seven datasets, including standard benchmarks (Office-Home, VisDA-2017) and specialized remote sensing datasets (UCM, AID).

Key findings include:

  • Superior Efficiency: On the Office-Home benchmark, CDBN achieved 78.1% accuracy with a ResNet-50 backbone and 86.2% with ViT-B/16, outperforming several methods that utilized the full source dataset.
  • Robustness to Scarcity: The model showed significant performance gains when moving from 1-shot to 8-shot training, with 8 samples per class identified as the optimal balance between annotation cost and performance.
  • Domain Versatility: In remote sensing tasks, CDBN outperformed the previous state-of-the-art (AD-CLIP) by 3.3%, demonstrating its utility in specialized domains with high visual complexity.

Conclusion

CDBN successfully addresses the "double whammy" of domain adaptation by combining CLIP's pre-trained knowledge with a dual-branch architecture. By effectively transferring semantic information while learning target-specific features, it enables high-performance adaptation even with extremely limited source data. Future research will explore one-shot scenarios and open-set adaptation challenges.

Summary updated

BibTeX
@misc{li2024data,
  author = {Yongguang Li and Yueqi Cao and Jindong Li and Qi Wang and Shengsheng Wang},
  title = {{Data-Efficient CLIP-Powered Dual-Branch Networks for Source-Free Unsupervised Domain Adaptation}},
  year = {2024},
  eprint = {2410.15811},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.15811},
}
Figure