Skip to main content
QUICK REVIEW

[Paper Review] Visual Prompt Based Personalized Federated Learning

Guanghao Li, Wansen Wu|arXiv (Cornell University)|Mar 15, 2023
Privacy-Preserving Technologies in DataComputer Science8 citations
TL;DR

The paper introduces pFedPT, a visual-prompt based personalized federated learning framework for image classification that uses client-specific prompts to implicitly encode local data distributions and guide a shared backbone, improving personalization and performance over state-of-the-art PFL methods on CIFAR-10/100.

ABSTRACT

As a popular paradigm of distributed learning, personalized federated learning (PFL) allows personalized models to improve generalization ability and robustness by utilizing knowledge from all distributed clients. Most existing PFL algorithms tackle personalization in a model-centric way, such as personalized layer partition, model regularization, and model interpolation, which all fail to take into account the data characteristics of distributed clients. In this paper, we propose a novel PFL framework for image classification tasks, dubbed pFedPT, that leverages personalized visual prompts to implicitly represent local data distribution information of clients and provides that information to the aggregation model to help with classification tasks. Specifically, in each round of pFedPT training, each client generates a local personalized prompt related to local data distribution. Then, the local model is trained on the input composed of raw data and a visual prompt to learn the distribution information contained in the prompt. During model testing, the aggregated model obtains prior knowledge of the data distributions based on the prompts, which can be seen as an adaptive fine-tuning of the aggregation model to improve model performances on different clients. Furthermore, the visual prompt can be added as an orthogonal method to implement personalization on the client for existing FL methods to boost their performance. Experiments on the CIFAR10 and CIFAR100 datasets show that pFedPT outperforms several state-of-the-art (SOTA) PFL algorithms by a large margin in various settings.

Motivation & Objective

  • Motivate the need for data-distribution-aware personalization in federated learning beyond model-centric approaches.
  • Propose a novel framework that uses client-specific visual prompts to encode local data distribution information.
  • Enable alternated training of a prompt generator and a shared backbone to achieve client-specific fine-tuning.
  • Demonstrate that prompts can act as a plug-in to improve other FL/PFL methods and enhance performance on standard benchmarks.

Proposed method

  • Each client maintains a local prompt generator and a backbone.
  • A personalized visual prompt is generated per client and added to local inputs during training.
  • Alternate optimization: update prompt generator while backbone is frozen, then update backbone while prompt is frozen.
  • Server aggregates backbones across clients using Federated averaging on each communication round.
  • Prompt size/type are varied; padding-based prompts with size 4 perform best in CIFAR-10 experiments.
  • The objective minimizes a loss over both backbone parameters and client-specific prompts: L(w, δ_i) = E_{(x,y)~D_i}[ℓ_i(w; (x+δ_i, y))].
Figure 1: Differences in local update and aggregation phases between FedAvg and pFedPT. In the figure, the lines represent the decision boundaries defined by the backbone. Assume that each client has two classes represented by different shapes. (a) In FedAvg, due to the heterogeneity of data in each
Figure 1: Differences in local update and aggregation phases between FedAvg and pFedPT. In the figure, the lines represent the decision boundaries defined by the backbone. Assume that each client has two classes represented by different shapes. (a) In FedAvg, due to the heterogeneity of data in each

Experimental results

Research questions

  • RQ1Can client-specific visual prompts encode local data distribution to guide a shared backbone for better personalized performance?
  • RQ2How does pFedPT compare to existing PFL baselines across non-IID settings on standard image classification benchmarks?
  • RQ3Do prompts provide a plug-in improvement for other FL/PFL methods beyond pFedPT?
  • RQ4What prompt designs (locations and sizes) yield the best performance in practice?

Key findings

  • pFedPT consistently achieves top test accuracy over baselines on CIFAR-10/100 under various non-IID settings.
  • On Dirichlet CIFAR-10 with CNN, pFedPT reaches 80.83% versus 61.92% for FedAvg and 77.98% for FedPer, illustrating a notable improvement.
  • pFedPT shows robustness across ViT and CNN backbones and appears to gain more as data heterogeneity increases.
  • Prompt-enhanced prompts can boost other FL methods (e.g., FedProx, MOON, FedRep) by providing distribution-aware hints to the backbone.
  • Padding prompts of size 4 offer the best performance in their ablation study on CIFAR-10, with other prompt designs slightly underperforming.
  • Visual analyses (Grad-CAM, t-SNE) suggest prompts shift attention and embeddings to encode client-specific information, aiding classification.
Figure 2: The pipeline of the pFedPT. $\hat{y}$ stands for the predicted logits of all classes. The dashed lines in steps 1 and 2 represent the loss backward for the model update. Each client contains a Prompt Generator, a set of personalized learnable parameters preserved locally, and a Backbone, w
Figure 2: The pipeline of the pFedPT. $\hat{y}$ stands for the predicted logits of all classes. The dashed lines in steps 1 and 2 represent the loss backward for the model update. Each client contains a Prompt Generator, a set of personalized learnable parameters preserved locally, and a Backbone, w

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.