Skip to main content
QUICK REVIEW

[Paper Review] Domain-Agnostic Mutual Prompting for Unsupervised Domain Adaptation

Zhekai Du, Xinyao Li|arXiv (Cornell University)|Mar 5, 2024
Domain Adaptation and Few-Shot LearningComputer Science3 citations
TL;DR

This paper proposes Domain-Agnostic Mutual Prompting (DAMP), a novel unsupervised domain adaptation framework that jointly optimizes domain-agnostic textual and visual prompts via cross-attention to align embeddings across domains. By leveraging CLIP's pre-trained knowledge and enforcing semantic consistency and instance discrimination, DAMP achieves state-of-the-art performance on three UDA benchmarks, demonstrating superior cross-domain knowledge transfer and robustness to complex domain shifts.

ABSTRACT

Conventional Unsupervised Domain Adaptation (UDA) strives to minimize distribution discrepancy between domains, which neglects to harness rich semantics from data and struggles to handle complex domain shifts. A promising technique is to leverage the knowledge of large-scale pre-trained vision-language models for more guided adaptation. Despite some endeavors, current methods often learn textual prompts to embed domain semantics for source and target domains separately and perform classification within each domain, limiting cross-domain knowledge transfer. Moreover, prompting only the language branch lacks flexibility to adapt both modalities dynamically. To bridge this gap, we propose Domain-Agnostic Mutual Prompting (DAMP) to exploit domain-invariant semantics by mutually aligning visual and textual embeddings. Specifically, the image contextual information is utilized to prompt the language branch in a domain-agnostic and instance-conditioned way. Meanwhile, visual prompts are imposed based on the domain-agnostic textual prompt to elicit domain-invariant visual embeddings. These two branches of prompts are learned mutually with a cross-attention module and regularized with a semantic-consistency loss and an instance-discrimination contrastive loss. Experiments on three UDA benchmarks demonstrate the superiority of DAMP over state-of-the-art approaches.

Motivation & Objective

  • To address the limitation of existing unsupervised domain adaptation (UDA) methods that fail to transfer source knowledge effectively due to domain-specific prompting and lack of cross-modal synergy.
  • To overcome the suboptimal use of pre-trained vision-language models (VLMs) in UDA by learning transferable, domain-agnostic prompts that unify source and pre-trained knowledge.
  • To enable flexible, bidirectional adaptation by jointly prompting both visual and textual branches using cross-attention, rather than unidirectional or isolated prompting.
  • To improve feature discriminability and domain invariance by regularizing prompts with semantic consistency and instance-discrimination contrastive losses.
  • To demonstrate that mutual, instance-conditioned prompting across modalities leads to better generalization and robustness than modality-specific or isolated prompting strategies.

Proposed method

  • DAMP introduces a mutual prompting framework that jointly learns domain-agnostic textual and visual prompts using a cross-attention module inspired by the Transformer decoder, enabling bidirectional interaction between vision and language branches.
  • The visual branch is prompted using instance-conditioned image context embeddings to generate domain-invariant visual features, while the language branch is prompted using a domain-agnostic textual prompt to guide semantic alignment.
  • A semantic-consistency regularization loss ensures that the prompt-optimized embeddings preserve shared semantics across domains, reducing domain-specific bias.
  • An instance-discrimination contrastive loss enhances feature discriminability by encouraging positive pairs (same instance) to be closer and negative pairs to be farther apart in the joint embedding space.
  • The method employs learnable scaling weights γv and γs for visual and textual prompts, respectively, to dynamically control the magnitude of perturbations and adapt to modality-specific distribution gaps.
  • The framework is trained end-to-end with a combination of supervised loss on source data, pseudo-labeling on confident target samples, and the two regularization losses to ensure robust and generalizable prompt learning.
Figure 1 : Top: exsiting prompt-based methods (e.g., DAPrompt [ 12 ] ) only learn textual prompts to embed semantics for each domain and perform classification separately, which limits cross-domain knowledge transfer and feature alignment. Bottom: our method learns both textual and visual prompts mu
Figure 1 : Top: exsiting prompt-based methods (e.g., DAPrompt [ 12 ] ) only learn textual prompts to embed semantics for each domain and perform classification separately, which limits cross-domain knowledge transfer and feature alignment. Bottom: our method learns both textual and visual prompts mu

Experimental results

Research questions

  • RQ1Can mutual prompting between vision and language branches improve domain-invariant representation learning in unsupervised domain adaptation?
  • RQ2Does learning domain-agnostic prompts instead of domain-specific ones lead to better transfer of source knowledge to the target domain?
  • RQ3How does cross-attention-based interaction between visual and textual prompts enhance feature alignment compared to unidirectional or isolated prompting?
  • RQ4To what extent do semantic-consistency and instance-discrimination regularizations improve the robustness and discriminability of the learned prompts?
  • RQ5Is the proposed mutual prompting framework more effective than existing prompt-based UDA methods like DAPrompt or CoOp under complex domain shifts?

Key findings

  • DAMP achieves state-of-the-art performance on three UDA benchmarks, with a mean accuracy of 78.2% on Office-Home and 88.4% on VisDA-17, outperforming previous SOTA methods.
  • The ablation study shows that mutual prompting with both textual and visual prompts yields a 2.9% absolute gain over the baseline CoOp on VisDA-17, demonstrating the effectiveness of cross-modal synergy.
  • Adding the semantic-consistency loss (Lsc) and instance-discrimination contrastive loss (Lidc) leads to consistent improvements, with the full method achieving 78.2% accuracy on Office-Home and 88.4% on VisDA-17.
  • The method is robust to hyperparameter choices: performance remains stable across confidence thresholds T ∈ [0.5, 1.0], and optimal prompt length N ≈ 32 is sufficient for rich semantic encoding.
  • Learnable scaling weights γv and γs converge to 0.1 and 0.5 respectively, indicating that visual prompts require smaller perturbations than textual ones, reflecting the modality gap in CLIP.
  • The mutual prompting framework with cross-attention outperforms uni-directional prompting baselines (e.g., MaPLe-style projection), proving the benefit of bidirectional interaction in prompt learning.
Figure 2 : Overview of the proposed DAMP framework. Parameters of $f_{s}$ and $f_{v}$ are frozen and only $\bm{p}_{1:N}$ and $G$ are tunable during training. The blue arrows represent text data flows, while the green and purple arrows are data flows for source and target images, respectively. We onl
Figure 2 : Overview of the proposed DAMP framework. Parameters of $f_{s}$ and $f_{v}$ are frozen and only $\bm{p}_{1:N}$ and $G$ are tunable during training. The blue arrows represent text data flows, while the green and purple arrows are data flows for source and target images, respectively. We onl

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.