[Paper Review] Learning to Prompt Your Domain for Vision-Language Models
This paper proposes Federated Dual Prompt Tuning (Fed-DPT), a domain-aware federated learning method that uses both visual and textual prompt tuning within a pre-trained CLIP model to adapt to heterogeneous data across clients. By learning domain-specific prompts and leveraging cross-attention to align visual and textual representations, Fed-DPT achieves 68.4% average accuracy on DomainNet—14.8 percentage points higher than original CLIP—demonstrating strong robustness and communication efficiency in decentralized, domain-shifted settings.
Prompt learning has recently become a very efficient transfer learning paradigm for Contrastive Language Image Pretraining (CLIP) models. Compared with fine-tuning the entire encoder, prompt learning can obtain highly competitive results by optimizing only a small number of parameters, which presents considerably exciting benefits for federated learning applications that prioritizes communication efficiency. However, in this work, we identify that directly transferring prompt learning approaches into federated learning does not yield favorable results since the model often suffers from considerable domain gaps across different clients. To address this issue, we propose ADAPT, a novel domain-aware prompt learning approach that facilitates both intra- and inter-domain prompts across federated participants. The basic idea of ADAPT is that the prompted CLIP should detect the input image's domain correspondence and before making the prediction of its category. Extensive experiments of ADAPT demonstrate its significant efficiency and effectiveness in federated learning. For example, by learning and sharing only 0.08M parameters, our ADAPT attains a 68.4% average accuracy over six domains in the DomainNet dataset, which improves the original CLIP by a large margin of 14.8%.
Motivation & Objective
- To address the challenge of domain shift in federated learning where clients' data originate from different domains with distinct visual styles.
- To improve generalization and robustness in decentralized training under data heterogeneity beyond label-based non-i.i.d. partitioning.
- To develop a parameter-efficient, communication-friendly method that maintains performance across diverse domains without fine-tuning the main model.
- To enable domain-aware adaptation by learning distinct prompts per domain while preserving global model consistency through federated averaging.
- To outperform existing federated learning and CLIP-based baselines in multi-domain, decentralized image classification.
Proposed method
- The method employs a pre-trained CLIP model with frozen image and text encoders, applying learnable visual and textual prompts to adapt to client-specific domains.
- Visual prompts are learned per client (domain), while textual prompts are shared across clients but updated via momentum-based exponential moving average to stabilize training.
- Cross-attention mechanisms are used to dynamically align visual and textual representations, enhancing feature correlation across modalities.
- Federated averaging is applied to aggregate visual prompt parameters across clients per domain, preserving domain-specific adaptation while enabling global convergence.
- The approach uses a dual prompt tuning strategy: one for visual inputs (image patches) and one for textual inputs (class descriptions), both optimized end-to-end in a federated setting.
- Communication is optimized by transmitting only the prompt parameters, minimizing bandwidth and preserving privacy.
Experimental results
Research questions
- RQ1Can dual prompt tuning with CLIP improve generalization in federated learning when clients' data originate from different visual domains?
- RQ2How does domain-specific prompt learning compare to domain-agnostic prompt tuning in handling cross-domain distribution shifts?
- RQ3What is the impact of momentum-based text prompt updates on model stability and convergence in federated settings?
- RQ4How does the length of textual prompts affect performance and generalization in domain-aware federated learning?
- RQ5To what extent does Fed-DPT maintain performance when data heterogeneity increases beyond label non-i.i.d. partitioning, such as in fine-grained client splits?
Key findings
- Fed-DPT achieves 68.4% average accuracy across six domains in the DomainNet dataset, representing a 14.8 percentage point improvement over the original CLIP model.
- The method outperforms FedAvg and FedProx by 16.8 and 16.0 percentage points on average, respectively, demonstrating superior robustness to data heterogeneity.
- Removing momentum updates for text prompts reduces accuracy by 2.2%, confirming the importance of stable, gradual updates in federated optimization.
- Training all text prompt tokens uniformly across domains (i.e., disabling domain-specificity) causes a 4.4% drop in accuracy, validating the necessity of domain-aware tuning.
- The optimal textual prompt length is 16 tokens; shorter prompts (4) underperform, and longer ones (32) lead to overfitting and reduced accuracy.
- Communication frequency of one epoch per round yields optimal performance; reducing it to 0.5 epochs per round offers no benefit, while increasing it to 2 epochs causes a 0.5% accuracy drop.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.