Prompt-Based Distribution Alignment for Unsupervised Domain Adaptation

Shuanghao Bai, Min Zhang, Wanqi Zhou, Siteng Huang, Zhirong Luan, Donglin Wang, Badong Chen

Introduction

Unsupervised Domain Adaptation (UDA) remains a significant challenge in computer vision. The goal is to adapt a model trained on a labeled "source" domain (e.g., synthetic images) to perform effectively on an unlabeled "target" domain (e.g., real-world photos). While Vision-Language Models (VLMs) like CLIP offer impressive zero-shot capabilities, they often struggle with the significant distribution shifts encountered in specialized UDA tasks. Traditional adversarial methods frequently sacrifice semantic discriminability for domain invariance.

The PDA Framework

To address these challenges, we introduce Prompt-Based Distribution Alignment (PDA). PDA is a two-branch prompt tuning framework designed to bridge the domain gap while preserving the rich internal knowledge of pre-trained VLMs.

The PDA framework architecture, featuring the Base Branch for discrimination and the Alignment Branch with the IFT module for distribution alignment.

The architecture consists of two specialized components:

  1. Base Branch (Discrimination): This branch employs multi-modal prompt tuning, adjusting both text and image encoders. It focuses on maintaining class-discriminative features, ensuring that categories remain separable across domains.
  2. Alignment Branch (Distribution Bridge): This branch introduces Image-Guided Feature Tuning (IFT). By maintaining class-specific feature banks for both source and target domains, the IFT module uses an attention mechanism to allow input images to "attend" to these banks. This process facilitates the learning of domain-invariant prompts by aligning the global distributions of the two domains.

Experimental Evaluation

PDA was evaluated on three major UDA benchmarks: Office-Home, Office-31, and the large-scale VisDA-2017.

Key Results

The framework consistently achieves state-of-the-art performance. On Office-Home, PDA reached an average accuracy of 85.7%, surpassing the previous leading prompt-tuning method, MaPLe, by 1.5%. On the synthetic-to-real VisDA-2017 benchmark, it achieved a record 89.7% accuracy.

Radar chart comparing PDA against ViT, CLIP, and MaPLe across accuracy and distribution alignment metrics.

As shown in the radar chart, PDA (cyan) consistently outperforms baselines not only in accuracy (Acc) but also in reducing domain distance metrics like Maximum Mean Discrepancy ($MMD^{-1}$) and Kullback-Leibler divergence ($KL^{-1}$), indicating superior distribution alignment.

Insights and Discussion

  • Synergy of Modalities: Tuning both vision and language prompts provides a mutual synergy that outperforms single-modality tuning, helping the model maintain semantic consistency during adaptation.
  • Efficiency via Feature Banks: The use of feature banks allows for effective global alignment without the prohibitive computational costs associated with exhaustive image-pair comparisons.
  • Beyond Zero-Shot: While CLIP is a powerful starting point, PDA provides a necessary "nudge," improving performance on Office-31 by an average of 13.7% over zero-shot baselines.

Limitations

Despite its success, PDA relies on the quality of initial pseudo-labels in the target domain. Low initial accuracy can lead to confirmation bias. Additionally, the performance is sensitive to the confidence threshold ($\tau$) used for selecting target samples, which currently requires manual tuning for new datasets. Future work will explore extending this prompt-based alignment to more complex tasks like object detection and semantic segmentation.

This paper was presented at AAAI-2024.

Summary updated

BibTeX
@inproceedings{bai2024prompt,
  author = {Shuanghao Bai and Min Zhang and Wanqi Zhou and Siteng Huang and Zhirong Luan and Donglin Wang and Badong Chen},
  title = {{Prompt-Based Distribution Alignment for Unsupervised Domain Adaptation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i2.27830},
}
Figure