[Paper Review] FedCLIP: Fast Generalization and Personalization for CLIP in Federated Learning
FedCLIP uses an attention-based adapter atop CLIP in federated learning to achieve fast generalization to unseen clients and personalized performance, with significantly reduced training and communication costs.
Federated learning (FL) has emerged as a new paradigm for privacy-preserving computation in recent years. Unfortunately, FL faces two critical challenges that hinder its actual performance: data distribution heterogeneity and high resource costs brought by large foundation models. Specifically, the non-IID data in different clients make existing FL algorithms hard to converge while the high resource costs, including computational and communication costs that increase the deployment difficulty in real-world scenarios. In this paper, we propose an effective yet simple method, named FedCLIP, to achieve fast generalization and personalization for CLIP in federated learning. Concretely, we design an attention-based adapter for the large model, CLIP, and the rest operations merely depend on adapters. Lightweight adapters can make the most use of pretrained model information and ensure models be adaptive for clients in specific tasks. Simultaneously, small-scale operations can mitigate the computational burden and communication burden caused by large models. Extensive experiments are conducted on three datasets with distribution shifts. Qualitative and quantitative results demonstrate that FedCLIP significantly outperforms other baselines (9% overall improvements on PACS) and effectively reduces computational and communication costs (283x faster than FedAVG). Our code will be available at: https://github.com/microsoft/PersonalizedFL.
Motivation & Objective
- Address data distribution heterogeneity in FL when using large pretrained models like CLIP.
- Develop a lightweight, adaptable mechanism to personalize CLIP across clients without fine-tuning the whole model.
- Preserve pretrained model knowledge to maintain robust feature representations while enabling task-specific adaptation.
- Reduce computational and communication demands compared to full-model federated training.
Proposed method
- Introduce AttAI, an attention-based adapter for the CLIP image encoder.
- Extract fixed features I = f^I(x) and T = f^T(y) from a pretrained CLIP model on each client.
- Train a local adapter g_i on D_i^train to produce an attention vector att = g(I) and update I* = att ∘ I.
- Compute CLIP-style logits using normalized I* and T with a scale s, following the CLIP loss formulation.
- Aggregate adapters’ parameters on the server via a weighted average w^g* = sum_i (n_i / sum_j n_j) w_i^g and distribute back to clients.
- Update only the adapters during FedCLIP optimization, reducing trainable parameters and communication compared to full-model FL.

Experimental results
Research questions
- RQ1Can a lightweight adapter on top of a pretrained CLIP model achieve both generalization to unseen clients and personalization for participating clients in FL?
- RQ2How much can adapters reduce computation and communication compared to updating full CLIP backbones in federated settings?
- RQ3What is the impact of using fixed CLIP features with task-specific attention on cross-client generalization and local performance?
Key findings
- FedCLIP achieves around 9% average improvement in generalization on PACS and Office-Home datasets compared to baselines.
- FedCLIP uses 283x fewer trainable parameters than FedAVG with CLIP, translating to substantially lower computational and communication costs.
- Across tasks, FedCLIP shows strong personalization and generalization, often achieving best or near-best performance on individual clients and overall averages.
- Experiments on three public image benchmarks demonstrate the method’s robustness and effectiveness with CLIP-based backbones vs. AlexNet baselines.
- The approach remains extensible to other architectures like BERT or ViT and is practical for deployment due to its adapter-based design.

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.