Abstract
Federated Learning (FL) enables collaborative model training without centralizing private data. However, applying FL to large-scale foundation models like CLIP is hindered by massive communication overhead and the "non-IID" problem, where data domains vary significantly across clients. We propose FedAPT (Federated Adaptive Prompt Tuning), a framework that keeps CLIP encoders frozen and tunes a lightweight adaptive network. By leveraging domain-specific keys, FedAPT generates personalized prompts for every image. Experimental results on DomainNet and Office-Caltech10 show that FedAPT outperforms existing federated prompt tuning methods and full-model training while reducing communication costs by over 90%.
Introduction
The rise of foundation models like CLIP has revolutionized computer vision, yet their deployment in Federated Learning remains challenging. Standard FL approaches often struggle with two issues: the prohibitive cost of transmitting millions of parameters and the performance degradation caused by domain shifts (e.g., one client having real photos while another has sketches). A "one-size-fits-all" prompt often fails to capture the nuances of diverse data distributions; for instance, adding the word "painting" to a prompt might improve accuracy for artistic images but significantly degrade performance for clipart or sketches.
Methodology: FedAPT
FedAPT addresses these challenges by keeping the CLIP image and text encoders frozen. Instead of updating the entire model, it introduces a small, trainable architecture consisting of three primary components:
- Meta Prompt ($p_g$): A shared, learnable vector that serves as the foundation for all prompts.
- Frozen Keys ($e_k$): Unique, random vectors assigned to different domains. These act as anchors for domain-specific knowledge.
- Adaptive Network ($Q_g$): A lightweight network that processes image features to determine the optimal weighting of domain keys for a specific input.
During local training, clients update only the Meta Prompt and the Adaptive Network. At inference, the Adaptive Network identifies domain characteristics in an image and "unlocks" relevant knowledge from the keys to produce a personalized prompt. The authors also designed a two-stage unsupervised training method using pseudo-labeling and contrastive loss, allowing FedAPT to function effectively even in the absence of labeled client data.
Experimental Evaluation
We evaluated FedAPT on two multi-domain benchmarks: Office-Caltech10 (OC) and the large-scale DomainNet (DN). DomainNet is particularly challenging, featuring six distinct styles: clipart, infograph, painting, quickdraw, real, and sketch.
Key Results
FedAPT demonstrates significant improvements over baseline methods across all domains. On DomainNet, it achieved an average accuracy of 67.39%, surpassing standard Federated Prompt Tuning (PromptFL) at 63.39% and even beating a fully-trained ResNet-50 (55.23%).
Beyond accuracy, FedAPT is highly efficient, utilizing less than 10% of the parameters required for full-model training. This drastically reduces the communication burden on clients, making it feasible for resource-constrained environments.
Discussion and Conclusion
FedAPT provides a robust solution for personalizing large-scale models in a federated setting without the "parameter explosion" typically associated with such tasks. By decoupling training and inference—pre-computing text encodings for keys—the authors reduced inference time from 30 minutes to just 30 seconds on a single GPU. While the model shows some sensitivity to class imbalance, its ability to automate domain-aware prompting represents a significant step forward for federated foundation models. Future work may explore applying adaptive prompts to other tasks like object detection or extending the framework to different foundation models beyond CLIP.
Summary updated