PromptFL: Let Federated Participants Cooperatively Learn Prompts Instead of Models – Federated Learning in Age of Foundation Model

Tao Guo, Song Guo, Junxiao Wang, Xueyang Tang, Wenchao XuIEEE Trans. Mobile Computing 2022

TL;DR

This paper introduces PromptFL, a novel federated learning (FL) framework that trains "soft prompts" instead of entire models. By leveraging pre-trained foundation models like CLIP, PromptFL significantly accelerates local training and global aggregation, making FL more efficient and feasible on resource-constrained edge devices.

What Problem Does This Paper Address?

Federated learning (FL) enables distributed training of machine learning models across multiple devices without sharing raw data, preserving user privacy. However, traditional FL faces significant challenges: limited bandwidth for parameter communication, insufficient local data on edge devices, leading to slow convergence and reduced model accuracy. Existing solutions often focus on optimizing FL algorithms or model architectures, but they don't fundamentally address the core issue of large model updates and data requirements. This paper tackles the problem of making FL more efficient and practical for edge devices, especially in the era of massive foundation models (FMs).

Methods

PromptFL proposes a paradigm shift: instead of federated model training, it enables federated prompt training. The core idea is to use a pre-trained foundation model (like CLIP) with its backbone frozen and have each client learn only a small set of "soft prompts." These prompts are continuous vector embeddings that modify the input to the FM, effectively adapting it to the specific downstream task without altering the FM itself.

Here's how it works:

  • Foundation Model (FM): An off-the-shelf FM, such as CLIP, is distributed to each client. The FM's parameters are kept frozen.
  • Prompt Learner: Each client has a small "prompt learner" module with trainable parameters. This module generates soft prompts.
  • Local Training: Clients train their prompt learners using their limited local data. The gradients are computed only for the prompt parameters.
  • Global Aggregation: Only the updated prompt parameters are sent to the federated server for aggregation. This drastically reduces communication overhead compared to sending full model updates.
  • Inference: The learned prompts are then used with the frozen FM for inference.

This approach leverages the strong generalization capabilities of FMs and the efficiency of prompt tuning, which requires significantly fewer trainable parameters and less data.

Datasets

The paper evaluates PromptFL on several standard image classification datasets:

  • Caltech101: For general object recognition.
  • Flowers102: For fine-grained classification.
  • OxfordPets: For fine-grained classification.
  • Food101: For fine-grained classification.

These datasets are commonly used in conjunction with CLIP for evaluating vision-language tasks.

Key Insights and Ideas

  • Prompting as a Lightweight FL Adaptation: The paper demonstrates that prompt tuning, a technique typically used for adapting FMs in centralized settings, can be effectively adapted to the federated learning paradigm. This offers a much more efficient alternative to traditional FL.
  • Drastic Reduction in Communication Overhead: By only updating prompt parameters (which are a tiny fraction of the full model), PromptFL achieves massive reductions in communication costs, making it far more practical for devices with limited bandwidth.
  • Efficiency on Limited Data: PromptFL's reliance on pre-trained FMs and prompt tuning means it can achieve competitive performance with very few local data samples per client, addressing a key limitation of traditional FL.
  • Privacy Preservation: Similar to FL, PromptFL keeps raw data on devices. Furthermore, the prompt parameters themselves are less likely to reveal sensitive information about the raw data compared to full model gradients.
  • Robustness to Non-IID Data: The experiments suggest that PromptFL is more stable and less affected by non-IID (non-identically and independently distributed) data across clients compared to existing FL methods.

Key Results

  • Communication Efficiency: PromptFL reduces communication costs by up to 110 times per round compared to fine-tuning FL, and requires fewer communication rounds to converge.
  • Computational Efficiency: Training GPU time is reduced by approximately 3 times for PromptFL compared to fine-tuning FL. GPU memory usage is also significantly lower.
  • Performance: PromptFL achieves competitive accuracy and F1 scores across various datasets, often matching or exceeding traditional FL methods, despite training only a tiny fraction of parameters (0.01% to 0.1%).
  • Data Distribution Stability: PromptFL's performance remains stable even with significant class distribution shifts across clients, outperforming existing frameworks that show "miserable stability" in such scenarios.
  • Scalability: The framework shows good performance with varying numbers of clients and "shots" (examples per class).

Limitations and Future Work

  • Reliance on Pre-trained FMs: The effectiveness of PromptFL is heavily dependent on the quality and availability of pre-trained foundation models.
  • Prompt Engineering Complexity: While PromptFL automates prompt learning, the initial design and understanding of prompt engineering principles are still crucial.
  • Future Work: The authors envision exploring more complex and effective prompt learning bridges to replace the current simple approach. They also suggest that the framework's compatibility with various vision tasks (object detection, video understanding, visual question answering) makes it economically attractive. Further research into privacy guarantees and practical deployment tips is also suggested.

Summary updated

BibTeX
@article{guo2022promptfl,
  author = {Tao Guo and Song Guo and Junxiao Wang and Xueyang Tang and Wenchao Xu},
  title = {{PromptFL: Let Federated Participants Cooperatively Learn Prompts Instead of Models – Federated Learning in Age of Foundation Model}},
  journal = {IEEE Transactions on Mobile Computing},
  year = {2022},
  url = {https://openreview.net/forum?id=l8cORZaoJdn},
}
Figure