Federated learning (FL) enables multiple clients to collaboratively train a global model without disclosing their data. Previous researches often require training the complete model parameters. However, the emergence of powerful pre-trained models makes it possible to achieve higher performance with fewer learnable parameters in FL. In this paper, we propose a federated adaptive prompt tuning algorithm, FedAPT, for multi-domain collaborative image classification with powerful foundation models, like CLIP. Compared with direct federated prompt tuning, our core idea is to adaptively unlock specific domain knowledge for each test sample in order to provide them with personalized prompts. To implement this idea, we design an adaptive prompt tuning module, which consists of a meta prompt, an adaptive network, and some keys. The server randomly generates a set of keys and assigns a unique key to each client. Then all clients cooperatively train the global adaptive network and meta prompt with the local datasets and the frozen keys. Ultimately, the global aggregation model can assign a personalized prompt to CLIP based on the domain features of each test sample. We perform extensive experiments on two multi-domain image classification datasets across two different settings - supervised and unsupervised. The results show that FedAPT can achieve better performance with less than 10\% of the number of parameters of the fully trained model, and the global model can perform well in diverse client domains simultaneously.
翻译:联邦学习(FL)使多个客户端能够在数据不公开的情况下协同训练全局模型。以往研究通常需要训练完整的模型参数,然而强大预训练模型的涌现使得在FL中以更少可学习参数实现更高性能成为可能。本文针对基于CLIP等强大基础模型的多领域协作图像分类任务,提出联邦自适应提示微调算法FedAPT。与直接联邦提示微调相比,我们的核心思想是为每个测试样本自适应地解锁特定领域知识,从而提供个性化提示。为实现这一思想,我们设计了由元提示、自适应网络和若干键组成的自适应提示微调模块:服务器随机生成一组键并为每个客户端分配唯一键,随后所有客户端利用本地数据集和冻结的键协同训练全局自适应网络与元提示。最终,全局聚合模型可根据每个测试样本的领域特征为CLIP分配个性化提示。我们在两个多领域图像分类数据集上进行了监督与无监督两种设置的广泛实验。结果表明,FedAPT在参数量不足全量训练模型10%的情况下即可取得更优性能,且全局模型能同时在多个不同客户端领域表现良好。