MLLab Logo ACL Logo

Towards Robust and Efficient Federated
Low-Rank Adaptation with Heterogeneous Clients

{1 Department of Computer Science and Engineering, 2 Graduate School of Artificial Intelligence}
POSTECH, South Korea

*Equal Contribution   Corresponding Author

ACL 2025 (Main, Long)
Teaser image

LoRA-A2 comprises two key components: Alternating freeze and Adaptive rank selection.

Abstract

Federated fine-tuning for Large Language Models (LLMs) has recently gained attention due to the heavy communication overhead of transmitting large model updates. Low Rank Adaptation (LoRA) has been proposed as a solution, yet its application in federated learning is complicated by discordance in aggregation. Existing methods addressing this discordance often suffer from performance degradation at low ranks in heterogeneous data settings. In response, we introduce LoRA-A2 (Low Rank Adaptation with Alternating freeze and Adaptive rank selection), which demonstrates robustness in challenging settings with low ranks and high data heterogeneity. Our experimental findings reveal that LoRA-A2 maintains performance even under extreme heterogeneity and low rank conditions, achieving up to a 99.8% reduction in uploaded parameters compared to full fine-tuning without compromising performance. This adaptive mechanism boosts robustness and communication efficiency in federated fine-tuning, enabling the practical deployment of LLMs in resource-constrained environments.

Discordance Problem in Federated LoRA

LoRA approximates the fine-tuned weight as \( W = W_0 + \Delta W = W_0 + BA \), where \( W_0 \) is the frozen pre-trained matrix, and \( B \in \mathbb{R}^{d_1 \times r}, A \in \mathbb{R}^{r \times d_2} \) are low-rank matrices with rank \( r \ll \min\{d_1, d_2\} \). This reduces the number of trainable parameters from \( d_1 \cdot d_2 \) to \( r \cdot (d_1 + d_2) \), which benefits in both communication and computation efficiency in Federated Learning (FL).

However, due to the bilinear parametrization of LoRA, aggregating client updates \( ( \Delta W_k = B_kA_k \; \forall k \in [K] )\) leads to the discordance problem:

\[ \sum_{k=1}^K w_k B_k A_k \neq \left( \sum_{k=1}^K w_k B_k \right) \left( \sum_{k=1}^K w_k A_k \right), \]

where \( w_k \)'s are non-negative aggregation weights with \( \sum w_k = 1 \). This mismatch degrades performance, which has led to a growing body of research aimed at addressing this issue.

  • FFA-LoRA [Sun et al.] Let \( A_k = A_0 \) be frozen for all \( k \in [K] \), so that
    \[ \sum_{k=1}^K w_k B_k A_k = \left( \sum_{k=1}^K w_k B_k \right) A_0. \]
  • FlexLoRA [Bai et al.] Aggregate \( B_kA_k \) directly. Then, using SVD, decompose it back into
    \[ \sum_{k=1}^K w_k B_k A_k = BA. \]

Limited Parameter Space in LoRA

Method A

(a) \( Dir(0.1) \)

Method B

(b) \( Dir(0.01) \)

Figure 1: Accuracy of previous Federated LoRA methods across different rank sizes in heterogeneous data settings.

However, as shown in Figure 1, existing methods struggle to maintain performance, especially with low rank and high data heterogeneity. One possible explanation is that the parameter space available to these methods might be insufficient to accommodate diverse local updates. Our goal is to address the discordance problem while maintaining performance in such challenging settings.

Alternating Freeze

Instead of solely training module \( B \) while keeping module \( A \) frozen permanently, LoRA-A2 alternates between the two: LoRA module \( B \) is frozen during even rounds, while module \( A \) is frozen during odd rounds. This method preserves the optimization space while effectively resolving discordance. Specifically, when freezing \( A \), we have

\[ \Delta W = \sum_{k=1}^K \left( w_k B_k \right) A = \sum_{k=1}^K \left( w_k B_k A \right) = \sum_{k=1}^K \left( w_k B_k A_k \right) = \sum_{k=1}^K \left( w_k \Delta W_k \right), \]
and when freezing \( B \), we have
\[ \Delta W = \sum_{k=1}^K B \left( w_k A_k \right) = \sum_{k=1}^K \left( w_k B A_k \right) = \sum_{k=1}^K \left( w_k B_k A_k \right) = \sum_{k=1}^K \left( w_k \Delta W_k \right). \]
In this way, LoRA-A2 trains both \( B \) and \( A \), ensuring that \( A \) does not remain the same as its initial value. (Note: Since the standard convention of LoRA initializes \( B \) to zero, we first train \( B \). However, if a different initialization scheme is used, training \( A \) first could also be a reasonable choice.)

Adaptive Rank Selection

LoRA-A2 selects important LoRA ranks to match local communication rank budget \( r_i \) out of global LoRA adapter with rank \( r_G \) adaptively based on the local dataset. This approach provides two key benefits:

  • It minimizes client conflicts by allowing different clients to choose different LoRA ranks in high heterogeneity.
  • It reallocates rank resources from unimportant LoRA modules to modules that require more fine-tuning, which is especially effective when communication rank budget is small.

