Abstract
Federated Low-Rank Adaptation (FedLoRA) is a powerful tool for fine-tuning Large Language Models (LLMs) across distributed, private data. However, it suffers from a fundamental mathematical flaw: simple averaging of low-rank matrices leads to "aggregation errors" that degrade global model performance. We introduce FLoRA-NA, a method that employs a lightweight optimization step on the server to reconstruct a nearly accurate global model. FLoRA-NA bridges the generalization gap without adding communication overhead. Our evaluation across NLU, mathematical reasoning, and code-solving benchmarks demonstrates that FLoRA-NA consistently outperforms existing baselines, maintaining high global accuracy even in heterogeneous settings.
Introduction
Fine-tuning LLMs on decentralized data—such as private business documents or user device interactions—is a major frontier in AI. Federated Learning (FL) enables this without moving raw data, and Low-Rank Adaptation (LoRA) makes it computationally feasible by updating two small matrices ($A$ and $B$) instead of billions of parameters.
However, combining these techniques reveals a "math gap." In standard FL, weights are averaged. In LoRA, the weight update is the product $BA$. Mathematically, the product of averages is not equal to the average of products: $$\left(\frac{1}{U}\sum B_u\right) \left(\frac{1}{U}\sum A_u\right) \neq \frac{1}{U}\sum (B_u A_u)$$ This discrepancy, termed aggregation error, causes the global model to perform significantly worse than local models—a phenomenon known as the "local-global generalization gap." Existing solutions often require excessive communication or sacrifice global performance for local personalization.
Methods: FLoRA-NA
We propose Federated Low-Rank Aggregation with Nearly Accurate Estimation (FLoRA-NA). Instead of simple averaging, the server performs a "Nearly Accurate Aggregation" step:
- Optimization: The server identifies two sets of coefficients, $P$ and $Q$ (vectors of size $U$, where $U$ is the number of clients).
- Surrogate Construction: Global matrices are constructed as weighted linear combinations: $\bar{B} = \sum P_u B_u$ and $\bar{A} = \sum Q_u A_u$.
- Objective Function: The server solves a small optimization problem to find $P$ and $Q$ that minimize the Frobenius norm of the difference between the surrogate product ($\bar{B}\bar{A}$) and the ideal average product ($\frac{1}{U}\sum B_u A_u$).
This approach is computationally efficient because optimization occurs over small coefficient vectors rather than massive weight matrices. It requires no additional data from clients and is compatible with LoRA variants like DoRA and HiRA.
Key Results
FLoRA-NA was evaluated across the GLUE benchmark (NLU), MetaMathQA (reasoning), and CodeFeedback (coding) using models like LLaMA-2-7B and Mistral-7B.
Closing the Generalization Gap
On the MNLI dataset, FLoRA-NA significantly reduced the generalization gap. While vanilla FedIT showed a global accuracy of ~71%, FLoRA-NA achieved ~81%, nearly matching local performance.
Performance and Efficiency
- State-of-the-Art: FLoRA-NA consistently outperformed baselines like FedIT, FedSA-LoRA, and FedEx-LoRA.
- Communication Efficiency: The method maintains the low communication cost of vanilla FedLoRA (e.g., ~0.78M parameters per round for RoBERTa-large).
- Scalability: FLoRA-NA proved stable as the number of clients scaled from 10 to 100, even under high data heterogeneity (non-IID settings).
Conclusion
FLoRA-NA demonstrates that bandwidth isn't the only way to fix FedLoRA; smarter aggregation can recover "lost" mathematical precision. By treating aggregation as an estimation problem, FLoRA-NA provides a robust global model that generalizes well to new data, bridging the gap between local and global performance in federated LLM fine-tuning.
Summary updated