Skip to main content
QUICK REVIEW

[Paper Review] FedBPT: Efficient Federated Black-box Prompt Tuning for Large Language Models

Jingwei Sun, Ziyue Xu|arXiv (Cornell University)|Oct 2, 2023
Privacy-Preserving Technologies in DataComputer Science7 citations
TL;DR

FedBPT is a novel federated learning framework that enables efficient, privacy-preserving prompt tuning of large language models (LLMs) without requiring access to model parameters. By using gradient-free optimization (CMA-ES) to train prompts locally and exchanging only low-dimensional prompt vectors, FedBPT reduces communication costs by over 500,000× and memory usage by 3× compared to gradient-based baselines, while achieving comparable accuracy to state-of-the-art methods.

ABSTRACT

Pre-trained language models (PLM) have revolutionized the NLP landscape, achieving stellar performances across diverse tasks. These models, while benefiting from vast training data, often require fine-tuning on specific data to cater to distinct downstream tasks. However, this data adaptation process has inherent security and privacy concerns, primarily when leveraging user-generated, device-residing data. Federated learning (FL) provides a solution, allowing collaborative model fine-tuning without centralized data collection. However, applying FL to finetune PLMs is hampered by challenges, including restricted model parameter access, high computational requirements, and communication overheads. This paper introduces Federated Black-box Prompt Tuning (FedBPT), a framework designed to address these challenges. FedBPT does not require the clients to access the model parameters. By focusing on training optimal prompts and utilizing gradient-free optimization methods, FedBPT reduces the number of exchanged variables, boosts communication efficiency, and minimizes computational and storage costs. Experiments highlight the framework's ability to drastically cut communication and memory costs while maintaining competitive performance. Ultimately, FedBPT presents a promising solution for efficient, privacy-preserving fine-tuning of PLM in the age of large language models.

Motivation & Objective

  • To address the challenges of fine-tuning large language models (LLMs) in federated learning settings where clients lack access to model parameters and face high computational, storage, and communication costs.
  • To enable efficient, privacy-preserving adaptation of black-box LLMs using only inference access, avoiding the need for back-propagation and parameter updates.
  • To reduce communication overhead in FL by exchanging only prompt vectors (hundreds of parameters) instead of model weights or gradients (millions to billions of parameters).
  • To maintain competitive performance with gradient-based fine-tuning methods while being feasible on resource-constrained edge devices such as mobile phones and AR headsets.
  • To scale efficiently with larger LLMs by keeping the number of trainable parameters constant regardless of model size.

Proposed method

  • Clients perform local prompt optimization using CMA-ES, a gradient-free optimization method, without accessing model parameters or performing back-propagation.
  • Only forward passes through the frozen LLM are required during local training, minimizing computational and storage costs on edge devices.
  • The server aggregates locally optimized prompt distributions and sends the global prompt distribution back to clients for the next round.
  • A binary mask with a controllable zero rate ($r_p$) is applied to input tokens to prevent overfitting during local prompt search.
  • A low-dimensional projection matrix maps the embedding space to a smaller space, enabling efficient CMA-ES optimization on a compact prompt vector.
  • The framework exchanges only the prompt parameters (e.g., 500 parameters) instead of model weights or gradients, drastically reducing communication volume.

Experimental results

Research questions

  • RQ1Can gradient-free optimization be effectively used to tune prompts in a federated setting without requiring access to model parameters?
  • RQ2To what extent can communication and memory costs be reduced in federated LLM fine-tuning while maintaining competitive performance?
  • RQ3How does FedBPT perform under non-IID data distributions compared to gradient-based and manual prompt baselines?
  • RQ4Does the framework scale efficiently with increasing LLM size, maintaining low computational and communication overhead?
  • RQ5What hyperparameters, such as local population size ($\lambda_k$) and mask rate ($r_p$), significantly affect the model's accuracy and robustness?

Key findings

  • FedBPT reduces communication cost by over 500,000× compared to gradient-based methods like FedP-tuning, which transmit nearly 2GB per round, by exchanging only 4KB of prompt parameters.
  • FedBPT reduces memory footprint by more than 3× compared to gradient-based methods, even without additional efficient inference techniques.
  • Under non-IID settings, FedBPT improves accuracy by 12%, 11%, and 13% over manual prompts on SST-2, AG’s News, and Yelp, respectively.
  • FedBPT achieves comparable accuracy to gradient-based methods like FedPrompt and FedP-tuning, especially outperforming them in non-IID settings where gradient-free baselines degrade significantly.
  • The model accuracy of FedBPT is not sensitive to the local population size ($\lambda_k$), allowing it to be set small (e.g., 5–20) to reduce computational cost.
  • Applying a random binary mask with $r_p = 0.6$ improves accuracy by up to 1.6% over vanilla BBT ($r_p = 0$), demonstrating effectiveness in mitigating local overfitting.

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.