Efficient Model Personalization in Federated Learning via Client-Specific Prompt Generation

Fu-En Yang, Chien-Yi Wang, Yu-Chiang Frank Wang

Abstract

Federated Learning (FL) faces significant hurdles when deploying modern foundation models, primarily due to data heterogeneity across clients and the prohibitive communication costs of transmitting massive parameter sets. We present pFedPG, a novel framework that achieves efficient model personalization by generating client-specific visual prompts. By keeping the large-scale backbone model frozen and only communicating small prompt vectors, pFedPG enables high-performance personalization with a 10,000x reduction in communication overhead. Experimental results across diverse datasets, including medical imaging and domain-shift benchmarks, demonstrate that pFedPG outperforms existing state-of-the-art personalized FL methods in both accuracy and efficiency.

1. Introduction

Federated Learning (FL) has emerged as a vital paradigm for training machine learning models on decentralized data while maintaining privacy. However, two major challenges—the "walls" of FL—hinder the practical application of high-performance foundation models like Vision Transformers (ViT):

  1. Data Heterogeneity (The Non-IID Problem): In real-world scenarios, clients (e.g., different hospitals or mobile users) possess data from vastly different distributions. A single global model often fails to generalize well to these diverse local environments.
  2. The Efficiency Gap: Foundation models contain millions or billions of parameters. Transmitting these weights between a central server and edge devices is often impossible due to bandwidth constraints and battery limitations.

While Personalized Federated Learning (pFL) aims to address heterogeneity, most current methods either require tuning the entire model or rely on smaller, less capable architectures. pFedPG addresses this by asking: Can we leverage the power of giant, pre-trained models while keeping communication and local computation extremely light?

2. Methodology

pFedPG shifts the focus from traditional weight-based training to Visual Prompting. The framework consists of three primary components: a frozen backbone, a client-specific prompt generator, and an implicit feedback loop.

2.1 Frozen Foundation Model

Instead of updating the entire architecture, pFedPG utilizes a large, pre-trained backbone (e.g., ViT-B/16) that remains completely frozen on the client side. No backbone weights are modified or transmitted during the federated process, ensuring that the core knowledge of the foundation model is preserved and computational costs remain low.

2.2 Client-Specific Prompt Generator ($G$)

The core innovation is a server-side module that uses a cross-attention mechanism to produce unique prompt initializations. This generator takes a "client descriptor" as input and outputs a set of prompt vectors tailored to that specific client's domain. These prompts are prepended to the input image tokens, effectively "steering" the frozen model to process local data more accurately.

2.3 The Optimization Loop

The training process follows a specialized four-step cycle:

  1. Generation: The server generates a personalized prompt and transmits it to the client.
  2. Local Tuning: The client performs a few steps of local training on the prompt vectors using their private data.
  3. Implicit Feedback: Rather than sending back the full prompt or model weights, the client sends the optimization direction ($\Delta P$)—the difference between the server's initialization and the locally tuned result.
  4. Meta-Learning: The server uses $\Delta P$ to update the Prompt Generator, teaching it how to produce better initializations for that client in subsequent rounds.

3. Experimental Evaluation

The authors evaluated pFedPG across several challenging scenarios designed to test robustness against data shifts and label imbalance.

  • Domain Discrepancy: Tested on Office-Caltech10 and DomainNet (featuring Clipart, Painting, Sketch, and real images).
  • Medical Imaging: Evaluated on Dermoscopic-FL, a dataset of skin lesion images from various medical sites with distinct imaging characteristics.
  • Label Imbalance: Simulated using CIFAR-10 and CIFAR-100 with Dirichlet distributions to create non-IID label spaces.

4. Key Results

4.1 Superior Accuracy

On the highly heterogeneous DomainNet dataset, pFedPG achieved an average accuracy of 71.64%. This significantly outperformed standard FedAvg (62.21%) and specialized personalized methods like FedRep (63.37%). The results were similarly dominant in the medical domain, highlighting the framework's utility for high-stakes, real-world applications.

4.2 Massive Communication Efficiency

By communicating only prompt vectors rather than model weights, pFedPG achieves a 99.99% reduction in communication overhead. While traditional pFL methods require transmitting approximately 85.8M parameters per round, pFedPG requires only ~7.68K parameters. This 10,000x reduction makes the use of foundation models feasible even on low-bandwidth networks.

4.3 The Power of Implicit Feedback

The study demonstrates that the server does not need access to client data or full model weights to learn effectively. By observing the direction of local optimization ($\Delta P$), the Prompt Generator successfully learns the underlying characteristics of the client's data distribution, proving that implicit feedback is sufficient for high-quality personalization.

5. Discussion and Conclusion

pFedPG represents a significant step forward in making foundation models accessible for federated applications. By decoupling the task-specific "instructions" (prompts) from the general "knowledge" (frozen backbone), the framework solves the dual problems of data heterogeneity and communication efficiency.

Limitations and Future Work: * Backbone Dependency: The method relies on the quality of the pre-trained backbone. If the foundation model has no exposure to a specific domain (e.g., satellite imagery if trained only on natural images), prompting may be less effective. * Scalability: As the number of clients grows into the millions, managing individual client descriptors may require more advanced clustering techniques. * Privacy: While $\Delta P$ is small, future research should investigate whether these optimization directions are susceptible to gradient inversion attacks to ensure total privacy compliance.

Summary updated

BibTeX
@inproceedings{yang2023efficient,
  author = {Fu-En Yang and Chien-Yi Wang and Yu-Chiang Frank Wang},
  title = {{Efficient Model Personalization in Federated Learning via Client-Specific Prompt Generation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure