Ferret: Federated Full-Parameter Tuning at Scale for Large Language Models

## Abstract

Abstract Large Language Models (LLMs) have become indispensable in numerous real-world applications. Unfortunately, fine-tuning these models at scale, especially in federated settings where data privacy and communication efficiency are critical, presents significant challenges. Existing methods often resort to parameter-efficient fine-tuning (PEFT) to mitigate communication overhead, but this typically comes at the cost of model accuracy. To address these limitations, we propose federated full-parameter tuning at scale for LLMs (Ferret), the first first-order method with shared randomness to enable scalable full-parameter tuning of LLMs across decentralized data sources while maintaining competitive model accuracy. Ferret accomplishes this through three aspects: (1) it employs widely applied first-order methods for efficient local updates; (2) it projects these updates into a low-dimensional space to considerably reduce communication overhead; and (3) it reconstructs local updates from this low-dimensional space with shared randomness to facilitate effective full-parameter global aggregation, ensuring fast convergence and competitive final performance. Our rigorous theoretical analyses and insights along with extensive experiments, show that Ferret significantly enhances the scalability of existing federated full-parameter tuning approaches by achieving high computational efficiency, reduced communication overhead, and fast convergence, all while maintaining competitive model accuracy. Our implementation is available at https://github.com/allen4747/Ferret .

## 1 Introduction

Recently, Large Language Models (LLMs) have become indispensable tools across a wide range of real-world applications, from natural language processing tasks like translation [] and summarization [] to more complex tasks such as code generation [] and decision-making systems []. The immense scale and versatility of LLMs make them highly valuable in practice, but they also introduce significant challenges, particularly when they are fine-tuned in federated settings. Federated Learning (FL) offers a decentralized approach to fine-tuning LLMs while retaining data on local clients to ensure privacy. However, while this approach effectively addresses privacy concerns, it also results in prohibitive communication overhead when the model parameters of LLMs scale to billions.

One of the straightforward strategies to mitigate the prohibitive communication costs in the federated tuning of LLMs is parameter-efficient fine-tuning (PEFT). PEFT methods [, ] focus on fine-tuning only a subset of model parameters, which is able to significantly reduce the communication overhead between clients and a central server [, , , ]. Despite the effectiveness in reducing bandwidth usage, this type of approach often compromises model accuracy [], as fine-tuning a subset of model parameters may fail to fully capture the nuances of local data distributions. Thus, recent efforts, e.g., FedKSeed [], have been devoted to utilizing zeroth-order optimization (ZOO) [, ] in federated full-parameter tuning of LLMs, aiming to maintain competitive model accuracy while reducing the communication overhead by transmitting only thousands of scalar gradients per round between clients and a central server. Unfortunately, this approach often suffers from its poor scalability, including increased computational cost per round and a larger number of communication rounds required for convergence, compared to FL methods that use first-order optimization (FOO), e.g., FedAvg [].

To this end, we propose federated full-parameter tuning at scale for LLMs (Ferret), the first first-order FL method with shared randomness to enable scalable federated full-parameter tuning of LLMs with compelling computational efficiency, reduced communication overhead, and fast convergence speed, all while maintaining competitive model accuracy. Ferret achieves this through three aspects: First, it employs widely applied first-order methods to perform computationally efficient local updates on each client, which typically requires fewer iterations to achieve the same local update process compared to existing ZOO-based FL. Next, Ferret projects these updates into a low-dimensional space, leading to a significantly reduced communication cost compared to existing FOO-based FL. Finally, Ferret reconstructs local updates from the low-dimensional space with shared randomness for effective full-parameter global aggregation, ensuring fast convergence and competitive model accuracy compared to existing ZOO-based FL. We further complement Ferret with rigorous theoretical analyses and principled insights, showing the theoretical advantages of Ferret over other baselines and guiding the best practices for its implementation. Finally, through extensive experiments, we verify that Ferret significantly outperforms existing methods with superior scalability and competitive model accuracy, making it a desirable solution for deploying LLMs in large-scale federated environments.

To summarize, our contributions in this work include:

- •
We propose Ferret, the first first-order FL approach with shared randomness (to the best of our knowledge), which significantly enhances the scalability of federated full-parameter tuning of LLMs
while maintaining competitive model accuracy.
- •
We present rigorous theoretical analyses and insights to support the effectiveness of our Ferret, demonstrating its theoretical advantages over other baselines and guiding its best practices.
- •
Through extensive experiments, we demonstrate that Ferret consistently improves over existing methods in practice, offering both superior scalability and competitive model accuracy.

## 2 Problem Setup

In this paper, we consider the federated full-parameter tuning of an LLM using decentralized data $\{{\mathcal{D}}_{i}\}_{i=1}^{\smash{N}}$ on $N$ local clients while preserving data privacy, i.e., without sharing raw data. Specifically, we aim to minimize a global objective ${\mathcal{L}}({\mathbf{w}})$ defined as the average loss across $\{{\mathcal{D}}_{i}\}_{i=1}^{\smash{N}}$ over the model parameters ${\mathbf{w}}\in{\mathbb{R}}^{\smash{d}}$ of an LLM. That is,

$$ $\min_{{\mathbf{w}}}{\mathcal{L}}({\mathbf{w}})\triangleq\frac{1}{N}\sum_{i\in[ N]}{\mathcal{L}}^{(i)}({\mathbf{w}})\quad\text{where}\quad{\mathcal{L}}^{(i)}( {\mathbf{w}})\triangleq\mathbb{E}_{{\mathbf{x}}^{(i)}\in{\mathcal{D}}_{i}} \left[\ell({\mathbf{w}};{\mathbf{x}}^{(i)})\right]\ .$ (1) $$

Following the practice in federated learning (FL), (1) can be solved through multiple rounds of local training and global aggregation. In each communication round, each client $i$ independently updates its local model parameters by minimizing its local objective ${\mathcal{L}}^{\smash{(i)}}({\mathbf{w}})$ based on its local data ${\mathcal{D}}_{i}$. After local training, the clients transmit their updated local model parameters to a central server, where they are aggregated to form an updated global model. This updated global model is then redistributed to all clients, and the process is repeated over rounds.

The main challenge in LLM federated full-parameter tuning is to ensure the computational efficiency and the convergence speed of the global model while reducing the communication overheads, particularly given that the parameter size $d$ of LLMs often reaches billions. While existing first-order FL [, , ] can ensure compelling computational efficiency and convergence speed by applying first-order updates, they typically incur ${\mathcal{O}}(d)$ communication overheads due to the need to transmit the entire set of model parameters between clients and the central server. This type of methods hence is impractical for LLM federated full-parameter tuning due to the enormous size of LLMs. In contrast, although zeroth-order FL [] can reduce these communication costs by transmitting only several scalar gradients from their finite difference-based gradient estimation with shared randomness, they often incur more computational cost to achieve the same local update progress and a larger number of communication rounds to converge compared with first-order FL. These naturally raise the question:
Can we combine the strengths of these methods to achieve scalable federated full-parameter tuning of LLMs with high computational efficiency, reduced communication overhead, and fast convergence?

Figure: Algorithm 1 Federated Full-Parameter Tuning at Scale for LLMs (Ferret)

## 3 The Ferret Algorithm

To answer it, we introduce Ferret, federated full-parameter tuning at scale for LLMs, in Algo. 1. We present an overview of our Ferret algorithm in Sec.3.1, followed by a detailed explanation of the key techniques in Ferret in Sec. 3.2.

### 3.1 Overview of Ferret

To achieve scalable LLM federated full-parameter tuning, our Ferret algorithm combines the strengths of both first-order FL, which offers efficient computation and fast convergence, and zeroth-order FL, which reduces communication overhead. Specifically, Ferret (a) follows first-order FL to apply first-order optimization methods for local updates on clients, ensuring both computational efficiency and fast convergence, and (b) draws inspiration from zeroth-order FL by projecting updates into a low-dimensional space using random bases that can be regenerated using shared randomness among clients for the reconstruction of these updates, thereby reducing communication overhead.

Our Ferret algorithm operates by repeating the following three sequential steps over many communication rounds, denoted by $r\in[R]$, where $R$ is the total number of rounds. For simplicity, we omit the subscript $r$ from the seeds, random bases, and projected coordinates in our notation.

Step 1: Global Aggregation (Line 3-5 in Algo. 1).
At the beginning of the first round ($r=1$), each client initializes its local model parameters using the pre-trained model parameters ${\mathbf{w}}_{0}$, i.e., ${\mathbf{w}}_{1}\leftarrow{\mathbf{w}}_{0}$. For subsequent rounds ($r>1$), each client $j\in[N]$ receives the random seeds $s^{\smash{(i)}}$ and the corresponding $K$ projected coordinates $\{\gamma_{k}^{\smash{(i)}}\}_{k=1}^{\smash{K}}$ of every client $i\in[N]$ from the previous round. These random seeds (i.e., shared randomness) are then used to generate $d$-dimensional random bases $\{{\mathbf{v}}_{k}^{\smash{(i)}}\}_{k=1}^{\smash{K}}$ for each client $i$. (^1^11Similar to the practice in [], we can obtain $K$ random seeds from a single seed $s^{\smash{(i)}}$ and employ these $K$ seeds to generate $K$ random bases independently for each client $i$. So, one seed is sufficient for each client.) These random bases, along with the corresponding projected coordinates $\{\gamma_{k}^{\smash{(i)}}\}_{k=1}^{\smash{K}}$, are applied to reconstruct local updates as $\widetilde{\Delta}_{r-1}^{\smash{(i)}}$ in every client $i$. The global model is then updated by aggregating these local contributions as follows:

$$ ${\mathbf{w}}_{r-1}\leftarrow{\mathbf{w}}_{r-2}-\frac{1}{N}\sum_{i\in[N]} \widetilde{\Delta}_{r-1}^{\smash{(i)}}\quad\text{where}\quad\widetilde{\Delta} _{r-1}^{\smash{(i)}}\triangleq\sum_{k\in[K]}\gamma_{k}^{(i)}{\mathbf{v}}_{k}^{ (i)}\ .$ (2) $$

Step 2: Local Updates (Line 6-8 in Algo. 1). After Step 1, each client $j$ will perform $T$-iteration first-order optimization on its local loss function by using the randomly sampled data for its local updates. Formally, if stochastic gradient descent with a local learning rate $\eta$ is used, the update rule for client $j\in[N]$ at iteration $t\in[T]$ of round $r\in[R]$ can then be represented as:

$$ ${\mathbf{w}}_{r,t}^{(j)}\leftarrow{\mathbf{w}}_{r,t-1}^{(j)}-\eta\nabla\ell \left({\mathbf{w}}_{r,t-1}^{(j)};{\mathbf{x}}_{t-1}^{(j)}\right)\quad\text{ where}\quad{\mathbf{w}}_{r,0}\leftarrow{\mathbf{w}}_{r}\ .$ (3) $$

Different from the zeroth-order update in [] that requires many local update iterations,
the first-order update in (3) enables each client to efficiently and effectively adapt the global model ${\mathbf{w}}_{r}$ to its specific data using a small $T$, thereby enhancing both the computational efficiency of this local update.
Here, (3) can be implemented using any gradient method variant, e.g., Adam [].

Step 3: Projected Updates (Line 9-11 in Algo. 1). After completing the local updates above, each client $j$ randomly chooses a single new seed $s^{(j)}$ to generate $K$ new random bases $\{{\mathbf{v}}_{k}^{\smash{(j)}}\}_{k=1}^{\smash{K}}$ and employ these $K$ new random bases to project the local update $\Delta^{\smash{(j)}}_{r}$ into a $K$-dimensional coordinates $\{\gamma_{k}^{\smash{(j)}}\}_{k=1}^{\smash{K}}$ based on the techniques in Sec. 3.2.
Seed $s^{\smash{(j)}}$ and projected coordinates $\{\gamma_{k}^{\smash{(j)}}\}_{k=1}^{\smash{K}}$ are then shared with other clients to facilitate the next round of global aggregation. By sharing only a single random seed and $K$ projected coordinates among $N$ clients where random bases $\{{\mathbf{v}}_{k}^{\smash{(j)}}\}_{k=1}^{\smash{K}}$ can be regenerated for global aggregation as shown in Step 1 above, the communication overhead in LLM full-parameter tuning is therefore considerably reduced compared with first-order methods (e.g., FedAvg) especially when $T\ll d$. Of note, the communication of this seed $s^{\smash{(j)}}$ can be mitigated if the same seed is used across all rounds $r\in[R]$, which can further reduce the communication overhead.

### 3.2 Update Projection and Reconstruction

As mentioned before, we aim to project the local updates into $K$-dimensional coordinates ($K\ll d$) to substantially reduce the communication overhead in LLM full-parameter tuning. To accomplish this, let $\Delta\in{\mathbb{R}}^{d}$ denote any local update, and let ${\mathbf{V}}=[{\mathbf{v}}_{1}\ {\mathbf{v}}_{2}\ \cdots\ {\mathbf{v}}_{K}]\in
{\mathbb{R}}^{d\times K}$ represent the $K$ random bases generated by any random seed $s$, we solve the following convex minimization problem to determine the $K$-dimensional projected coordinates ${\bm{\gamma}}=[\gamma_{1}\ \gamma_{2}\ \cdots\ \gamma_{K}]^{\top}$:

$$ ${\bm{\gamma}}\triangleq\operatorname*{arg\,min}_{{\mathbf{y}}}\left\|{\mathbf{ V}}{\mathbf{y}}-\Delta\right\|\ .$ (4) $$

As ${\mathbf{V}}$ is singular with $K\ll d$, the close-form of ${\bm{\gamma}}$ and its corresponding reconstruction $\widetilde{\Delta}$ will be

$$ ${\bm{\gamma}}=({\mathbf{V}}^{\top}{\mathbf{V}})^{-1}{\mathbf{V}}^{\top}\Delta, \quad\widetilde{\Delta}={\mathbf{V}}({\mathbf{V}}^{\top}{\mathbf{V}})^{-1}{ \mathbf{V}}^{\top}\Delta\ .$ (5) $$

Choice of Random Bases ${\mathbf{V}}$. Particularly, if ${\mathbf{V}}$ is a rectangular matrix with ones on its main diagonal, meaning that each ${\mathbf{v}}_{k}$ is a standard basis vector, (5) simplifies to ${\bm{\gamma}}={\mathbf{V}}^{\top}\Delta$, which then corresponds to a block-wise dimension selection for local update projection and reconstruction. However, this approach significantly reduces the number of parameters updated per round as $K\ll d$, potentially hindering the overall tuning performance. We thus propose to sample each element in ${\mathbf{v}}_{k}\ (k\in[K])$ independently from a normal distribution with bounded 2-norm, i.e., $\left\|{\mathbf{v}}_{k}\right\|\leq 1$, aiming to realize and stabilize full-parameter tuning of LLMs for competitive overall performance. To achieve this, we can
sample from a truncated normal distribution: ${\textnormal{v}}\sim{\mathcal{N}}(0,1)$ with ${\textnormal{v}}\in[-1/\sqrt{d},1/\sqrt{d}]$ instead.
The efficacy of this bounded norm will be demonstrated in Sec. 4.1.

Reconstruction w/o Inversion.
Unfortunately,
(5) incurs a computational complexity of ${\mathcal{O}}(K^{2}d+K^{3})$ and
storage complexity of ${\mathcal{O}}(Kd)$ owing to the inversion of ${\mathbf{V}}^{\top}{\mathbf{V}}$ in (5), which is prohibitively costly, especially when $K$ is large and $d$ reaches billions. Since ${\mathbf{V}}^{\top}{\mathbf{V}}$ is a scaled empirical covariance for the aforementioned distribution of an identity covariance matrix []
, we propose to approximate ${\mathbf{V}}^{\top}{\mathbf{V}}$ with ${\mathbf{I}}_{K}$ (i.e., $K\times K$-dimensional identity matrix) and (5) as

$$ ${\bm{\gamma}}\approx(\rho K)^{-1}{\mathbf{V}}^{\top}\Delta\ .$ (6) $$

Here, $\rho\triangleq 1-\frac{2\psi(1/\sqrt{d})/\sqrt{d}}{2\Phi(1/\sqrt{d})-1}$, where $\psi(\frac{1}{\sqrt{d}})$ and $\Phi(\frac{1}{\sqrt{d}})$ is the probability density function (PDF) and cumulative distribution function (CDF) of the standard normal distribution evaluated at $1/\sqrt{d}$, respectively.
This approximation leads to improved computational complexity of ${\mathcal{O}}(Kd)$ and storage complexity of ${\mathcal{O}}(\max\{K,d\})$, where the storage complexity is reduced due to the in-place operations on random bases $\{{\mathbf{v}}_{k}\}_{k=1}^{\smash{K}}$ when computing $\{\gamma_{k}\}_{k=1}^{\smash{K}}$ sequentially. Consequently, we can reconstruct the true update $\Delta$ approximately using $\widetilde{\Delta}$ below

$$ $\widetilde{\Delta}=(\rho K)^{-1}{\mathbf{V}}{\mathbf{V}}^{\top}\Delta\ ,$ (7) $$

whose efficacy will be theoretically justified in Sec. 4.1. Finally, our (6) and (7) simplify the update projection and reconstruction in (5) into straightforward matrix multiplications.

Block-Wise Reconstruction. The computational complexity of ${\mathcal{O}}(Kd)$ and storage complexity of ${\mathcal{O}}(\max\{K,d\})$ for our reconstruction in (7) is still prohibitively costly, particularly for LLMs with billions of parameters. To address this, we propose a block-wise reconstruction technique to reduce both computational and storage complexities. Specifically, suppose the full dimension $d$ is divided into $L$ blocks, each with dimension $d_{l}$ such that $\sum_{l\in[L]}d_{l}=d$. Let $\Delta_{l}$ be the update for block $l$ and $K_{l}$ (with $\sum_{l\in[L]}K_{l}=K$) be the number of random bases allocated to this block. We propose to compute ${\bm{\gamma}}_{l}$ and reconstruct $\Delta_{l}$ using random bases
${\mathbf{V}}_{l}$ of dimension $d_{l}\times K_{l}$ as follows:

$$ $\displaystyle{\bm{\gamma}}_{l}=(\rho_{l}K)^{-1}{\mathbf{V}}_{l}^{\top}\Delta_{ l},\quad\widetilde{\Delta}_{l}=(\rho_{l}K_{l})^{-1}{\mathbf{V}}_{l}{\mathbf{V} }_{l}^{\top}\Delta_{l}\ .$ (8) $$

Here, $\rho_{l}\triangleq 1-\frac{2\psi(1/\sqrt{d_{l}})/\sqrt{d_{l}}}{2\Phi(1/\sqrt{d
_{l}})-1}$.
This trick reduces the storage complexity to ${\mathcal{O}}(\max\{\{K_{l},d_{l}\}_{l=1}^{\smash{L}}\})$ that is straightforward to verify, and lowers the computational complexity to ${\mathcal{O}}(\sum_{l\in[L]}K_{l}d_{l})$.
Of note, (8) also significantly reduces the computational complexity of global aggregation compared to existing methods [] (verified in Sec. 5).
This block-wise reconstruction thus further enhances the scalability of our Ferret in the federated full-parameter tuning of LLMs.

## 4 Theoretical Analyses and Insights

We then provide theoretical analyses to substantiate the effectiveness of Ferret: (a) reconstruction analysis in Sec. 4.1; (b) convergence analysis in Sec. 4.2; and (c) scalability and beyond in Sec. 4.3.

### 4.1 Reconstruction Analysis

###### Theorem 1 (Unbiased Reconstruction) .

Given the reconstruction in (7), we have

$$ $\mathbb{E}\left[\widetilde{\Delta}\right]=\Delta\ .$ $$

To begin with, we demonstrate in Thm. 1 that our reconstruction in (7) is unbiased, with the proof provided in Appx. B.1. Of note, Thm. 1 shows that (a) the scalar $1/(\rho K)$ is crucial for (7) to achieve an unbiased reconstruction of the ground-truth update $\Delta$, and (b) our (7) avoids the bias commonly found in zeroth-order FL methods [], including FedZO [] and FedKSeed []. As a result, (7) is expected to provide a more accurate update reconstruction, which we will elaborate more below.

###### Theorem 2 (Reconstruction Error) .

Given the reconstruction in (7), we have

$$ $\mathbb{E}\left[\left\|\widetilde{\Delta}-\Delta\right\|\right]\leq\max\left\{ 2\sqrt{\frac{2\ln(2d)}{\rho K}},\frac{2\ln(2d)}{\rho K}\right\}\left\|\Delta \right\|\ .$ $$

We then demonstrate the efficacy of our reconstruction in (7) by theoretically bounding the difference between the reconstructed update $\widetilde{\Delta}$ and the ground truth $\Delta$ in Thm. 2. The proof is in Appx. B.2. Of note, $1/\rho$ typically has an asymptotic rate of ${\mathcal{O}}(d)$, which we will verify empirically in Appx. C.4.
Thm. 2 offers three critical insights of our Ferret: (a) Our reconstruction in (7) incurs a reconstruction error at a rate of $\widetilde{{\mathcal{O}}}(d/K)$ for $T$ local update iterations when $\sqrt{d}\geq K$, which generally aligns with the results in []. This indicates that the reconstruction error of our (7) can be linearly reduced by increasing $K$. (b) Ferret avoids additional constant error items [] that are caused by the biased estimation in these zeroth-order FL methods, implying that our (7) can be more accurate. We will justify this further in our Thm. 3 below. (c) Thanks to the independence from the iterations (i.e., $T$) of local updates in Thm. 2, Ferret prevents the error accumulation over the local update iterations $T$, which is a common issue in zeroth-order FL methods [, ].

###### Theorem 3 (Connection with Zeroth-Order Method) .

Define
$g_{k}\triangleq\frac{\ell({\mathbf{w}}+\epsilon{\mathbf{v}}_{k};{\mathbf{x}}^{
(i)})-\ell({\mathbf{w}};{\mathbf{x}}^{(i)})}{\epsilon}$ where each element v in ${\mathbf{v}}_{k}$ is sampled from ${\textnormal{v}}\sim{\mathcal{N}}(0,1)$ with ${\textnormal{v}}\in[-1/\sqrt{d},1/\sqrt{d}]$, ${\bm{g}}\triangleq[g_{1}\ \cdots\ g_{K}]^{\top}$, and ${\mathbf{V}}\triangleq[{\mathbf{v}}_{1}\ {\mathbf{v}}_{2}\ \cdots\ {\mathbf{v}
}_{K}]\in{\mathbb{R}}^{d\times K}$, assume $\ell(\cdot;\cdot)$ is $\beta$-smooth w.r.t its first argument, the zeroth-order reconstruction ${\mathbf{V}}{\bm{g}}/K$ used in [, ] then incurs:

$$ $\left\|\frac{1}{K}{\mathbf{V}}{\bm{g}}-\frac{1}{K}{\mathbf{V}}{\mathbf{V}}^{ \top}\nabla\ell({\mathbf{w}};{\mathbf{x}}^{(i)})\right\|\leq\frac{1}{2}\beta \epsilon\ .$ $$

We then show in Thm. 3 the connection between our update projection (6) and zeroth-order method used in [, ]. The proof is provided in Appx. B.3. Thm. 3 delivers three essential insights: (a) When ${\epsilon}\rightarrow 0$, the reconstruction ${\mathbf{V}}{\bm{g}}/K$ in zeroth-order method is equivalent to ${\mathbf{V}}{\mathbf{V}}^{\top}\nabla\ell({\mathbf{w}};{\mathbf{x}}^{(i)})/K$ and shares a similar form of (7) when $\Delta$ is replaced by $\nabla\ell({\mathbf{w}};{\mathbf{x}}^{\smash{(i)}})$, implying that zeroth-order method in fact aims to approximate our reconstruction (7). (b) In practice, $\epsilon>0$. So, zeroth-order method leads to a biased reconstruction with an additional error term of $\beta{\epsilon}/2$ compared to our (7), and this error will accumulate over $T$ local iterations, implying that our (7) can indeed be more accurate as we have demonstrated above. (c) In addition, zeroth-order method is typically coupled with a single gradient (i.e., $\nabla\ell({\mathbf{w}};{\mathbf{x}}^{\smash{(i)}})$), whereas our (7) can be applied to any vector, making it more general. Overall, these results further verify the advantages of our (7) over the zeroth-order method used in [, ], which we will also support empirically in Appx. C.4.

###### Proposition 1 (Block-Wise Reconstruction Speedup) .

For block-wise reconstruction (8) of size $L$,

$$ $\displaystyle\sum_{l\in[L]}d_{l}K_{l}<\Bigg{(}\sum_{l\in[L]}d_{l}\Bigg{)}\Bigg {(}\sum_{l\in[L]}K_{l}\Bigg{)}=dK\ .$ $$

We next highlight the computational advantage of our block-wise reconstruction (8) in Prop. 1. The proof is in Appx. B.4. Prop. 1 indicates that by dividing the reconstruction of $d$-dimensional updates into smaller blocks $\{d_{l}\}_{l=1}^{L}$, we get a reduction in overall computational complexity that is strictly less than that of the full dimension $d$ in (7). E.g., when $d_{1}=\cdots=d_{L}$ and $K_{1}=\cdots=K_{L}$, we have $\sum_{l\in[L]}K_{l}d_{l}=Kd/L$, showing that our block-wise reconstruction (8) reduces the computational complexity of (7) by a factor of $1/L$. This implies that increasing the number of blocks $L$ can further enhance the computational efficiency of our block-wise reconstruction (8).

###### Proposition 2 (Block-Wise Reconstruction Error) .

For block-wise reconstruction (8) of size $L$, when $\sqrt{d_{l}}\geq K_{l}$ for any $l\in[L]$,

$$ $\displaystyle\mathbb{E}\left[\left\|\widetilde{\Delta}-\Delta\right\|\right]< \widetilde{{\mathcal{O}}}\Bigg{(}\sum_{l\in[L]}\frac{\left\|\Delta_{l}\right\| }{\rho_{l}K_{l}}\Bigg{)}\ ,$ $$

which is minimized by choosing
$K_{l}\propto\sqrt{\left\|\Delta_{l}\right\|/\rho_{l}}$.

We conclude by analyzing the error induced by our block-wise reconstruction (8) and the corresponding optimal random bases allocation in Prop. 2. The proof is provided in Appx. B.5. Prop. 2 demonstrates that reconstruction error can be minimized by adaptively allocating the number of random bases according to the gradient norm of each block. This is intuitively reasonable because a larger gradient norm typically indicates a need for more immediate model updates in practice. Hence, this insight not only provides a theoretical foundation for optimizing Ferret but also offers practical guidance. That is, by aligning the number of random bases with gradient norms, practitioners can enhance reconstruction accuracy and overall model performance. This adaptive approach ensures efficient use of computational resources, making Ferret versatile and effective across different datasets and federated learning scenarios.

###### Theorem 1 (Unbiased Reconstruction) .

###### Theorem 2 (Reconstruction Error) .

###### Theorem 3 (Connection with Zeroth-Order Method) .

###### Proposition 1 (Block-Wise Reconstruction Speedup) .

###### Proposition 2 (Block-Wise Reconstruction Error) .

### 4.2 Convergence Analysis

In this subsection, we present the convergence of Ferret in our Thm. 4 below when using stochastic gradient descent (SGD) for the local updates in (3). To simplify the analysis, we primarily focus on deriving theoretical results for a homogeneous setting, where ${\mathcal{L}}^{\smash{(i)}}({\mathbf{w}})={\mathcal{L}}({\mathbf{w}})$ in (1). Results in the heterogeneous setting can be derived by following the same proof idea.

###### Theorem 4 (Convergence) .

Define $D\triangleq{\mathcal{L}}({\mathbf{w}}_{0})-\min_{{\mathbf{w}}}{\mathcal{L}}({
\mathbf{w}})$. Assume that ${\mathcal{L}}({\mathbf{w}})$ is $\beta$-smooth and non-convex, and $\mathbb{E}[\|\nabla{\mathcal{L}}^{\smash{(i)}}({\mathbf{w}})-\ell({\mathbf{w}}
;{\mathbf{x}})\|^{2}]\leq\sigma^{2}$ for any ${\mathbf{x}},{\mathbf{w}}$, when choosing $\eta\leq\frac{1}{20\beta T}$ in Algo. 1, the following holds for federated full-parameter tuning with ${\mathcal{L}}^{\smash{(i)}}({\mathbf{w}})={\mathcal{L}}({\mathbf{w}})$,

$$ $\min_{r\in[R)}\mathbb{E}\left[\left\|\nabla{\mathcal{L}}({\mathbf{w}}_{r}) \right\|^{2}\right]\leq{\mathcal{O}}\left(\frac{D}{\eta TR}+\eta T\sigma^{2} \right)\ .$ $$

Especially, by choosing $\eta=\frac{1}{20\beta T\sqrt{R}}$ in Algo. 1, the number of communication rounds are required to be $R={\mathcal{O}}(1/{\epsilon}^{2})$ to achieve an ${\epsilon}$ convergence error.

Its proof is in Appx. B.6. Particularly, when $T=1$, Thm. 4 recovers the result of standard SGD []. Thm. 4 provides three essential insights: (a) Thanks to our improved update reconstruction (7) as justified above, Ferret avoids the additional constant terms accumulated over $T$ local iterations, which are typically caused by the biased gradient estimation in zeroth-order FL methods (e.g., FedZO and FedKSeed) [], thereby highlighting the superior advantage of Ferret over these zeroth-order FL methods in convergence speed. (b) Given a proper $\eta$, Ferret shares the same communication round complexity as SGD, at a rate of ${\mathcal{O}}(1/\epsilon^{\smash{2}})$, showing that the communication round complexity of Ferret is asymptotically comparable to that of standard SGD. (c) This communication rounds complexity is improved over that of zeroth-order FL methods [] due to its independence from $d$ and other constant factors required by these zeroth-order FL methods, further highlighting the advantage of Ferret in communication round complexity and its improved efficacy in federated full-parameter tuning over these methods.

###### Theorem 4 (Convergence) .

### 4.3 Scalability and Beyond

**Table 1: Comparison of scalability (computation and communication per round, and $\#$rounds to converge) and other factors (adaptivity, generalization, and privacy). Here, $d\gg K\gg T$. Symbols: $\circ$ (fewer is better), $\heartsuit$ and $\diamond$ (more is better).**
| Method | Type | Scalability | Others |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Comp. | Comm. | $\#$Rounds | Adapt. | Gen. | Privacy |  |  |
| FedZO [] | ZOO | ${\mathcal{O}}(\tau_{0}K)$ | ${\mathcal{O}}(d)$ | $\circ\circ\circ$ | $\sqrt{}$ | $\heartsuit\ \heartsuit\ \heartsuit$ | $\diamond\ \diamond$ |
| FedKSeed [] | ZOO | ${\mathcal{O}}(\tau_{0}K)$ | ${\mathcal{O}}(K)$ | $\circ\circ\circ$ | $\times$ | $\heartsuit\ \heartsuit\ \heartsuit$ | $\diamond\diamond\diamond$ |
| FedAvg [] | FOO | ${\mathcal{O}}(\tau_{1}T)$ | ${\mathcal{O}}(d)$ | $\circ$ | $\sqrt{}$ | $\heartsuit\ \heartsuit\ \heartsuit$ | $\diamond$ |
| Ferret (ours) | FOO | ${\mathcal{O}}(\tau_{1}T)$ | ${\mathcal{O}}(K)$ | $\circ\ \circ$ | $\sqrt{}$ | $\heartsuit\ \heartsuit\ \heartsuit$ | $\diamond\diamond\diamond$ |

With the theoretical results above, we summarize the scalability of Ferret and compare it to existing methods like zeroth-order FL (e.g., FedZO and FedKSeed) and first-order FL (e.g., FedAvg) in Tab. 1.

Computation Per Round. Of note, Ferret enjoys a computational complexity of ${\mathcal{O}}(\tau_{1}T)$ for any client $i\in[N]$ per round, where $\tau_{1}$ is the per-iteration complexity of the first-order update (including forward and backward passes) in (3), and $T$ is the number of local iterations. This is comparable to the well-established FedAvg. In contrast, both FedZO and FedKSeed incur a complexity of ${\mathcal{O}}(\tau_{0}K)$, with $\tau_{0}$ being the per-iteration complexity of the zeroth-order update (i.e., forward pass) and $K$ representing the number of forward passes. As first-order updates use more accurate gradients, $T$ will be smaller than $K$ (i.e., $T\ll K$) to attain the same local update progress. Although $\tau_{1}$ can be at most twice $\tau_{0}$, our Ferret is still more computationally efficient than FedZO and FedKSeed (see Sec. 5).

Communication Per Round. As only one seed and $K$ projected coordinates $\{\gamma_{k}^{(i)}\}_{k=1}^{\smash{K}}$ from a client $i\in[N]$ need to be transmitted per round in Algo. 1 with $K\ll d$, Ferret incurs a communication overhead of ${\mathcal{O}}(K)$, which is similar to that of FedKSeed. This is significantly more efficient than FedAvg and FedZO, which have a communication complexity of ${\mathcal{O}}(d)$ due to their need to transmit the entire model (or gradients). This significantly reduced communication cost therefore makes Ferret especially suitable for federated full-parameter tuning of LLMs with billions of parameters.

Rounds to Converge. As revealed in Sec.4.2, our Ferret benefits from unbiased update reconstruction in (7) (validated in Thm. 1), enabling fast convergence with a small number of communication rounds to achieve $\epsilon$ convergence error (see Thm. 4). This is significantly more efficient than zeroth-order FL methods like FedZO and FedKSeed, which require many more communication rounds to converge due to poor gradient estimation []. FedAvg, applying the ground truth local update for its global aggregation, surely converges with the fewest rounds. Overall, Ferret remains a strong choice for federated full-parameter tuning of LLMs, even in terms of communication rounds to converge.

Beyond Scalability. Our Ferret also offers benefits in adaptability, generalization, and privacy. Unlike FedKSeed, which is limited to SGD, Ferret is highly adaptable, because both global aggregation (2) and local update (3) in Ferret can be implemented with any gradient method variant, e.g., the widely used AdamW [] in LLM training. This adaptability thus makes it much easier to integrate Ferret into existing centralized tuning workflows for LLMs, facilitating a seamless transition to federated tuning.
Besides, since Ferret enables federated tuning with full parameters, it is expected to deliver strong generalization performance as other federated full-parameter tuning methods like FedAvg, as supported in Sec. 5. Finally, by transmitting only seeds and low-dimensional projected coordinates among clients, rather than the entire model (or gradients) as in FedZO and FedAvg, Ferret ensures improved privacy, like FedKSeed, for federated full-parameter tuning of LLMs.

Overall, Ferret strikes an optimal balance between computational efficiency, communication overhead, convergence speed, and other critical factors such as adaptability, generalization, and privacy.
This makes it a highly scalable and desirable solution for federated full-parameter tuning of LLMs.

## 5 Experiments

In this section, we follow the practice in FedKSeed [] to evaluate the efficacy of Ferret algorithm. We primarily compare Ferret with other federated full-parameter tuning baselines, including those based on zeroth-order methods, such as FedZO [] and FedKSeed [], as well as those based on first-order methods, such as FedAvg []. The evaluations are conducted using DataJuicer-1.3B [] and LLaMA-3B [] models on the Natural Instructions [] and Dolly-15K [] datasets. Since our Ferret is guaranteed to converge faster than zeroth-order FL methods, as shown in Sec. 4.2, we only run Ferret for 12 communication rounds compared to 40 rounds in FedKSeed on Natural Instructions, and 20 rounds versus 60 in FedKSeed on Dolly-15K. For additional details, please refer to Appx. C.1.

**Table 2: Comparison of Rouge-L (%) among various algorithms. Each cell reports the mean $\pm$ std of Rouge-L scores from the final round of four runs, each using a different random seed.**
| Algorithm | Natural Instructions | Dolly-15K |  |  |
| --- | --- | --- | --- | --- |
| DataJuicer-1.3B | LLaMA-3B | DataJuicer-1.3B | LLaMA-3B |  |
| FedPTuning | 19.61 $\pm$ 2.71 | 25.41 $\pm$ 1.14 | 23.98 $\pm$ 3.23 | 30.30 $\pm$ 1.16 |
| FedPrompt | 6.04 $\pm$ 0.12 | 8.95 $\pm$ 2.47 | 32.73 $\pm$ 0.87 | 24.50 $\pm$ 4.78 |
| FedIT-SGD | 19.40 $\pm$ 1.83 | 28.14 $\pm$ 0.85 | 27.23 $\pm$ 0.68 | 29.28 $\pm$ 0.50 |
| FedIT | 22.30 $\pm$ 0.42 | 28.13 $\pm$ 0.50 | 30.80 $\pm$ 0.98 | 33.23 $\pm$ 1.51 |
| FedAvg | 22.08 $\pm$ 1.52 | 27.88 $\pm$ 0.75 | 32.30 $\pm$ 1.23 | 34.27 $\pm$ 0.45 |
| FedZO | 21.74 $\pm$ 1.91 | 29.46 $\pm$ 0.38 | 32.91 $\pm$ 0.67 | 36.34 $\pm$ 0.39 |
| FedKSeed | 22.33 $\pm$ 1.72 | 29.77 $\pm$ 0.75 | 32.90 $\pm$ 0.37 | 35.64 $\pm$ 0.83 |
| Ferret (ours) | 24.99 $\pm$ 0.99 | 30.03 $\pm$ 0.99 | 30.63 $\pm$ 0.84 | 34.57 $\pm$ 0.57 |

Comparison on Accuracy. We present the model accuracy achieved by different federated tuning methods in Tab. 1. The results show that federated full-parameter tuning methods (including FedAvg, FedZO, FedKSeed, and Ferret) generally achieve better model accuracy compared to PEFT-based federated tuning methods (such as FedPTuning, FedPrompt, FedIT-SGD, and FedIT), underscoring the importance of full-parameter tuning for LLMs. Additionally, the results in Tab. 1 demonstrate that our proposed method, Ferret, consistently delivers strong or competitive performance across four different scenarios. E.g., on the Natural Instructions dataset, Ferret outperforms all other methods for different model sizes, with up to a 2.66% improvement over the next best method, FedKSeed. On the Dolly-15K dataset, Ferret maintains competitive performance. These results thus demonstrate the ability of our Ferret to sustain strong model accuracy in practice.

**Table 3: Comparison of computational cost and communication overhead on LLaMA-3B, focusing on (a) the computational costs from local updates, global aggregation, and the overall tuning process; and (b) the per-round and overall communication costs. The improvement achieved by our Ferret is reported in brackets using blue (compared with FedKSeed) and orange (compared with FedAvg).**
| Algorithm | Computational Cost (Sec.) | Communication Cost (# param.) |  |  |  |
| --- | --- | --- | --- | --- | --- |
| Local Update | Global Aggr. | Overall | Per-Round | Overall |  |
| FedZO | 58.1 | 4.8 | 2.5$\times$10^3 | 6.0$\times$10^9 | 2.4$\times$10^11 |
| FedKSeed | 24.5 | 723.8 | 3.0$\times$10^4 | 8.2$\times$10^3 | 3.2$\times$10^5 |
| FedAvg | 2.3 | 4.8 | 85.2 | 6.0$\times$10^9 | 7.2$\times$10^10 |
| Ferret (ours) | 5.6 (4.4$\times$) | 49.1 (14.7$\times$) | 6.6$\times$10^2 (45.5$\times$) | 7.8$\times$10^3 (10${}^{6}\times$) | 9.4$\times$10^4 (10${}^{6}\times$) |

Figure: Figure 1: Comparison of communication rounds required by Ferret and FedKSeed for convergence on Natural Instructions with (a) DataJuicer-1.3B and (b) LLaMA-3B.
Refer to caption: x1.png

Comparison on Scalability.
In this paper, since we focus on federated full-parameter tuning of LLMs, we primarily provide a detailed scalability comparison of this type of methods (including FedZO, FedKSeed, FedAvg, and Ferret) on the Natural Instructions dataset using LLaMA-3B, as shown in Tab. 3. The results reveal that Ferret significantly reduces computation costs for local updates (4.4$\times$), global aggregation (14.7$\times$), and the overall tuning process (45.5$\times$) compared to its zeroth-order counterpart, FedKSeed. These improvements are driven by our first-order local updates, which require fewer iterations, our block-wise reconstruction approach, which optimizes global aggregation, and our accurate reconstruction, which reduces the communication rounds complexity. Moreover, Ferret achieves a dramatically lower communication cost, by a factor of 10${}^{6}\times$, compared to its first-order counterpart FedAvg which does not utilize shared randomness. This indicates that our Ferret makes federated full-parameter tuning far more practical. Additionally, we present in Fig. 1 the comparison of communication rounds required by Ferret and FedKSeed for convergence on Natural Instructions with DataJuicer-1.3B and LLaMA-3B. These results show that Ferret enjoys a remarkable convergence speed, requiring nearly only 2 rounds rather than the complete 12 rounds, resulting in a 20$\times$ speedup on the communication rounds complexity. In summary, these results align well with our analyses in Sec. 4.3 and further underscore the scalability of Ferret, highlighting its ability to achieve an optimal balance between computational efficiency, communication overhead, and convergence speed, positioning it as a superior choice for large-scale federated learning of LLMs.

## 6 Conclusion

In conclusion, our Ferret algorithm offers a highly desirable solution for the scalable, full-parameter tuning of LLMs in federated environments. By achieving high computational efficiency, fast convergence, and reduced communication overhead, Ferret overcomes the limitations of existing methods, striking an improved balance among these critical factors. Moreover, our rigorous theoretical analyses and extensive experiments validate Ferret as a robust and reliable approach for deploying LLMs in large-scale federated settings.

## Appendix A Related Work

Federated PEFT for LLMs.
The field of federated learning (FL) has gained significant traction in its application to the fine-tuning of large language models (LLMs). Traditional FL approaches in this domain [, , , ] have predominantly focused on parameter-efficient fine-tuning (PEFT) techniques [, , , , ], which reduce the number of trainable parameters in LLMs to mitigate the extensive communication overheads in FL scenarios. Unfortunately, while PEFT methods such as those proposed in [, ] have shown promise, they often fall short in achieving the accuracy levels possible with full-parameter tuning [], particularly in non-IID (non-independent and identically distributed) data settings commonly encountered in FL. In contrast, this paper focuses on federated full-parameter tuning of LLMs, aiming to achieve significantly reduced communication overhead while maintaining competitive model accuracy.

Federated Learning with Shared Randomness. Several approaches leveraging shared randomness have been proposed to enhance communication efficiency in FL. Methods including [, , , , , , ] demonstrate that by transmitting only a limited set of random seeds and scalar gradients, communication overhead can be drastically reduced. However, these methods rely on zeroth-order optimization (ZOO) for their local updates on each client. This reliance often results in poor scalability, as these methods require substantial computational costs per round to achieve the same local update progress and a larger number of communication rounds to converge compared with their first-order counterparts, such as FedAvg [] and FedProx []. This limitation therefore becomes a bottleneck in large-scale federated environments. In contrast, our paper introduces the use of shared randomness within first-order FL, aiming to improve both computational and communication-round efficiency of zeroth-order FL. To the best of our knowledge, this is the first time that shared randomness has been introduced in first-order FL to reduce communication overhead.

## Appendix B Proofs

### B.1 Proof of Thm. 1

Suppose v is randomly and independently sampled from a truncated normal distribution, i.e., ${\textnormal{v}}\sim{\mathcal{N}}(0,1)$ with ${\textnormal{v}}\in[-1/\sqrt{d},1/\sqrt{d}]$, we have

$$ $\displaystyle\mathbb{E}\left[{\textnormal{v}}\right]$ $\displaystyle=0\ ,$ (9) $$

and also

$$ $\displaystyle\mathbb{E}\left[{\textnormal{v}}^{2}\right]$ $\displaystyle=\left(\mathbb{E}\left[{\textnormal{v}}\right]\right)^{2}+\text{ VAR}({\textnormal{v}})$ (10) $\displaystyle=\text{VAR}({\textnormal{v}})$ $\displaystyle=1-\frac{1/\sqrt{d}(\psi(1/\sqrt{d})+\psi(-1/\sqrt{d}))}{\Phi(1/ \sqrt{d})-\Phi(-1/\sqrt{d})}-\left(\frac{\psi(1/\sqrt{d})-\psi(-1/\sqrt{d})}{ \Phi(1/\sqrt{d})-\Phi(-1/\sqrt{d})}\right)^{2}$ $\displaystyle=1-\frac{2\psi(1/\sqrt{d})/\sqrt{d}}{2\Phi(1/\sqrt{d})-1}$ $$

where $\psi(\frac{1}{\sqrt{d}})$ and $\Phi(\frac{1}{\sqrt{d}})$ is the probability density function (PDF) and cumulative distribution function (CDF) of the standard normal distribution evaluated at $1/\sqrt{d}$, respectively.

According to Sec. 3.2, each element v in ${\mathbf{V}}$ is randomly and independently sampled from the truncated normal distribution above. We therefore have the following to conclude our proof:

$$ $\displaystyle\mathbb{E}\left[\widetilde{\Delta}\right]$ $\displaystyle=\frac{1}{\rho K}\mathbb{E}\left[{\mathbf{V}}{\mathbf{V}}^{\top} \right]\Delta$ (11) $\displaystyle=\frac{1}{\rho K}\mathbb{E}\left[\sum_{k=1}^{K}{\mathbf{v}}_{k}{ \mathbf{v}}_{k}^{\top}\right]\Delta$ $\displaystyle=\Delta\ .$ $$

### B.2 Proof of Thm. 2

To begin with, we introduce the lemma below to ease our proof.

###### Lemma 1 (Matrix Bernstein Inequality, Thm. 1.6.2 in [ 39 ] ) .

Let ${\mathbf{X}}_{1},\cdots,{\mathbf{X}}_{K}$ be independent, zero mean, and symmetry matrices of size $d\times d$, if $\left\|{\mathbf{X}}_{k}\right\|\leq C$ for any $k\in[K]$, we then have

$$ $\mathbb{E}\left[\left\|\sum_{k=1}^{K}{\mathbf{X}}_{k}\right\|\right]\leq\sqrt{ 2\nu\ln(2d)}+\frac{1}{3}C\ln(2d)$ (12) $$

where $\nu\triangleq\left\|\sum_{k=1}^{K}\mathbb{E}\left[{\mathbf{X}}_{k}^{2}\right]\right\|$.

Define ${\mathbf{X}}_{k}\triangleq\left({\mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}-\rho{
\mathbf{I}}_{d}\right)/K$, We have

$$ $\displaystyle\left\|{\mathbf{X}}_{k}\right\|$ $\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}\frac{1}{K}\left\|{\mathbf{v}}_{ k}{\mathbf{v}}_{k}^{\top}-\rho{\mathbf{I}}_{d}\right\|$ (13) $\displaystyle\stackrel{{\scriptstyle(b)}}{{\leq}}\frac{1}{K}\left(\left\|{ \mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}\right\|+\rho\left\|{\mathbf{I}}_{d} \right\|\right)$ $\displaystyle\stackrel{{\scriptstyle(c)}}{{=}}\frac{1}{K}\left(\left\|{\mathbf {v}}_{k}^{\top}{\mathbf{v}}_{k}\right\|+\rho\right)$ $\displaystyle\stackrel{{\scriptstyle(d)}}{{\leq}}\frac{2}{K}$ $$

where $(b)$ comes from triangle inequality and $(c)$ is due to the fact that outer product ${\mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}$ and inner product ${\mathbf{v}}_{k}^{\top}{\mathbf{v}}_{k}$ shares the same operator norm. Finally, $(d)$ results from $\rho<1$ and ${\mathbf{v}}_{k}^{\top}{\mathbf{v}}_{k}\leq 1$.

Besides, we also have

$$ $\displaystyle\mathbb{E}\left[{\mathbf{X}}_{k}^{2}\right]$ $\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}\frac{1}{K^{2}}\mathbb{E}\left[{ \mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}{\mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}- 2\rho{\mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}+\rho^{2}{\mathbf{I}}_{d}\right]$ (14) $\displaystyle\stackrel{{\scriptstyle(b)}}{{\preceq}}\frac{1}{K^{2}}\mathbb{E} \left[{\mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}-2\rho{\mathbf{v}}_{k}{\mathbf{v} }_{k}^{\top}+\rho^{2}{\mathbf{I}}_{d}\right]$ $\displaystyle\stackrel{{\scriptstyle(c)}}{{=}}\frac{1}{K^{2}}\left(\rho-\rho^{ 2}\right){\mathbf{I}}_{d}$ $\displaystyle\stackrel{{\scriptstyle(d)}}{{\preceq}}\frac{\rho}{K^{2}}{\mathbf {I}}_{d}$ $$

