Abstract
Federated Learning (FL) enables collaborative model training without direct data sharing, yet it is often hampered by high communication overhead and performance degradation on non-IID (non-identically and independently distributed) data. We present FedAPT, a novel framework that integrates foundation models like CLIP into multi-domain federated tasks. FedAPT introduces an Adaptive Prompt Tuning (APT) module consisting of learnable meta-prompts, frozen keys serving as domain anchors, and a lightweight adaptive network. This approach allows the model to dynamically "unlock" domain-specific knowledge for individual test samples. Experimental results on benchmarks such as DomainNet demonstrate that FedAPT achieves higher accuracy than full-model fine-tuning while updating less than 10% of the parameters.
Introduction
Traditional Federated Learning requires the transmission of millions of parameters, straining bandwidth and local compute resources. Furthermore, the "Non-IID" challenge—where data distributions vary significantly across clients (e.g., different lighting or artistic styles for the same object category)—often prevents a single global model from generalizing effectively. While prompt tuning has emerged as a parameter-efficient alternative, standard methods typically rely on static prompts. FedAPT addresses this by making prompts adaptive, providing personalized guidance based on the specific domain characteristics of each input image.
Methodology: Adaptive Prompt Tuning (APT)
The FedAPT framework keeps the heavy vision and text encoders of the CLIP model frozen, focusing training solely on the lightweight APT module.
Architecture Components
The APT module is comprised of three primary elements:
- Meta Prompt ($p_g$): A shared base prompt learned through standard federated averaging.
- Frozen Keys ($e_k$): Random, unique keys generated by the server and assigned to clients. These act as fixed "anchors" for domain-specific knowledge.
- Adaptive Network ($Q_g$): A small, learnable fully-connected layer that analyzes input image features to produce a "membership vector."
Training and Inference
During local training, each client uses its assigned frozen key to constrain the prompt tuning process, effectively "tagging" learned features to specific keys. At inference time, the Adaptive Network evaluates a new image to determine which keys (and thus which domain knowledge) are most relevant. It then generates a personalized prompt via element-wise multiplication of the meta-prompt and a weighted combination of the keys.
Inference Efficiency
A common bottleneck in prompt tuning is the need for multiple passes through the text encoder when different prompts are used for a single batch. FedAPT circumvents this by pre-computing text encodings for each key.
By combining results in the embedding space, the authors reduced inference time on test sets from 30 minutes to just 30 seconds.
Experimental Evaluation
FedAPT was evaluated on two major multi-domain benchmarks: Office-Caltech10 (4 domains, 10 categories) and DomainNet (6 domains, 345 categories). The framework was tested in both supervised and unsupervised settings, with the latter utilizing pseudo-labeling and contrastive loss.
Key Results
- Parameter Efficiency: On DomainNet, FedAPT achieved an average accuracy of 67.39%, outperforming fully-trained ResNet-50 (55.23%) and ViT (54.04%) while training only 2.8M parameters (vs. 87.8M for ViT).
- Robustness to Skew: FedAPT consistently outperformed other federated tuning baselines like PromptFL and FedCLIP across various levels of data imbalance.
- Unsupervised Performance: The adaptive mechanism proved robust even without ground-truth labels, effectively utilizing CLIP’s zero-shot capabilities for pseudo-supervision.
Discussion and Future Work
FedAPT demonstrates that foundation models are highly "FL-ready"; rather than re-learning features, the goal becomes learning how to query the model effectively via prompts. However, limitations remain. Extreme category imbalance—where some clients lack samples for certain classes—still leads to performance degradation across all prompt-tuning methods. Future research could explore initializing keys with semantic information (e.g., domain descriptions) rather than random values, and investigating potential privacy implications of the domain-classifying adaptive network.
Summary updated