Figure 2 below shows the number of selected ranks per module for three clients in a pathological data distribution setting. In this setup, clients 0 and 1 are assigned the "medical" and "space" classes respectively, while client 2 is assigned "motorcycle" and "religions" classes from the 20 Newsgroups dataset. This indicates that clients with semantically related data tend to converge on similar rank subspaces, potentially enabling more effective cooperative training. Meanwhile, clients with divergent data distributions select distinct ranks, leading to more independent updates. In addition, we observe that most modules are assigned zero ranks across clients. This suggests that our adaptive mechanism effectively prunes out modules that do not benefit from fine-tuning. Please refer to Sections 4.2 and 4.3 for the detailed methodology of our rank selection mechanism.

ars_client_0

(a) Client 0

ars_client_1

(b) Client 1

ars_client_2

(c) Client 2

Figure 2: Visualization on number of selected rank per module. The x-axis shows RoBERTa module types, while the y-axis indicates layer numbers. Experimented on the 20 Newsgroups dataset with a pathological data distribution. Average 2 ranks were selected out of 16 ranks by our adaptive rank selection algorithm.

Experimental Results

LoRA Rank Method BANKING77 Dataset 20 Newsgroups Dataset Communicated
Parameters*
Dir(0.5)Dir(0.1)Dir(0.01) Dir(0.5)Dir(0.1)Dir(0.01)
w/o LoRA FL (w/o LoRA) 92.76 ± 0.30 90.29 ± 0.73 67.58 ± 0.44 70.93 ± 1.04 68.82 ± 0.69 64.41 ± 0.30 186B
Rank = 8FL + LoRA 92.80 ± 0.2490.47 ± 0.5360.96 ± 1.4770.44 ± 0.2867.33 ± 0.1843.90 ± 1.081.99B
FFA-LoRA 87.20 ± 0.5777.44 ± 1.2840.88 ± 1.0467.00 ± 0.6761.27 ± 0.7137.34 ± 0.300.991B
FlexLoRA 93.35 ± 0.2492.14 ± 0.2569.84 ± 0.6570.59 ± 0.2268.10 ± 0.3860.41 ± 1.541.99B
Ours 93.24 ± 0.2791.61 ± 0.3970.13 ± 1.2270.26 ± 0.2167.12 ± 0.2254.50 ± 1.441.31B
Rank = 4FL + LoRA 92.86 ± 0.0888.11 ± 0.8854.99 ± 0.5970.33 ± 0.1267.29 ± 0.1943.12 ± 2.670.991B
FFA-LoRA 86.90 ± 1.1476.38 ± 0.6137.63 ± 0.8067.75 ± 0.4561.25 ± 0.2636.04 ± 0.800.497B
FlexLoRA 92.71 ± 0.3190.53 ± 0.7057.38 ± 1.3070.05 ± 0.1468.00 ± 0.3350.50 ± 2.090.991B
Ours 93.22 ± 0.2491.43 ± 0.6369.63 ± 1.5270.28 ± 0.3267.12 ± 0.6053.04 ± 1.680.888B
Rank = 2FL + LoRA 91.97 ± 0.4385.59 ± 1.1349.08 ± 0.5670.14 ± 0.1365.40 ± 0.3139.07 ± 2.230.497B
FFA-LoRA 84.65 ± 1.0573.44 ± 0.8834.44 ± 2.1568.12 ± 0.4761.57 ± 0.3836.65 ± 0.520.249B
FlexLoRA 92.22 ± 0.5087.31 ± 0.2755.24 ± 2.1970.03 ± 0.3166.17 ± 1.7048.23 ± 1.730.497B
Ours 93.10 ± 0.0792.02 ± 0.3669.40 ± 0.4870.12 ± 0.1867.02 ± 0.2652.99 ± 2.560.528B
Rank = 1FL + LoRA 90.61 ± 0.1082.24 ± 1.6845.78 ± 1.0469.40 ± 0.3363.16 ± 0.5336.58 ± 0.980.249B
FFA-LoRA 82.51 ± 0.5372.96 ± 0.5433.68 ± 0.2067.73 ± 0.3061.35 ± 0.2234.44 ± 0.680.124B
FlexLoRA 90.40 ± 0.5482.20 ± 0.7442.75 ± 0.8969.53 ± 0.2562.98 ± 1.1235.54 ± 0.680.249B
Ours 93.21 ± 0.1391.87 ± 0.3368.88 ± 1.1570.31 ± 0.2466.95 ± 0.0754.84 ± 1.150.270B

Table: Results with RoBERTa-base on BANKING77 and 20 Newsgroups datasets. Smaller \( \alpha \) for \( Dir(\alpha) \) implies that the simulated setting is more heterogeneous. The best results on each dataset are shown in bold and second best in underline. The metric used here is accuracy (%). *This column reports the total number of uploaded parameters, averaged across rows.

BibTeX

@misc{koo2024robustefficientfederatedlowrank,
        title={Towards Robust and Efficient Federated Low-Rank Adaptation with Heterogeneous Clients}, 
        author={Jabin Koo and Minwoo Jang and Jungseul Ok},
        year={2024},
        eprint={2410.22815},
        archivePrefix={arXiv},
        primaryClass={cs.LG},
        url={https://arxiv.org/abs/2410.22815}, 
  }