where $(b)$ comes from the fact that ${\mathbf{v}}_{k}^{\top}{\mathbf{v}}_{k}\leq 1$ and $(c)$ is due to the fact that $\mathbb{E}\left[{\mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}\right]=\rho{\mathbf{I}
}_{d}$.

As a result, by introducing the results above with a triangle inequality, we have

$$ $\displaystyle\left\|\sum_{k=1}^{K}\mathbb{E}\left[{\mathbf{X}}_{k}^{2}\right]\right\|$ $\displaystyle\leq\sum_{k=1}^{K}\left\|\frac{\rho}{K^{2}}{\mathbf{I}}_{d}\right\|$ (15) $\displaystyle\leq\frac{\rho}{K}\ .$ $$

By introducing the results above into Lemma. 1,

$$ $\displaystyle\mathbb{E}\left[\left\|\widetilde{\Delta}-\Delta\right\|\right]$ $\displaystyle=\mathbb{E}\left[\left\|\frac{1}{\rho K}{\mathbf{V}}{\mathbf{V}}^ {\top}\Delta-\Delta\right\|\right]$ (16) $\displaystyle\leq\mathbb{E}\left[\left\|\frac{1}{\rho K}{\mathbf{V}}{\mathbf{V }}^{\top}-{\mathbf{I}}_{d}\right\|\right]\left\|\Delta\right\|$ $\displaystyle=\frac{1}{\rho}\mathbb{E}\left[\left\|\sum_{k=1}^{K}{\mathbf{X}}_ {k}\right\|\right]\left\|\Delta\right\|$ $\displaystyle\leq\sqrt{\frac{2\ln(2d)}{\rho K}}+\frac{\ln(2d)}{\rho K}\ ,$ $$

which finally concludes our proof.

###### Remark 1 .

Sampling from a truncated normal distribution (rather than a standard normal distribution) ensures a bounded norm, which is crucial for achieving a bounded reconstruction error by our method in Sec. 3.2.

###### Lemma 1 (Matrix Bernstein Inequality, Thm. 1.6.2 in [ 39 ] ) .

###### Remark 1 .

### B.3 Proof of Thm. 3

Since the loss function $\ell(\cdot;\cdot)$ is assumed to be $\beta$-smooth w.r.t its first argument, we then have

$$ $\displaystyle\ell({\mathbf{w}}+\epsilon{\mathbf{v}}_{k};{\mathbf{x}}^{(i)})- \ell({\mathbf{w}};{\mathbf{x}}^{(i)})$ $\displaystyle\leq\epsilon\left(\nabla\ell({\mathbf{w}};{\mathbf{x}}^{(i)}) \right)^{\top}{\mathbf{v}}_{k}+\frac{1}{2}\beta\epsilon^{2}\left\|{\mathbf{v}} _{k}\right\|^{2}$ (17) $\displaystyle\leq\epsilon\left(\nabla\ell({\mathbf{w}};{\mathbf{x}}^{(i)}) \right)^{\top}{\mathbf{v}}_{k}+\frac{1}{2}\beta\epsilon^{2}\ .$ $$

By dividing $\epsilon$ on both sides of the inequality above, we have

$$ $\displaystyle g_{k}-{\mathbf{v}}_{k}^{\top}\nabla\ell({\mathbf{w}};{\mathbf{x} }^{(i)})\leq\frac{1}{2}\beta\epsilon\ .$ (18) $$

We therefore can conclude our proof using the results below:

$$ $\displaystyle\left\|\frac{1}{K}{\mathbf{V}}{\bm{g}}-\frac{1}{K}{\mathbf{V}}{ \mathbf{V}}^{\top}\nabla\ell({\mathbf{w}};{\mathbf{x}}^{(i)})\right\|$ $\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}\left\|\frac{1}{K}\sum_{k=1}^{K} \left({\mathbf{v}}_{k}g_{k}-{\mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}\nabla\ell( {\mathbf{w}};{\mathbf{x}}^{(i)})\right)\right\|$ (19) $\displaystyle\stackrel{{\scriptstyle(b)}}{{\leq}}\frac{1}{K}\sum_{k=1}^{K} \left\|{\mathbf{v}}_{k}g_{k}-{\mathbf{v}}_{k}{\mathbf{v}}_{k}^{\top}\nabla\ell ({\mathbf{w}};{\mathbf{x}}^{(i)})\right\|$ $\displaystyle\stackrel{{\scriptstyle(c)}}{{\leq}}\frac{1}{K}\sum_{k=1}^{K} \left|g_{k}-{\mathbf{v}}_{k}^{\top}\nabla\ell({\mathbf{w}};{\mathbf{x}}^{(i)}) \right|\left\|{\mathbf{v}}_{k}\right\|$ $\displaystyle\stackrel{{\scriptstyle(d)}}{{\leq}}\frac{1}{2}\beta\epsilon$ $$

where $(b)$ comes from triangle inequality and $(d)$ results from (18) and $\left\|{\mathbf{v}}_{k}\right\|\leq 1$.

###### Remark 2 .

When $\epsilon\rightarrow 0$, (18) indicates that $g_{k}={\mathbf{v}}_{k}^{\top}\nabla\ell({\mathbf{w}};{\mathbf{x}}^{(i)})$, implying that this scalar gradient in zeroth-order method, e.g., FedKSeed [], is an approximation of directional derivative, i.e., our projected update in (6) when $\Delta$ is replaced with $\nabla\ell({\mathbf{w}};{\mathbf{x}}^{(i)})$.

###### Remark 2 .

### B.4 Proof of Prop. 1

Due to the fact that $d=\sum_{l\in[L]}d_{l}$, $K=\sum_{l\in[L]}K_{l}$, and $K_{l}>0$ for any $l\in[L]$, we have

$$ $\displaystyle dK$ $\displaystyle=\left(\sum_{l\in[L]}d_{l}\right)\left(\sum_{l\in[L]}K_{l}\right)$ $\displaystyle=\sum_{l\in[L]}d_{l}\left(\sum_{l\in[L]}K_{l}\right)$ $\displaystyle>\sum_{l\in[L]}d_{l}K_{l}\ ,$ $$

which therefore concludes our proof.

### B.5 Proof of Prop. 2

Based on our block-wise reconstruction in (8) and Thm. 2, we have

$$ $\displaystyle\mathbb{E}\left[\left\|\widetilde{\Delta}-\Delta\right\|\right]$ $\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}\mathbb{E}\left[\sqrt{\sum_{l\in [L]}\left\|\widetilde{\Delta}_{l}-\Delta_{l}\right\|^{2}}\right]$ (20) $\displaystyle\stackrel{{\scriptstyle(b)}}{{<}}\mathbb{E}\left[\sqrt{\Bigg{(} \sum_{l\in[L]}\left\|\widetilde{\Delta}_{l}-\Delta_{l}\right\|\Bigg{)}^{2}}\right]$ $\displaystyle\stackrel{{\scriptstyle(c)}}{{=}}\sum_{l\in[L]}\mathbb{E}\left[ \left\|\widetilde{\Delta}_{l}-\Delta_{l}\right\|\right]$ $\displaystyle\stackrel{{\scriptstyle(d)}}{{\leq}}\sum_{l\in[L]}\left(\sqrt{ \frac{2\ln(2d_{l})}{\rho_{l}K_{l}}}+\frac{\ln(2d_{l})}{\rho_{l}K_{l}}\right) \left\|\Delta_{l}\right\|$ $$

where $(a)$ is based on the definition of $\widetilde{\Delta}_{l}$ and $\Delta_{l}$ and $(b)$ is from the fact that $\left\|\widetilde{\Delta}_{l}-\Delta_{l}\right\|>0$.

Given that $\sqrt{d_{l}}>K_{l}$ and we can then use $\widetilde{{\mathcal{O}}}$ to hide the logarithm term in the result above, the following then holds:

$$ $\displaystyle\mathbb{E}\left[\left\|\widetilde{\Delta}-\Delta\right\|\right]< \widetilde{{\mathcal{O}}}\left(\sum_{l\in[L]}\frac{\left\|\Delta_{l}\right\|}{ \rho_{l}K_{l}}\right)\ .$ (21) $$

To minimize the upper bound above w.r.t $\{K_{l}\}_{l=1}^{L}$ with $\sum_{l\in[L]}K_{l}=K$, we resort to KKT conditions. Specifically, define ${\bm{k}}\triangleq[K_{1},\cdots,K_{L}]^{\top}$ and the following Lagrangian function based on $\lambda>0$:

$$ $F({\bm{k}},\lambda)\triangleq\sum_{l\in[L]}\frac{\left\|\Delta_{l}\right\|}{ \rho_{l}K_{l}}+\lambda\left(\sum_{l\in[L]}K_{l}-K\right)\ .$ (22) $$

To minimize (21), for any $l\in[L]$, $K_{l}$ and $\lambda$ then needs to satisfy the following condition:

$$ $\displaystyle\frac{\partial F({\bm{k}},\lambda)}{\partial K_{l}}=-\frac{\left \|\Delta_{l}\right\|/\rho_{l}}{K_{l}^{2}}+\lambda=0\ .$ (23) $$

