Abstract
Federated Prompt Learning (FPL) integrates large pre-trained Vision-Language Models (VLMs) like CLIP into federated frameworks to leverage their transferable representations. However, a fundamental conflict exists between the need for local personalization due to data heterogeneity and the preservation of the VLM's inherent generalization capabilities. This paper introduces FedPGP (Federated Prompt Learning with CLIP Generalization and low-rank Personalization), a framework designed to strike a harmonious balance between these objectives. FedPGP employs low-rank adaptation for local updates and a dual-purpose contrastive loss guided by frozen CLIP knowledge. Extensive experiments across category-level and domain-level scenarios demonstrate that FedPGP effectively maintains generalization while achieving high-quality personalization, outperforming existing FPL baselines.
Introduction
The emergence of Vision-Language Models (VLMs) has transformed computer vision, particularly through their ability to perform "zero-shot" generalization. In Federated Learning (FL), where multiple clients train a model collaboratively without sharing raw data, prompt tuning has become a popular method for adapting these VLMs efficiently. However, FL faces the challenge of Data Heterogeneity (Non-IID data). While clients require personalization to perform well on their specific local data, standard fine-tuning often leads to "catastrophic forgetting" of the VLM's broad generalization capabilities. FedPGP addresses this by ensuring that local adaptation does not come at the expense of the model's foundational knowledge.
The FedPGP Framework
FedPGP introduces a multi-pronged approach to manage the trade-off between global generalization and local personalization.
Low-Rank Personalization
To prevent local updates from overwriting the global knowledge embedded in the prompts, FedPGP utilizes a low-rank adaptation mechanism ($\Delta p_i = U_i V_i$). By decomposing the prompt update into a low-rank format—similar to the LoRA technique—the framework constrains the personalization space. This acts as a regularizer, filtering out local noise and ensuring that the adaptation remains focused on the most significant features of the local data distribution.
CLIP Knowledge Guidance
To maintain the "common sense" of the VLM, FedPGP uses the original, frozen CLIP model as a teacher. By referencing handcrafted prompts (e.g., "a photo of a [class]"), the framework provides a stable anchor for the learnable prompts. This guidance prevents the model from drifting too far into task-specific overfitting during the federated training process.
Dual-Purpose Contrastive Loss
The core of the FedPGP optimization is a prompt-wise contrastive loss ($L_{con}$). This loss function simultaneously manages two relationships:
- Generalization Alignment: It treats the global prompt and the handcrafted CLIP prompt as a positive pair, pulling them together to preserve the model's ability to handle unseen categories.
- Personalization Differentiation: It treats the global prompt and the personalized local prompt as a negative pair, pushing them apart just enough to allow the local model to capture unique client-specific characteristics without collapsing the global structure.
Experimental Evaluation
The researchers conducted extensive benchmarks to evaluate FedPGP across various challenging scenarios:
Base-to-Novel Generalization
In tests on datasets like OxfordPets, Flowers102, and Caltech101, models were trained on "base" classes and tested on "novel" classes. FedPGP achieved a Harmonic Mean (HM) of 87.33% across five major datasets, significantly higher than CoOp (77.55%) and PromptFL (84.46%). The HM is a critical metric here, as it only remains high if the model performs well on both seen and unseen data.
Domain Generalization and Robustness
Using the DomainNet benchmark (which includes styles like 'sketch', 'real', and 'painting'), FedPGP was tested in "leave-one-domain-out" scenarios. It achieved an average accuracy of 86.76%, outperforming the next best method by nearly 4%. This demonstrates that the low-rank constraints effectively prevent the model from becoming overly specialized to a single domain's style.
Extreme Non-IID Scenarios
Under highly fragmented data settings (simulated via Dirichlet distributions), FedPGP showed substantial gains. For instance, on the DTD dataset, it reached 91.52% accuracy, where other federated methods struggled to maintain performance. This highlights the framework's resilience to extreme data imbalance across clients.
Key Insights and Discussion
The success of FedPGP points toward several important conclusions for the future of Federated Prompt Learning:
- The Intrinsic Rank Hypothesis: The effectiveness of low-rank updates suggests that prompt adaptation has a low intrinsic dimension. By targeting this dimension, FedPGP retains the "VLM magic" while allowing for necessary local adjustments.
- Generalization as the Foundation: The results suggest that in FPL, generalization should be viewed as the "floor" (the baseline capability), while personalization is the "ceiling" (the potential for local improvement). FedPGP ensures the floor is preserved while successfully raising the ceiling.
Conclusion
FedPGP provides a robust framework for balancing the competing needs of personalization and generalization in federated environments. By combining low-rank adaptation with contrastive knowledge guidance, it allows VLMs to adapt to local data without losing their powerful zero-shot capabilities. Future research will explore the theoretical foundations of this low-rank approach and investigate automated methods for tuning the balance between global and local objectives.
Summary updated