Differentially Private Low-Rank Adaptation of Large Language Model Using Federated Learning

Xiao-Yang Liu, Rongyi Zhu, Daochen Zha, Jiechao Gao, Shan Zhong, Meikang QiuACM Trans. Manag. Inf. Syst 2023

TL;DR

This paper introduces DP-LoRA, a novel federated learning approach for fine-tuning large language models (LLMs) that simultaneously addresses critical privacy concerns and the substantial communication overhead. By combining differential privacy with low-rank adaptation, DP-LoRA enables multiple parties to collaboratively improve LLMs on sensitive data without compromising individual privacy or incurring prohibitive communication costs.

What Problem Does This Paper Address?

Large language models (LLMs) are increasingly being adapted for specialized domains like finance and medicine. However, fine-tuning these models often requires sensitive, private data. While federated learning offers a way to train models collaboratively without directly sharing raw data, it faces two major challenges:

  1. Privacy Leakage: Even without direct data exposure, attackers might infer sensitive information from model outputs. This is a significant concern in high-stakes domains like healthcare and finance.
  2. Communication Overhead: LLMs are massive, and federated learning involves frequent communication of model updates between clients and a central server. This can be prohibitively expensive and time-consuming.

Existing solutions often tackle one problem at the expense of the other, or focus only on the pre-training phase, leaving a gap for efficient and private fine-tuning in collaborative settings.

Methods

The authors propose DP-LoRA (Differentially Private Low-Rank Adaptation), a federated learning algorithm designed to tackle both privacy and communication challenges.

  • Differential Privacy: DP-LoRA injects noise into the weight updates using a Gaussian mechanism. This ensures that the contribution of any single data point is masked, providing a formal (ε, δ)-differential privacy guarantee. This prevents attackers from inferring specific individual data from the model's behavior.
  • Low-Rank Adaptation (LoRA): Instead of updating all model parameters, DP-LoRA freezes most of the pre-trained LLM weights and only fine-tunes a small set of low-rank adaptation matrices. This significantly reduces the number of parameters that need to be transmitted during federated learning, thereby mitigating communication overhead.

The algorithm integrates these two components within a standard federated learning framework, where clients train locally, add noise to their updates, and then upload these updates to a server for aggregation.

Datasets

The authors evaluated DP-LoRA on a variety of datasets to mimic real-world scenarios:

  • Medical: A dataset of 0.26 million English patient-doctor consultations, covering 51 medical categories.
  • Financial: A dataset comprising financial news, social media sentiment, regulatory filings, and analyst opinions, annotated with financial sentiment (Bearish, Bullish, Neutral).
  • General: Standard NLP benchmarks including BoolQ (question answering), PIQA (physical commonsense reasoning), and WinoGrande (commonsense reasoning).

The paper also mentions SlimPajama as a general dataset source.

Key Insights and Ideas

  • Privacy-Utility Trade-off is Real: The experiments consistently show that as privacy guarantees become stricter (lower ε and δ values), model performance generally decreases. This highlights the fundamental challenge of balancing data protection with model accuracy.
  • Model Resilience Varies: Different LLMs exhibit varying degrees of resilience to privacy constraints. Some models, like ChatGLM-6B, show a more stable performance even with stricter privacy settings, suggesting architectural or training differences that make them more robust.
  • LoRA is Key for Communication Efficiency: The low-rank adaptation technique is crucial for making federated learning of LLMs practical. By drastically reducing the number of parameters to transmit, it makes collaborative training feasible even with large models.
  • Noise Can Sometimes Help (Unexpectedly): In one instance with Llama-7B and a specific δ value, performance improved. The authors hypothesize this might be due to the noise helping the model escape local optima, a counter-intuitive but potentially valuable observation.

Key Results

  • Privacy Guarantees: DP-LoRA is shown to provide (ε, δ)-differential privacy, with theoretical bounds derived.
  • Communication Reduction: The low-rank adaptation significantly reduces communication overhead. For example, with Llama-7B, the communication overhead was reduced from 6.7B parameters (original) to as low as 0.17B with a rank of 4, representing a substantial compression ratio.
  • Performance: While stricter privacy settings lead to a performance drop across models and tasks, DP-LoRA effectively maintains a reasonable level of utility. For instance, on MedQuAD, Llama-7B's performance dropped from 69.4 (original) to 55.9 with stricter privacy, but still achieved competitive results compared to other models under similar constraints.
  • Model Comparison: The paper presents extensive tables showing the performance of various LLMs (GPT-2, BERT, ChatGLM-6B, Llama-7B) under different privacy settings and compression ratios, illustrating the trade-offs.

Limitations and Future Work

  • Privacy-Utility Trade-off: The authors acknowledge the inherent trade-off between privacy and model performance. While DP-LoRA mitigates this, it doesn't eliminate it.
  • Error Bounds: Future work could focus on refining the theoretical error bounds for differential privacy, especially in the context of LLM fine-tuning, where current bounds might be less stringent.
  • Dataset Diversity: Expanding the experimental scope to include a wider array of domain-specific datasets is suggested to further validate the applicability and robustness of DP-LoRA.
  • Heterogeneous Datasets: The authors plan to address scenarios where different institutions might have unique datasets that don't conform to the same distribution.

Summary updated

BibTeX
@article{liu2023differentially,
  author = {Xiao-Yang Liu and Rongyi Zhu and Daochen Zha and Jiechao Gao and Shan Zhong and Meikang Qiu},
  title = {{Differentially Private Low-Rank Adaptation of Large Language Model Using Federated Learning}},
  journal = {ACM Trans. Manag. Inf. Syst.},
  year = {2023},
  url = {https://openreview.net/forum?id=Kne0MRfDym},
}
Figure