That is,

$$ $\lambda=\frac{\left\|\Delta_{1}\right\|/\rho_{1}}{K_{1}^{2}}=\cdots=\frac{ \left\|\Delta_{L}\right\|/\rho_{L}}{K_{L}^{2}}\ .$ (24) $$

This finally leads to $K_{l}\propto\sqrt{\left\|\Delta_{L}\right\|/\rho_{L}}$, which consequently concludes our proof.

###### Remark 3 .

Prop. 2 provides a looser bound than Thm. 2, primarily owing to the inequality $(b)$ in (20). Based on this looser bound, one might expect that block-wise reconstruction would incur a larger error compared to the vanilla reconstruction in (7). However, empirical results in Appx. C.4 and Appx. C.5 show that block-wise reconstruction yields comparable performance to the vanilla approach.

###### Remark 3 .

### B.6 Proof of Thm. 4

Of note, we follow the general idea in [] to prove the convergence of Ferret. To begin with, we introduce the following lemmas borrowed from []:

###### Lemma 2 .

Let $\left\{{\bm{u}}_{1},\ldots,{\bm{u}}_{\tau}\right\}$ be any $\tau$ vectors in $\mathbb{R}^{d}$. Then the following holds for any $a>0$:

$$ $\displaystyle\left\|{\bm{u}}_{i}\right\|\left\|{\bm{u}}_{j}\right\|$ $\displaystyle\leq\frac{a}{2}\left\|{\bm{u}}_{i}\right\|^{2}+\frac{1}{2a}\left \|{\bm{u}}_{j}\right\|^{2}\ ,$ (25) $\displaystyle\left\|{\bm{u}}_{i}+{\bm{u}}_{j}\right\|^{2}$ $\displaystyle\leq(1+a)\left\|{\bm{u}}_{i}\right\|^{2}+\left(1+\frac{1}{a} \right)\left\|{\bm{u}}_{j}\right\|^{2}\ ,$ (26) $\displaystyle\left\|\sum_{i=1}^{\tau}{\bm{u}}_{i}\right\|^{2}$ $\displaystyle\leq\tau\sum_{i=1}^{\tau}\left\|{\bm{u}}_{i}\right\|^{2}\ .$ (27) $$

###### Lemma 3 .

For any $\beta$-smooth function $f$, inputs ${\bm{x}},{\bm{y}}$ in the domain of $f$, the following holds for any constant $\eta>0$:

$$ $\|{\bm{x}}-\eta\nabla f({\bm{x}})-{\bm{y}}+\eta\nabla f({\bm{y}})\|^{2}\leq(1+ \eta\beta)^{2}\|{\bm{x}}-{\bm{y}}\|^{2}\ .$ $$

Let $\eta\leq 1/(T\beta)$, we can bound the discrepancy between ${\mathbf{w}}_{r,t}^{(i)}$ and ${\mathbf{w}}_{r}$ for any client $i$ as below

$$ $\displaystyle\mathbb{E}\left[\left\|{\mathbf{w}}_{r,t}^{(i)}-{\mathbf{w}}_{r} \right\|^{2}\right]$ (28) $\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}$ $\displaystyle\mathbb{E}\left[\left\|{\mathbf{w}}_{r,t-1}^{(i)}-\eta\nabla\ell( {\mathbf{w}}_{r,t-1}^{(i)};{\mathbf{x}}_{r,t-1}^{(i)})-{\mathbf{w}}_{r}\right \|^{2}\right]$ $\displaystyle\stackrel{{\scriptstyle(b)}}{{=}}$ $\displaystyle\mathbb{E}\left[\left\|{\mathbf{w}}_{r,t-1}^{(i)}-\eta\nabla{ \mathcal{L}}({\mathbf{w}}_{r,t-1}^{(i)})+\eta\nabla{\mathcal{L}}({\mathbf{w}}_ {r})-{\mathbf{w}}_{r}+\eta\left(\nabla{\mathcal{L}}({\mathbf{w}}_{r,t-1}^{(i)} )-\nabla{\mathcal{L}}^{(i)}({\mathbf{w}}_{r,t-1}^{(i)})\right)\right.\right.$ $\displaystyle\qquad\qquad\left.\left.+\eta\left(\nabla{\mathcal{L}}^{(i)}({ \mathbf{w}}_{r,t-1}^{(i)})-\nabla\ell({\mathbf{w}}_{r,t-1}^{(i)};{\mathbf{x}}_ {r,t-1}^{(i)})-\nabla{\mathcal{L}}({\mathbf{w}}_{r})\right)\right\|^{2}\right]$ $\displaystyle\stackrel{{\scriptstyle(c)}}{{\leq}}$ $\displaystyle\frac{T}{T-1}\mathbb{E}\left[\left\|{\mathbf{w}}_{r,t-1}^{(i)}- \eta\nabla{\mathcal{L}}({\mathbf{w}}_{r,t-1}^{(i)})+\eta\nabla{\mathcal{L}}({ \mathbf{w}}_{r})-{\mathbf{w}}_{r}\right\|^{2}\right]$ $\displaystyle\qquad\qquad+2\eta^{2}T\,\mathbb{E}\left[\left\|\nabla{\mathcal{L }}^{(i)}({\mathbf{w}}_{r,t-1}^{(i)})-\nabla\ell({\mathbf{w}}_{r,t-1}^{(i)};{ \mathbf{x}}_{r,t-1}^{(i)})\right\|^{2}+\left\|\nabla{\mathcal{L}}({\mathbf{w}} _{r})\right\|^{2}\right]$ $\displaystyle\stackrel{{\scriptstyle(d)}}{{\leq}}$ $\displaystyle\ \frac{T(1+\eta\beta)^{2}}{T-1}\mathbb{E}\left[\left\|{\mathbf{w }}_{r,t-1}^{(i)}-{\mathbf{w}}_{r}\right\|^{2}\right]+2\eta^{2}T\sigma^{2}+2 \eta^{2}T\,\left\|\nabla{\mathcal{L}}({\mathbf{w}}_{r})\right\|^{2}$ $\displaystyle\stackrel{{\scriptstyle(e)}}{{\leq}}$ $\displaystyle\ 24\eta^{2}T^{2}\sigma^{2}+24\eta^{2}T^{2}\left\|\nabla{\mathcal {L}}({\mathbf{w}}_{r})\right\|^{2}$ $$

where $(a)$ is from the local update of ${\mathbf{w}}_{r,t-1}^{\smash{(i)}}$ on each client $i$, and $(c)$ is based on (26) in Lemma 2 with $a=1/(T-1)$ and ${\mathcal{L}}({\mathbf{w}}_{r,t-1}^{(i)})={\mathcal{L}}^{(i)}({\mathbf{w}}_{r,
t-1}^{(i)})$. Besides, $(d)$ results from Lemma 3 and the assumption that $\mathbb{E}[\|\nabla{\mathcal{L}}^{\smash{(i)}}({\mathbf{w}})-\ell({\mathbf{w}}
;{\mathbf{x}})\|^{2}]\leq\sigma^{2}$. Finally, $(e)$ comes from the summation of geometric series and the fact that $\eta\beta\leq 1/T$ as well as

$$ $\displaystyle\sum_{\tau=0}^{t-1}\left(\frac{(T+1)^{2}}{T(T-1)}\right)^{\tau}$ $\displaystyle\leq\sum_{\tau=0}^{T-1}\left(\frac{(T+1)^{2}}{T(T-1)}\right)^{\tau}$ (29) $\displaystyle=\frac{\left((T+1)^{2}/[T(T-1)]\right)^{T}-1}{(T+1)^{2}/[T(T-1)]-1}$ $\displaystyle=\frac{T(T-1)}{3T+1}\left(\left(1+\frac{3T+1}{T(T-1)}\right)^{T}- 1\right)$ $\displaystyle<\frac{T(T-1)}{3T+1}\left(\exp\left(\frac{3T+1}{T}\right)-1\right)$ $\displaystyle<\frac{T}{3}\left(\exp\left(\frac{7}{2}\right)-1\right)$ $\displaystyle<12T\ .$ $$

Besides $\mathbb{E}\left[{\mathbf{V}}_{r}{\mathbf{V}}_{r}^{\top}\right]=\rho{\mathbf{I}
}_{d}$, one can also verify that $\mathbb{E}\left[{\mathbf{V}}_{r}{\mathbf{V}}_{r}^{\top}{\mathbf{V}}_{r}{
\mathbf{V}}_{r}^{\top}\right]=\rho^{2}{\mathbf{I}}_{d}$, we therefore have

$$ $\displaystyle\mathbb{E}\left[\left\|{\mathbf{w}}_{r+1}-{\mathbf{w}}_{r}\right \|^{2}\right]$ (30) $\displaystyle=$ $\displaystyle\mathbb{E}\left[\left({\mathbf{w}}_{r+1}-{\mathbf{w}}_{r}\right)^ {\top}\left({\mathbf{w}}_{r+1}-{\mathbf{w}}_{r}\right)\right]$ $\displaystyle=$ $\displaystyle\mathbb{E}\left[\left(\frac{\eta}{\rho KN}\right)^{2}\left(\sum_{ i=1}^{N}\sum_{t=1}^{T}\nabla\ell({\mathbf{w}}^{(i)}_{r,t-1};{\mathbf{x}}^{(i)} _{r,t-1})\right)^{\top}{\mathbf{V}}_{r}{\mathbf{V}}_{r}^{\top}{\mathbf{V}}_{r} {\mathbf{V}}_{r}^{\top}\sum_{i=1}^{N}\sum_{t=1}^{T}\nabla\ell({\mathbf{w}}^{(i )}_{r,t-1};{\mathbf{x}}^{(i)}_{r,t-1})\right]$ $\displaystyle=$ $\displaystyle\left(\frac{\eta}{\rho KN}\right)^{2}\mathbb{E}\left[\left(\sum_{ i=1}^{N}\sum_{t=1}^{T}\nabla\ell({\mathbf{w}}^{(i)}_{r,t-1};{\mathbf{x}}^{(i)} _{r,t-1})\right)^{\top}\mathbb{E}\left[{\mathbf{V}}_{r}{\mathbf{V}}_{r}^{\top} {\mathbf{V}}_{r}{\mathbf{V}}_{r}^{\top}\right]\sum_{i=1}^{N}\sum_{t=1}^{T} \nabla\ell({\mathbf{w}}^{(i)}_{r,t-1};{\mathbf{x}}^{(i)}_{r,t-1})\right]$ $\displaystyle=$ $\displaystyle\left(\frac{\eta}{N}\right)^{2}\mathbb{E}\left[\left\|\sum_{i=1}^ {N}\sum_{t=1}^{T}\nabla\ell({\mathbf{w}}^{(i)}_{r,t-1};{\mathbf{x}}^{(i)}_{r,t -1})\right\|^{2}\right]$ $\displaystyle\leq$ $\displaystyle\frac{\eta^{2}}{N}\sum_{i=1}^{N}\mathbb{E}\left[\left\|\sum_{t=1} ^{T}\nabla\ell({\mathbf{w}}^{(i)}_{r,t-1};{\mathbf{x}}^{(i)}_{r,t-1})\right\|^ {2}\right]$ $$

where the last inequality comes from the (27) in Lemma 2. Here, we omit the subscript $r$ from the random bases ${\mathbf{V}}$ in our notation for simplicity.

Since $\mathbb{E}\left[\left\|{\mathbf{w}}_{r,t}^{(i)}-{\mathbf{w}}_{r}\right\|^{2}
\right]=\eta^{2}\mathbb{E}\left[\left\|\sum_{\tau=1}^{t}\nabla\ell({\mathbf{w}
}_{r,\tau-1}^{(i)};{\mathbf{x}}_{r,\tau-1}^{(i)})\right\|^{2}\right]$, by replacing $\tau$ with $T$, we have

