Introduction
Standard Federated Learning (FL) aims to train a single global model across decentralized clients while preserving data privacy. However, the primary bottleneck in this paradigm is data heterogeneity (Non-IID data). When clients possess unique data distributions—such as one user having a dataset of cats and another of cars—a universal "one-size-fits-all" model often fails to achieve optimal performance for individual users.
Existing Personalized Federated Learning (PFL) strategies typically address this at the model level, such as by employing personalized classifier heads. This paper introduces pFedPT (Personalized Federated Prompt Tuning), a novel framework that shifts the focus to the data level. By utilizing "visual prompting," pFedPT allows a shared global model to adapt to local contexts without compromising privacy.
The pFedPT Framework
The core innovation of pFedPT is the introduction of client-specific, learnable visual prompts. These prompts consist of a frame of colored pixels padded around the original local images. This padding acts as a "hint" or a client-conditional signature that describes the local data distribution to the global backbone.
Training Mechanism
To prevent interference between the prompt and the model weights, pFedPT employs an alternating four-step training strategy:
- Local Prompt Update: Update the private prompt parameters while freezing the shared backbone.
- Local Backbone Update: Freeze the prompt and update the backbone weights.
- Aggregation: Send the backbone to the server for weight averaging.
- Broadcasting: Distribute the updated global backbone back to the clients.
This method is designed to be "orthogonal," meaning visual prompts can be integrated into other FL algorithms like FedProx or MOON to enhance their performance.
Empirical Analysis and Key Insights
The researchers evaluated pFedPT on standard benchmarks including CIFAR-10, CIFAR-100, and Tiny-ImageNet. The analysis yielded several critical insights into why visual prompting is effective:
- Feature Space Optimization: As shown in the t-SNE visualizations (see Figure 1), the addition of prompts increases the distance between different classes (inter-class variation) and tightens the clusters within the same class (intra-class variation). For instance, in the provided visualizations, pFedPT increased inter-class variation from 10.58 to 12.32 compared to standard FedAvg.
- Attention Shift: Grad-CAM visualizations revealed that the model actively "attends" to the added prompts. This suggests the prompts provide a necessary context that helps the global model fine-tune its predictions for specific local distributions on the fly.
- Prompt Design: The study found that padding (adding pixels to the edges) is superior to "pixel patches" (internal squares). Padding preserves the integrity of the original image content while providing sufficient space for the prompt signature.
Results and Privacy Benefits
On CIFAR-10 and CIFAR-100, pFedPT consistently outperformed state-of-the-art (SOTA) methods like FedRep and FedBABU by 1% to 3%. The performance gains were most significant in highly heterogeneous (Non-IID) scenarios. Furthermore, adding pFedPT to the FedProx algorithm increased its CIFAR-10 accuracy from approximately 62% to over 80%.
Beyond accuracy, pFedPT offers a privacy bonus. Since the visual prompts are never transmitted to the server, they act as a protective layer. The framework was shown to reduce data leakage, making it significantly more difficult for malicious actors to infer sensitive client data from the uploaded model weights.
Conclusion and Future Work
pFedPT demonstrates that data-level intervention through visual prompting is a powerful tool for personalized federated learning. While the method showed some sensitivity to prompt size and required more communication rounds on complex datasets like Tiny-ImageNet, it represents a significant step forward in handling data heterogeneity. Future research may explore non-visual prompts and the application of this framework to large-scale foundation models.
Summary updated