[论文解读] FedCLIP: Fast Generalization and Personalization for CLIP in Federated Learning
FedCLIP 在联邦学习中在 CLIP 之上放置一个基于注意力的适配器,以实现对未见客户端的快速泛化和个性化性能,同时显著降低训练和通信成本。
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.
研究动机与目标
- 解决使用像 CLIP 这样的大规模预训练模型时,FL 中的数据分布异质性问题。
- 开发一个轻量、可自适应的机制,在不对整个模型进行微调的情况下对 CLIP 进行跨客户端个性化。
- 保留预训练模型的知识,以维持稳健的特征表示,同时实现任务特定的适应。
- 相较于全模型的联邦训练,降低计算和通信需求。
提出的方法
- 为 CLIP 图像编码器引入 AttAI,一种基于注意力的适配器。
- 在每个客户端从预训练的 CLIP 模型提取固定特征 I = f^I(x) 和 T = f^T(y)。
- 在 D_i^train 上训练本地适配器 g_i,以产生注意力向量 att = g(I) 并更新 I* = att ∘ I。
- 使用归一化的 I* 和 T 及一个缩放因子 s,按 CLIP 损失公式计算 CLIP 风格的对数几率。
- 通过加权平均在服务器聚合适配器参数 w^g* = sum_i (n_i / sum_j n_j) w_i^g,并分发回客户端。
- 在 FedCLIP 优化中仅更新适配器,相较于全模型 FL,减少可训练参数和通信。

实验结果
研究问题
- RQ1在联邦学习中,基于预训练 CLIP 模型的轻量级适配器是否能够同时实现对未见客户端的泛化和对参与客户端的个性化?
- RQ2与在联邦设置中更新完整的 CLIP 主干相比,适配器在计算和通信方面能降低多少?
- RQ3使用固定的 CLIP 特征配合任务特定的注意力对跨客户端泛化和本地性能有何影响?
主要发现
- FedCLIP 在 PACS 与 Office-Home 数据集上的泛化平均提升约 9%,相较基线。
- FedCLIP 的可训练参数比 FedAVG 与 CLIP 少约 283 倍,带来显著降低的计算与通信成本。
- 在各个任务中,FedCLIP 展示出强烈的个性化和泛化能力,通常在单个客户端上达到最好或接近最好,以及总体平均水平。
- 在三个公开图像基准测试上的实验表明,该方法在 CLIP 基于骨干的情形下,相对 AlexNet 基线更具鲁棒性和有效性。
- 该方法可扩展到如 BERT 或 ViT 等其他架构,并且由于其基于适配器的设计,实际部署具有可行性。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。