Skip to main content
QUICK REVIEW

[Paper Review] Text-driven Prompt Generation for Vision-Language Models in Federated Learning

Qiu Chen, Xingyu Li|arXiv (Cornell University)|Oct 9, 2023
Multimodal Machine Learning ApplicationsComputer Science4 citations
TL;DR

This paper proposes Federated Text-driven Prompt Generation (FedTPG), a novel method that trains a unified, context-aware prompt generator across multiple clients in federated learning to improve generalization in vision-language models. By conditioning prompt generation on task-specific text inputs, FedTPG achieves 4.32% higher accuracy on unseen classes and 1.82% on unseen datasets compared to FedCoOp, demonstrating superior zero-shot generalization without retraining.

ABSTRACT

Prompt learning for vision-language models, e.g., CoOp, has shown great success in adapting CLIP to different downstream tasks, making it a promising solution for federated learning due to computational reasons. Existing prompt learning techniques replace hand-crafted text prompts with learned vectors that offer improvements on seen classes, but struggle to generalize to unseen classes. Our work addresses this challenge by proposing Federated Text-driven Prompt Generation (FedTPG), which learns a unified prompt generation network across multiple remote clients in a scalable manner. The prompt generation network is conditioned on task-related text input, thus is context-aware, making it suitable to generalize for both seen and unseen classes. Our comprehensive empirical evaluations on nine diverse image classification datasets show that our method is superior to existing federated prompt learning methods, that achieve overall better generalization on both seen and unseen classes and is also generalizable to unseen datasets.

Motivation & Objective

  • To address the poor generalization of existing federated prompt learning methods to unseen classes and tasks in vision-language models.
  • To enable vision-language models like CLIP to generalize effectively across diverse, unseen image classification datasets in a federated setting.
  • To develop a scalable, collaborative method that learns a unified prompt generator across remote clients without sharing raw data.
  • To improve prompt learning by conditioning generated prompts on semantic task descriptions rather than learning fixed prompt vectors.
  • To achieve better performance on both seen and unseen classes, including zero-shot transfer to new domains.

Proposed method

  • A text-driven prompt generator (TPG) is trained to convert task-related text inputs (e.g., class names or descriptions) into context-aware prompt vectors for CLIP.
  • The prompt generator is trained in a federated manner across multiple clients, each with a different image classification dataset, using only local data and model updates.
  • Each client optimizes the prompt generator locally using few-shot image-text pairs, then communicates model weights to a central server for aggregation.
  • The global prompt generator learns to map semantic text inputs to task-specific prompt vectors, enabling generalization across different domains and contexts.
  • The method uses a lightweight neural network to generate prompt vectors conditioned on text embeddings, preserving CLIP’s frozen backbone for efficiency.
  • The approach leverages contrastive learning and prompt tuning to adapt CLIP effectively under data- and communication-constrained federated settings.

Experimental results

Research questions

  • RQ1Can a federated prompt generation method generalize better than fixed prompt learning on unseen classes in vision-language models?
  • RQ2How does conditioning prompt generation on task-specific text improve zero-shot generalization across diverse image classification datasets?
  • RQ3Does a unified, collaborative prompt generator trained across multiple clients outperform existing federated prompt learning baselines in terms of generalization and robustness?
  • RQ4How sensitive is the proposed method to variations in client data distribution, number of shots, and client participation rate?
  • RQ5Can the prompt generator learn a generalizable function mapping text context to effective prompt vectors across domains like object recognition and texture classification?

Key findings

  • FedTPG achieves an average improvement of 4.32% on unseen classes compared to FedCoOp across nine datasets, demonstrating strong zero-shot generalization.
  • On unseen datasets, FedTPG outperforms FedCoOp by 1.82% on average, showing robust transferability to new domains.
  • The method maintains consistent performance across varying client data distributions, with harmonic mean accuracy increasing from 73.07% to 74.83% as client class count rose from 5 to 20.
  • FedTPG shows improved performance with more than one shot per class, outperforming FedKgCoOp when shot count exceeds one.
  • The model remains robust under varying client participation rates, from 10% to 100%, consistently outperforming FedCoOp and FedKgCoOp.
  • Visualization confirms that prompt vectors generated from ImageNet generalize well to other datasets, with clusters aligning across different domains, indicating strong cross-dataset transferability.

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.