Why Gradient Subspace? Identifying and Mitigating LoRA's Bottlenecks in Federated Fine-Tuning of Large Language Models

Navyansh Mahla, Ganesh RamakrishnanarXiv 2024

Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities across various domains, particularly in task generalization for both text and vision data. While fine-tuning these models can significantly enhance their performance on specific downstream tasks, it often requires high-quality data that cannot be shared due to privacy concerns. Federated Learning (FL) offers a promising solution for collaborative training without direct data sharing. However, many parameter-efficient fine-tuning strategies for LLMs in FL, particularly those based on Low-Rank Adaptation (LoRA), face limitations. In this paper, we critically analyze the convergence and performance guarantees of popular FL frameworks utilizing LoRA, highlighting its suboptimal nature due to constrained subspace learning of low-rank matrices. This limitation hinders effective fine-tuning of LLMs in federated settings. Through rigorous analytical and empirical evaluations, we demonstrate that direct weight averaging outperforms LoRA-based strategies, leading to superior performance for fine-tuned models. Our comprehensive comparison unmasks inefficiencies in LoRA approaches and underscores the advantages of direct weight aggregation. We extend our analysis to low-rank gradient-based optimizers, such as GaLore, used during local training steps. Our findings show that GaLore along with direct-weight aggregation is a more effective approach, outperforming federated LoRA methods like FlexLoRA and FFA-LoRA across both text and image modalities. While privacy remains paramount in FL discourse, our focus is on assessing performance outcomes of federated fine-tuned models and evaluating various FL frameworks from both theoretical and empirical perspectives. Our findings advocate reassessing the reliance on LoRA within FL contexts, paving the way for more efficient training methodologies.

Introduction

Fine-tuning Large Language Models (LLMs) on private, distributed data is a primary use case for Federated Learning (FL). To manage massive memory requirements, researchers typically employ Parameter-Efficient Fine-Tuning (PEFT) methods like Low-Rank Adaptation (LoRA). However, this research identifies a fundamental flaw: LoRA's fixed low-rank structure is too restrictive for the heterogeneous (non-IID) data found in real-world distributed environments.

When different clients learn distinct features, their local low-rank updates occupy different mathematical subspaces. Upon aggregation at a central server, the resulting "rank" of the combined update is naturally higher than what a single LoRA adapter can represent—a phenomenon termed "rank inflation." Existing state-of-the-art methods like FlexLoRA attempt to compress this back down using Singular Value Decomposition (SVD), but this creates a lossy bottleneck that discards vital learned information, leading to suboptimal performance and training instability.

Methods: The FedFTG Framework

To address these bottlenecks, we introduce FedFTG (Federated Fine Tuning using GaLore). The core innovation is moving away from external adapters and instead performing direct weight averaging on the model's original parameters. To maintain memory efficiency, FedFTG utilizes two key strategies:

  1. Selective Layer Tuning: Based on Joint Matrix Approximation (JoMA) theory, we fine-tune only the lower MLP layers (specifically the up-proj layer) of the Transformer. These layers effectively capture the necessary information from the entire block.
  2. GaLore Optimizer: Instead of constraining weights to be low-rank, we use the GaLore (Gradient Low-Rank Projection) optimizer. GaLore projects gradients into a low-rank subspace during local updates, significantly reducing the memory footprint of optimizer states without permanently locking the model weights into a narrow subspace.
Architecture of FedFTG showing selective layer tuning and global weight aggregation.

Theoretically, this approach results in linear excess risk bounds, whereas popular LoRA-based FL methods like FFA-LoRA suffer from quadratic bounds, explaining why the latter often diverge or plateau as communication rounds increase.

Experimental Evaluation

We evaluated FedFTG across multiple modalities and models, including Gemma-2B and TinyLlama for text (MedQuAD and Dolly-15k datasets) and SigLIP for vision (Brain Tumour MRI classification). To simulate difficult real-world conditions, we used Dirichlet Allocation ($\alpha = 0.1$) to ensure highly skewed, non-IID label distributions across clients.

Key Results

FedFTG consistently outperformed SOTA methods across all benchmarks:

  • Vision Accuracy: In 4-client vision tasks, FedFTG achieved an F1 score of 0.843, nearly doubling FlexLoRA’s 0.4868.
  • Language Modeling: On the MedQuAD dataset with TinyLlama, FedFTG reached a ROUGE-L of 0.6994, surpassing FlexLoRA (0.6816) and significantly outperforming FFA-LoRA (0.3047).
Comparison of ROUGE_L F1 scores across aggregation steps, highlighting the stability of FedFTG versus the performance dips in FlexLoRA.

Qualitative analysis reveals that while LoRA-based methods suffer from performance "dips" or plateaus during aggregation—likely due to the lossy compression of rank-inflated updates—FedFTG maintains a stable, upward trajectory. This confirms that the gradient subspace is a more effective locus for enforcing low-rank constraints than the weight subspace in federated contexts.

Conclusion

Our findings advocate for a reassessment of LoRA's dominance in Federated Learning. By utilizing gradient-based low-rank optimization (GaLore) and direct weight aggregation, FedFTG overcomes the "rank inflation" bottleneck, providing superior stability and performance. While direct weight averaging increases communication overhead compared to tiny adapters, the gains in model quality suggest that future research should focus on bridging this gap through advanced quantization and adaptive aggregation strategies.

Summary updated

BibTeX
@misc{mahla2024why,
  author = {Navyansh Mahla and Ganesh Ramakrishnan},
  title = {{Why Gradient Subspace? Identifying and Mitigating LoRA's Bottlenecks in Federated Fine-Tuning of Large Language Models}},
  year = {2024},
  eprint = {2410.23111},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.23111},
}
Figure