$$ $\mathbb{E}\left[\left\|{\mathbf{w}}_{r+1}-{\mathbf{w}}_{r}\right\|^{2}\right] \leq 24\eta^{2}T^{2}\sigma^{2}+24\eta^{2}T^{2}\left\|\nabla{\mathcal{L}}({ \mathbf{w}}_{r})\right\|^{2}\ .$ (31) $$

Besides, since $\mathbb{E}\left[{\mathbf{w}}_{r+1}-{\mathbf{w}}_{r}\right]=-\frac{\eta}{N}\sum
_{i=1}^{N}\sum_{t=1}^{T}\nabla{\mathcal{L}}^{(i)}({\mathbf{w}}^{(i)}_{r,t-1})$, we have

$$ $\displaystyle\mathbb{E}\left[\nabla{\mathcal{L}}({\mathbf{w}}_{r})^{\top}({ \mathbf{w}}_{r+1}-{\mathbf{w}}_{r})\right]$ (32) $\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}$ $\displaystyle-\frac{\eta}{N}\mathbb{E}\left[\sum_{i=1}^{N}\sum_{t=1}^{T}\nabla {\mathcal{L}}({\mathbf{w}}_{r})^{\top}\nabla{\mathcal{L}}^{(i)}({\mathbf{w}}^{ (i)}_{r,t-1})\right]$ $\displaystyle\stackrel{{\scriptstyle(b)}}{{=}}$ $\displaystyle-\frac{\eta}{N}\mathbb{E}\left[\sum_{i=1}^{N}\sum_{t=1}^{T}\nabla {\mathcal{L}}({\mathbf{w}}_{r})^{\top}\left(\nabla{\mathcal{L}}^{(i)}({\mathbf {w}}^{(i)}_{r,t-1})-\nabla{\mathcal{L}}({\mathbf{w}}^{(i)}_{r,t-1})+\nabla{ \mathcal{L}}({\mathbf{w}}^{(i)}_{r,t-1})-\nabla{\mathcal{L}}({\mathbf{w}}_{r}) +\nabla{\mathcal{L}}({\mathbf{w}}_{r})\right)\right]$ $\displaystyle\stackrel{{\scriptstyle(c)}}{{\leq}}$ $\displaystyle\frac{\eta}{N}\sum_{i=1}^{N}\sum_{t=1}^{T}\left(\eta\beta T\left \|\nabla{\mathcal{L}}({\mathbf{w}}_{r})\right\|^{2}+\frac{\beta}{4\eta T} \mathbb{E}\left[\left\|{\mathbf{w}}^{(i)}_{r,t-1}-{\mathbf{w}}_{r}\right\|^{2} \right]\right)-\eta T\left\|\nabla{\mathcal{L}}({\mathbf{w}}_{r})\right\|^{2}$ $\displaystyle\stackrel{{\scriptstyle(d)}}{{\leq}}$ $\displaystyle(7\eta^{2}T^{2}\beta-\eta T)\left\|\nabla{\mathcal{L}}({\mathbf{w }}_{r})\right\|^{2}+6\eta^{2}T^{2}\beta\sigma^{2}$ $$

where $(c)$ comes from Cauchy–Schwarz inequality and the fact that ${\mathcal{L}}({\mathbf{w}}_{r,t-1}^{(i)})={\mathcal{L}}^{(i)}({\mathbf{w}}_{r,
t-1}^{(i)})$. In addition, $(d)$ results from (31).

Finally, based on the assumption that ${\mathcal{L}}$ is $\beta$-smooth, we naturally have

$$ $\displaystyle\mathbb{E}\left[{\mathcal{L}}({\mathbf{w}}_{r+1})-{\mathcal{L}}({ \mathbf{w}}_{r})\right]$ $\displaystyle\leq\mathbb{E}\left[\nabla{\mathcal{L}}({\mathbf{w}}_{r})^{\top} \left({\mathbf{w}}_{r+1}-{\mathbf{w}}_{r}\right)\right]+\frac{\beta}{2}\mathbb {E}\left[\left\|{\mathbf{w}}_{r+1}-{\mathbf{w}}_{r}\right\|^{2}\right]$ (33) $\displaystyle\leq(19\eta^{2}T^{2}\beta-\eta T)\mathbb{E}\left[\left\|\nabla{ \mathcal{L}}({\mathbf{w}}_{r})\right\|^{2}\right]+18\eta^{2}T^{2}\beta\sigma^{2}$ $$

By summarizing both sides over $R$ rounds and letting $\eta\leq\frac{1}{20T\beta}$,

$$ $\displaystyle\mathbb{E}\left[\left\|\nabla{\mathcal{L}}({\mathbf{w}}_{r}) \right\|^{2}\right]\leq\frac{20\ \mathbb{E}\left[{\mathcal{L}}({\mathbf{w}}_{r })-{\mathcal{L}}({\mathbf{w}}_{r+1})\right]}{\eta T}+360\eta T\beta\sigma^{2}\ ,$ (34) $$

Finally, we have the following results to conclude our proof:

$$ $\displaystyle\min_{r\in[R)}\mathbb{E}\left[\left\|\nabla{\mathcal{L}}({\mathbf {w}}_{r})\right\|^{2}\right]\leq\frac{20\left({\mathcal{L}}({\mathbf{w}}_{0})- \min_{{\mathbf{w}}}{\mathcal{L}}({\mathbf{w}})\right)}{\eta TR}+360\eta\beta T \sigma^{2}\ .$ (35) $$

###### Remark 4 .

Note that the large constant in (35) arises from our bound in (28) for sufficiently large $T$. This bound can be improved in practice by considering a smaller $T$ instead.

###### Lemma 2 .

###### Lemma 3 .

###### Remark 4 .

## Appendix C Experiments

### C.1 Experimental Setup

Baselines. In line with the comparison in [], we selected four practical methods for federated LLM tuning as our baselines: (1) FedPTuning [], (2) FedPrompt [], (3) FedIT [], and (4) FedIT-SGD, a variant of FedIT that replaces Adam with SGD. In addition, we included four full-parameter tuning methods for comparison: (1) FedAvg [], (2) FedZO [], (3) FedMeZO, a hybrid of FedAvg and MeZO [], and (4) FedKSeed [].

Datasets. We conducted our experiments using the Natural Instructions (NI) [] and Dolly-15K [] datasets, following a setup similar to []. For the NI dataset, we allocated 738 training tasks to individual clients for local updates and reserved 119 test tasks for global evaluation, reflecting a non-IID distribution. Meanwhile, for the Dolly-15K dataset, the final task was utilized for global evaluation, while the remaining tasks were distributed among 200 clients with varying levels of label distribution skew. Rouge-L [] was chosen as the evaluation metric. Given our resource constraints, we selected DataJuicer-1.3B [] and LLaMA-3B [] as the base models for our study.

FL Setting. In each round of federated learning, 5% of clients were randomly selected to participate. Following the same practice in FedKSeed [], we set the total number of communication rounds to 40 for the NI dataset and 60 for Dolly-15K for all baselines. Due to the compelling efficiency of our method, we set the total number of communication rounds to 12 for the NI dataset and 20 for Dolly-15K for Ferret. First-order baselines trained locally for one epoch, and FedKSeed trained for 200 steps, while our Ferret algorithm trained for 10 iterations (i.e., $T=10$ in Algo. 1). The $K$ value was set to 4096 for FedKSeed. All approaches perform local update with a batchsize of 1 to reduce memory consumption. For each local update iteration in Ferret, we accumulate the gradients from 4 samples.

Hyper-parameters. For Ferret, the local update learning rate $\eta$ for each client is set to $1\times 10^{-4}$, where the selected learning rate is searched from $[2\times 10^{-4},1\times 10^{-4},5\times 10^{-5}]$. The global aggregation learning rates on Natural Instruction and Dolly-15K are set to $10.0$ and $3.0$, respectively, which is search from $[10.0,5.0,1.0]$. For other baselines in Tab. 1 of our main paper, we reported their accuracy performances using the results from FedKSeed [].

### C.2 Calculation of Computational Cost and Communication Overhead

In this subsection, we provide the details of how the computational cost and communication cost are calculated for all methods listed in Tab. 3.

Computation. For FedZO, we use the default hyper-parameters ($b_{1}=20,b_{2}=25$) from the FedZO paper [], which employs 20 local update steps and 25 perturbations for each sinlge update step. For calculating the computational cost of FedAvg and Ferret, we apply 10 local update steps for each client. Same as our experimental setting in Tab. 1, the batch is set to 1 for all methods. The time cost incurred at gradient projection is also included in the Local Update.

In the global aggregation process for both FedZO and FedAvg, raw gradients from all clients are averaged and then used to update the global model. In contrast, for FedKSeed and Ferret, the projected gradients are first aggregated through averaging, then reconstructed, and finally used to update the global model.

For the overall computation cost, we follow the calculation below:

$$ $\text{Overall}=(\text{Local Update}+\text{Global Aggr.})\times R.$ $$

Communication. The per-round communication cost refers to the total number of parameters exchanged between a client and the central server during a single round. This includes both the raw or projected gradients that the client sends to the server and the aggregated gradients that the client receives from the server. Each parameter (or projected gradient) is encoded as 16-bit floating point numbers. In accordance with the practice in FedKSeed, we set the number of rounds $R$ to 40 for both FedZO and FedKSeed. Given the notable convergence rate of Ferret, we set $R$ to 12 for both Ferret and FedAvg. Although [] employs $R=40$ for FedAvg, we use $R=12$ to provide a strong basis for comparison and to highlight the computational efficiency of Ferret.

For the overall communication cost, we follow the calculation below:

$$ $\text{Overall}=2\times\text{Per-Round}\times R.$ $$

### C.3 Prompt Template

In our experiments, the raw input data is pre-processed to follow a structured format, where we warp the input text to the Alpaca prompt template []. The corresponding templates for the NI and Dolly-15K dataset are shown in Table 4 and 5.

Table: Table 4: Prompt template for Natural Instructions.

**Table 5: Prompt template for Dolly-15K. If some data instances do not have the context**
| Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. |
| --- |
| ### Instruction: {instruction} |
| ### Input: {context} |
| ### Response: |

### C.4 Ablation Studies on Reconstruction

[Uncaptioned image]: x3.png

In Fig. 2, we present the rate of $1/\rho$ where $\rho$ is defined in Sec. 3.2 to verify our claim following Thm. 2. The results in Fig. 2 confirm that $1/\rho$ indeed follows a rate of ${\mathcal{O}}(d)$.

In Fig. 3, we present the reconstruction accuracy (measured by cosine similarity) for the $d=10^{5}$-dimensional gradient of the function $F({\bm{x}})=\sum_{i=1}^{d}x^{2}_{i}$ at a randomly sampled input ${\bm{x}}$ with varying $K$ by using our method in (7) and zeroth-order method with different values of $\epsilon$. The goal is to compare the reconstruction accuracy of our (7) with that of the ZO method under varying $K$ and $\epsilon$. The results in Fig. 3 indicate that: (a) our method (7) achieves improved reconstruction accuracy compared to the ZO method, particularly the one with an optimal $\epsilon=0.1$, which indeed aligns with the insights from our Thm. 3; (b) both our method (7) and the ZO method exhibit the same increasing rate in reconstruction accuracy as $K$ increases, highlighting the connection between these two methods as implied by our Thm. 3; and (c) this increasing rate is generally linear, which is consistent with Thm. 2. These results therefore further verify the insights in Thm. 2 and Thm. 3, and support the advantages of our method (7) over the ZO method.

