FedPrompt: Communication-Efficient and Privacy-Preserving Prompt Tuning in Federated Learning

Haodong Zhao, Wei Du, Fangqi Li, Peixuan Li, Gongshen Liu

TL;DR

This paper introduces FedPrompt, a novel approach that combines federated learning (FL) with prompt tuning for large pre-trained language models (PLMs). FedPrompt significantly reduces communication costs in FL by only tuning and aggregating soft prompts, achieving comparable accuracy to full model fine-tuning while maintaining privacy.

What Problem Does This Paper Address?

Federated learning (FL) has emerged as a powerful paradigm for training machine learning models on decentralized data while preserving user privacy. However, applying FL to tasks that rely on massive pre-trained language models (PLMs) like BERT, Roberta, or T5 presents a significant challenge: the enormous communication overhead. Fine-tuning these PLMs requires transmitting and aggregating all their parameters, which can be prohibitively expensive, especially for devices with limited bandwidth. Prompt tuning offers a more efficient alternative by freezing the PLM and only training a small set of "soft prompt" parameters. This paper addresses the gap of applying this efficient prompt tuning technique within the federated learning framework to achieve both communication efficiency and privacy preservation.

Methods

The core innovation of FedPrompt lies in its adaptation of prompt tuning for FL. Instead of the standard FL approach of aggregating full PLM parameters, FedPrompt adopts a "model split aggregation" strategy. Specifically:

  • Freezing PLMs: The large pre-trained language models (PLMs) are kept fixed across all clients and the server.
  • Tuning Soft Prompts: Only the small set of soft prompt parameters are trained locally on each client.
  • Aggregation of Soft Prompts: The server aggregates these learned soft prompt parameters, rather than the entire PLM.

This approach drastically reduces the number of parameters that need to be communicated, leading to significant efficiency gains. The paper also investigates the security implications, specifically testing FedPrompt against backdoor attacks. They propose a "FedPPT" attack scenario where malicious clients poison their local training data with a trigger word to inject a backdoor into the aggregated soft prompt.

Datasets

The authors evaluated FedPrompt on a variety of standard NLP tasks, including:

  • Text Bi-classification: Sentiment analysis (SST-2, IMDB), toxicity detection (OffensEval, Twitter), and spam detection (Enron, Lingspam).
  • Sentence-pair classification: Question Natural Language Inference (QNLI) and Recognizing Textual Entailment (RTE).

These datasets were split across ten clients to simulate the federated learning environment, with both IID (Independent and Identically Distributed) and Non-IID data distributions being considered.

Key Insights and Ideas

  • Prompt Tuning is a Natural Fit for FL: The paper demonstrates that prompt tuning, with its focus on learning small, task-specific parameters, is highly compatible with the communication constraints of federated learning.
  • Drastic Communication Cost Reduction: By only aggregating soft prompts, FedPrompt achieves an astonishing reduction in communication cost, down to approximately 0.01% of what's required for full PLM fine-tuning.
  • Robustness to Backdoor Attacks: FedPrompt exhibits remarkable resilience against backdoor attacks. Even when malicious clients attempt to poison the soft prompts, the aggregation process effectively mitigates the attack, resulting in a low attack success rate.
  • Privacy Preservation with LDP: The paper explores the use of Local Differential Privacy (LDP) to further enhance privacy, showing a manageable trade-off in accuracy for increased privacy guarantees.

Key Results

  • Communication Efficiency: FedPrompt reduces communication costs to about 0.01% of full PLM fine-tuning, making FL practical for resource-constrained devices.
  • Accuracy: FedPrompt achieves performance very close to full PLM fine-tuning, with only a slight decrease in accuracy (typically less than 3%) on both IID and Non-IID datasets. For instance, on SST-2 with BERT, FedPrompt achieved 90.16% ACC with a communication cost of 0.016M parameters, compared to 91.02% ACC with 109.530M parameters for fine-tuning.
  • Backdoor Attack Robustness: In backdoor attack experiments, the Attack Success Rate (ASR) on malicious clients reached 100% after one local training round, but after aggregation, the ASR on benign clients and the global model remained low, demonstrating the effectiveness of the aggregation process in neutralizing the attack.
  • Non-IID Performance: FedPrompt shows strong compatibility with Non-IID data distributions, a common challenge in FL, with performance degradation being minimal.

Limitations and Future Work

  • Backdoor Attack Defense: While FedPrompt is robust to standard backdoor attacks, the authors acknowledge that more sophisticated methods might exist. They propose future work on enabling the server to detect outliers in soft prompt parameters from clients and using aggregation to further destroy backdoors, even at the cost of a slight accuracy drop.
  • LDP Trade-off: The use of LDP for enhanced privacy leads to a decrease in accuracy (around 5% in their experiments). Future work could focus on optimizing this trade-off.
  • Prompt Method Exploration: While FedPrompt shows promise with standard prompt tuning, the authors suggest further exploration of other prompt tuning methods (like P-tuning and Prefix-Tuning) within the FedPrompt framework.

Summary updated

BibTeX
@inproceedings{zhao2023fedprompt,
  author = {Haodong Zhao and Wei Du and Fangqi Li and Peixuan Li and Gongshen Liu},
  title = {{FedPrompt: Communication-Efficient and Privacy-Preserving Prompt Tuning in Federated Learning}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10095356},
}
Figure