SLoRA: Federated Parameter Efficient Fine-Tuning of Language Models

Sara Babakniya, Ahmed Roushdy Elkordy, Yahya H. Ezzeldin, Qingfeng Liu, Kee-Bong Song, Mostafa El-Khamy, Salman Avestimehr

Abstract

Transfer learning via fine-tuning pre-trained transformer models has gained significant success in delivering state-of-the-art results across various NLP tasks. In the absence of centralized data, Federated Learning (FL) can benefit from distributed and private data of the FL edge clients for fine-tuning. However, due to the limited communication, computation, and storage capabilities of edge devices and the huge sizes of popular transformer models, efficient fine-tuning is crucial to make federated training feasible. This work explores the opportunities and challenges associated with applying parameter efficient fine-tuning (PEFT) methods in different FL settings for language tasks. Specifically, our investigation reveals that as the data across users becomes more diverse, the gap between fully fine-tuning the model and employing PEFT methods widens. To bridge this performance gap, we propose a method called SLoRA, which overcomes the key limitations of LoRA in high heterogeneous data scenarios through a novel data-driven initialization technique. Our experimental results demonstrate that SLoRA achieves performance comparable to full fine-tuning, with significant sparse updates with approximately $\sim 1\%$ density while reducing training time by up to $90\%$.

The Challenge of Federated Fine-Tuning

Fine-tuning Large Language Models (LLMs) is the gold standard for adapting them to specialized tasks. However, doing this in a Federated Learning (FL) setting—where data stays on user devices for privacy—introduces two primary challenges:

  1. Resource Constraints: Edge devices like smartphones lack the memory and bandwidth to compute or transmit updates for billions of parameters.
  2. Data Heterogeneity (Non-IID): In real-world scenarios, user data is highly diverse. This research identifies a critical "heterogeneity gap": while Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA perform well on centralized data, their performance degrades significantly in FL as data becomes more diverse across users.

Standard LoRA typically starts with random initializations that struggle to converge when clients have wildly different data distributions. As data becomes more "pathological" or diverse, the accuracy gap between LoRA and Full Fine-Tuning (FFT) widens.

The performance gap between full fine-tuning and parameter-efficient methods widens as data heterogeneity increases.

SLoRA: Bridging the Gap with Sparse Priming

To overcome the heterogeneity penalty, the authors propose SLoRA (Sparse LoRA), which utilizes a clever two-stage training process to provide a data-driven initialization for low-rank adapters:

  • Stage 1: Sparse Fine-Tuning (SFT) Priming: Instead of starting with low-rank matrices, the server generates a random, data-independent binary mask. Clients only update the weights visible through this mask (approximately 1.3% density). This "primes" the model using actual client data without the overhead of full fine-tuning.
  • The Pivot (SVD): After a few rounds, the server aggregates the accumulated sparse weight changes ($\Delta W$) and performs a Singular Value Decomposition (SVD). This compresses the learned knowledge into two low-rank matrices ($A_0$ and $B_0$).
  • Stage 2: LoRA Training: The model switches to standard LoRA, but instead of random initialization, it uses the $A_0$ and $B_0$ matrices from the SVD step as a "warm start." Clients then continue training only these low-rank adapters.
The two-stage SLoRA workflow: Stage 1 uses sparse updates to prime the model, followed by SVD to initialize Stage 2 LoRA adapters.

Experimental Results

The researchers evaluated SLoRA using Albert and DistilBERT models on two primary benchmarks: the 20News group dataset and the News Category dataset. Data heterogeneity was simulated using Latent Dirichlet Allocation (LDA) to create various non-IID distributions.

Key findings include:

  • Accuracy Parity: On the 20News dataset with Albert, SLoRA achieved 58.6% accuracy, slightly outperforming Full Fine-Tuning (58.17%) and significantly beating standard LoRA (56.5%).
  • Massive Speedup: SLoRA reduced total training time by 90% compared to full fine-tuning (40.4 minutes vs. 596.7 minutes).
  • Communication Efficiency: It maintained an update density of ~1%, making it feasible for low-bandwidth mobile connections.
  • Stability: SLoRA showed much lower variance across different random seeds and data distributions compared to other PEFT baselines.

Limitations and Future Work

While SLoRA effectively addresses data heterogeneity, some limitations remain. The study assumes all clients have similar resource capabilities; exploring resource heterogeneity (where devices have different memory/compute limits) is a vital next step. Additionally, while the SVD is a one-time cost, it occurs on the server and could become a computational bottleneck for extremely large models. Future research could also investigate how SLoRA handles generative tasks or more complex reasoning benchmarks.

Summary updated

Abstract

Transfer learning via fine-tuning pre-trained transformer models has gained significant success in delivering state-of-the-art results across various NLP tasks. In the absence of centralized data, Federated Learning (FL) can benefit from distributed and private data of the FL edge clients for fine-tuning. However, due to the limited communication, computation, and storage capabilities of edge devices and the huge sizes of popular transformer models, efficient fine-tuning is crucial to make federated training feasible. This work explores the opportunities and challenges associated with applying parameter efficient fine-tuning (PEFT) methods in different FL settings for language tasks. Specifically, our investigation reveals that as the data across users becomes more diverse, the gap between fully fine-tuning the model and employing PEFT methods widens. To bridge this performance gap, we propose a method called SLoRA, which overcomes the key limitations of LoRA in high heterogeneous data scenarios through a novel data-driven initialization technique. Our experimental results demonstrate that SLoRA achieves performance comparable to full fine-tuning, with significant sparse updates with approximately $\sim 1\%$ density while reducing training time by up to $90\%$.
BibTeX
@inproceedings{babakniya2023slora,
  author = {Sara Babakniya and Ahmed Roushdy Elkordy and Yahya H. Ezzeldin and Qingfeng Liu and Kee-Bong Song and Mostafa El-Khamy and Salman Avestimehr},
  title = {{SLoRA: Federated Parameter Efficient Fine-Tuning of Language Models}},
  booktitle = {Federated Learning @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=06quMTmtRV},
}
Figure