Figure: Figure 4: Reconstruction Accuracy (measured by cosine similarity between reconstruction and ground truth) of our (8) vs. zeroth-order method under varying $T$, $d$, and $L$.
Refer to caption: x5.png

In Fig. 4 (a), we present the reconstruction accuracy (measured by cosine similarity) of a $T$-iteration gradient descent update for the function $F({\bm{x}})=\sum_{i=1}^{d}\sin^{2}(x_{i})$ with a learning rate of 0.1, $d=5\times 10^{4}$, $L=1$, and $K=500$, using our method in (8) and the zeroth-order (ZO) method described in Thm. 3 with $\epsilon=0.1$. The goal is to compare the accumulated error from our (8) with that of the ZO method. Interestingly, Fig. 4 (a) shows that our method maintains consistent reconstruction accuracy as the number $T$ of gradient descent iterations increases, whereas the ZO method experiences a noticeable decline in accuracy. This result implies that our (8) effectively avoids the accumulated error typical in zeroth-order methods, aligning with the theoretical justification provided in Sec. 4.1.

In Fig. 4 (b), we show the reconstruction accuracy (measured by cosine similarity) of $d$-dimensional gradient of $F({\bm{x}})=\sum_{i=1}^{d}\sin^{2}(x_{i})$ at a randomly sampled input ${\bm{x}}$, with $L=1$ and $K=500$, using our method in (8) and the zeroth-order (ZO) method described in Thm. 3 with $\epsilon=0.1$. The goal is to compare the reconstruction accuracy rate with respect to the dimension $d$ between our (8) method and the ZO method. Interestingly, Fig. 4 (b) shows that both methods achieve the same reconstruction accuracy rate with respect to $d$. More importantly, when $d$ becomes large, the accuracy rate is approximately linear, which aligns with the theoretical insights provided in Thm. 2.

In Fig. 4 (c), we present the reconstruction accuracy (measured by cosine similarity) and computational complexity (measured by time cost) for the $d=5.12\times 10^{5}$-dimensional gradient of function $F({\bm{x}})=\sum_{i=1}^{d}\sin^{2}(x_{i})$ at a randomly sampled input ${\bm{x}}$, under varying $L$ of the same number of dimensions and $K=512$, using our method in (8). The goal is to study the impact of block size $L$ on our (8). Notably, Fig. 4 (c) shows that our block-wise reconstruction (8) significantly reduces computational complexity (in line with Prop. 1), while maintaining consistent reconstruction accuracy as $L$ increases. These results further verify the efficacy of our block-wise reconstruction (8).

### C.5 Ablation Studies on Convergence and Generalization

Figure: Figure 5: Convergence and generalization of Ferret under varying $K$ on Natural Instructions with DataJuicer-1.3B where $2K_{0}$ corresponds to the communication cost of 7.8$\times$10^3 per round in Tab. 3.
Refer to caption: x8.png

In Fig. 5, we present the convergence and generalization of Ferret under varying $K$ on the Natural Instructions dataset with DataJuicer-1.3B, using the same experimental setup as described in Appx. C.1. Notably, Fig. 5 shows that: (a) a larger number of random bases (i.e., a larger $K_{0}$) generally leads to improved convergence, while the generalization performance remains comparable; (b) $2K_{0}$ already provides compelling convergence and generalization performance, and further increasing $K$ yields only marginal improvements in convergence; and (c) a slight decrease in generalization performance as $K$ increases is likely due to the reduced regularization effect from noisy gradients.

Figure: Figure 6: Convergence, generalization, and projection time cost per round of Ferret under varying $L$ on Natural Instructions with DataJuicer-1.3B where $L=194$ is applied in our Tab. 2.
Refer to caption: x10.png

In Fig. 6, we present the convergence, generalization, and projection time cost of Ferret under varying block sizes $L$ on the Natural Instructions dataset with DataJuicer-1.3B, using the same experimental setup as described in Appx. C.1. Notably, Fig. 6 shows that increasing the number of blocks (i.e., a larger $L$) leads to improved convergence and reduced time cost for projection and reconstruction, while the generalization performance remains comparable. This improved convergence is likely due to the logarithmic term in the reconstruction error of our (7), as a larger number of blocks reduces the dimensionality of each block, thereby minimizing reconstruction error. In addition, the reduced time cost aligns with our analysis in Sec. 4.1 and the empirical results shown in Fig. 4(c), further highlighting the efficacy of our block-wise reconstruction method (8).

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 3
presentation: 2
questions: Weaknesses
soundness: 3
strengths: 1.	This paper introduces random projection into federated learning by projecting local updates to a lower-dimensional space using random bases and transmitting them to the server. The server then reconstructs the updates by combining the low-dimensional projection with the random bases. This approach can significantly reduce communication overhead.
2.	The work provides rigorous theoretical analysis and proof to support the validity.
3.	Through extensive experimental validation, Ferret was found to consistently outperform existing baselines in practice.
summary: To address the issue of communication overhead in federated learning, the paper proposes using random projection to project local updates into a lower-dimensional space. During communication with the central server, only this lower-dimensional projection needs to be transmitted. The central server then reconstructs these low-dimensional projections back to the original dimensions, performs updates, and shares the parameters with each client for the next update. This method reduces communication overhead while maintaining model accuracy and, compared to zeroth-order optimization, involves lower computational costs and fewer communication rounds, resulting in better scalability.
weaknesses: 1.	The idea of this paper aligns with the idea behind FetchSGD [Rothchild D, Panda A, Ullah E, et al. Fetchsgd: Communication-efficient federated learning with sketching[C]//International Conference on Machine Learning. PMLR, 2020: 8253-8265], as both reduce dimensionality and then reconstruct. It merely applies random projection from statistics, which is only a minor methodological difference.
2.	This paper does not compare its novelty and effectiveness with similar papers, nor does it cite works with similar ideas in the introduction sections. For example, it proposes using random projection for dimensionality reduction, but how does this differ from the dimensionality reduction in FetchSGD or the encoder/decoder approach in HCFL（Nguyen M D, Lee S M, Pham Q V, et al. HCFL: A high compression approach for communication-efficient federated learning in very large scale IoT networks[J]. IEEE Transactions on Mobile Computing, 2022, 22(11): 6495-6507.）?
3.	The paper suffers from serious clarity issues in its presentation. There are several instances of symbol ambiguity in the formulas; for example, in Algorithm 1, the client is initially represented by i, but later changes to j without explanation. Additionally, in line 6, w_{r-1} is obtained, but it suddenly changes to w_r in the subsequent text. The terms "send" and "receive" in lines 4 and 12 are also ambiguous, leaving it unclear whether the central server is responsible for sending or receiving the random seed. Furthermore, the method by which the server transmits the aggregated results back to the clients is not adequately explained. These issues may lead readers to significant misunderstandings regarding the use of the proposed method in this paper. Moreover, the paper does not have a related work section. The core of its method is random projection, but no paper related to random projection is mentioned, which makes the paper lack the support of previous literature and the comparison with similar idea papers (it only discusses the difference between first-order optimization and zero-order optimization in federated learning).
4.      Reconstruct the paper's structure: In the Related Work section, include a description of similar dimensionality reduction methods and clearly outline the similarities and differences between your approach and methods like FetchSGD and HCFL. Explain the motivation for using random projection and its advantages over other dimensionality reduction techniques. Additionally, provide a detailed, step-by-step explanation of the overall framework and process of your method to avoid potential misunderstandings.
5.     Compare experimental results: Conduct experiments to compare the effectiveness of this method with similar federated learning compression methods, including FetchSGD, HCFL, and FedPAQ（Reisizadeh A, Mokhtari A, Hassani H, et al. Fedpaq: A communication-efficient federated learning method with periodic averaging and quantization[C]//International conference on artificial intelligence and statistics. PMLR, 2020: 2021-2031.）, to provide a clearer assessment of its performance.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: 1.Have you conducted any preliminary experiments or theoretical analysis suggesting scalability beyond 13B?
2.How does the reconstruction error affect the convergence rate in practice? What other factors contribute to the empirically faster convergence?
3.How does the privacy level compare to other federated learning approaches?
4.Is there a systematic way to determine hyperparameters for a new deployment?
soundness: 3
strengths: 1.Technical Innovation: First algorithm to combine first-order optimization with shared randomness in federated learning；Novel approach to projecting updates into low-dimensional space while enabling effective reconstruction；Theoretically sound block-wise reconstruction technique that improves scalability.
2.Theoretical Foundation:Rigorous mathematical analysis proving unbiased reconstruction (Theorem 1)；Comprehensive convergence analysis (Theorem 4) 
3.Extensive experiments across multiple datasets (Natural Instructions, Dolly-15K, CodeAlpaca, GSM8K)；Testing on various model sizes (1.3B to 13B parameters)；Strong performance compared to existing methods；Significant improvements in computational efficiency and communication overhead
summary: This paper presents Ferret, an innovative first-order federated learning method that enables efficient full-parameter tuning of Large Language Models (LLMs) while maintaining data privacy. The work makes significant contributions to addressing the challenges of communication overhead and computational efficiency in federated learning settings.
weaknesses: 1. This paper could benefit from a formal privacy analysis of the shared randomness approach.
2.More detailed analysis of sensitivity to key hyperparameters (K, L, T) would be provided.
3.Limited discussion of practical deployment challenges in real-world federated settings.

---

confidence: 5
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. In the experiments, a client participation rate of 5% was adopted, and the proposed method was executed over 12 rounds. This setup is somewhat confusing, as under this configuration, at most 60% of the clients contribute data to the FL system. Why was this setting chosen?
2. What is the adopted $K$ and $L$ for the proposed approach in Tables 2 and 3? These values seem to be missed in Appendix C.
3. Please refer to Weaknesses.
soundness: 2
strengths: 1. Focusing on a research problem that is valuable for promoting the practical application of federated tuning for LLMs, i.e., computation overhead.
2. A comprehensive literature review is provided.
3. Good presentation, making this work easy to follow.
summary: This work enables a first-order full-parameter tuning of LLMs in an FL context. The main contributions of this work are: 1) To reduce the communication overhead of transmitting model updates, it maps model updates to several randomly generated base vectors, each of which can be encoded using a random seed. By this way, it allows a single model update to be encoded with $K \cdot N$ base vectors, thereby significantly lowering the communication overhead associated with transmitting model updates. 2) To address the computation overhead of aggregation, it introduces a block-wise encoding scheme. Compared to existing federated LLM tuning methods, this work exhibits superiority on computation overhead. 

This work addresses the common issues of zeroth-order optimization-based methods, which typically require more iterations than gradient descent methods, resulting in a relatively significant computational overhead. This is valuable for implementing on-device federated LLM tuning, although the proposed approach can cause higher memory footprint than MeZO-based ones.
weaknesses: 1. Generally, BP-based approach would cause more significant memory footprint compared to MeZO-based ones. This work is designed for enabling full-parameter tuning of LLMs, which generally require high memory capacity of devices. Thus, **it is important to present the memory footprint of the proposed approach, together with a comparison to existing related approaches**.
2. The experimental results in Figure 1 show that the proposed method exhibits suboptimal convergence performance compared to FedAvg on the 7B model, while achieving nearly comparable results to FedAvg on other models. The experimental section should provide a more detailed discussion of this issue.
3. The optimal methods are not clearly presented in the tables. It is recommended to better highlight them using boldface, underlining, or similar techniques.
4. In line 365, the authors claim that FedKSeed requires $K$ steps of local update. This may be a mistake. FedKSeed does not require performing tuning on each of the $K$ seeds. Instead, a subset of these $K$ seeds is selected during the local training process to carry out the model updates. As the author stated out in line 1107, "FedKSeed trained for 200 steps".