Collaborative and Efficient Personalization with Mixtures of Adaptors

## Abstract

Abstract Non-iid data is prevalent in real-world federated learning problems. Data heterogeneity can come in different types in terms of distribution shifts. In this work, we are interested in the heterogeneity that comes from concept shifts, i.e., shifts in the prediction across clients. In particular, we consider multi-task learning, where we want the model to adapt to the task of the client. We propose a parameter-efficient framework to tackle this issue, where each client learns to mix between parameter-efficient adaptors according to its task. We use Low-Rank Adaptors (LoRAs) as the backbone and extend its concept to other types of layers. We call our framework Federated Low-Rank Adaptive Learning (FLoRAL). This framework is not an algorithm but rather a model parameterization for a multi-task learning objective, so it can work on top of any algorithm that optimizes this objective, which includes many algorithms from the literature. FLoRAL is memory-efficient, and clients are personalized with small states (e.g., one number per adaptor) as the adaptors themselves are federated. Hence, personalization is–in this sense–federated as well. Even though clients can personalize more freely by training an adaptor locally, we show that collaborative and efficient training of adaptors is possible and performs better. We also show that FLoRAL can outperform an ensemble of full models with optimal cluster assignment, which demonstrates the benefits of federated personalization and the robustness of FLoRAL to overfitting. We show promising experimental results on synthetic datasets, real-world federated multi-task problems such as MNIST, CIFAR-10, and CIFAR-100. We also provide a theoretical analysis of local SGD on a relaxed objective and discuss the effects of aggregation mismatch on convergence. 1 1 1 Code: https://anonymous.4open.science/r/FLoRAL-8478

## 1 Introduction

In Federated Learning (FL), clients serve as decentralized holders of private data, and they can collaborate via secure aggregation of model updates, but one of the main challenges is the heterogeneity of the clients (Kairouz et al., ). For example, heterogeneity can be in terms of data distributions (statistical heterogeneity) or client capabilities (system heterogeneity) (Gao et al., ). In this work, we are interested in a statistical heterogeneity where labels are predicted differently across clients. In particular, this can be viewed under the lens of multi-task learning (Marfoq et al., ) or clustering (Werner et al., ) such that there are only a few ground-truth tasks or clusters across all clients.

The central assumption in our work is that the personalized models across clients should be similar enough to benefit from collaboration, but they also need to be sufficiently different and expressive to fit and generalize on their personal data.
The differences between clients can be thought of as 1) statistical in terms of data (e.g., shifts in distributions) or structural in terms of model (e.g., structured differences in subsets of parameters). To learn these differences efficiently, we often assume that they are low-complexity differences.

Most approaches maintain that the personalized models are either close in distance to the global model via proximal regularization (Li et al., ; Beznosikov et al., ; Borodich et al., ; Sadiev et al., )
or meta-learning (Fallah et al., ), or that the personalized models belong to a cluster of models (Marfoq et al., ; Werner et al., ). Other approaches also assume model heterogeneity, where clients might have a local subset of parameters that are not averaged (Pillutla et al., ; Mishchenko et al., ) where it can personalize to the local task by construction (Almansoori et al., ). For example, a specific subset of parameters can be chosen to be the last layer or some added adaptors.

It has been shown that fine-tuning works particularly well for personalization (Cheng et al., ). One well-known example is using Low-Rank Adaptors (LoRA) (Hu et al., ) for personalizing large language models to different tasks, where the fine-tuning is done on additive low-rank matrices. Thus, the personalized models differ from the base model only in low-rank matrices.
Inspired by the efficiency of low-rank adaptors in multi-task learning for language models and the idea that fine-tuning changes parameters along a low-dimensional intrinsic subspace (Li et al., ; Aghajanyan et al., ), we use low-rank adaptors in the FL setting and show that they can offer significant improvements with a relatively small memory budget.

Thus, instead of regularizing the complexity of a personalized model by its proximity to a reference solution or clustering full models, we explicitly parameterize the personalized models as having low-rank differences from the global model. This is done by introducing a small number of low-rank adaptors per layer and a mixture vector per client that mixes between those adaptors. Thus, it implicitly regularizes the personal models through a weight-sharing mechanism that enforces a low-rank difference from the global model. Our approach can be seen as a hybrid that 1) explicitly constrains the complexity of the difference (per layer) between the global model and the personalized model and 2) casts the problem of learning these differences as a multi-task learning problem via the local mixture vectors. The main benefit of this approach is that low-rank adaptors can also be federated, i.e., collaboratively learned, and the number of local personalization parameters per client is minimal. This means our approach can be efficiently employed in the cross-device setting as well.

#### Contributions

Here, we summarize our contributions:

- 1.
We propose the Federated Low-Rank Adaptive Learning (FLoRAL), an efficient and lightweight FL framework for personalization. It acts as an extension to multi-task learning algorithms that are specifically designed for FL.
- 2.
Perhaps counter-intuitively, we show experimentally that a model with a mixture of adaptors can beat a mixture of models, even though the number of parameters is significantly larger, e.g., 9x larger.
Also, a model with a mixture of adaptors on stateless clients (e.g., see Section 5) can generalize better than a model with a dedicated fine-tuned adaptor on stateful clients. This is a perfect demonstration of the efficiency of FLoRAL and the benefits of collaborative learning.
- 3.
We release the code for this framework, which includes plug-and-play wrappers for PyTorch models (Paszke et al., ) that are as simple as Floral(model, rank=8, num_clusters=4). We also provide minimal extensions of Flower client and server modules (Beutel et al., ), making the adoption of our method in practice and reproducing the experiments seamless and easy.
- 4.
We run various experiments and ablation studies showing that our FLoRAL framework is efficient given resource constraints in terms of relative parameter increase.
- 5.
We provide the convergence rate for local SGD on a multi-task objective with learnable router and highlight the difficulties that arise from aggregation mismatch.
We also provide an extended analysis in the appendix showing better variance reduction from weight sharing.

## 2 Related Work

#### Multi-task Learning

Our problem can be seen as a multi-task learning problem in which the solutions share a base model. The closest work to ours in this respect is FedEM (Marfoq et al., ), which works by assigning to each client a personalized mixture vector that mixes between a small number of full models such that each model solves one task. FedEM then proceeds with an algorithm based on expectation maximization. One problem is that their approach assumes that the full models should be mixed. In contrast, we assume that the mixed components are only the adaptors, which constitute a small fraction of the model and are thus much more efficient in terms of memory. Other related works on clustering include IFCA (Ghosh et al., ), FedSoft (Li et al., ), and Federated-Clustering (Werner et al., ). The main difference from our work is that we only cluster a small component of the whole model, allowing the clients to benefit from having a shared base model that is learned among all the clients.

#### Personalization

Another approach to personalization is by introducing a proximal regularizer with respect to a reference model.
Ditto (Li et al., ) is a stateful algorithm that trains the local models by solving a proximal objective with respect to a reference model. The reference model is the FedAvg solution, which is attained concurrently by solving the non-regularized objective. Meta-learning approaches, inspired by Finn et al. (), can extend naturally to personalization. For example, Fallah et al. () propose to solve a local objective that is an approximate solution after one local gradient step. Meta-learning also assumes that the local solutions are close to the FedAvg solution as they mimic fine-tuning from the FedAvg solution in some sense. In our approach, we do not assume that the clients are stateful nor that the FedAvg solution is meaningful or close to any of the local solutions. We assume that the local models can benefit from collaboration but still allow for personalization via different mixtures, which is much more memory efficient and can be managed by the server.

#### LoRA

Using mixture of LoRAs in FL is not new due to their popularity. The idea of mixing LoRAs has been explored recently (Wu et al., ) for language models. SLoRA (Babakniya et al., ) focuses on parameter-efficient fine-tuning after federated training and thus does not federate the adaptors. Both FedLoRA (Wu et al., ) and pFedLoRA (Yi et al., ) assume that the LoRAs are not federated as well, where they both also introduce a specific two-stage algorithm to train those LoRAs. The federated mixture of experts (Reisser et al., ) trains an ensemble of specialized models, but they specialize in input rather than prediction. FedJETs (Dun et al., ) uses whole models as experts in addition to a pre-trained feature aggregator as a common expert that helps the client choose the right expert.
Other works explore mixture of LoRAs (Zhu et al., ; Yang et al., ) for adaptation but in a different, non-collaborative context.

#### Representation Learning

Other successful approaches in FL work by feature, prototype, or representation aggregation (Tan et al., ; Nguyen et al., ; Zhang et al., ), which makes them orthogonal to our work.

## 3 Preliminary

#### Notation

We denote $[N]=\{1,2,\ldots,N\}.$
We reserve some indices for specific objects: $k\in[K]$ is a superset index(^2^22We reserve the superset for clients and the subset for clusters.) denoting the client with $K$ being the number of clients, and $c\in[C]$ is a subset index denoting the cluster with $C$ being the number of clusters. The number of clients in cluster c is $K_{c}$.
The client sampling distribution is $\mathcal{K}$, or $\mathcal{K}_{c}$ when given cluster $c$.
The number of samples in client $k$ is $N^{k}$, and the total number of samples is $N=\sum_{k=1}^{K}N^{k}$.
We will use bold lowercase characters to denote vectors, e.g., $\mathbf{w}$ denotes a vector of parameters, and uppercase bold characters for matrices, e.g., $\mathbf{W}+\mathbf{L}$ denotes the adaptive layer.
As a relevant example, the adaptive parameters can be written in vector form as $\mathbf{w}=[\text{vec}(\mathbf{W})^{\top}\ \text{vec}(\mathbf{L})^{\top}]^{\top}$, where $\text{vec}(\cdot)$ is a vectorization operator.
A simplex $\Delta^{C-1}$ is such that $\sum_{c=1}^{C}\bm{\pi}_{c}=1$ and $\bm{\pi}_{c}\geq 0\;(\forall c\in[C])$ for all $\bm{\pi}\in\Delta^{C-1}$.

### 3.1 Federated Learning

Federated learning (FL) is a framework for training a model on distributed data sources while the data remains private and on-premise.
Let $K$ be the number of clients and the local loss function for client $k$ be $f^{k}(\mathbf{w})$.
The global objective is

$$ $\min_{\mathbf{w}}\quad\mathbb{E}_{k\sim\mathcal{K}}[f^{k}(\mathbf{w})],$ (FL) $$

where $\mathcal{K}$ is a client distribution with support $[K]$.
The functions $f^{k}(\mathbf{w})$ can be stochastic as well.

The most straightforward algorithm for optimizing FL is FedAvg (McMahan et al., ), which proceeds in a cycle as follows: 1) send copies of the global model to the participating clients, 2) train the copies locally on the client’s data, and then 3) send back the copies and aggregate them to get the new global model.

The objective FL assumes that a single global model can obtain an optimal solution that works for all the objectives, which is often not feasible due to heterogeneities in data distribution and system capabilities (Kairouz et al., ). A natural approach would be to consider personalized solutions $\mathbf{w}^{k}$ for each client $k$, an approach called PersonalizedFL (PFL).

$$ $\min_{\{\mathbf{w}^{k}\}_{k=1}^{K}}\quad\mathbb{E}_{k\sim\mathcal{K}}[f^{k}( \mathbf{w}^{k})]+\Gamma(\mathbf{w}^{1},\cdots,\mathbf{w}^{K}).$ (PFL) $$

Without the regularizer $\Gamma$, the objective would simply amount to local independent training for each client, so clients do not benefit from collaboration and can suffer from a low availability of data.
Adding the regularizer $\Gamma$ helps introduce a collaboration incentive or inductive bias. For example, Ditto has $\Gamma(\mathbf{w}^{1},\cdots,\mathbf{w}^{K};\mathbf{w}^{*})=\frac{\lambda}{2}
\sum_{k=1}^{K}\lVert\mathbf{w}^{k}-\mathbf{w}^{*}\rVert^{2}$, where $\mathbf{w}^{*}$ is the solution of FL, which implies that the personalized solutions should stay close to the FL solution.

The Ditto (Li et al., ) objective still assumes that a single global solution is a good enough center for all clients, which can be limiting and impractical for real-world heterogeneous problems. Given a proximal regularization, an improvement on this assumption would be to introduce more than one center or cluster, such that clients belonging to some cluster are close to its center. The problem of finding the cluster centers is called Clustered FL (CFL).

Let $C$ be the number of ground-truth clusters and assume that it is known.
Let $\mathcal{K}_{c}$ be the client sampling distribution of cluster $c$. We can reformulate the objective to account for clusters as follows

$$ $\min_{\{\mathbf{w}_{c}\}_{c=1}^{C}}\quad\sum_{c=1}^{C}\mathbb{E}_{k\sim \mathcal{K}_{c}}[f^{k}(\mathbf{w}_{c})].$ (CFL) $$

We can generalize the previous objectives under one objective by introducing (learnable) client mixtures $\bm{\pi}^{k}\in\Delta^{C-1}$ for all $k\in[K]$ with regularization $\Gamma$, e.g. for weight sharing, which we denote as Mixed Federated Learning (MFL)

$$ $\displaystyle\min_{\{\mathbf{w}_{c}\}_{c=1}^{C},\{\bm{\pi}^{k}\}_{k=1}^{K}}$ $\displaystyle\quad\sum_{c=1}^{C}\mathbb{E}_{k\sim\mathcal{K}}\left[\bm{\pi}^{k }_{c}f^{k}(\mathbf{w}_{c})\right]+\Gamma(\{\mathbf{w}_{c}\}_{c=1}^{C}),$ (MFL) s.t. $\displaystyle\quad\bm{\pi}^{k}\in\Delta^{C-1},\forall k\in[K],.$ $$

We can see that local losses from different clusters are mixed differently according to each client. From this formulation, the previous optimization problems can be recovered with the following settings

$$ $\displaystyle\Gamma(\cdot)=0\quad\text{and}$ $\displaystyle C=1$ $\displaystyle\longrightarrow$ $\displaystyle\quad\lx@cref{creftype~refnum}{eq:fl},$ $\displaystyle C=K\quad\text{and}$ $\displaystyle\bm{\pi}^{k}_{c}=\bm{1}\{k=c\}$ $\displaystyle\longrightarrow$ $\displaystyle\quad\lx@cref{creftype~refnum}{eq:pfl},$ $\displaystyle\Gamma(\cdot)=0\quad\text{and}$ $\displaystyle\bm{\pi}^{k}_{c}=\bm{1}\{k\in\operatorname{supp}(\mathcal{K}_{c})\}$ $\displaystyle\longrightarrow$ $\displaystyle\quad\lx@cref{creftype~refnum}{eq:cfl},$ $$

where $\bm{1}$ is the indicator function.

Finally, in our formulation we use particular form of $\Gamma$, where we split $\mathbf{w}_{c}$ as $\mathbf{w}_{c}=[\mathbf{u}_{c},\mathbf{a}_{c}]$ and define

$$ $\displaystyle\Gamma(\{\mathbf{w}_{c}\}_{c=1}^{C})=\begin{cases}0&\text{ if } \mathbf{u}_{i}=\mathbf{u}_{j}\;\forall i,j\in[C],\\ +\infty&\text{otherwise.}\\ \end{cases}$ $$

This weight-sharing across clients is based on the inductive bias that the optimal personalized solutions have low-complexity differences across the population (i.e., differences that could be explained in a parameter-efficient way). Therefore, in the rest of the paper, we do not use $\Gamma(\{\mathbf{w}_{c}\}_{c=1}^{C})$, but we replace it with explicit parametrization, where $\mathbf{w}_{c}=(\mathbf{u},\mathbf{a}_{c})$. We refer to $\{\mathbf{a}_{c}\}_{c\in[C]}$ as adaptors.
The final objective, which we call MFL with Weight Sharing (MFL-WS), is of the form

$$ $\displaystyle\min_{\mathbf{u},\{\mathbf{a}_{c}\}_{c=1}^{C},\{\bm{\pi}^{k}\}_{k =1}^{K}}$ $\displaystyle\quad\sum_{c=1}^{C}\mathbb{E}_{k\sim\mathcal{K}}\left[\bm{\pi}^{k }_{c}f^{k}(\mathbf{u},\mathbf{a}_{c})\right]$ (MFL-WS) s.t. $\displaystyle\quad\bm{\pi}^{k}\in\Delta^{C-1},\forall k\in[K].$ $$

In the next section, we discuss the particular choice of adaptors.

### 3.2 Parameter-Efficient Adaptors

#### Linear layer

This LoRA was introduced in (Hu et al., ). Let $\mathbf{W}\in\mathbb{R}^{d_{out}\times d_{in}}$ be the base linear layer. We introduce a low-rank adaptive layer $\mathbf{L}:=\mathbf{U}\mathbf{V}^{\top}$ with rank $r$, where $\mathbf{U}\in\mathbb{R}^{m\times r}$ and $\mathbf{V}\in\mathbb{R}^{n\times r}$. We initialize $\mathbf{L}$ such that $\mathbf{U}$ is random (or initialized similarly to $\mathbf{W}$) and $\mathbf{V}$ is zero.
The low-rank adaptive layer $\tilde{\mathbf{W}}$ is

$$ $\textstyle\tilde{\mathbf{W}}:=\mathbf{W}+\mathbf{L}=\mathbf{W}+\mathbf{U} \mathbf{V}^{\top}.$ (1) $$

#### Relative parameter budget

It is easy to see that the number of parameters in a linear LoRA is $(m+n)r$, which can be much smaller than $mn$ for small $r$. We can have a constraint on the number of parameters relative to the model size, i.e., $(m+n)r\leq\rho mn$, where $\rho>0$ is the relative parameter budget per adaptor (e.g., $\rho=0.01$ for a maximum of 1% increase in model size per adaptor). Given a specific $\rho$ based on system capabilities, $r$ can be automatically set to be the maximum such that $r\leq\rho mn/(m+n)$, or just $r=\lfloor\rho mn/(m+n)\rfloor$. Note how $r$ attains its largest values when $m=n$, where the equation simply becomes $r\leq\rho n/2$. We hereafter refer to $\rho$ as the budget (per adaptor), and set it to either 1% or 10% in the experiments. Note that for certain models, it is impossible to satisfy the budget if $\rho mn/(m+n)<1$, so we enforce a minimum rank of 1 (otherwise, there will be no adaptors).

#### Convolution layer

Consider a 2D convolution layer. Let $\mathbf{W}\in\mathbb{R}^{c_{out}\times c_{in}\times k_{1}\times k_{2}}$ be the base convolution layer. We similarly introduce a “low-rank” adaptive convolution layer $\mathbf{L}=\mathbf{U}*\mathbf{V}$ with rank $r$, such that the adaptive convolution $\tilde{\mathbf{W}}$ becomes $(\mathbf{W}+\mathbf{L})*x=\mathbf{W}*x+\mathbf{L}*x=\mathbf{W}*x+\mathbf{U}*(
\mathbf{V}*x)$, where $*$ is the convolution operator. We call these adaptive layers Convolution LoRAs (ConvLoRAs), which are more general than a linear LoRA on a matricized convolution as is often done in practice, e.g., in the official implementation (Hu et al., ).

We can have more than one way of defining $\mathbf{U}$ and $\mathbf{V}$. Note that one of the convolutions in the adaptor should share the same padding, stride, and dilation as the base convolution, while the other should be such that it does not change the resolution of the input. Depending on what is meant by “rank” for convolution layers, we can either reduce the rank channel-wise, filter-wise, both, or as a linear layer by matricizing the convolution. We discuss these in detail in Section F.1 and show that a novel channel+filter-wise implementation is more parameter-efficient and performs better. More details about low-rank constructions of convolution layers can be found in (Jaderberg et al., ; Khodak et al., ).

#### Bias

Biases are vectors, so a low-rank parameterization would not be possible, and there is no straightforward way to have a parameter-efficient adaptor except by considering weight-sharing or a single constant. Due to biases contributing a small percentage of the overall number of parameters in large models, we consider adaptive biases as $\mathbf{b}+\mathbf{L}_{\mathbf{b}}$ with extra biases $\mathbf{L}_{\mathbf{b}}$ initialized to 0. Although this adaptor is not parameter-efficient relative to $\mathbf{b}$, the small impact on the overall parameter count means that this is not a significant limitation. Moreover, as demonstrated in Section G.3, this approach can be crucial for achieving optimal accuracy.

## 4 Analysis for (MFL)

In order to connect the analysis with our FLoRAL framework, we can consider a vector parameterization of the model given client $k$ and cluster $c$ as in MFL-WS.
Namely, we have $\mathbf{w}_{c,t}^{k}=(\mathbf{u}^{k}_{t},\mathbf{a}^{k}_{c,t})$,
where it is understood as the concatenation of the two vectors and we emphasize that $\mathbf{u}^{k}_{t}$ does not depend on the cluster. For example, $\mathbf{u}^{k}_{t}=\text{vec}(\mathbf{W}^{k}_{t})$ can be the base layer and $\mathbf{a}^{k}_{c,t}=(\text{vec}(\mathbf{U}^{k}_{c,t})\top\ \ \text{vec}(
\mathbf{V}^{k}_{c,t})^{\top})^{\top}$ can be the LoRA adaptor.
The analysis proceeds without assumptions on the form of $\mathbf{w}_{c,t}^{k}$. In Appendix B, we show the benefits of weight-sharing under suitable assumptions that make use of such a structure.

Recall $\bm{\pi}^{k}\in\Delta^{C-1}$ the ground-truth router of client $k$.
In general, the probability of sampling a *single* client $k$ is often chosen to be proportional to the number of its data points, i.e., $p(k)\propto N^{k}$ (note this is different from sampling a *cohort*, which is explained below). On the other hand, the probability that client $k$ samples cluster $c$ is $p(c|k)=\bm{\pi}^{k}_{c}$ by construction. Since we have $p(k,c)=p(c|k)p(k)\propto\bm{\pi}^{k}_{c}N^{k}$, we can divide $p(k,c)$ by $p(c)=\sum_{k}p(k,c)$ to get $p(k|c)$.
Overall, we have $p(c|k)=\bm{\pi}^{k}_{c}$ by construction and $p(k)=\frac{N^{k}}{N}$ by assumption, so that

$$ $p(k,c)=\frac{N^{k}}{N}\bm{\pi}^{k}_{c},\quad\quad p(c)=\sum_{k=1}^{K}\frac{N^{ k}}{N}\bm{\pi}^{k}_{c},\quad\quad p(k|c)=\frac{\bm{\pi}^{k}_{c}N^{k}}{\sum_{k^ {\prime}=1}^{K}\bm{\pi}_{k^{\prime}c}N_{k^{\prime}}}.$ (2) $$

Thus, we use the per-cluster aggregator $p(k|c)$ since we aggregate variables per cluster, e.g., aggregate $\mathbf{w}_{c,t}^{k}$ across clients.

We now introduce notations for the analysis. Denote $\hat{\bm{\pi}}_{c,t}^{k}$ the learned estimate of $\bm{\pi}_{c}^{k}$ at iteration $t$.
Denote $\mathbf{p}_{c}^{k}:=p(k|c)=\frac{\bm{\pi}_{c}^{k}N^{k}}{\sum_{k^{\prime}=1}^{K
}\bm{\pi}^{k^{\prime}}_{c}N_{k^{\prime}}}$ and similarly $\hat{\mathbf{p}}_{c,t}^{k}=\frac{\hat{\bm{\pi}}_{c,t}^{k}N^{k}}{\sum_{k^{
\prime}=1}^{K}\hat{\bm{\pi}}^{k^{\prime}}_{c,t}N_{k^{\prime}}}$.
Define the aggregation operators $\mathbb{E}_{k|c}[\mathbf{w}_{c,t}^{k}]:=\sum_{k=1}^{K}\mathbf{p}_{c}^{k}
\mathbf{w}_{c,t}^{k}$ and $\mathbb{E}_{c|k}[\mathbf{w}_{c,t}^{k}]:=\sum_{c=1}^{C}\bm{\pi}_{c}^{k}\mathbf{
w}_{c,t}^{k}$.
Additionally, we denote using $\hat{\mathbb{E}}$ the same aggregation operators but taken with respect to $\hat{\mathbf{p}}_{c,t}^{k}$ and $\hat{\bm{\pi}}_{c,t}^{k}$, respectively.

Recall that the mixed (or personalized) objective of client $k$ is $\mathbb{E}_{c|k}[f^{k}(\mathbf{w}_{c,t}^{k})]:=\sum_{c=1}^{C}\bm{\pi}_{c}^{k}f
^{k}(\mathbf{w}_{c,t}^{k})$.
The objective MFL can be stated more succinctly as

$$ $\min_{\mathbf{w}_{1},\cdots,\mathbf{w}_{C}}\quad\mathbb{E}_{c,k}[f^{k}(\mathbf {w}_{c})].$ (3) $$

###### Remark 4.1 .

Consider a cluster assignment router (i.e., one-hot w.r.t. $c$). Let $k\sim\mathcal{K}$ and $\bar{c}$ be its associated cluster. Then, $\mathbb{E}_{c|k}[f^{k}(\mathbf{w}_{c})]=f^{k}(\mathbf{w}_{\bar{c}})$ and $\mathbb{E}_{k|c}[f^{k}(\mathbf{w}_{c})]=f_{\bar{c}}(\mathbf{w}_{\bar{c}})$.

###### Remark 4.1 .

#### Local SGD

With the above notation in hand, we consider the local SGD setting (Stich, ).
We note that our work is orthogonal to (Wang & Ji, ) since they can estimate $p(k)$ with an unbiased participation indicator variable, whereas we assume that $p(k)$ is known and estimate $p(c|k)$ instead, which itself cannot be unbiased because of the dependency of the estimate on the optimal objective values. Further, the analysis Pillutla et al. () cannot be directly adapted because it is concerned with a split of global and local variables (i.e., weights and mixture, respectively), whereas we take into account weight sharing across clusters and train mixtures explicitly. Thus, we follow the generic local SGD framework with perturbed iterates and demonstrate the benefits of our parameterization where applicable.

For client $k$ and cluster $c$, the algorithm starts with the initialization $\mathbf{w}_{c,0}^{k}=\hat{\mathbb{E}}_{k|c}[\mathbf{w}_{c,0}^{k}]$ with $\hat{\bm{\pi}}_{c,0}^{k}=1/C$, without loss of generality.
We define the aggregated gradient as $\mathbf{g}_{c,t}^{k}=\nabla f^{i_{t}}(\mathbf{w}_{c,t}^{k})$ for independently sampled clients ${i_{t}}\sim\mathcal{K}$ every $H$ steps, i.e., $i_{t}=\cdots=i_{t_{0}}$ for all $t\geq t_{0}$ where $t_{0}=t-(t\mod H)$. Though similar, we will explicitly reserve the random variables ${i_{t}}$ for denoting sampled clients at time $t$ and $k$ for denoting a “tracking” variable of the expected performance over clients, which will be independent of ${i_{t}}$.
Let $c\in[C]$ and define $f_{c}:=\mathbb{E}_{{i_{t}}|c}[f^{i}]$. Assume an unbiased estimate $\mathbb{E}_{{i_{t}}|c}\nabla f^{i_{t}}(\mathbf{w}_{c,t}^{k})=\nabla f_{c}(
\mathbf{w}_{c,t}^{k})$,
where we denote $\mathbb{E}_{{i_{t}}|c}$ the expectation with respect to ${i_{t}}$ given $c$.
Let $\mathbf{w}_{c}^{*}$ be any point satisfying $\nabla f_{c}(\mathbf{w}_{c}^{*})=0$.
We run $T$ gradient steps $\mathbf{w}_{c,t+1}^{k}=\mathbf{w}_{c,t}^{k}-\eta_{t}\mathbf{g}_{c,t}^{k}$ with a learning rate $\eta_{t}$.
Synchronization happens every $H$ iterations so that $\mathbf{w}_{c,t+1}^{k}=\hat{\mathbb{E}}_{k|c}[\mathbf{w}_{c,t}^{k}-\eta_{t}
\mathbf{g}_{c,t}^{k}]$, $\forall t$ such that $(t+1)\mod H=0$.
The algorithm we use in the analysis is the following

$$ $\displaystyle\mathbf{w}_{c,t+1}^{k}$ $\displaystyle=\left\{\begin{matrix}[l]\mathbf{w}_{c,t}^{k}-\eta_{t}\nabla f^{i _{t}}(\mathbf{w}_{c,t}^{k}),\quad&\text{if }(t+1)\mod H>0\\ \hat{\mathbb{E}}_{k|c,\hat{\bm{\pi}}_{t}}[\mathbf{w}_{c,t}^{k}-\eta_{t}\nabla f ^{i_{t}}(\mathbf{w}_{c,t}^{k})],\quad&\text{otherwise,}\end{matrix}\right.$ (4) $\displaystyle\hat{\bm{\pi}}_{t+1}$ $\displaystyle\propto\left\{\begin{matrix}[l]\hat{\bm{\pi}}_{t},\quad&\text{if }(t+1)\mod H>0\\ \exp(-\eta_{t}f_{c}(\mathbf{w}_{c,t+1}^{k})),\quad&\text{otherwise}.\end{ matrix}\right.$ (5) $$

All of the practical implementation details will be discussed in more detail in the next section.

Following the local SGD analysis in (Stich, ), we make the following corresponding assumptions.

###### Assumption 4.2 ( $L$ -smoothness and $\mu$ -strong convexity) .

$f_{c}$ is $L$-smooth and $\mu$-strongly convex.
In other words, $\forall\mathbf{w},\mathbf{v}\in\mathbb{R}^{d},\forall c$, the following holds

$$ $\displaystyle f_{c}(\mathbf{v})-f_{c}(\mathbf{w})-\langle\nabla f_{c}(\mathbf{ w}),\mathbf{v}-\mathbf{w}\rangle$ $\displaystyle\leq\tfrac{L}{2}\lVert\mathbf{v}-\mathbf{w}\rVert,$ (6) $\displaystyle f_{c}(\mathbf{v})-f_{c}(\mathbf{w})-\langle\nabla f_{c}(\mathbf{ w}),\mathbf{v}-\mathbf{w}\rangle$ $\displaystyle\geq\tfrac{\mu}{2}\lVert\mathbf{v}-\mathbf{w}\rVert.$ (7) $$

###### Assumption 4.3 (Bounded second moment) .

$\forall\mathbf{w}\in\mathbb{R}^{d}$, $\forall c\in[C]$,
$\mathbb{E}_{{i_{t}}|c}\lVert\nabla f^{{i_{t}}}(\mathbf{w})\rVert^{2}\leq G^{2}$.

###### Assumption 4.4 (Bounded variance) .

$\forall\mathbf{w}\in\mathbb{R}^{d}$, $\forall c\in[C]$,
$\mathbb{E}_{{i_{t}}|c}\lVert\nabla f_{c}(\mathbf{w})-\nabla f^{{i_{t}}}(
\mathbf{w})\rVert^{2}\leq\sigma^{2}$.

The main quantity of interest in our analysis is the total variation distance $\lVert\bm{\delta}_{c,t}\rVert_{1}$ where $\bm{\delta}_{c,t}:=(\lvert\hat{\mathbf{p}}_{c,t}^{k}-\mathbf{p}_{c}^{k}\rvert)
_{k=1}^{K}$.
We may also refer to it as the aggregation mismatch, or just mismatch.

Using the router update in 5, we can obtain the convergence bound of local SGD but with an extra $\mathcal{O}(\frac{G}{\mu T})$ term and a learning rate inversely proportional to $\max\{L,G\}$ instead of $L$.
This seems to be unavoidable without extra assumptions due to a circular dependency between $\bm{\delta}_{c,t}$ and $f_{c}(\mathbf{w}_{c,t}^{k})$.
However, we show in Corollary A.5 that local SGD descent is recovered when $\hat{\mathbf{p}}_{c,t}^{k}=\mathbf{p}_{c}^{k}$.
The convergence rate for this general case can be seen in Theorem A.9.

Here, we present a convergence bound given an assumption on the decrease of $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$.
The exact bound can be found in Theorem A.10.
We defer all proofs to Appendix A.

###### Theorem 4.5 .

Consider the setup in Section 4.
Let $\tilde{\sigma}^{2}=\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}$, $\kappa=\frac{L}{\mu}$, and $U_{c}=\min_{k;\,p(c)\leq\bm{\pi}_{c}^{k}}\{p(c)/\bm{\pi}_{c}^{k}\}$.
Initialize $\hat{\bm{\pi}}_{c,0}^{k}=1/C$ for all $k\in[K]$, and assume $\lvert\mathbf{p}_{c}^{k}-\hat{\mathbf{p}}_{c,t}^{k}\rvert\leq\lvert\mathbf{p}_
{c}^{k}-\hat{\mathbf{p}}_{c,0}^{k}\rvert$ for all $t\geq 0$.
Assume that $f_{c}(\mathbf{w}_{c}^{*})=0$ without loss of generality,
and assume that $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}\leq(t+s)^{-\beta}\lVert\bm{\delta}_{c,0}
\rVert_{1}^{2}$ for $\beta\in(0,1)$.
Let $\eta_{t}\leq\frac{\alpha}{t+s}$ with $\alpha=\frac{1}{\mu}$ and $s\geq\max\{3H,4\kappa/U_{c}\}$.
Then,

$$ $\mathbb{E}f_{c}(\hat{\mathbf{w}}_{c,T})-f_{c}(\mathbf{w}_{c}^{*})\leq\mathcal{ O}\left(\frac{\tilde{\sigma}^{2}}{\mu T}+\frac{G^{2}\lVert\bm{\delta}_{c,0} \rVert_{1}^{2}}{\mu T^{1{\color[rgb]{1,0,1}\definecolor[named]{pgfstrokecolor} {rgb}{1,0,1}\pgfsys@color@cmyk@stroke{0}{1}{0}{0}\pgfsys@color@cmyk@fill{0}{1} {0}{0}+\beta}}}+\frac{G^{2}\kappa H^{2}}{\mu T^{2}}\right).$ (8) $$

Observe that we recover local SGD asymptotically when $\lVert\bm{\delta}_{c,0}\rVert_{1}=0$ and $U_{c}=1$ (which is the case for FL), or when $\beta\to 1$ since $\lVert\bm{\delta}_{c,0}\rVert_{1}\leq 2$.
Observe also that we obtain a general notion of variance reduction through $\tilde{\sigma}^{2}=\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}$. Indeed, $\lVert\mathbf{p}_{c}\rVert^{2}=1/K$ in the FL case and $\lVert\mathbf{p}_{c}\rVert^{2}=1/K_{c}$ for cluster $c$ in the CFL case, where $K_{c}$ is the number of clients in cluster $c$.

Note that $U_{c}\geq p(c)\approx 1/C$ for balanced clustered FL problems, but this can become as low as $p(k)$ when a cluster contains one client. The difficulty is inherent for such edge cases, but the dependence on $U_{c}^{-1}$ in the bound appears only in higher-order terms (see Theorem A.10 for the full bound). We believe that having independent learning rates per client should remove the $\min$ in $U_{c}$, and a finer analysis on the quantity $\hat{\mathbf{p}}_{c,t}^{k}/\mathbf{p}_{c}^{k}$ can bound $U_{c}$ further from below, but we leave this for future work.

In Appendix B,
we extend the analysis to the FML case with weight sharing (explained in the next section).
Given fine-grained variances and cluster heterogeneity conditions for which weight sharing works best, we can demonstrate better variance reduction of the base layer under a trade-off with cluster heterogeneity (see 33, for example). A better understanding of weight sharing and the assumptions in Appendix B is an interesting direction for future work.

###### Assumption 4.2 ( L 𝐿 L italic_L -smoothness and μ 𝜇 \mu italic_μ -strong convexity) .

###### Assumption 4.3 (Bounded second moment) .

###### Assumption 4.4 (Bounded variance) .

###### Theorem 4.5 .

## 5 Practical Implementation

#### Mixture of adaptors

The (MFL) objective suggests that any learning algorithm will have to run at least $C$ forward passes per step for each client, which is necessary for computing the objective.
One way to circumvent that is by “moving” the mixture inside the objective.
This allows us to mix the weights and perform one forward pass.
We call this Federated Mixture Learning (FML)(^3^33The “M” in the acronym follows the position of the mixture in the objective.)

$$ $\displaystyle\min_{\{\mathbf{w}_{c}\}_{c=1}^{C},\{\bm{\pi}^{k}\}_{k=1}^{K}}$ $\displaystyle\quad\mathbb{E}_{k\sim\mathcal{K}}\left[f^{k}\left(\sum_{c=1}^{C} \bm{\pi}^{k}_{c}\mathbf{w}_{c}\right)\right]+\Gamma(\{\mathbf{w}_{c}\}_{c=1}^{ C}),$ ( FML ) s.t. $\displaystyle\quad\bm{\pi}^{k}\in\Delta^{C-1},\forall k\in[K].$ $$

Observe that for convex $f^{k}$, this proxy acts as a lower bound since $f^{k}(\sum_{c=1}^{C}\bm{\pi}^{k}_{c}\mathbf{w}_{c})\leq\sum_{c=1}^{C}\bm{\pi}^
{k}_{c}f^{k}\left(\mathbf{w}_{c}\right)$ due to Jensen’s inequality.
Thus, for convex losses $f^{k}$, minimizing MFL implies minimizing FML, but not vice versa. In this sense, FML could be seen as a more general problem, and MFL is a relaxation. We note that this problem is similar to FedEM (Marfoq et al., ), but we only use $K$ mixture vectors of size $C$ and we do not have sample-specific weights.

This formulation is especially useful for additive adaptors since the weights can be merged into one.
Also, it allows us to mix the $C$ adaptors and run one forward pass, which is often more efficient than running $C$ forward passes.
This is particularly true for inference, in which the weights can be merged once so that forward passes come without extra cost.
The benefits of weight sharing can also manifest through better variance reduction, which is demonstrated in Appendix B.

#### Learning the mixture weights

Instead of optimizing $\bm{\pi}^{k}$ directly in $\Delta^{C-1}$, we consider the parameterization $\bm{\pi}^{k}=\text{Softmax}(\bm{\theta}^{k})$ for some vector $\bm{\theta}^{k}\in\mathbb{R}^{C}$, i.e., $\bm{\pi}^{k}_{c}=\frac{\exp(\bm{\theta}^{k}_{c})}{\sum_{c^{\prime}=1}^{C}\exp(
\bm{\theta}^{k}_{c^{\prime}})}$.

Note that $\bm{\theta}^{k}$ is a local parameter and not aggregated. The cost of storing $\bm{\theta}^{k}$ in each client is minimal as it is of size $C$, which is often significantly small compared to the model size $d$. Even if we consider stateless clients, the server should be able to handle an extra storage and communication budget of $\bm{\theta}^{k}$, which is $KC$.
Note that the server does not need to know the IDs of the clients and that the clients can learn the $\bm{\theta}^{k}$ from scratch every round, as it is not expensive.
Let us consider a scenario where the cost $KC$ is prohibitive. Suppose the model size is $d=1000$ and the client participation ratio is $p=0.1\%$. The extra cost for the server will be $pKd=K<KC$ for $C>1$.
Thus, the prohibitive scenario occurs only when $pd<C$, which is often not the case as $d$ is rarely this small (e.g., a 32 by 32 linear layer with bias has more 1000 parameters), let alone $p$.
The only drawback with stateless clients is the need to learn $\bm{\theta}^{k}$ from scratch every round, which is cheap to learn given the current model.

In Appendix C, we make a connection between the router update in 5 for (MFL) and the gradient descent update of $\bm{\pi}^{k}$ on (FML) under the Softmax parameterization, and show conditions under which they become equivalent.

Figure: Algorithm 1 Simple FLoRAL Averaging

#### FLoRAL problem and algorithm

We obtain the FLoRAL problem by employing the weight sharing regularizer in (MFL-WS) to (FML) and using low-rank adaptors $\mathbf{a}_{c}$.
Weight sharing and low-rankedness are explicit in the parameterization.

The algorithm we use to solve (FLoRAL) in practice is shown in Algorithm 1 and is straightforward. We use simultaneous gradient descent for $\mathbf{u}$ and $\mathbf{a}_{c}$, so we simply write the update in terms of the concatenation $\mathbf{w}_{c}$.
One trick we employ to ensure better convergence is LoRA preconditioning, which is detailed in Appendix D.

## 6 Experiments

In this section, we empirically show the performance of our lightweight framework. In particular, we show that our FLoRAL framework, which can have as few as $4\%$ extra parameters, can possibly outperform an ensemble of models, which can collectively have up to $300\%$ extra parameters.
It can also outperform clients equipped with a local adaptor.
This clearly shows the benefit of collaborative learning and how personalization and adaptation can also be done efficiently in a collaborative setting.

We consider datasets with known ground-truth clusters, for example, linear and MLP synthetic datasets, MNIST and CIFAR-10 with rotation or label shift Ghosh et al. (); Werner et al. (), CIFAR-100 with 10 clusters, each having 10 unique labels (Werner et al., ).
Further, we consider the same datasets with only 5% data availability per client (with 10 being the minimum number of samples per client).
This is to demonstrate the benefits of our approach, which would be when a large model might overfit the local datasets. The results can be seen in Table 1. Further ablation studies on $\rho$ and $C$, the adaptors, and the type of ConvLoRAs can be found in Table 3, Table 5, and Table 5, respectively.

In general, we follow the experimental setup in (Werner et al., ) or (Pillutla et al., ) and implement our experiments using PyTorch (Paszke et al., ) and Flower (Beutel et al., ).
We use the simplest setup possible without any tricks other than LoRA preconditioning, which is explained in Appendix D. We discuss another trick called LoRA centering in Appendix E, which we believe is potentially useful but is still in the experimental phase. The algorithm we use in practice is shown in Algorithm 1. Further details can be found in Appendix G.

We emphasize that we do not aim to improve over the state-of-the-art.
However, we can refer readers to (Werner et al., ) for a relevant comparison, where we should note that the algorithm they use has a quadratic running time in the number of clients. We implemented and tested their linear-time momentum-based algorithm, but it suffers from cluster collapse on our synthetic tasks.

**Table 1: Accuracy of different methods on our tasks. $\bm{\pi}^{*}$ indicates the use of optimal routing. Full = 100% data, Reduced = 5% data. R = Rotate, LS = Label Shift. Bold = best, italic = second best.**
| Method | $\bm{\pi}^{*}$ | MNIST | CIFAR-10 | CIFAR-100 |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Full | Reduced | Full | Reduced | Full | Reduced |  |  |  |  |  |  |
| R | LS | R | LS | R | LS | R | LS |  |  |  |  |
| FedAvg |  | 91.5 0.6 | 25.8 2.4 | 78.2 0.6 | 23.2 0.9 | 64.4 0.3 | 21.9 0.4 | 45.6 0.3 | 18.7 0.4 | 29.2 1.8 | 20.7 1.4 |
| Local Adaptor |  | 86.6 0.3 | 84.5 1.8 | 47.4 5.4 | 32.0 2.3 | 66.3 0.5 | 68.8 0.5 | 33.5 0.5 | 30.8 0.8 | 85.1 0.8 | 39.5 2.8 |
| Ensemble | ✗ | 92.0 0.1 | 93.8 0.5 | 66.7 5.3 | 86.4 0.4 | 71.0 2.8 | 46.4 9.2 | 42.4 0.9 | 41.7 4.6 | 86.2 0.0 | 43.7 3.2 |
| Ensemble | ✓ | 95.8 0.3 | 95.6 0.3 | 88.2 1.4 | 87.6 1.3 | 73.7 0.2 | 73.3 0.1 | 45.0 0.9 | 45.1 0.8 | 92.8 0.3 | 55.0 0.4 |
| FLoRAL(1%) | ✗ | 91.3 0.6 | 89.7 3.2 | 73.1 3.7 | 46.0 9.9 | 65.5 0.4 | 62.8 8.8 | 45.2 0.3 | 44.2 0.9 | 81.3 0.5 | 52.2 0.5 |
| FLoRAL(1%) | ✓ | 93.9 0.8 | 93.7 0.2 | 87.5 2.1 | 87.6 0.5 | 68.9 0.2 | 72.2 0.2 | 47.8 0.9 | 44.1 0.6 | 82.4 0.2 | 53.1 0.4 |
| FLoRAL(10%) | ✗ | 91.8 1.0 | 93.1 0.9 | 75.7 2.3 | 70.8 7.1 | 65.1 0.3 | 56.2 5.5 | 44.5 0.4 | 42.1 0.2 | 87.3 0.3 | 51.2 1.0 |
| FLoRAL(10%) | ✓ | 94.5 0.6 | 94.2 0.2 | 87.0 0.7 | 86.9 0.5 | 69.3 0.5 | 72.1 0.5 | 47.2 0.3 | 42.7 0.3 | 86.6 0.5 | 53.9 0.9 |

#### Synthetic

Consider a regression task where we want to learn $\mathbf{y}\in\mathbb{R}^{d_{y}}$ given $\mathbf{x}\in\mathbb{R}^{d_{x}}$, where $\mathbf{x}\sim\mathcal{N}(0,\mathbf{I}_{d_{x}})$. We construct two versions of this regression task: one is based on a linear model plus a personalized LoRA, and the other is based on a similar setup on the first layer of a two-layer ReLU net.
This dataset provides a proof of concept for our method. Namely, the target model for client $k$ is

$$ $\textstyle\mathbf{y}_{\text{lin}}^{k}(\mathbf{x})=\sum_{c=1}^{C}\bm{\pi}^{k}_{ c}(\mathbf{W}+\alpha\mathbf{U}_{c}\mathbf{V}_{c}^{\top})\mathbf{x},$ (9) $$

where $\mathbf{W}\in\mathbb{R}^{d_{y}\times d_{x}}$, $\mathbf{U}_{c}\in\mathbb{R}^{d_{y}\times r}$, $\mathbf{V}_{c}\in\mathbb{R}^{d_{x}\times r}$, and $\alpha\in\mathbb{R}$.
Similarly, consider the 2-layer ReLU neural net
$\mathbf{y}_{\text{mlp}}^{k}(\mathbf{x})=\mathbf{\Phi}(\mathbf{y}_{\text{lin}}^
{k}(\mathbf{x}))_{+}$
for $\mathbf{\Phi}\in\mathbb{R}^{d_{y}\times d_{y}}$,
where we write the ReLU function as $(\cdot)_{+}$.
We discuss these datasets in more detail in Section G.1.
The results in Table 3 show the performances with $K=10$ and $C=2$ for the linear version and $K=20$ and $C=4$ for the MLP version.
Note that even the linear task is not easy to solve, and similar problems have been studied in the mixed linear regression literature, e.g., see (Chen et al., ).

**Table 2: Ablation of $\rho$ and $C$.**
| $C$ | $\rho$ | CIFAR-10 | CIFAR-100 |  |
| --- | --- | --- | --- | --- |
| R | LS |  |  |  |
| $\times 0.5$ | 1% | 66.5 | 36.3 | 48.8 |
| $\times 0.5$ | 10% | 66.8 | 41.6 | 50.9 |
| $\times 1$ | 1% | 70.2 | 74.1 | 51.7 |
| $\times 1$ | 10% | 71.5 | 74.2 | 57.4 |
| $\times 2$ | 1% | 69.0 | 73.8 | 51.3 |
| $\times 2$ | 10% | 70.8 | 74.1 | 54.8 |

#### MNIST and CIFAR-10

We test our method on a clustered version of MNIST and CIFAR-10 datasets in which the clusters are generated according to one of the following tasks: 1) a rotation task, where each cluster $c$ rotates the image by $2\pi c/C$ degrees, and 2) a label shift task, where cluster $c$ shifts the labels by $y\mapsto(y+c)\mod 10$. Following (Werner et al., ), we choose $C=4$ and $K=300$ for MNIST and sample $10\%$ of the clients every round, and choose $C=4$ and $K=20$ for CIFAR-10 and sample all clients every round. The model for MNIST is a 2-layer ReLU net, whereas for CIFAR-10, it has two convolution layers followed by a 2-layer ReLU net classifier.

#### CIFAR-100

The CIFAR-100 task is to train a model that is not expressive enough to fit 100 labels yet expressive enough to fit 10 labels. Thus, we expect that the model would benefit from collaboration with the right clients. The setup is to divide the 100 labels into $C=10$ clusters such that each cluster has 10 unique labels and then split each cluster uniformly into $K/C=10$ clients (so, in total, $K=100$). The model used is VGG-8, a custom-sized model from the VGG-family (Simonyan & Zisserman, ) that is specifically able to fit 10 labels but not 100. We sample 25 clients every round, which makes the task harder than (Werner et al., ) and can result in overfitting.

#### Discussion

The results in Figure 8 show the robustness of FLoRAL with respect to its hyperparameters, particularly when $C$ is larger than the number of ground-truth clusters.
As for Table 1, we can see that FLoRAL is always competitive with the best baseline, which is ensembles with optimal routers. A particularly interesting case is the reduced CIFAR-10-R experiments, in which FLoRAL(1%) and FLoRAL(10%) surprisingly outperform ensembles even *in the optimal routing case*, which seems slightly counter-intuitive. We believe this to be due to the variance reduction shown in Appendix B.
Note that FLoRAL($\rho$) has $C\rho d$ extra parameters, whereas ensembles have $(C-1)d$. For example, when $d=1,000$ and $C=4$, FLoRAL(1%) adds $40$ parameters vs. $3,000$ for ensembles, and when $C=10$, it is $100$ vs. $9,000$. Local Adaptors require each client to have its own adaptor (i.e., each client has a storage of size $\rho d$). Regardless of its feasibility, FLoRAL is shown to leverage the power of collaboration when local adaptors fail to do so. We note that the low accuracies of FLoRAL with learned routing in reduced MNIST-LS can be alleviated with more training rounds, e.g., see Section G.5 for plots.
Overall, these results demonstrate that FLoRAL is an efficient personalization method, and it can lead to better generalization in low-data regimes.

## 7 Conclusion

In this work, we presented a parameter-efficient method for collaborative learning and personalization. Here are some future directions we are interested in exploring:

- •
Is there a principled way to understand the trade-off between parameter-efficiency and the accuracy gains from increasing $\rho$ or $C$ and how to choose them in practice?
- •
FML can be formulated as a “multimodal optimization” problem (Wong, ), which can also be described in terms of a model class that uses mixture-candidate distributions (Khan & Rue, ). It would be interesting to explore the design of efficient algorithms under their framework, e.g., with a mixture of structured distributions (Louizos & Welling, ).
- •
Our framework is suitable for federated fine-tuning of language models. We are interested in exploring this direction.
- •
The router $\bm{\pi}$ can route based on its input, as in mixture of experts (Shazeer et al., ). It can also be learned per layer. Preliminary experiments suggest that these tweaks provide marginal benefits, but there is still room for exploration.
- •
We are interested in designing methods for zero-shot generalization to unseen clients based on FLoRAL. Is it possible to fine-tune the router without labels?

## Appendix A Proofs

We reiterate the notations part from the main text here for clarity. Let $\mathbf{p}_{c}^{k}:=\frac{\bm{\pi}_{c}^{k}N^{k}}{\sum_{k^{\prime}=1}^{K}\bm{
\pi}^{k^{\prime}}_{c}N_{k^{\prime}}}=p(k|c)$ and $\hat{\mathbf{p}}_{c,t}^{k}:=\frac{\hat{\bm{\pi}}_{c,t}^{k}N^{k}}{\sum_{k^{
\prime}=1}^{K}\hat{\bm{\pi}}^{k^{\prime}}_{c,t}N_{k^{\prime}}}$.
Define the expectation operators $\mathbb{E}_{k|c}[\mathbf{w}_{c,t}^{k}]:=\sum_{k=1}^{K}\mathbf{p}_{c}^{k}
\mathbf{w}_{c,t}^{k}$ and $\mathbb{E}_{c|k}[\mathbf{w}_{c,t}^{k}]:=\sum_{c=1}^{C}\bm{\pi}_{c}^{k}\mathbf{
w}_{c,t}^{k}$ and similarly for their estimates $\hat{\mathbb{E}}_{k|c,\hat{\bm{\pi}}_{t}}[\mathbf{w}_{c,t}^{k}]$ and $\hat{\mathbb{E}}_{c|k,\hat{\bm{\pi}}_{t}}[\mathbf{w}_{c,t}^{k}]$. We drop $\hat{\bm{\pi}}_{c,t}^{k}$ from the notation for clarity.
We use the variable $i$ to denote client sampling, and $i|c$ should be understood as randomness in client sampling given cluster $c$, for example.
Finally, let the global function of cluster $c$ be $f_{c}(\mathbf{w}):=\mathbb{E}_{k|c}[f^{k}(\mathbf{w})]$. Note the absence of $k$ in the weight.

The analysis roughly follows (Stich, ) and differ mostly in the appearance of the total variation distance between $\mathbf{p}_{c}^{k}$ and $\hat{\mathbf{p}}_{c,t}^{k}$.

We start by introducing virtual iterates for tracking the aggregated weights (or gradients) with respect to the true router (or the estimated router) at every time step, which will be mainly useful for the analysis. These iterates coincide at the synchronization step, in which they become equal by construction of the algorithm. The iterates are as follows

$$ $\displaystyle\tilde{\mathbf{w}}_{c,t}:=\hat{\mathbb{E}}_{k|c}[\mathbf{w}_{c,t} ^{k}],\quad\quad\tilde{\mathbf{g}}_{c,t}:=\hat{\mathbb{E}}_{k|c}[\nabla f^{{i_ {t}}}(\mathbf{w}_{c,t}^{k})],$ (10) $\displaystyle\bar{\mathbf{w}}_{c,t}:=\mathbb{E}_{k|c}[\mathbf{w}_{c,t}^{k}], \quad\quad\bar{\mathbf{g}}_{c,t}:=\mathbb{E}_{k|c}[\nabla f_{c}(\mathbf{w}_{c, t}^{k})],$ (11) $$

Note that $\tilde{\mathbf{w}}_{c,t+1}=\tilde{\mathbf{w}}_{c,t}-\eta_{t}\tilde{\mathbf{g}}
_{c,t}$ and $\mathbb{E}_{{i_{t}}|c}[\tilde{\mathbf{g}}_{c,t}]=\bar{\mathbf{g}}_{c,t}$.
Hence, using $\lVert\mathbf{a}+\mathbf{b}\rVert^{2}\leq 2\lVert\mathbf{a}\rVert^{2}+2\lVert
\mathbf{b}\rVert^{2}$, we have

$$ $\displaystyle\mathbb{E}_{{i_{t}}|c}\lVert\tilde{\mathbf{w}}_{c,t+1}-\mathbf{w} _{c}^{*}\rVert^{2}$ $\displaystyle=\mathbb{E}_{{i_{t}}|c}\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_ {c}^{*}-\eta_{t}\tilde{\mathbf{g}}_{c,t}\rVert^{2}$ $\displaystyle=\mathbb{E}_{{i_{t}}|c}\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_ {c}^{*}-\eta_{t}\tilde{\mathbf{g}}_{c,t}-\eta_{t}\bar{\mathbf{g}}_{c,t}+\eta_{ t}\bar{\mathbf{g}}_{c,t}\rVert^{2}$ $\displaystyle=\underbrace{\mathbb{E}_{{i_{t}}|c}\lVert\tilde{\mathbf{w}}_{c,t} -\mathbf{w}_{c}^{*}-\eta_{t}\bar{\mathbf{g}}_{c,t}\rVert^{2}}_{\text{ideal aggregation descent}}+\eta_{t}^{2}\underbrace{\mathbb{E}_{{i_{t}}|c}\lVert\bar {\mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_{c,t}\rVert^{2}}_{\text{gradient aggregation error}}$ $\displaystyle\quad+2\eta_{t}\underbrace{\mathbb{E}_{{i_{t}}|c}\langle\tilde{ \mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*}-\eta_{t}\bar{\mathbf{g}}_{c,t},\bar{ \mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_{c,t}\rangle}_{\text{correlation error}}.$ (12) $$

In the original local SGD analysis, the correlation error is 0 since we aggregate the sampled gradients exactly and thus the expectation gives $\mathbb{E}_{{i_{t}}|c}[\tilde{\mathbf{g}}_{c,t}]=\bar{\mathbf{g}}_{c,t}$.
Note that the expectation $\mathbb{E}_{{i_{t}}|c}$ is implicitly defined $\mathbb{E}_{i_{t}|c}[\cdot|i_{t-1},\cdots]$, which would be $\mathbb{E}_{i_{t}|c}[\cdot|i_{t_{0}-1},\cdots]$, where $t_{0}=t-(t\mod H)$ since $i_{t}=\cdots=i_{t_{0}}$ (because we sample clients every $H$ round).

### A.1 Bounding descent

###### Lemma A.1 (Descent bound 1) .

Given the setting and the assumptions in Section 4, the following holds

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{c,t+1}-\mathbf{w}_{c}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^ {*}\rVert^{2}+2\eta_{t}^{2}\lVert\tilde{\mathbf{g}}_{c,t}-\bar{\mathbf{g}}_{c, t}\rVert^{2}+2L\eta_{t}\hat{\mathbb{E}}_{k|c}\lVert\tilde{\mathbf{w}}_{c,t}- \mathbf{w}_{c,t}^{k}\rVert^{2}$ $\displaystyle\quad+\eta_{t}\sum_{k=1}^{K}(4L\eta_{t}\mathbf{p}_{c}^{k}-\hat{ \mathbf{p}}_{c,t}^{k})[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})]$ $$

###### Proof.

From the ideal aggregation descent, we have

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*}-\eta_{t}\bar{ \mathbf{g}}_{c,t}\rVert^{2}$ $\displaystyle=\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*}\rVert^{2}+\eta _{t}^{2}\lVert\bar{\mathbf{g}}_{c,t}\rVert^{2}-2\eta_{t}\langle\tilde{\mathbf{ w}}_{c,t}-\mathbf{w}_{c}^{*},\bar{\mathbf{g}}_{c,t}\rangle$ $\displaystyle\leq\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*}\rVert^{2}+ \eta_{t}^{2}\mathbb{E}_{k|c}\lVert\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2} -2\eta_{t}\langle\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*},\bar{\mathbf{g}}_ {c,t}\rangle,$ $$

where we have used Jensen’s inequality
(^4^44$f(\mathbb{E}{X})\leq\mathbb{E}{f(X)}$ for random variable $X$ and convex $f$.).
As for the correlation error, we can write it as

$$ $2\eta_{t}\mathbb{E}_{{i_{t}}|c}\langle\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^ {*}-\eta_{t}\bar{\mathbf{g}}_{c,t},\bar{\mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_{ c,t}\rangle=2\eta_{t}\langle\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*},\bar{ \mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_{c,t}\rangle-2\eta_{t}^{2}\langle\bar{ \mathbf{g}}_{c,t},\bar{\mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_{c,t}\rangle.$ $$

We bound $-\eta_{t}^{2}\langle\bar{\mathbf{g}}_{c,t},\bar{\mathbf{g}}_{c,t}-\tilde{
\mathbf{g}}_{c,t}\rangle$ with Young’s inequality
(^5^55$2\langle\mathbf{a},\mathbf{b}\rangle\leq\gamma\lVert\mathbf{a}\rVert^{2}+ \gamma^{-1}\lVert\mathbf{b}\rVert^{2}$ for $\gamma>0$.)

$$ $\displaystyle-2\eta_{t}^{2}\langle\bar{\mathbf{g}}_{c,t},\bar{\mathbf{g}}_{c,t }-\tilde{\mathbf{g}}_{c,t}\rangle$ $\displaystyle\leq\eta_{t}^{2}\lVert\bar{\mathbf{g}}_{c,t}\rVert^{2}+\eta_{t}^{ 2}\lVert\bar{\mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_{c,t}\rVert^{2}$ $\displaystyle\leq\eta_{t}^{2}\mathbb{E}_{k|c}\lVert\nabla f_{c}(\mathbf{w}_{c, t}^{k})\rVert^{2}+\eta_{t}^{2}\lVert\bar{\mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_ {c,t}\rVert^{2},$ $$

where we have used Jensen’s inequality as before.

Adding everything together, we get

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{c,t+1}-\mathbf{w}_{c}^{*}\rVert^{2}$ $\displaystyle\leq\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*}\rVert^{2}+2 \eta_{t}^{2}\mathbb{E}_{k|c}\lVert\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2} +2\eta_{t}^{2}\lVert\tilde{\mathbf{g}}_{c,t}-\bar{\mathbf{g}}_{c,t}\rVert^{2}$ $\displaystyle\quad-2\eta_{t}\hat{\mathbb{E}}_{k|c}\langle\tilde{\mathbf{w}}_{c ,t}-\mathbf{w}_{c}^{*},\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rangle$ $\displaystyle=\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*}\rVert^{2}+2 \eta_{t}^{2}\mathbb{E}_{k|c}\lVert\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2} +2\eta_{t}^{2}\lVert\tilde{\mathbf{g}}_{c,t}-\bar{\mathbf{g}}_{c,t}\rVert^{2}$ $\displaystyle\quad-2\eta_{t}\hat{\mathbb{E}}_{k|c}\langle\tilde{\mathbf{w}}_{c ,t}-\mathbf{w}_{c,t}^{k},\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rangle-2\eta_{t} \hat{\mathbb{E}}_{k|c}\langle\mathbf{w}_{c,t}^{k}-\mathbf{w}_{c}^{*},\nabla f_ {c}(\mathbf{w}_{c,t}^{k})\rangle.$ $$

Observe that, by 4.2 and $\nabla f_{c}(\mathbf{w}_{c}^{*})=\bm{0}$, we have

$$ $\lVert\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2}=\lVert\nabla f_{c}(\mathbf{ w}_{c,t}^{k})-\nabla f_{c}(\mathbf{w}_{c}^{*})\rVert^{2}\leq 2L[f_{c}(\mathbf{ w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})],$ (13) $$

and

$$ $-\langle\mathbf{w}_{c,t}^{k}-\mathbf{w}_{c}^{*},\nabla f_{c}(\mathbf{w}_{c,t}^ {k})\rangle\leq-[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})]-\frac{ \mu}{2}\lVert\mathbf{w}_{c,t}^{k}-\mathbf{w}_{c}^{*}\rVert^{2}.$ (14) $$

We bound $\langle\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c,t}^{k},\nabla f_{c}(\mathbf{w}_{
c,t}^{k})\rangle$ with Young’s inequality

$$ $\displaystyle-2\langle\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c,t}^{k},\nabla f_{ c}(\mathbf{w}_{c,t}^{k})\rangle$ $\displaystyle\leq 2L\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c,t}^{k}\rVert^ {2}+\frac{1}{2L}\lVert\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2}$ $\displaystyle\overset{\lx@cref{creftype~refnum}{eq:L-smooth-lemma}}{\leq}2L \lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c,t}^{k}\rVert^{2}+[f_{c}(\mathbf{w }_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})].$ $$

We now plug in the results into the main bound

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{c,t+1}-\mathbf{w}_{c}^{*}\rVert^{2}$ $\displaystyle\leq\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*}\rVert^{2}+4 L\eta_{t}^{2}\mathbb{E}_{k|c}[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c} ^{*})]+2\eta_{t}^{2}\lVert\tilde{\mathbf{g}}_{c,t}-\bar{\mathbf{g}}_{c,t} \rVert^{2}$ $\displaystyle\quad+2\eta_{t}L\hat{\mathbb{E}}_{k|c}\lVert\tilde{\mathbf{w}}_{c ,t}-\mathbf{w}_{c,t}^{k}\rVert^{2}+\eta_{t}\hat{\mathbb{E}}_{k|c}[f_{c}( \mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})])$ $\displaystyle\quad-2\eta_{t}\hat{\mathbb{E}}_{k|c}[f_{c}(\mathbf{w}_{c,t}^{k}) -f_{c}(\mathbf{w}_{c}^{*})]-\eta_{t}\mu\hat{\mathbb{E}}_{k|c}\lVert\mathbf{w}_ {c,t}^{k}-\mathbf{w}_{c}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^ {*}\rVert^{2}+2\eta_{t}^{2}\lVert\tilde{\mathbf{g}}_{c,t}-\bar{\mathbf{g}}_{c, t}\rVert^{2}+2L\eta_{t}\hat{\mathbb{E}}_{k|c}\lVert\tilde{\mathbf{w}}_{c,t}- \mathbf{w}_{c,t}^{k}\rVert^{2}$ $\displaystyle\quad+\eta_{t}\sum_{k=1}^{K}(4L\eta_{t}\mathbf{p}_{c}^{k}-\hat{ \mathbf{p}}_{c,t}^{k})[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})],$ $$

where we have used Jensen’s inequality $-\hat{\mathbb{E}}_{k|c}\lVert\mathbf{w}_{c,t}^{k}-\mathbf{w}_{c}^{*}\rVert^{2}
\leq-\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^{*}\rVert^{2}$.
This completes the proof.

∎

###### Lemma A.2 (Gradient aggregation error) .

Let $\bm{\delta}^{k}_{c,t}:=\lvert\hat{\mathbf{p}}_{c,t}^{k}-\mathbf{p}_{c}^{k}\rvert$ and $\bm{\delta}_{c,t}:=(\bm{\delta}^{k}_{c,t})_{k=1}^{K}$.
Then,

$$ $\mathbb{E}_{{i_{t}}|c}\lVert\bar{\mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_{c,t} \rVert^{2}\leq 2\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}+2G^{2}\lVert\bm{ \delta}_{c,t}\rVert_{1}^{2}.$ (15) $$

###### Proof.

We divide the gradient aggregation error into controllable terms.

$$ $\displaystyle\lVert\bar{\mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_{c,t}\rVert^{2}$ $\displaystyle=\lVert\sum_{k=1}^{K}\mathbf{p}_{c}^{k}\nabla f_{c}(\mathbf{w}_{c ,t}^{k})-\hat{\mathbf{p}}_{c,t}^{k}\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k}) \rVert^{2}$ $\displaystyle=\lVert\sum_{k=1}^{K}\mathbf{p}_{c}^{k}(\nabla f_{c}(\mathbf{w}_{ c,t}^{k})-\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k}))+(\mathbf{p}_{c}^{k}-\hat{ \mathbf{p}}_{c,t}^{k})\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})\rVert^{2}$ $\displaystyle\leq 2\lVert\sum_{k=1}^{K}\mathbf{p}_{c}^{k}(\nabla f_{c}(\mathbf {w}_{c,t}^{k})-\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k}))\rVert^{2}+2\lVert\sum _{k=1}^{K}\bm{\delta}^{k}_{c,t}\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})\rVert^ {2}.$ (16) $$

The first term can be bounded by noting $\mathrm{Var}(\sum_{k=1}^{K}c_{k}X_{k})=\sum_{k=1}^{K}c_{k}^{2}\mathrm{Var}(X_{
k})$ for independent $X_{k}$, which holds since we condition on the previous iterates.
We use 4.4 to obtain

$$ $\mathbb{E}_{{i_{t}}|c}\lVert\sum_{k=1}^{K}\mathbf{p}_{c}^{k}(\nabla f_{c}( \mathbf{w}_{c,t}^{k})-\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k}))\rVert^{2}\leq \sum_{k=1}^{K}(\mathbf{p}_{c}^{k})^{2}\mathrm{Var}(\nabla f^{{i_{t}}}(\mathbf{ w}_{c,t}^{k}))\leq\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}.$ (17) $$

The second term can be bounded with Jensen’s inequality and 4.3. Note $i_{t}=\cdots=i_{t_{0}}$ for $t_{0}=t-(t\mod H)$ and $\bm{\delta}^{k}_{c,t}$ does not depend on $i_{t}$ for $t\geq t_{0}$ by construction, as shown in 5, so

$$ $\mathbb{E}_{{i_{t}}|c}\lVert\sum_{k=1}^{K}\bm{\delta}^{k}_{c,t}\nabla f^{{i_{t }}}(\mathbf{w}_{c,t}^{k})\rVert^{2}\leq\lVert\bm{\delta}_{c,t}\rVert_{1}\sum_{ k=1}^{K}\bm{\delta}^{k}_{c,t}\mathbb{E}_{{i_{t}}|c}\lVert\nabla f^{{i_{t}}}( \mathbf{w}_{c,t}^{k})\rVert^{2}\leq\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}G^{2}.$ (18) $$

Combining 17 and 18 into 16 and taking expectation completes the proof.
∎

###### Lemma A.3 (Weights second moment) .

Assume that $\eta_{t+1}\leq\eta_{t}$ and $\eta_{t_{0}}\leq 2\eta_{t}$, where $t_{0}=t-(t\mod H)$, i.e., $\eta_{t}\leq\eta_{t_{0}}\leq 2\eta_{t}$.
Then, we have

$$ $\displaystyle\mathbb{E}_{{i_{t}}|c}\mathbb{E}_{k|c}\lVert\bar{\mathbf{w}}_{c,t }-\mathbf{w}_{c,t}^{k}\rVert^{2}\leq 4\eta_{t}^{2}H^{2}G^{2},$ $\displaystyle\mathbb{E}_{{i_{t}}|c}\hat{\mathbb{E}}_{k|c}\lVert\tilde{\mathbf{ w}}_{c,t}-\mathbf{w}_{c,t}^{k}\rVert^{2}\leq 4\eta_{t}^{2}H^{2}G^{2}.$ $$

###### Proof.

Let $t_{0}=t-(t\mod H)$ and recall that by synchronization we have $\mathbf{w}_{c,t_{0}}^{k}=\bar{\mathbf{w}}_{c,t_{0}}=\tilde{\mathbf{w}}_{c,t_{0}}$.
Using $\mathbb{E}\lVert X-\mathbb{E}X\rVert^{2}=\mathbb{E}\lVert X\rVert^{2}-\lVert
\mathbb{E}X\rVert^{2}$ with $X=\mathbf{w}_{c,t}^{k}-\mathbf{w}_{c,t_{0}}^{k}$, we get

$$ $\displaystyle\mathbb{E}_{{i_{t}}|c}\mathbb{E}_{k|c}\lVert\bar{\mathbf{w}}_{c,t }-\mathbf{w}_{c,t}^{k}\rVert^{2}$ $\displaystyle=\mathbb{E}_{{i_{t}}|c}\mathbb{E}_{k|c}\lVert\mathbf{w}_{c,t}^{k} -\mathbf{w}_{c,t_{0}}^{k}-(\bar{\mathbf{w}}_{c,t}-\mathbf{w}_{c,t_{0}}^{k}) \rVert^{2}$ $\displaystyle=\mathbb{E}_{{i_{t}}|c}\mathbb{E}_{k|c}\lVert\mathbf{w}_{c,t}^{k} -\mathbf{w}_{c,t_{0}}^{k}\rVert^{2}-\lVert\bar{\mathbf{w}}_{c,t}-\bar{\mathbf{ w}}_{c,t_{0}}\rVert^{2}$ $\displaystyle\leq\mathbb{E}_{{i_{t}}|c}\mathbb{E}_{k|c}\lVert\mathbf{w}_{c,t}^ {k}-\mathbf{w}_{c,t_{0}}^{k}\rVert^{2}$ $\displaystyle=\mathbb{E}_{k|c}\mathbb{E}_{{i_{t}}|c}\lVert\sum_{\tau=t_{0}}^{t -1}\eta_{\tau}\nabla f^{{i_{\tau}}}(\mathbf{w}_{c,\tau}^{k})\rVert^{2}$ $\displaystyle\leq 4\eta_{t}^{2}H\sum_{\tau=t_{0}}^{t-1}\mathbb{E}_{k|c}\mathbb {E}_{{i_{t}}|c}\lVert\nabla f^{{i_{\tau}}}(\mathbf{w}_{c,\tau}^{k})\rVert^{2}$ (19) $\displaystyle\overset{\ref{ass:G-lipschitz}}{\leq}4\eta_{t}^{2}H^{2}G^{2},$ $$

where 19 uses $\eta_{t}\leq\eta_{t_{0}}\leq 2\eta_{t}$ and $\lVert\sum_{i=1}^{H}\mathbf{a}_{i}\rVert^{2}\leq H\sum_{i=1}^{H}\lVert\mathbf{
a}_{i}\rVert^{2}$.
Note that the bound for $\mathbb{E}_{{i_{t}}|c}\hat{\mathbb{E}}_{k|c}\lVert\tilde{\mathbf{w}}_{c,t}-
\mathbf{w}_{c,t}^{k}\rVert^{2}$ follows using the same argument.
The assumption about the learning rate implies that it does not decay by more than some factor (e.g., $\frac{1}{2}$) before the next synchronization, which can be easily satisfied by adding $H$ in the denominator of $\eta_{t}$.
∎

###### Lemma A.4 (Descent bound 2) .

Assume that $\eta_{t+1}\leq\eta_{t}$ and $\eta_{t_{0}}\leq 2\eta_{t}$, where $t_{0}=t-(t\mod H)$
and $\bm{\delta}_{c,t}$ defined as in Lemma A.2. Then,

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{c,t+1}-\mathbf{w}_{c}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^ {*}\rVert^{2}+4\eta_{t}^{2}\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}+4\eta_{t}^ {2}G^{2}\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}+8L\eta_{t}^{3}H^{2}G^{2}$ $\displaystyle\quad+\eta_{t}\sum_{k=1}^{K}(4L\eta_{t}\mathbf{p}_{c}^{k}-\hat{ \mathbf{p}}_{c,t}^{k})[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})].$ $$

###### Proof.

The bound follows from applying Lemmas A.2 and A.3 on Lemma A.1.
∎

###### Lemma A.1 (Descent bound 1) .

###### Proof.

###### Lemma A.2 (Gradient aggregation error) .

###### Proof.

###### Lemma A.3 (Weights second moment) .

###### Proof.

###### Lemma A.4 (Descent bound 2) .

###### Proof.

#### Discussion

Let us stop here and compare this bound with that of vanilla local SGD.
First, we observe that we retrieve the original variance reduction (up to a constant factor).
Next, we see that the directly incurred cost from aggregation mismatch is $G^{2}$.
The aggregation mismatch also manifests in the optimality gap in the sense that it “dampens” the guarantee as the aggregation increases,
which we will make more precise later.

In general, the descent lemma above can recover local SGD’s descent lemma in the FL setting, which immediately implies its convergence rate.

###### Corollary A.5 .

Lemma A.4 recovers local SGD descent lemma from (Stich, , Lemma 3.1) up to constant factors.

###### Proof.

Since $C=1$ in local SGD, this trivially gives “uniform” routing and thus $\lVert\bm{\delta}_{c,t}\rVert_{1}=0$, i.e., $\hat{\mathbf{p}}_{c,t}^{k}=\mathbf{p}_{c}^{k}=1/K$. Note that we have used the same assumptions, so we can apply Lemma A.4 with $\eta_{t}\leq\frac{1}{16L}$ to obtain the descent lemma of local SGD up to constant factors (and up to application of Lemmas A.2 and A.3).
∎

Next, we want to bound the quantity $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$ given the update 5,
and relate the new bound to Lemma A.4.
After that, we can derive the convergence rate with the help of a technical lemma.
We also derive the convergence rate given a slow decay assumption on $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$, which shows more clearly the effect of aggregation mismatch on convergence.

###### Corollary A.5 .

###### Proof.

### A.2 Bounding the total variation distance

The following bound follows from the router update in 5.

###### Lemma A.6 (Total variation distance bound) .

Consider the choice $\hat{\bm{\pi}}_{c,t}^{k}=\frac{{\exp(-\eta_{t}f_{c}(\mathbf{w}_{c,t}^{k}))}}{{
\sum_{c^{\prime}=1}^{C}\exp(-\eta_{t}f_{c}(\mathbf{w}_{c^{\prime},t}^{k}))}}$,
and assume that we can write $\bm{\pi}_{c}^{k}=\frac{{\exp(-\bar{\eta}f_{c}(\mathbf{w}_{c}^{*}))}}{{\sum_{c^
{\prime}=1}^{C}\exp(-\bar{\eta}f_{c}(\mathbf{w}_{c^{\prime}}^{*}))}}$,
where $f_{c}$ is bounded below by 0 and $\bar{\eta}\geq\eta_{t}$, $\forall t\geq 0$.
Then,

$$ $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}\leq 4\eta_{t}\mathbb{E}_{k|c}[f_{c}( \mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})]+\bar{\eta}f_{c}(\mathbf{w}_{c }^{*})+4\log KC+10L\eta_{t}^{3}H^{2}G^{2}.$ $$

###### Proof.

Let $t_{0}=t-(t\mod H)$. We will consider the cases where $t=t_{0}$ and $t>t_{0}$ separately.

###### Lemma A.6 (Total variation distance bound) .

###### Proof.

#### Case t = t 0 𝑡 subscript 𝑡 0 t=t_{0} italic_t = italic_t start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT :

Let $\hat{Z}^{k}_{t}=\sum_{c^{\prime}=1}^{C}\exp(-\eta_{t}f_{c}(\mathbf{w}_{c^{
\prime},t}^{k}))$ be the partition function of client $k$, so that we can write $\hat{\bm{\pi}}_{c,t}^{k}=\exp(-\eta_{t}f_{c}(\mathbf{w}_{c,t}^{k}))/\hat{Z}^{k
}_{t}$.
Recall that $\mathbf{p}_{c}^{k}=p(k|c)\propto N^{k}\bm{\pi}_{c}^{k}$, and let $\hat{Z}_{c,t}=\sum_{k=1}^{K}N^{k}\hat{\bm{\pi}}_{c,t}^{k}$ be the partition function of cluster $c$.
Equivalently define $Z^{k}$ and $Z_{c,t}$ to be the partition functions of client $k$ and cluster $c$ give the optimal router $\bm{\pi}_{c}^{k}$, respectively.
Observe

$$ $\displaystyle\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$ $\displaystyle=\left(\sum_{k=1}^{K}\lvert\hat{\mathbf{p}}_{c,t}^{k}-\mathbf{p}_ {c}^{k}\rvert\right)^{2}=\left(\sum_{k=1}^{K}\mathbf{p}_{c}^{k}\lvert\hat{ \mathbf{p}}_{c,t}^{k}/\mathbf{p}_{c}^{k}-1\rvert\right)^{2}$ $\displaystyle\leq 2\sum_{k=1}^{K}\mathbf{p}_{c}^{k}\log\frac{\mathbf{p}_{c}^{k }}{\hat{\mathbf{p}}_{c,t}^{k}}$ $\displaystyle=2\sum_{k=1}^{K}\mathbf{p}_{c}^{k}(\eta_{t}f_{c}(\mathbf{w}_{c,t} ^{k})-\bar{\eta}f_{c}(\mathbf{w}_{c}^{*})+\log\frac{\hat{Z}^{k}_{t}}{Z^{k}}+ \log\frac{\hat{Z}_{c,t}}{Z_{c}})$ $\displaystyle\leq 2\sum_{k=1}^{K}\mathbf{p}_{c}^{k}\eta_{t}(f_{c}(\mathbf{w}_{ c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*}))+\log\frac{\hat{Z}^{k}_{t}}{Z^{k}}+\log \frac{\hat{Z}_{c,t}}{Z_{c}},$ (20) $$

where we have used Pinsker’s inequality, the router’s expression, and $\bar{\eta}\geq\eta_{t}$.

Using $\max_{1\leq k\leq K}\{x_{k}\}\leq\log\sum_{k=1}^{K}\exp(x_{k})\leq\max_{1\leq k
\leq K}\{x_{k}\}+\log K$,
we can write

$$ $\displaystyle\log\frac{\hat{Z}^{k}_{t}}{Z^{k}}$ $\displaystyle=\log\sum_{c^{\prime}=1}^{C}\exp(-\eta_{t}f_{c}(\mathbf{w}_{c^{ \prime},t}^{k}))-\log\sum_{c^{\prime}=1}^{C}\exp(-\bar{\eta}f_{c}(\mathbf{w}_{ c^{\prime}}^{*}))$ $\displaystyle\leq\max_{1\leq c^{\prime}\leq C}\{-\eta_{t}f_{c}(\mathbf{w}_{c^{ \prime},t}^{k})\}-\max_{1\leq c^{\prime}\leq C}\{-\bar{\eta}f_{c}(\mathbf{w}_{ c^{\prime}}^{*})\}+\log C$ $\displaystyle=\min_{1\leq c^{\prime}\leq C}\{\bar{\eta}f_{c}(\mathbf{w}_{c^{ \prime}}^{*})\}-\min_{1\leq c^{\prime}\leq C}\{\eta_{t}f_{c}(\mathbf{w}_{c^{ \prime},t}^{k})\}+\log C,$ ( $\dagger$ ) $$

and using similar arguments, we can show that

$$ $\displaystyle\log\frac{\hat{Z}_{c,t}}{Z_{c}}$ $\displaystyle=\log\sum_{k=1}^{K}N^{k}\hat{\bm{\pi}}_{c,t}^{k}-\log\sum_{k=1}^{ K}N^{k}\bm{\pi}_{c}^{k}$ $\displaystyle=\log\sum_{k=1}^{K}\exp(-\eta_{t}f_{c}(\mathbf{w}_{c,t}^{k})+\log \frac{N^{k}}{\hat{Z}^{k}_{t}})-\log\sum_{k=1}^{K}\exp(-\bar{\eta}f_{c}(\mathbf {w}_{c}^{*})+\log\frac{N^{k}}{Z^{k}})$ $\displaystyle=\min_{1\leq k\leq K}\{\bar{\eta}f_{c}(\mathbf{w}_{c}^{*})+\log \frac{Z^{k}}{N^{k}}\}-\min_{1\leq k\leq K}\{\eta_{t}f_{c}(\mathbf{w}_{c,t}^{k} )+\log\frac{\hat{Z}^{k}_{t}}{N^{k}}\}+\log K.$ ( $\ast$ ) $$

By properties of the LogSumExp function, we have

$$ $-\min_{1\leq c^{\prime}\leq C}\{\bar{\eta}f_{c}(\mathbf{w}_{c^{\prime}}^{*})\} \leq\log Z^{k}\leq-\min_{1\leq c^{\prime}\leq C}\{\bar{\eta}f_{c}(\mathbf{w}_{ c^{\prime}}^{*})\}+\log C,$ $$

and similarly with $\log\hat{Z}^{k}_{t}$ and $-\eta_{t}\min_{1\leq c^{\prime}\leq C}f_{c}(\mathbf{w}_{c^{\prime},t}^{k})$.
Observe that $-\log\frac{N}{N^{k}}\leq 0$ and $\min_{1\leq k\leq K}\{\log\frac{N}{N^{k}}\}\leq\log K$
since the uniform case has the lowest max probability.
Now define the centered function $f_{c}^{\circ}(\cdot):=f_{c}(\cdot)-\min_{1\leq c^{\prime}\leq C}\{f_{c}(\cdot)\}$
and note that $f_{c}^{\circ}(\cdot)\leq f_{c}(\cdot)$.
Adding and subtracting $\log N$ to both terms in ($\ast$) and using the expressions above,
we can get

$$ $\displaystyle\log\frac{\hat{Z}_{c,t}}{Z_{c}}$ $\displaystyle\leq\min_{1\leq k\leq K}\{\bar{\eta}f_{c}(\mathbf{w}_{c}^{*})+ \log\frac{NZ^{k}}{N^{k}}\}-\min_{1\leq k\leq K}\{\eta_{t}f_{c}(\mathbf{w}_{c,t }^{k})+\log\frac{N\hat{Z}^{k}_{t}}{N^{k}}\}+\log K$ $\displaystyle\leq\bar{\eta}f_{c}^{\circ}(\mathbf{w}_{c}^{*})-\min_{1\leq k\leq K }\{\eta_{t}f_{c}^{\circ}(\mathbf{w}_{c,t}^{k})\}+2\log K+\log C.$ ( $\dagger\dagger$ ) $$

Combining ($\dagger$) and ($\dagger\dagger$), we get

$$ $\displaystyle\log\frac{\hat{Z}^{k}_{t}}{Z^{k}}+\log\frac{\hat{Z}_{c,t}}{Z_{c}}$ $\displaystyle\leq\bar{\eta}f_{c}(\mathbf{w}_{c}^{*})-\min_{1\leq c^{\prime} \leq C}\{\eta_{t}f_{c}(\mathbf{w}_{c^{\prime},t}^{k})\}-\min_{1\leq k\leq K}\{ \eta_{t}f_{c}(\mathbf{w}_{c,t}^{k})\}+2\log KC$ $\displaystyle\leq\bar{\eta}f_{c}(\mathbf{w}_{c}^{*})+2\log KC.$ $$

where the second inequality follows because $\min_{i}\{A_{i}+B_{i}\}\leq\min_{i}\{A_{i}\}+\min_{i}\{B_{i}\}$.
Applying this inequality to the overall bound 20, we have

$$ $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}\leq 2\eta_{t}\mathbb{E}_{k|c}[f_{c}( \mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})]+2\bar{\eta}f_{c}(\mathbf{w}_{ c}^{*})+4\log KC.$ (21) $$

#### Case t > t 0 𝑡 subscript 𝑡 0 t>t_{0} italic_t > italic_t start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT :

Note that $\bm{\delta}_{c,t}=\bm{\delta}_{c,t_{0}}$ by 5, so we get the same bound 21 but in terms of $t_{0}$.
If we decompose the function gap $\mathbb{E}_{k|c}[f_{c}(\mathbf{w}_{c,t_{0}}^{k})-f_{c}(\mathbf{w}_{c}^{*})]=
\mathbb{E}_{k|c}[f_{c}(\mathbf{w}_{c,t_{0}}^{k})-\mathbb{E}_{{i_{t}}|c}f_{c}(
\mathbf{w}_{c,t}^{k})]+\mathbb{E}_{k|c}[\mathbb{E}_{{i_{t}}|c}f_{c}(\mathbf{w}
_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})]$, we see that it suffices to bound the first term to be able to write $\bm{\delta}_{c,t}$ in terms of function gap at step $t$. We can also take the expectations $\mathbb{E}_{{i_{t}}|c}$ out since neither $\mathbf{w}_{c,t_{0}}^{k}$ nor $\mathbf{w}_{c}^{*}$ depend on ${i_{t}}=\cdots={i_{t_{0}}}$.

Recall that $\mathbf{w}_{c,t_{0}}^{k}=\mathbb{E}_{k|c}[\mathbf{w}_{c,t_{0}}^{k}]$. Using $L$-smoothness from 4.2, we get

$$ $\displaystyle\mathbb{E}_{k,{i_{t}}|c}[f_{c}(\mathbf{w}_{c,t_{0}}^{k})-f_{c}( \mathbf{w}_{c,t}^{k})]$ $\displaystyle\leq\mathbb{E}_{k,{i_{t}}|c}\langle\nabla f_{c}(\mathbf{w}_{c,t}^ {k}),\mathbf{w}_{c,t_{0}}^{k}-\mathbf{w}_{c,t}^{k}\rangle+\frac{L}{2}\mathbb{E }_{k,{i_{t}}|c}\lVert\mathbf{w}_{c,t_{0}}^{k}-\mathbf{w}_{c,t}^{k}\rVert^{2}$ $\displaystyle\overset{\text{(Young)}}{\leq}\gamma^{-1}\mathbb{E}_{k|c}\lVert \nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2}+(\gamma+\frac{L}{2})\mathbb{E}_{k ,{i_{t}}|c}\lVert\mathbf{w}_{c,t_{0}}^{k}-\mathbf{w}_{c,t}^{k}\rVert^{2}$ $\displaystyle\overset{\lx@cref{creftype~refnum}{eq:bound-sumgrads}}{\leq} \gamma^{-1}\mathbb{E}_{k|c}\lVert\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2}+ (\gamma+\frac{L}{2})4\eta_{t}^{2}H^{2}G^{2}$ $\displaystyle\overset{\lx@cref{creftype~refnum}{eq:L-smooth-lemma}}{\leq} \mathbb{E}_{k|c}[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})]+10L \eta_{t}^{2}H^{2}G^{2},$ $$

where we have chosen $\gamma:=2L$.

We complete the proof by taking the max of both cases, which simply amounts to adding both cases.
∎

The following descent lemma will be used to get the convergence rate without any assumptions on $\lVert\bm{\delta}_{c,t}\rVert_{1}$ other than what we have in the router update 5.

###### Lemma A.7 (Descent bound 3) .

Let the conditions in Lemmas A.4 and A.6 be satisfied.
Without loss of generality, assume that $f_{c}(\mathbf{w}_{c}^{*})=0$.
If $\eta_{t}\leq\frac{\gamma_{t}}{\max\{\frac{5}{2},16G^{2},4L\}}$, where $\gamma_{t}=\min\{1,\min_{k\in[K];\ \mathbf{p}_{c}^{k}>0}\{\hat{\mathbf{p}}_{c,
t}^{k}/\mathbf{p}_{c}^{k}\}\}$,
then

$$ $\displaystyle\mathbb{E}_{{i_{t}}|c}\lVert\tilde{\mathbf{w}}_{c,t+1}-\mathbf{w} _{c}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^ {*}\rVert^{2}-\frac{1}{2}\eta_{t}\hat{\mathbb{E}}_{k|c}[f_{c}(\mathbf{w}_{c,t} ^{k})-f_{c}(\mathbf{w}_{c}^{*})]$ $\displaystyle\quad+4\eta_{t}^{2}\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}+16 \eta_{t}^{2}G^{2}\log KC+9\eta_{t}^{3}LH^{2}G^{2}.$ $$

###### Proof.

We apply Lemma A.6 on Lemma A.4 and rearrange to get

$$ $\displaystyle\mathbb{E}_{{i_{t}}|c}\lVert\tilde{\mathbf{w}}_{c,t+1}-\mathbf{w} _{c}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^ {*}\rVert^{2}+4\eta_{t}^{2}\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}+16\eta_{t} ^{2}G^{2}\log KC$ $\displaystyle\quad+40L\eta_{t}^{5}H^{2}G^{4}+8L\eta_{t}^{3}H^{2}G^{2}$ $\displaystyle\quad+\eta_{t}\sum_{k=1}^{K}(16\eta_{t}^{2}G^{2}\mathbf{p}_{c}^{k }+4L\eta_{t}\mathbf{p}_{c}^{k}-\hat{\mathbf{p}}_{c,t}^{k})[f_{c}(\mathbf{w}_{c ,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})].$ $$

In order to have a meaningful convergence of the optimality gap, we have to bound it from above, so we should have

$$ $\mathbf{p}_{c}^{k}(16\eta_{t}^{2}G^{2}+8L\eta_{t}-1)+\mathbf{p}_{c}^{k}-\hat{ \mathbf{p}}_{c,t}^{k}<-A,$ (22) $$

for some $A>0$.

Suppose $\mathbf{p}_{c}^{k}>\hat{\mathbf{p}}_{c,t}^{k}$, and recall that $c$ is given, so we fix it.
Write $r^{k}_{t}:=\hat{\mathbf{p}}_{c,t}^{k}/\mathbf{p}_{c}^{k}<1$.
Then, $\mathbf{p}_{c}^{k}-\hat{\mathbf{p}}_{c,t}^{k}=(1-r^{k}_{t})\mathbf{p}_{c}^{k}<
\mathbf{p}_{c}^{k}$,
so that 22 becomes $\mathbf{p}_{c}^{k}(16\eta_{t}^{2}G^{2}+4L\eta_{t}-r^{k}_{t})<-A$.
If we set $\eta_{t}\leq\frac{B}{\max\{16G^{2},4L\}}$ for some $B>0$,
we would have $\mathbf{p}_{c}^{k}(B\eta_{t}+B-r^{k}_{t})<-A$, implying that

$$ $\eta_{t}<\frac{1}{B}(r^{k}_{t}-B-A/\mathbf{p}_{c}^{k})=\frac{\hat{\mathbf{p}}_ {c,t}^{k}-A}{B\mathbf{p}_{c}^{k}}-1.$ $$

Setting $A=(1-(\bar{\eta}+1)(r^{k}_{t})^{-1}B)\hat{\mathbf{p}}_{c,t}^{k}>0$ gives $\eta_{t}<\bar{\eta}$,
where $\bar{\eta}$ is some strict upper bound of $\eta_{t}$ for all $t$,
but we should also have $(\bar{\eta}+1)(r^{k}_{t})^{-1}B<1\iff B<\frac{r^{k}_{t}}{\bar{\eta}+1}$.
Thus, we set $B:=\frac{r^{k}_{t}}{\bar{\eta}+2}$,
getting

$$ $A=\frac{1}{2}\hat{\mathbf{p}}_{c,t}^{k},\quad\quad\quad\quad\eta_{t}\leq\frac{ r^{k}_{t}}{(\bar{\eta}+2)\max\{16G^{2},4L\}}.$ (23) $$

Now, if $\mathbf{p}_{c}^{k}\leq\hat{\mathbf{p}}_{c,t}^{k}$ with $\eta_{t}\leq\frac{D}{\max\{16G^{2},4L\}}$ for some $D>0$,
22 would imply $\eta_{t}<\frac{1-A}{D\mathbf{p}_{c}^{k}}-1$,
so that $A=(1-(\bar{\eta}+1)D)\mathbf{p}_{c}^{k}>0$ gives $\eta_{t}<\bar{\eta}$ but under the condition $D<\frac{1}{\bar{\eta}+1}$. Thus, setting $D:=\frac{1}{\bar{\eta}+2}$ gives the same setting in 23 with 1 instead of $r^{k}_{t}$. Thus, for all $k\in[K]$, we should have

$$ $\eta_{t}\leq\frac{\min\{1,r^{k}_{t}\}}{(\bar{\eta}+2)\max\{16G^{2},4L\}}.$ $$

We can restrict the denominator to $\max\{1,16G^{2},4L\}$ without loss of generality. Then, we can upper bound $\eta_{t}\leq\frac{1}{(\bar{\eta}+2)}<\frac{1}{2}$, so that $\bar{\eta}=\frac{1}{2}$ suffices for this choice.

Overall, we have $\eta_{t}\leq\frac{\min\{1,\min_{k\in[K]}\{\hat{\mathbf{p}}_{c,t}^{k}/\mathbf{p
}_{c}^{k}\}\}}{\max\{\frac{5}{2},16G^{2},4L\}}$, and using 22 with $A=\frac{1}{2}\hat{\mathbf{p}}_{c,t}^{k}$, we get

$$ $\displaystyle\mathbb{E}_{{i_{t}}|c}\lVert\tilde{\mathbf{w}}_{c,t+1}-\mathbf{w} _{c}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^ {*}\rVert^{2}-\frac{1}{2}\eta_{t}\hat{\mathbb{E}}_{k|c}[f_{c}(\mathbf{w}_{c,t} ^{k})-f_{c}(\mathbf{w}_{c}^{*})]$ $\displaystyle\quad+4\eta_{t}^{2}\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}+16 \eta_{t}^{2}G^{2}\log KC+8L\eta_{t}^{3}H^{2}G^{2}+40L\eta_{t}^{5}H^{2}G^{4}.$ $$

Given our choice of $\eta_{t}$, we note that $40L\eta_{t}^{5}H^{2}G^{4}\leq L\eta_{t}^{4}H^{2}G^{2}\leq L\eta_{t}^{3}H^{2}G^
{2}$,
which completes the proof.
∎

###### Lemma A.7 (Descent bound 3) .

###### Proof.

#### Discussion

Note that the learning rate is not as strict as it may look.
First of all, note that $\hat{\mathbf{p}}_{c,t}^{k}<\mathbf{p}_{c}^{k}$ is the case of interest, as otherwise, $\gamma_{t}=1$. Taking the minimum for $k$ such that $\mathbf{p}_{c}^{k}>0$ makes sense because $\hat{\mathbf{p}}_{c,t}^{k}\geq\mathbf{p}_{c}^{k}=0$, so $\gamma_{t}=1$.

Now assume that $\hat{\mathbf{p}}_{c,t}^{k}\leq\mathbf{p}_{c}^{k}$ for all $t$. The lowest value $\gamma_{t}$ can attain is when $\mathbf{p}_{c}^{k}=1$ and $\hat{\mathbf{p}}_{c,t}^{k}$ is very small. This can happen, for example, when a cluster has one client. However, a uniform initialization for the routers would have that

$$ $\hat{\bm{\pi}}_{c,0}^{k}=1/C\quad\implies\quad\hat{\mathbf{p}}_{c,0}^{k}=\frac {p(k)\hat{\bm{\pi}}_{c,0}^{k}}{\sum_{k^{\prime}=1}^{K}p(k^{\prime})\hat{\bm{ \pi}}^{k^{\prime}}_{c,0}}=p(k).$ $$

Since $\mathbf{p}_{c}^{k}=\frac{p(k)\bm{\pi}_{c}^{k}}{p(c)}$, we would then have $\hat{\mathbf{p}}_{c,0}^{k}/\mathbf{p}_{c}^{k}=\frac{p(c)}{\bm{\pi}_{c}^{k}}\leq
1$ since we assumed $\hat{\mathbf{p}}_{c,t}^{k}\leq\mathbf{p}_{c}^{k}$.

Suppose $\bm{\pi}_{c}^{k}=1$. If $\sum_{k=1}^{K}\bm{\pi}_{c}^{k}=1$, i.e., the number of clients in cluster $c$ is 1, then we cannot improve $\hat{\mathbf{p}}_{c,0}^{k}/\mathbf{p}_{c}^{k}=p(k)$ any further.
This can be even worse if there is one data point for client $k$.
However, these extreme heterogeneity scenarios are inherently difficult, so it is better to capture this heterogeneity with some term, particularly when $\bm{\pi}_{c}^{k}\geq p(c)$, which follows from $\hat{\mathbf{p}}_{c,t}^{k}\leq\mathbf{p}_{c}^{k}$.

For example, assume that $\bm{\pi}_{c}^{k}\leq U_{c}^{-1}p(c)$ for all $k$ such that $\bm{\pi}_{c}^{k}\geq p(c)$, so that $U_{c}\in[p(c),1]$. In other words, we can choose $U_{c}=\min_{k;\,p(c)\leq\bm{\pi}_{c}^{k}}\{p(c)/\bm{\pi}_{c}^{k}\}$. This implies that $\hat{\mathbf{p}}_{c,0}^{k}/\mathbf{p}_{c}^{k}=\frac{p(c)}{\bm{\pi}_{c}^{k}}
\geq U_{c}$.

The value $U_{c}$ is a uniformity measure, so that a larger $U_{c}$ denotes a more uniform allocation of clients in cluster $c$. For example, if $U_{c}=1$, then, for all $k$ such that $\bm{\pi}_{c}^{k}\geq p(c)$, we have $\bm{\pi}_{c}^{k}=p(c)$. On the other hand, if $U_{c}=p(c)$, then it is possible for some clients $k$ to have $\bm{\pi}_{c}^{k}=1$, or in the worst case, $p(c)=p(k)$ when only one client is in cluster $c$ (remember that clients with $\bm{\pi}_{c}^{k}<p(c)$ are ignored).
When cluster sizes are comparable, we have $p(c)\approx 1/C$, meaning that $U_{c}\geq 1/C$.

Thus, in general, with uniform router initialization and when $\lvert\mathbf{p}_{c}^{k}-\hat{\mathbf{p}}_{c,t}^{k}\rvert\leq\lvert\mathbf{p}_
{c}^{k}-\hat{\mathbf{p}}_{c,0}^{k}\rvert$ (which is a mild restriction to ensure $\hat{\mathbf{p}}_{c,0}^{k}/\mathbf{p}_{c}^{k}$ is smaller than $\hat{\mathbf{p}}_{c,0}^{k}/\mathbf{p}_{c}^{k}$), we have

$$ $U_{c}=\min_{k;\,p(c)\leq\bm{\pi}_{c}^{k}}\{p(c)/\bm{\pi}_{c}^{k}\}\leq\min\{1, \min_{k\in[K]}\{p(k)/\mathbf{p}_{c}^{k}\}\}\leq\gamma_{t}\leq 1.$ (24) $$

Regarding the $\min$ operator in $U_{c}$,
it is only required because it is a uniform learning rate for all clients,
so it must converge for the worst client, which is the client with the least amount of data (i.e., lowest $p(k)$).
Thus, we believe that this can be removed when considering learning rates per client.
We leave this analysis for future work.

### A.3 Convergence rates

In order to get convergence rates from descent lemmas, we make use of the following useful lemma, which is based on (Stich et al., , Lemma 3.3).

###### Lemma A.8 .

Let $\{a_{t}\}_{t\geq 0}$, $\{b_{t}\}_{t\geq 0}$,
and $\{c_{t}\}_{t\geq 0}$,
be arbitrary non-negative sequences such that

$$ $a_{t+1}\leq(1-\mu\eta_{t})a_{t}-\eta_{t}b_{t}+\eta_{t}^{2}c_{t}.$ $$

Let $\eta_{t}=\frac{\alpha}{t+s}$ for $t\geq 0$ and $s\geq 1$,
and choose $\alpha=\frac{1}{\mu}$.
Then, we have the following inequality

$$ $\sum_{t=0}^{T-1}b_{t}\leq(s-1)\mu a_{0}+\sum_{t=0}^{T-1}\eta_{t}c_{t}.$ $$

###### Proof.

Let $r_{t}:=1-\mu\eta_{t}$. Then,

$$ $\displaystyle a_{t+1}$ $\displaystyle\leq r_{t}a_{t}-\eta_{t}b_{t}+\eta_{t}^{2}c_{t}$ $\displaystyle\leq r_{t}r_{t-1}a_{t-1}-\eta_{t}b_{t}-r_{t}\eta_{t-1}b_{t-1}+ \eta_{t}^{2}c_{t}+r_{t}\eta_{t-1}^{2}c_{t-1}$ $\displaystyle\leq-\eta_{t}b_{t}-r_{t}\eta_{t-1}b_{t-1}-r_{t}r_{t-1}\eta_{t-2}b _{t-2}$ $\displaystyle\quad+\eta_{t}^{2}c_{t}+r_{t}\eta_{t-1}^{2}c_{t-1}+r_{t}r_{t-1} \eta_{t-2}^{2}c_{t-2}+r_{t}r_{t-1}r_{t-2}a_{t-2}$ $\displaystyle\leq\cdots$ $\displaystyle\implies a_{T+1}$ $\displaystyle\leq r_{0:T}a_{0}+\sum_{t=0}^{T}r_{t+1:T}\eta_{t}(-b_{t}+\eta_{t} c_{t}),$ $$

where we denote $r_{t_{1}:t_{2}}:=\prod_{t=t_{1}}^{t_{2}}r_{t}$, which defaults to 1 when $t_{1}>t_{2}$.

Observe that

$$ $\sum_{t=t_{1}}^{t_{2}}\eta_{t}=\sum_{t=t_{1}}^{t_{2}}\frac{\alpha}{t+s}\geq \alpha\int_{t=t_{1}}^{t_{2}}\frac{1}{t+s}=\alpha\log\frac{t_{2}+s}{t_{1}+s}.$ $$

Hence,

$$ $r_{t_{1}:t_{2}}=\prod_{t=t_{1}}^{t_{2}}(1-\mu\eta_{t})\leq\prod_{t=t_{1}}^{t_{ 2}}\exp(-\mu\eta_{t})=\exp(-\mu\sum_{t=t_{1}}^{t_{2}}\eta_{t})\leq\left(\frac{ t_{1}+s}{t_{2}+s}\right)^{\mu\alpha}.$ $$

We can confirm that for $\alpha=1/\mu$, we have

$$ $r_{t}^{-1}\eta_{t}=\left(\frac{t+s}{t+s-\mu\alpha}\right)\left(\frac{\alpha}{t +s}\right)=\frac{\alpha}{t+s-1}=\eta_{t-1},$ $$

so that $r_{t}=\frac{\eta_{t}}{\eta_{t-1}}$.
This implies $r_{t_{1}:t_{2}}=\frac{\eta_{t_{2}}}{\eta_{t_{1}-1}}=\frac{t_{1}+s-1}{t_{2}+s}
\leq\frac{t_{1}+s}{t_{2}+s}$,
so the inequality above is almost tight when $\alpha=1/\mu$ (loose by a multiplicative factor of $\frac{t_{1}+s}{t_{1}+s-1}$).
This also implies that $\eta_{T}=\eta_{T-1}r_{T}=\cdots=\eta_{t}r_{t+1:T}=\cdots=\eta_{0}r_{1:T}$.
so we can factor these terms out and divide both sides by $\eta_{T}$.
Hence, we have $\frac{r_{0:T}}{\eta_{T}}=\frac{r_{0}}{\eta_{0}}=(s-1)\mu$,
and by observing that $0\leq\frac{a_{T+1}}{\eta_{T}}$, we can get the desired bound.
∎

Now we are ready to prove the main theoretical results of the paper.

###### Theorem A.9 (Convergence rate) .

Consider the setup in Section 4.
Let $\tilde{\sigma}^{2}=\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}$, $\kappa=\frac{L}{\mu}$, and $U_{c}=\min_{k;\,p(c)\leq\bm{\pi}_{c}^{k}}\{p(c)/\bm{\pi}_{c}^{k}\}$.
Initialize $\hat{\bm{\pi}}_{c,0}^{k}=1/C$ for all $k\in[K]$, and assume $\lvert\mathbf{p}_{c}^{k}-\hat{\mathbf{p}}_{c,t}^{k}\rvert\leq\lvert\mathbf{p}_
{c}^{k}-\hat{\mathbf{p}}_{c,0}^{k}\rvert$ for all $t\geq 0$.
Assume that $f_{c}(\mathbf{w}_{c}^{*})=0$, without loss of generality.
Let $\eta_{t}\leq\frac{\alpha}{t+s}$ with $\alpha=\frac{1}{\mu}$ and $s\geq\max\{3H,4\kappa/U_{c},16G^{2}/\mu U_{c}\}$.
Consider the weighted average after $T$ iterations $\hat{\mathbf{w}}_{c,T}:=\frac{1}{\sum_{t=0}^{T-1}w_{t}}\sum_{t=0}^{T-1}w_{t}
\tilde{\mathbf{w}}_{c,t}$ with $w_{t}=(t+s)^{2}$.
Then, the following holds

$$ $\displaystyle\mathbb{E}f_{c}(\hat{\mathbf{w}}_{c,T})-f_{c}(\mathbf{w}_{c}^{*})$ $\displaystyle\leq(8\tilde{\sigma}^{2}+32G^{2}\log KC)(\frac{1}{\mu T}+\frac{2s -1}{\mu T^{2}})$ $\displaystyle\quad+\frac{18\kappa H^{2}G^{2}}{\mu T^{2}}+\frac{24(s-1)s^{2}G^{ 2}}{\mu T^{3}}.$ $$

If $L\geq 4G^{2}$, we have the following asymptotic bound

$$ $\mathbb{E}f_{c}(\hat{\mathbf{w}}_{c,T})-f_{c}(\mathbf{w}_{c}^{*})\leq\mathcal{ O}\left(\frac{1}{\mu T}+\frac{\kappa/U_{c}+H}{\mu T^{2}}\right)\tilde{\sigma}^ {2}+\mathcal{O}\left(\frac{\log KC}{\mu T}+\frac{\kappa H^{2}}{\mu T^{2}}+ \frac{(\kappa/U_{c})^{3}+H^{3}}{\mu T^{3}}\right)G^{2}.$ $$

###### Proof.

Note that $\eta_{t}$ satisfies Lemma A.7 by construction of $s$ and 24.
It also satisfies Lemma A.3 since for $t\in[t_{0},t_{0}+H)$, we have $\frac{\eta_{t}}{\eta_{t+H}}=\frac{t+s+H}{t+s}\leq 2$ because $s+t\geq s\geq H$.

Let $\{w_{t}\}_{t\geq 0}$ be a non-negative (averaging) sequence.
We use Lemma A.8 on Lemma A.7 with

$$ $a_{t}=w_{t}\mathbb{E}_{{i_{t}}|c}\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c} ^{*}\rVert^{2},\quad\quad b_{t}=\frac{w_{t}}{2}f_{c}(\tilde{\mathbf{w}}_{c,t}) -f_{c}(\mathbf{w}_{c}^{*}),\quad\quad c_{t}=w_{t}(A+B\eta_{t}),$ $$

where $A=4\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}+16G^{2}\log KC$ and $B=9LH^{2}G^{2}$.
Note $f_{c}(\tilde{\mathbf{w}}_{c,t})-f_{c}(\mathbf{w}_{c}^{*})\leq\hat{\mathbb{E}}_
{k|c}[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})]$ by Jensen’s inequality.
Thus,

$$ $\sum_{t=0}^{T-1}w_{t}\mathbb{E}_{{i_{t}}|c}[f_{c}(\bar{\mathbf{w}}_{c,t})-f_{c }(\mathbf{w}_{c}^{*})]\leq 2(s-1)\mu w_{0}a_{0}+2A\sum_{t=0}^{T-1}w_{t}\eta_{t }+2B\sum_{t=0}^{T-1}w_{t}\eta_{t}^{2}.$ $$

From the expression above, it makes sense to choose $w_{t}=(t+s)^{2}$.
Indeed,

$$ $\sum_{t=0}^{T-1}w_{t}\eta_{t}=\sum_{t=0}^{T-1}\alpha(t+s)=\frac{T(T-1)}{2\mu}+ \frac{Ts}{\mu},\quad\text{and}\quad\sum_{t=0}^{T-1}w_{t}\eta_{t}^{2}=\sum_{t=0 }^{T-1}\alpha^{2}=\frac{T}{\mu^{2}}.$ $$

Hence, using Jensen’s inequality with $\hat{\mathbf{w}}_{c,T}:=\frac{1}{\sum_{t=0}^{T-1}w_{t}}\sum_{t=0}^{T-1}w_{t}
\bar{\mathbf{w}}_{c,t}$ and letting $D=\lVert\tilde{\mathbf{w}}_{c,0}-\mathbf{w}_{c}^{*}\rVert$,
we have with the tower property of conditional expectations that

$$ $\mathbb{E}f_{c}(\hat{\mathbf{w}}_{c,T})-f_{c}(\mathbf{w}_{c}^{*})\leq\frac{2(s -1)s^{2}\mu D^{2}}{\sum_{t=0}^{T-1}w_{t}}+2A(\frac{T(T-1)+2Ts}{2\mu\sum_{t=0}^ {T-1}w_{t}})+2B\frac{T}{\mu^{2}\sum_{t=0}^{T-1}w_{t}}.$ $$

We bound $\frac{1}{\sum_{t=0}^{T-1}w_{t}}$ using the fact
$\sum_{t=0}^{T-1}w_{t}=\frac{1}{3}T^{3}+(s-\frac{1}{2})T^{2}+(s^{2}-s+\frac{1}{
6})T\geq\frac{1}{3}T^{3}$.
Using this bound and plugging in $A$ and $B$, we get

$$ $\displaystyle\mathbb{E}f_{c}(\hat{\mathbf{w}}_{c,T})-f_{c}(\mathbf{w}_{c}^{*})$ $\displaystyle\leq\frac{6(s-1)s^{2}\mu D^{2}}{T^{3}}+(8\sigma^{2}\lVert\mathbf{ p}_{c}\rVert^{2}+32G^{2}\log KC)(\frac{1}{\mu T}+\frac{2s-1}{\mu T^{2}})$ $\displaystyle\quad+\frac{18LH^{2}G^{2}}{\mu^{2}T^{2}}.$ $$

We use $\mu\mathbb{E}\lVert\tilde{\mathbf{w}}_{c,0}-\mathbf{w}_{c}^{*}\rVert\leq 2G$
(Rakhlin et al., , Lemma 2) and tower property of conditional expectation in terms of $\mathbb{E}_{{i_{t}}|c}$ to get the desired bound.
∎

###### Lemma A.8 .

###### Proof.

###### Theorem A.9 (Convergence rate) .

###### Proof.

#### Discussion

Note that in Theorem A.9, we have $\eta_{t}$ depending on $G^{2}$ and the bound has an extra $\mathcal{O}(\frac{G^{2}\log KC}{\mu T})$ term in the asymptotic bound,
which comes from Lemma A.6, where we bounded $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$ using 5.
Furthermore, the terms $U_{c}$ appear in our analysis, but we explain that they do not affect the recovery of local SGD rates. Indeed, in the FL case, $U_{c}\geq p(c)=1$ since $C=1$.
Even if we have $C$ copies of FL with $p(c)=1/C$, since $p(k|c)=p(k)$, we would still have $U_{c}=1$ (see the definition in 24).
In the CFL case, if we have similar cluster sizes and client sizes, then $U_{c}=1/C$, which is the (linear) price to pay for learning the clusters given the uniform router initialization. This dependence can be reduced further by taking into the decay of $\hat{\mathbf{p}}_{c,t}^{k}/\mathbf{p}_{c}^{k}$ instead of assuming uniform router initialization and non-increasing $\hat{\mathbf{p}}_{c,t}^{k}/\mathbf{p}_{c}^{k}$ in $t$, but we leave such an analysis for future work.

We now prove a stronger convergence rate given a stronger assumption on the decrease of $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$.
Namely, we assume that $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}\leq(t+s)^{-\beta}\lVert\bm{\delta}_{c,0}
\rVert_{1}^{2}$ for $\beta\in(0,1)$.
This convergence rate does not require a dependence on $G^{2}$ in the learning rate,
and it weakens $\mathcal{O}(\frac{G^{2}\log KC}{\mu T})$ proportionally to $\beta$.
This particular range of the exponent of $\beta$ maintains the extra term in the asymptotic rate with an explicit dependence on $\beta$. The exponent is bounded above by $1$ for technical convenience, and we believe this condition can be easily removed.
In any case, exponents of 1 or larger would make the extra terms incurred from $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$ disappear asymptotically.
Indeed, the original rate of local SGD can be exactly recovered when $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$ decays quickly (where $U_{c}=1$ as explained above). We now state the stronger convergence rate.

###### Theorem A.10 (Convergence Rate with decreasing $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$ ) .

Consider the setup in Section 4.
Let $\tilde{\sigma}^{2}=\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}$, $\kappa=\frac{L}{\mu}$, and $U_{c}=\min_{k;\,p(c)\leq\bm{\pi}_{c}^{k}}\{p(c)/\bm{\pi}_{c}^{k}\}$.
Initialize $\hat{\bm{\pi}}_{c,0}^{k}=1/C$ for all $k\in[K]$, and assume $\lvert\mathbf{p}_{c}^{k}-\hat{\mathbf{p}}_{c,t}^{k}\rvert\leq\lvert\mathbf{p}_
{c}^{k}-\hat{\mathbf{p}}_{c,0}^{k}\rvert$ for all $t\geq 0$.
Assume that $f_{c}(\mathbf{w}_{c}^{*})=0$ without loss of generality,
and assume that $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}\leq(t+s)^{-\beta}\lVert\bm{\delta}_{c,0}
\rVert_{1}^{2}$ for $\beta\in(0,1)$.
Let $\eta_{t}\leq\frac{\alpha}{t+s}$ with $\alpha=\frac{1}{\mu}$ and $s\geq\max\{3H,4\kappa/U_{c}\}$.
Consider the weighted average after $T$ iterations $\hat{\mathbf{w}}_{c,T}:=\frac{1}{\sum_{t=0}^{T-1}w_{t}}\sum_{t=0}^{T-1}w_{t}
\tilde{\mathbf{w}}_{c,t}$ with $w_{t}=(t+s)^{2}$.
Then,

$$ $\displaystyle\mathbb{E}f_{c}(\hat{\mathbf{w}}_{c,T})-f_{c}(\mathbf{w}_{c}^{*})$ $\displaystyle\leq 12\tilde{\sigma}^{2}(\frac{1}{\mu T}+\frac{2s-1}{\mu T^{2}}) +48G^{2}\frac{\lVert\bm{\delta}_{c,0}\rVert_{1}^{2}}{\mu T^{1+\beta}}$ $\displaystyle\quad+24G^{2}\frac{(s-1+2\lVert\bm{\delta}_{c,0}\rVert_{1}^{2}s^{ -\beta})s^{2}}{\mu T^{3}}+48LH^{2}G^{2}\frac{1}{\mu^{2}T^{2}}.$ $$

Asymptotically,

$$ $\displaystyle\mathbb{E}f_{c}(\hat{\mathbf{w}}_{c,T})-f_{c}(\mathbf{w}_{c}^{*})$ $\displaystyle\leq\mathcal{O}\left(\frac{1}{\mu T}+\frac{\kappa/U_{c}+H}{\mu T^ {2}}\right)\tilde{\sigma}^{2}+\mathcal{O}\left(\frac{\kappa H^{2}}{\mu T^{2}}+ \frac{(\kappa/U_{c})^{3}+H^{3}}{\mu T^{3}}\right)G^{2}$ $\displaystyle\quad+\mathcal{O}\left(\frac{1}{\mu T^{1+\beta}}+\frac{(\kappa/U_ {c})^{2-\beta}+H^{2-\beta}}{\mu T^{3}}\right)\lVert\bm{\delta}_{c,0}\rVert_{1} ^{2}G^{2}.$ $$

###### Proof.

Recall Lemma A.4

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{c,t+1}-\mathbf{w}_{c}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c}^ {*}\rVert^{2}+4\eta_{t}^{2}\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}+4\eta_{t}^ {2}G^{2}\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}+8L\eta_{t}^{3}H^{2}G^{2}$ $\displaystyle\quad+\eta_{t}\sum_{k=1}^{K}(4L\eta_{t}\mathbf{p}_{c}^{k}-\hat{ \mathbf{p}}_{c,t}^{k})[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c}(\mathbf{w}_{c}^{*})].$ $$

We use the exact same reasoning in Lemma A.7 to get that
$\eta_{t}\leq\frac{\min\{1,\min_{k\in[K]}\{\hat{\mathbf{p}}_{c,t}^{k}/\mathbf{p
}_{c}^{k}\}}{\max\{5/2,4L\}}$.
Our choice of $\eta_{t}$ already satisfies this rate from 24, and it clearly satisfies Lemma A.3 by construction of $s$.
Thus, the overall bound becomes

$$ $\displaystyle\frac{1}{2}f_{c}(\tilde{\mathbf{w}}_{c,t})-f_{c}(\mathbf{w}_{c}^{ *})\leq\frac{1}{2}\eta_{t}\hat{\mathbb{E}}_{k|c}[f_{c}(\mathbf{w}_{c,t}^{k})-f _{c}(\mathbf{w}_{c}^{*})]$ $\displaystyle\quad\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w} _{c}^{*}\rVert^{2}+4\eta_{t}^{2}\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}+4\eta _{t}^{2}G^{2}\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}+8L\eta_{t}^{3}H^{2}G^{2}.$ $$

We can now invoke Lemma A.8 with

$$ $a_{t}=w_{t}\mathbb{E}_{{i_{t}}|c}\lVert\tilde{\mathbf{w}}_{c,t}-\mathbf{w}_{c} ^{*}\rVert^{2},\quad\quad b_{t}=\frac{w_{t}}{2}\mathbb{E}_{{i_{t}}|c}[f_{c}( \bar{\mathbf{w}}_{c,t})-f_{c}(\mathbf{w}_{c}^{*})],\quad\quad c_{t}=w_{t}(A_{t }+B\eta_{t}),$ $$

where $\{w_{t}\}_{t\geq 0}$ is an averaging sequence, $A_{t}=4\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}+4G^{2}\lVert\bm{\delta}_{c,t}
\rVert_{1}^{2}$, and $B=8LH^{2}G^{2}$.
Thus,

$$ $\sum_{t=0}^{T-1}w_{t}\mathbb{E}_{{i_{t}}|c}[f_{c}(\bar{\mathbf{w}}_{c,t})-f_{c }(\mathbf{w}_{c}^{*})]\leq 2(s-1)\mu w_{0}a_{0}+2\sum_{t=0}^{T-1}w_{t}\eta_{t} A_{t}+2\sum_{t=0}^{T-1}w_{t}\eta_{t}^{2}B.$ $$

We choose $w_{t}=(t+s)^{2}$ as in Theorem A.9
and use the assumption that $\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}\leq(t+s)^{-\beta}\lVert\bm{\delta}_{c,0}
\rVert_{1}^{2}$ for $\beta\in(0,1)$ to get

$$ $\displaystyle\sum_{t=0}^{T-1}w_{t}\eta_{t}A_{t}=\alpha\sum_{t=0}^{T-1}(t+s)A_{t}$ $\displaystyle=4\alpha\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}\sum_{t=0}^{T-1}( t+s)+4\alpha G^{2}\sum_{t=0}^{T-1}(t+s)\lVert\bm{\delta}_{c,t}\rVert_{1}^{2}$ $\displaystyle=4\alpha\sigma^{2}\lVert\mathbf{p}_{c}\rVert^{2}(\frac{T(T-1)}{2} +Ts)+4\alpha G^{2}\lVert\bm{\delta}_{c,0}\rVert_{1}^{2}\sum_{t=0}^{T-1}(t+s)^{ 1-\beta}.$ $$

Furthermore,

$$ $\sum_{t=0}^{T-1}(t+s)^{1-\beta}\leq\int_{0}^{T}(t+s)^{1-\beta}dt=\frac{1}{2- \beta}((T+s)^{2-\beta}-s^{2-\beta})\leq(T+s)^{2-\beta}.$ $$

Hence,

$$ $\sum_{t=0}^{T-1}w_{t}\eta_{t}A_{t}\leq 2\alpha\sigma^{2}\lVert\mathbf{p}_{c} \rVert^{2}T(T+2s-1)+8\alpha G^{2}\lVert\bm{\delta}_{c,0}\rVert_{1}^{2}(T^{2- \beta}+s^{2-\beta}),$ $$

where we have used $(T+s)^{2-\beta}\leq 2\max\{T,s\}^{2-\beta}\leq 2(T^{2-\beta}+s^{2-\beta})$.

On the other hand, using $\sum_{t=0}^{T-1}\frac{1}{(t+s)^{\beta}}\leq T$, we get

$$ $\sum_{t=0}^{T-1}w_{t}\eta_{t}^{2}B\leq 8\alpha^{2}LH^{2}G^{2}T.$ $$

Using the averaging $\hat{\mathbf{w}}_{c,T}:=\frac{1}{\sum_{t=0}^{T-1}w_{t}}\sum_{t=0}^{T-1}w_{t}
\bar{\mathbf{w}}_{c,t}$, the fact that $\sum_{t=0}^{T-1}w_{t}\geq\frac{1}{3}T^{3}$, and $\mu\mathbb{E}\lVert\tilde{\mathbf{w}}_{c,0}-\mathbf{w}_{c}^{*}\rVert\leq 2G$, as in Theorem A.9,
we overall have

$$ $\displaystyle\mathbb{E}f_{c}(\hat{\mathbf{w}}_{c,T})-f_{c}(\mathbf{w}_{c}^{*})$ $\displaystyle\leq 24G^{2}\frac{(s-1)s^{2}}{\mu T^{3}}+12\sigma^{2}\lVert \mathbf{p}_{c}\rVert^{2}\frac{T+2s-1}{\mu T^{2}}$ $\displaystyle\quad+48G^{2}\lVert\bm{\delta}_{c,0}\rVert_{1}^{2}\frac{T^{2- \beta}+s^{2-\beta}}{\mu T^{3}}+48LH^{2}G^{2}\frac{1}{\mu^{2}T^{2}},$ $$

which completes the proof after rearranging the terms.
∎

###### Remark A.11 .

Given uniform router initialization, we have $\lVert\bm{\delta}_{c,0}\rVert_{1}=\sum_{k=1}^{K}\lvert p(k)-\mathbf{p}_{c}^{k}
\rvert=\sum_{k=1}^{K}\mathbf{p}_{c}^{k}(1-p(k)/\mathbf{p}_{c}^{k})\leq(1-U_{c})$.

###### Theorem A.10 (Convergence Rate with decreasing ∥ 𝜹 c , t ∥ 1 2 superscript subscript delimited-∥∥ subscript 𝜹 𝑐 𝑡 1 2 \lVert\bm{\delta}_{c,t}\rVert_{1}^{2} ∥ bold_italic_δ start_POSTSUBSCRIPT italic_c , italic_t end_POSTSUBSCRIPT ∥ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) .

###### Proof.

###### Remark A.11 .

## Appendix B Extending the analysis to (FML) with Weight Sharing

In this section, we show the benefits of weight sharing in the FML case.
We now consider iterates that track the full expectation $\mathbb{E}_{k,c}$ instead of $\mathbb{E}_{k|c}$.

$$ $\displaystyle\tilde{\mathbf{w}}_{t}:=\hat{\mathbb{E}}_{k,c}[\mathbf{w}_{c,t}^{ k}],\quad\quad\tilde{\mathbf{g}}_{t}:=\hat{\mathbb{E}}_{k,c}[\nabla f^{{i_{t}} }(\mathbf{w}_{c,t}^{k})],$ (25) $\displaystyle\bar{\mathbf{w}}_{t}:=\mathbb{E}_{k,c}[\mathbf{w}_{c,t}^{k}], \quad\quad\bar{\mathbf{g}}_{t}:=\mathbb{E}_{k,c}[\nabla f_{c}(\mathbf{w}_{c,t} ^{k})],$ (26) $$

Note that we have assumed that $\mathbb{E}_{{i_{t}}|c}\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})=\nabla f_{c}(
\mathbf{w}_{c,t}^{k})$.
However, we make an important distinction here.
In the previous analysis in Appendix A, we have written the expectation $\mathbb{E}_{{i_{t}}|c}$,
but, in fact, this $c$ is not the same as the $c$ in $\mathbb{E}_{k,c}$.
The expectations $\mathbb{E}_{k,c}$ and $\hat{\mathbb{E}}_{k,c}$ track the aggregated iterates,
whereas $\mathbb{E}_{{i_{t}},c}$ takes expectation with respect to client sampling, which is independent of the tracking variables.
Thus, in order to make the distinction clear, we write the sampled cluster variable as $z$ and write the expectation with respect to sampling as $\mathbb{E}_{{i_{t}},z}$,
so that $p({i_{t}},z=c)=\sum_{k\in{i_{t}}}p(k)\bm{\pi}_{c}^{k}$ (recall that $p(k,c)=p(k)p(c|k)=p(k)\bm{\pi}_{c}^{k}$).

Now we introduce finer variance and heterogeneity assumptions that help us achieve even better variance reduction.

###### Assumption B.1 (Bounded variance of base model and adaptors) .

For any $c\in[C]$ and $k\in[K]$, and given weight sharing $\mathbf{w}_{c}=(\mathbf{u},\mathbf{a}_{c})\in\mathbb{R}^{d}$, we have

$$ $\displaystyle\mathbb{E}_{{i_{t}}|z=c}\lVert\nabla_{\mathbf{a}_{c}}f^{{i_{t}}}( \mathbf{w}_{c})-\nabla_{\mathbf{a}_{c}}f_{c}(\mathbf{w}_{c})\rVert^{2}\leq \sigma_{c}^{2},$ (27) $\displaystyle\mathbb{E}_{{i_{t}},z}\lVert\nabla_{\mathbf{u}}f^{{i_{t}}}( \mathbf{w}_{c})-\mathbb{E}_{c^{\prime}}\nabla_{\mathbf{u}}f_{c^{\prime}}( \mathbf{w}_{c})\rVert^{2}\leq\bar{\sigma}^{2}.$ (28) $$

###### Assumption B.2 (Bounded heterogeneity of base model and adaptors) .

For any $c\in[C]$, $k\in[K]$, $t\geq 0$ and synchronization steps $t_{0}\mod H=0$, and given weight sharing $\mathbf{w}_{c,t}^{k}=(\mathbf{u}^{k}_{t},\mathbf{a}^{k}_{c,t})\in\mathbb{R}^{d}$, we have

$$ $\displaystyle\mathbb{E}_{k,c}\lVert\nabla_{\mathbf{u}}f_{c}(\mathbf{w}_{c,t}^{ k})-\mathbb{E}_{c^{\prime}}\nabla_{\mathbf{u}}f_{c^{\prime}}(\mathbf{w}_{c,t}^ {k})\rVert^{2}\leq\Delta^{2},$ (29) $\displaystyle\hat{\mathbb{E}}_{c}\lVert\mathbf{w}_{c,t_{0}}^{k}-\hat{\mathbb{E }}_{c}\mathbf{w}_{c,t_{0}}^{k}\rVert^{2}=\hat{\mathbb{E}}_{c}\lVert\mathbf{a}^ {k}_{c,t_{0}}-\hat{\mathbb{E}}_{c}\mathbf{a}^{k}_{c,t_{0}}\rVert^{2}=0.$ (30) $$

The assumptions above are not made only for the convenience of establishing our result. They do have practical relevance when these variance quantities are smaller than the one used in 4.4.
Namely, 27, which is a straightforward adaptation of 4.4, bounds the variance of the sampled *adaptors*’ gradients separately (per cluster). On the other hand, 28 bounds the variance of the *base* model’s gradient from the averaged objective across clusters. We expect both of these bounds to be tighter than the variance of the *full* model’s gradient per cluster separately.

As for B.2, the weight sharing structure should be justified under these conditions. In particular, 30 is not possible without weight sharing (see Appendix E for more details on enforcing this on LoRAs). The first assumption 29 bounds the deviation of the *base* gradient across clusters, which can be close to 0 with weight sharing and small adaptors.

Overall, these assumptions decompose the variance and heterogeneity errors in a way that makes the benefits of weight sharing manifest, which is especially true using B.2.

###### Assumption B.1 (Bounded variance of base model and adaptors) .

###### Assumption B.2 (Bounded heterogeneity of base model and adaptors) .

### B.1 Analysis

We will now show that an extension of the previous analysis in Appendix A using the aforementioned quantities and assumptions is possible and can lead to better variance reduction.

In the following lemma, we will make use of the quantity $\mathbf{w}^{*}:=\mathbb{E}_{c}[\mathbf{w}_{c}^{*}]=\sum_{c=1}^{C}p(c)\mathbf{w
}_{c}^{*}$, where $p(c)$ is the overall probability of cluster $c$, e.g., see 2. This quantity is not a real optimum, but rather an analytical tool. Indeed, by Jensen’s inequality, we can write $\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*}\rVert^{2}\leq\lVert\mathbf{u}^{k}_
{t}-\mathbf{u}^{*}_{t}\rVert^{2}+\mathbb{E}_{c}\lVert\mathbf{a}^{k}_{c,t}-
\mathbf{a}^{*}_{c,t}\rVert^{2}$ when $\mathbf{w}_{c,t}^{k}=(\mathbf{u}^{k}_{t},\mathbf{a}^{k}_{c,t})$. Thus, obtaining a upper bound on the optimality gap using terms $\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*}\rVert^{2}$ suffices as it implies the upper bound of interest.

###### Lemma B.3 (Descent bound with weight sharing) .

Define $\mathbf{p}:=(p(k))_{k=1}^{K}$ (indexed as $\mathbf{p}^{k}$) and $\bm{\pi}_{c}=(\bm{\pi}_{c}^{k})_{k=1}^{K}$.
Let $\bm{\delta}^{k}_{t}=(\lvert\bm{\pi}_{c}^{k}-\hat{\bm{\pi}}_{c,t}^{k}\rvert)_{c
=1}^{C}$ and $\mathbf{w}^{*}:=\mathbb{E}_{c}[\mathbf{w}_{c}^{*}]$.
Consider the setting and assumptions in Section 4,
with the addition of mean subtraction of adaptors after every synchronization so that 30,
and let B.1 and B.2 hold.
Then,

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{t+1}-\mathbf{w}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*} \rVert^{2}+\eta_{t}\sum_{k=1}^{K}\sum_{c=1}^{C}\mathbf{p}^{k}(4L\eta_{t}\bm{ \pi}_{c}^{k}-\hat{\bm{\pi}}_{c,t}^{k})[f_{c}(\mathbf{w}_{c,t}^{k})$ $\displaystyle\quad+4\eta_{t}^{2}(G^{2}\mathbb{E}_{k}\lVert\bm{\delta}^{k}_{t} \rVert_{1}^{2}+\mathbb{E}_{c}[\lVert\mathbf{p}_{c}\rVert^{2}\sigma_{c}^{2}]+2 \bar{\sigma}^{2}\sum_{c=1}^{C}\lVert\mathbf{p}\odot\bm{\pi}_{c}\rVert^{2}+2 \Delta^{2})$ $\displaystyle\quad+8L\eta_{t}^{3}H^{2}G^{2}.$ $$

###### Proof.

As in 12, the descent can be bounded as

$$ $\displaystyle\mathbb{E}_{{i_{t}},z}\lVert\tilde{\mathbf{w}}_{t+1}-\mathbf{w}^{ *}\rVert^{2}$ $\displaystyle=\mathbb{E}_{{i_{t}},z}\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{* }-\eta_{t}\bar{\mathbf{g}}_{t}\rVert^{2}+\eta_{t}^{2}\mathbb{E}_{{i_{t}},z} \lVert\bar{\mathbf{g}}_{c,t}-\tilde{\mathbf{g}}_{t}\rVert^{2}$ $\displaystyle\quad+2\eta_{t}\mathbb{E}_{{i_{t}},z}\langle\tilde{\mathbf{w}}_{t }-\mathbf{w}^{*}-\eta_{t}\bar{\mathbf{g}}_{t},\bar{\mathbf{g}}_{t}-\tilde{ \mathbf{g}}_{t}\rangle.$ $$

From the ideal aggregation descent, we have

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*}-\eta_{t}\bar{\mathbf{ g}}_{t}\rVert^{2}$ $\displaystyle=\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*}\rVert^{2}+\eta_{t}^{ 2}\lVert\bar{\mathbf{g}}_{t}\rVert^{2}-2\eta_{t}\langle\tilde{\mathbf{w}}_{t}- \mathbf{w}^{*},\bar{\mathbf{g}}_{t}\rangle$ $\displaystyle\leq\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*}\rVert^{2}+\eta_{t }^{2}\mathbb{E}_{k,c}\lVert\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2}-2\eta_ {t}\langle\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*},\bar{\mathbf{g}}_{t}\rangle.$ $$

As for the correlation error, we use Young’s inequality and Jensen’s inequality as before

$$ $\displaystyle 2\eta_{t}\langle\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*}-\eta_{t} \bar{\mathbf{g}}_{t},\bar{\mathbf{g}}_{t}-\tilde{\mathbf{g}}_{t}\rangle=2\eta_ {t}\langle\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*},\bar{\mathbf{g}}_{t}-\tilde{ \mathbf{g}}_{t}\rangle-2\eta_{t}^{2}\langle\bar{\mathbf{g}}_{t},\bar{\mathbf{g }}_{t}-\tilde{\mathbf{g}}_{t}\rangle$ $\displaystyle\quad\leq 2\eta_{t}\langle\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*}, \bar{\mathbf{g}}_{t}-\tilde{\mathbf{g}}_{t}\rangle+\eta_{t}^{2}\mathbb{E}_{k,c }\lVert\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2}+\eta_{t}^{2}\lVert\bar{ \mathbf{g}}_{t}-\tilde{\mathbf{g}}_{t}\rVert^{2}.$ $$

Adding everything together, we get

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{t+1}-\mathbf{w}^{*}\rVert^{2}$ $\displaystyle\leq\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*}\rVert^{2}+2\eta_{ t}^{2}\mathbb{E}_{k,c}\lVert\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rVert^{2}+2\eta _{t}^{2}\lVert\tilde{\mathbf{g}}_{t}-\bar{\mathbf{g}}_{t}\rVert^{2}$ $\displaystyle\quad-2\eta_{t}\hat{\mathbb{E}}_{k,c}\langle\tilde{\mathbf{w}}_{t }-\mathbf{w}_{c,t}^{k},\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rangle-2\eta_{t}\hat {\mathbb{E}}_{k,c}\langle\mathbf{w}_{c,t}^{k}-\mathbf{w}^{*},\nabla f_{c}( \mathbf{w}_{c,t}^{k})\rangle$ $\displaystyle\overset{\lx@cref{creftype~refnum}{eq:L-smooth-lemma}+\lx@cref{ creftype~refnum}{eq:mu-sc-lemma}}{\leq}\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w} ^{*}\rVert^{2}+2\eta_{t}^{2}\lVert\tilde{\mathbf{g}}_{t}-\bar{\mathbf{g}}_{t} \rVert^{2}-2\eta_{t}\hat{\mathbb{E}}_{k,c}\langle\tilde{\mathbf{w}}_{t}- \mathbf{w}_{c,t}^{k},\nabla f_{c}(\mathbf{w}_{c,t}^{k})\rangle$ $\displaystyle\quad+\eta_{t}\sum_{k=1}^{K}\sum_{c=1}^{C}\mathbf{p}^{k}(4L\eta_{ t}\bm{\pi}_{c}^{k}-2\hat{\bm{\pi}}_{c,t}^{k})[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c }(\mathbf{w}^{*})]-\eta_{t}\mu\hat{\mathbb{E}}_{k,c}\lVert\mathbf{w}_{c,t}^{k} -\mathbf{w}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*} \rVert^{2}+2\eta_{t}^{2}\lVert\tilde{\mathbf{g}}_{t}-\bar{\mathbf{g}}_{t} \rVert^{2}+2L\eta_{t}\hat{\mathbb{E}}_{k,c}\lVert\tilde{\mathbf{w}}_{t}- \mathbf{w}_{c,t}^{k}\rVert^{2}$ $\displaystyle\quad+\eta_{t}\sum_{k=1}^{K}\sum_{c=1}^{C}\mathbf{p}^{k}(4L\eta_{ t}\bm{\pi}_{c}^{k}-\hat{\bm{\pi}}_{c,t}^{k})[f_{c}(\mathbf{w}_{c,t}^{k})-f_{c} (\mathbf{w}^{*})],$ $$

where the last inequality uses Jensen’s inequality and Young’s inequality.

The optimality gap can be bounded by $-\frac{1}{2}\mathbf{p}^{k}\hat{\bm{\pi}}_{c,t}^{k}$ as in Lemma A.7 given a learning rate with a numerator $\min\{1,\min_{k\in[K]}\{\mathbf{p}^{k}\hat{\bm{\pi}}_{c,t}^{k}/\mathbf{p}^{k}
\bm{\pi}_{c}^{k}\}\}=\min_{k;\,\bm{\pi}_{c}^{k}>\hat{\bm{\pi}}_{c,t}^{k}}\{
\hat{\bm{\pi}}_{c,t}^{k}/\bm{\pi}_{c}^{k}\}$ this time, which allows us to obtain a bound in terms of $\hat{\mathbb{E}}_{c}[f_{c}(\tilde{\mathbf{w}}_{c,t})-f_{c}(\mathbf{w}_{c}^{*})]$.

The term $\hat{\mathbb{E}}_{k,c}\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}_{c,t}^{k}\rVert^
{2}$ can be bounded with Lemma A.3 by adding and subtracting $\hat{\mathbb{E}}_{c}\mathbf{w}_{c,t_{0}}^{k}=\tilde{\mathbf{w}}_{t_{0}}$ and applying the variance formula

$$ $\displaystyle\hat{\mathbb{E}}_{k,c}\lVert\mathbf{w}_{c,t}^{k}-\tilde{\mathbf{w }}_{t}\rVert^{2}$ $\displaystyle=\hat{\mathbb{E}}_{k,c}\lVert\mathbf{w}_{c,t}^{k}-\hat{\mathbb{E} }_{c}\mathbf{w}_{c,t_{0}}^{k}-(\tilde{\mathbf{w}}_{t}-\hat{\mathbb{E}}_{c} \mathbf{w}_{c,t_{0}}^{k})\rVert^{2}$ $\displaystyle\leq\hat{\mathbb{E}}_{k,c}\lVert\mathbf{w}_{c,t}^{k}-\hat{\mathbb {E}}_{c}\mathbf{w}_{c,t_{0}}^{k}\rVert^{2}$ $\displaystyle=\hat{\mathbb{E}}_{k,c}\lVert\sum_{\tau=t_{0}}^{t-1}\eta_{\tau} \nabla f^{{i_{\tau}}}(\mathbf{w}_{c,\tau}^{k})\rVert^{2}$ $\displaystyle\overset{\lx@cref{creftype~refnum}{eq:bound-sumgrads}+\lx@cref{ creftype~refnum}{eq:zeta-bounded-heterogeneity}}{\leq}4\eta_{t}^{2}H^{2}G^{2}.$ $$

It remains to bound $\lVert\tilde{\mathbf{g}}_{t}-\bar{\mathbf{g}}_{t}\rVert^{2}$,
in which the benefits of weight sharing will mainly manifest.
We start bounding $\lVert\tilde{\mathbf{g}}_{t}-\bar{\mathbf{g}}_{t}\rVert^{2}$ as in Lemma A.2

$$ $\displaystyle\mathbb{E}_{{i_{t}},z}\lVert\bar{\mathbf{g}}_{t}-\tilde{\mathbf{g }}_{t}\rVert^{2}$ $\displaystyle\leq 2\mathbb{E}_{{i_{t}},z}\lVert\mathbb{E}_{k,c}[\nabla f_{c}( \mathbf{w}_{c,t}^{k})-\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})]\rVert^{2}$ $\displaystyle\quad+2\mathbb{E}_{{i_{t}},z}\lVert\sum_{k=1}^{K}\sum_{c=1}^{C}p( k)(\bm{\pi}_{c}^{k}-\hat{\bm{\pi}}_{c,t}^{k})[\nabla f_{c}(\mathbf{w}_{c,t}^{k })-\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})]\rVert^{2}$ $\displaystyle\leq 2\mathbb{E}_{{i_{t}},z}\lVert\mathbb{E}_{k,c}[\nabla f_{c}( \mathbf{w}_{c,t}^{k})-\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})]\rVert^{2}$ $\displaystyle\quad+2\sum_{k=1}^{K}p(k)\mathbb{E}_{{i_{t}},z}\lVert\sum_{c=1}^{ C}(\bm{\pi}_{c}^{k}-\hat{\bm{\pi}}_{c,t}^{k})[\nabla f_{c}(\mathbf{w}_{c,t}^{k })-\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})]\rVert^{2}$ $\displaystyle\overset{\ref{eq:bound-delta}}{\leq}2\mathbb{E}_{{i_{t}},z}\lVert \mathbb{E}_{k,c}[\nabla f_{c}(\mathbf{w}_{c,t}^{k})-\nabla f^{{i_{t}}}(\mathbf {w}_{c,t}^{k})]\rVert^{2}+2G^{2}\mathbb{E}_{k}\lVert\bm{\delta}^{k}_{t}\rVert_ {1}^{2}.$ $$

By noting that $\lVert(\mathbf{u},\mathbf{a}_{c})\rVert^{2}=\lVert\mathbf{u}\rVert^{2}+\lVert
\mathbf{a}_{c}\rVert^{2}$, the first term can be decomposed further

$$ $\displaystyle 2\mathbb{E}_{{i_{t}},z}\lVert\mathbb{E}_{k,c}[\nabla f_{c}( \mathbf{w}_{c,t}^{k})-\nabla f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})]\rVert^{2}$ $\displaystyle=2\mathbb{E}_{{i_{t}},z}\lVert\mathbb{E}_{k,c}[\nabla_{{\color[ rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathbf{u}}}f_{c}( \mathbf{w}_{c,t}^{k})-\nabla_{{\color[rgb]{1,0,0}\definecolor[named]{ pgfstrokecolor}{rgb}{1,0,0}\mathbf{u}}}f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})] \rVert^{2}$ $\displaystyle\quad+2\mathbb{E}_{{i_{t}},z}\lVert\mathbb{E}_{k,c}[\nabla_{{ \color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathbf{a}_{c }}}f_{c}(\mathbf{w}_{c,t}^{k})-\nabla_{{\color[rgb]{1,0,0}\definecolor[named]{ pgfstrokecolor}{rgb}{1,0,0}\mathbf{a}_{c}}}f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})] \rVert^{2}.$ $$

The adaptor’s term can be bounded as follows

$$ $\displaystyle 2\mathbb{E}_{{i_{t}},z}\lVert\mathbb{E}_{k,c}[\nabla_{\mathbf{a} _{c}}f_{c}(\mathbf{w}_{c,t}^{k})-\nabla_{\mathbf{a}_{c}}f^{{i_{t}}}(\mathbf{w} _{c,t}^{k})]\rVert^{2}$ $\displaystyle\quad\overset{\text{(Jensen)}}{\leq}2\sum_{c=1}^{C}p(c)\mathbb{E} _{z}\mathbb{E}_{{i_{t}}|z=c}\lVert\sum_{k=1}^{K}\mathbf{p}_{c}^{k}\left(\nabla _{\mathbf{a}_{c}}f_{c}(\mathbf{w}_{c,t}^{k})-\nabla_{\mathbf{a}_{c}}f^{{i_{t}} }(\mathbf{w}_{c,t}^{k})\right)\rVert^{2}$ $\displaystyle\quad\overset{\lx@cref{creftype~refnum}{eq:sigma-bounded-variance -adaptor}}{\leq}2\sum_{c=1}^{C}p(c)\lVert\mathbf{p}_{c}\rVert^{2}\sigma_{c}^{2},$ $$

For the base model’s term, we decompose it further

$$ $\displaystyle 2\mathbb{E}_{{i_{t}},z}\lVert\mathbb{E}_{k,c}[\left(\nabla_{ \mathbf{u}}f_{c}(\mathbf{w}_{c,t}^{k})-\nabla_{\mathbf{u}}f^{{i_{t}}}(\mathbf{ w}_{c,t}^{k})]\right)\rVert^{2}$ $\displaystyle\quad\leq 4\mathbb{E}_{{i_{t}},z}\lVert\mathbb{E}_{k,c}[\nabla_{ \mathbf{u}}f_{c}(\mathbf{w}_{c,t}^{k})-\mathbb{E}_{c^{\prime}}\nabla_{\mathbf{ u}}f_{c^{\prime}}(\mathbf{w}_{c,t}^{k})]\rVert^{2}$ (*) $\displaystyle\quad\quad+4\mathbb{E}_{{i_{t}},z}\lVert\mathbb{E}_{k,c}[\mathbb{ E}_{c^{\prime}}\nabla_{\mathbf{u}}f_{c^{\prime}}(\mathbf{w}_{c,t}^{k})-\nabla_ {\mathbf{u}}f^{{i_{t}}}(\mathbf{w}_{c,t}^{k})]\rVert^{2}.$ (**) $$

Observe that we can write $\mathbb{E}_{c^{\prime}}[\nabla_{\mathbf{u}}f_{c^{\prime}}(\mathbf{w}_{c,t}^{k}
)]=\mathbb{E}_{{i_{t}}^{\prime},z^{\prime}}[\nabla_{\mathbf{u}}f^{{i_{t}}^{
\prime}}(\mathbf{w}_{c,t}^{k})]$, so that

$$ $\text{($**$)}=4\mathrm{Var}_{{i_{t}},z}\left(\sum_{k=1}^{K}\sum_{c=1}^{C} \mathbf{p}^{k}\bm{\pi}_{c}^{k}\nabla_{\mathbf{u}}f^{{i_{t}}}(\mathbf{w}_{c,t}^ {k})\right)\overset{\lx@cref{creftype~refnum}{eq:sigma-bounded-variance-shared }}{\leq}4\bar{\sigma}^{2}\sum_{c=1}^{C}\lVert\mathbf{p}\odot\bm{\pi}_{c}\rVert ^{2}.$ $$

As for ($*$),

$$ $\text{($*$)}\overset{\text{(Jensen)}}{\leq}4\mathbb{E}_{k,c}\lVert\nabla_{ \mathbf{u}}f_{c}(\mathbf{w}_{c,t}^{k})-\mathbb{E}_{c^{\prime}}\nabla_{\mathbf{ u}}f_{c^{\prime}}(\mathbf{w}_{c,t}^{k})]\rVert^{2}\overset{\lx@cref{ creftype~refnum}{eq:delta-bounded-heterogeneity}}{\leq}4\Delta^{2},$ $$

Adding the bounds for gradient error, we get

$$ $\mathbb{E}_{{i_{t}},z}\lVert\bar{\mathbf{g}}_{t}-\tilde{\mathbf{g}}_{t}\rVert^ {2}\leq 2G^{2}\mathbb{E}_{k}\lVert\bm{\delta}^{k}_{t}\rVert_{1}^{2}+2\mathbb{E }_{c}[\lVert\mathbf{p}_{c}\rVert^{2}\sigma_{c}^{2}]+4\bar{\sigma}^{2}\sum_{c=1 }^{C}\lVert\mathbf{p}\odot\bm{\pi}_{c}\rVert^{2}+4\Delta^{2}.$ (31) $$

Thus, we overall have the descent bound

$$ $\displaystyle\lVert\tilde{\mathbf{w}}_{t+1}-\mathbf{w}^{*}\rVert^{2}$ $\displaystyle\leq(1-\eta_{t}\mu)\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*} \rVert^{2}+\eta_{t}\sum_{k=1}^{K}\sum_{c=1}^{C}\mathbf{p}^{k}(4L\eta_{t}\bm{ \pi}_{c}^{k}-\hat{\bm{\pi}}_{c,t}^{k})[f_{c}(\mathbf{w}_{c,t}^{k})$ $\displaystyle\quad+4\eta_{t}^{2}(G^{2}\mathbb{E}_{k}\lVert\bm{\delta}^{k}_{t} \rVert_{1}^{2}+\mathbb{E}_{c}[\lVert\mathbf{p}_{c}\rVert^{2}\sigma_{c}^{2}]+2 \bar{\sigma}^{2}\sum_{c=1}^{C}\lVert\mathbf{p}\odot\bm{\pi}_{c}\rVert^{2}+2 \Delta^{2})$ $\displaystyle\quad+8L\eta_{t}^{3}H^{2}G^{2}.$ $$

This completes the proof.
∎

###### Lemma B.3 (Descent bound with weight sharing) .

###### Proof.

#### Convergence rate

The convergence rate will be almost identical to the main one, with the addition of more terms from our new assumptions, and a finer, more precise total variation distance term, which would introduce a $\log C$ term instead of a $\log KC$ using the same steps as in Lemma A.6.
As for the optimality gap, we would get it in terms of $\hat{\mathbb{E}}_{c}[f_{c}(\tilde{\mathbf{w}}_{c,t})-f_{c}(\mathbf{w}_{c}^{*})]$, as it is not possible to move the $\hat{\mathbb{E}}_{c}$ inside with Jensen’s inequality since it is an average of different functions and not one function.
We believe this can be remedied by a careful use of perturbed iterates $\mathbb{E}_{k,c}[\hat{\mathbb{E}}_{c^{\prime}}f_{c^{\prime}}(\mathbf{w}_{c,t}^
{k})]$, but we make no claims.
Finally, recall that $\lVert\tilde{\mathbf{w}}_{t}-\mathbf{w}^{*}\rVert^{2}\leq\lVert\mathbf{u}^{k}_
{t}-\mathbf{u}^{*}_{t}\rVert^{2}+\mathbb{E}_{c}\lVert\mathbf{a}^{k}_{c,t}-
\mathbf{a}^{*}_{c,t}\rVert^{2}$ when $\mathbf{w}_{c,t}^{k}=(\mathbf{u}^{k}_{t},\mathbf{a}^{k}_{c,t})$, so that a bound on the perturbed iterates suffices.

Overall, we believe that obtaining a convergence rate from Lemma B.3 is straightforward given the main results in Theorem A.9 and Theorem A.10 and is not interesting in itself, so we shall omit it.

### B.2 Benefits of Weight Sharing

Using the above lemma, we will show the benefits of weight-sharing on some idealized examples with well-balanced client datasets and cluster sizes.
First, recall the gradient aggregation error in 31

$$ $\displaystyle\mathbb{E}_{{i_{t}},z}\lVert\bar{\mathbf{g}}_{t}-\tilde{\mathbf{g }}_{t}\rVert^{2}\leq 2G^{2}\mathbb{E}_{k}\lVert\bm{\delta}^{k}_{t}\rVert_{1}^{ 2}+2\mathbb{E}_{c}[\lVert\mathbf{p}_{c}\rVert^{2}\sigma_{c}^{2}]+4\bar{\sigma} ^{2}\sum_{c=1}^{C}\lVert\mathbf{p}\odot\bm{\pi}_{c}\rVert^{2}+4\Delta^{2}.$ $$

This descent bound follows from using the perturbed iterates in 26 and 25 and using B.1 and B.2. We now present examples based on FL and CFL.

###### Remark B.4 .

Consider a balanced FL problem with $C=1$ and $N^{k}=N/K$.
Clearly, $\bm{\pi}_{c}^{k}=1$ for all $k\in[K]$, so we trivially have $\bm{\delta}^{k}_{t}=\bm{0}$. Furthermore, $\mathbf{p}_{c}=1/K$, so $\lVert\mathbf{p}_{c}\rVert^{2}=\frac{1}{K}$, and $\sum_{c=1}^{C}\lVert\mathbf{p}\odot\bm{\pi}_{c}\rVert^{2}=1/K$. Finally, $\Delta^{2}=0$.
Thus,

$$ $\mathbb{E}_{{i_{t}},z}\lVert\bar{\mathbf{g}}_{t}-\tilde{\mathbf{g}}_{t}\rVert^ {2}\leq\frac{4\bar{\sigma}^{2}+2\sigma_{1}^{2}}{K},$ $$

which is the original variance reduction.
Considering $C$ (independent) copies with $\bm{\pi}_{c}^{k}=1/C$ and a uniform router initialization $\hat{\bm{\pi}}_{c,0}^{k}=1/C$, and assuming that the variances of the adaptors are similar, i.e., $\sigma_{1}^{2}=\cdots=\sigma_{C}^{2}$, we get

$$ $\mathbb{E}_{{i_{t}},z}\lVert\bar{\mathbf{g}}_{t}-\tilde{\mathbf{g}}_{t}\rVert^ {2}\leq\frac{4\bar{\sigma}^{2}}{KC}+\frac{2\sigma_{1}^{2}}{K},$ (32) $$

where we can see the benefits of reducing the base model’s variance by averaging further across $C$ copies of FL problems with independent sampling.
Indeed, if $\sigma_{c}^{2}=\sigma_{1}^{2}$ for all $c\in[C]$, then we would have $\sigma_{1}^{2}/K$, but the full $1/KC$ factor remains for the base model.

###### Remark B.5 .

Consider a balanced clustered problem with $N^{k}=N/K$ and $\bm{\pi}_{c}^{k}=\bm{1}\{k\in c\}$, so that $p(k)=\frac{1}{K}$ and $p(c)=\frac{K_{c}}{K}$, where $K_{c}=\sum_{k=1}^{K}\bm{1}\{k\in c\}$.
Then, we have $\mathbf{p}_{c}^{k}=p(c|k)p(k)/p(c)=\frac{\bm{1}\{k\in c\}}{K_{c}}$, so $\lVert\mathbf{p}_{c}\rVert^{2}=\frac{1}{K_{c}}$.
Similarly, $\mathbb{E}_{c}[\lVert\mathbf{p}_{c}\rVert^{2}\sigma_{c}^{2}]=\frac{\sum_{c=1}^
{C}\sigma_{c}^{2}}{K}$.
Furthermore, we have $\sum_{c=1}^{C}\lVert\mathbf{p}\odot\mathbf{p}_{c}\rVert^{2}=\sum_{c=1}^{C}\sum
_{k=1}^{K}\frac{\bm{1}\{k\in c\}}{K^{2}}=\sum_{c=1}^{C}\frac{K_{c}}{K^{2}}=
\frac{1}{K}$.
Thus, when $\sigma_{1}^{2}=\cdots=\sigma_{C}^{2}$, we have

$$ $\mathbb{E}_{{i_{t}},z}\lVert\bar{\mathbf{g}}_{t}-\tilde{\mathbf{g}}_{t}\rVert^ {2}\leq\frac{4\bar{\sigma}^{2}}{K}+\frac{2\sigma_{1}^{2}}{K/C}+2G^{2}\mathbb{E }_{k}\lVert\bm{\delta}^{k}_{t}\rVert_{1}^{2}+4\Delta^{2}.$ (33) $$

Now consider a uniform router initialization $\bm{\pi}_{c}^{k}=1/C$.
Note $\bm{\delta}^{k}_{0}=(\lvert\bm{1}\{k\in c\}-1/C\rvert)_{c=1}^{C}$, so $\lVert\bm{\delta}^{k}_{0}\rVert_{1}^{2}=(\frac{C-1}{C}+(C-1)\frac{1}{C})^{2}=4
\frac{(C-1)^{2}}{C^{2}}$.
As for $\Delta^{2}$, we can only assume that it is close to 0. Otherwise, the use of weight sharing will not be motivated.

We can see from the clustered example that understanding the trade-off between the reduction in variances (via weight sharing) and the increase of $\Delta$ heterogeneity is important and allows for more principled mechanisms of weight sharing, which would be an interesting direction to explore.

###### Remark B.4 .

###### Remark B.5 .

## Appendix C Router Update

### C.1 Derivation of router update for (MFL)

The update in 5 looks different from the one we use in practice. Indeed, consider the $\bm{\pi}^{k}$ that minimizes (MFL) for each $k\in[K]$, i.e., $\bm{\pi}^{k}=\operatorname*{arg\,min}_{\bm{\pi}}\sum_{c=1}^{C}\bm{\pi}_{c}f^{k
}(\mathbf{w}_{c,t}^{k})$.
This is trivially $\bm{\pi}^{k}=\bm{e}_{\bar{c}}$ where $\bm{e}_{i}$ is basis vector of the $i$-th coordinate and $\bar{c}=\operatorname*{arg\,min}_{k\in[K]}f^{k}(\mathbf{w}_{c,t}^{k})$, i.e., $\bm{\pi}^{k}$ is one-hot at the lowest loss. Thus, $\bm{\pi}^{k}$ will always lie at one of the vertices of $\Delta^{C-1}$.

However, consider now (MFL) with negative entropy regularization for the routers $\Gamma(\bm{\pi}^{k})=\sum_{c=1}^{C}\bm{\pi}_{c}^{k}\log\bm{\pi}_{c}^{k}$.
We have

$$ $\displaystyle\bm{\pi}^{k}_{t}$ $\displaystyle=\operatorname*{arg\,min}_{\bm{\pi}\in\Delta^{C-1}}\ \sum_{c=1}^{ C}\bm{\pi}_{c}f^{k}(\mathbf{w}_{c,t}^{k})+\lambda_{\text{ent}}\sum_{c=1}^{C} \bm{\pi}_{c}\log\bm{\pi}_{c}$ $\displaystyle=\operatorname*{arg\,min}_{\bm{\pi}_{c}\geq 0}\quad\sum_{c=1}^{C} \bm{\pi}_{c}f^{k}(\mathbf{w}_{c,t}^{k})+\lambda_{\text{ent}}\sum_{c=1}^{C}\bm{ \pi}_{c}\log\bm{\pi}_{c}+\lambda_{\text{sim}}(\sum_{c=1}^{C}\bm{\pi}_{c}-1)$ $\displaystyle\implies\lambda_{\text{ent}}\log\bm{\pi}^{k}_{c,t}=-f^{k}(\mathbf {w}_{c,t}^{k})-\lambda_{\text{ent}}C-\lambda_{\text{sim}}C.$ $$

Let $\lambda=\frac{\lambda_{\text{sim}}}{\lambda_{\text{ent}}}$.
We either have $\lambda_{\text{sim}}=0$ or $\sum_{c=1}^{C}\bm{\pi}^{k}_{c,t}=1$, so

$$ $\displaystyle 1=\sum_{c=1}^{C}\bm{\pi}^{k}_{c,t}$ $\displaystyle=\sum_{c=1}^{C}\exp(-\lambda_{\text{ent}}^{-1}f^{k}(\mathbf{w}_{c ,t}^{k})-C-\lambda C)$ $\displaystyle\exp(\lambda C)$ $\displaystyle=\sum_{c=1}^{C}\exp(-\lambda_{\text{ent}}^{-1}f^{k}(\mathbf{w}_{c ,t}^{k})-C)$ $\displaystyle\lambda$ $\displaystyle=\frac{1}{C}\log\sum_{c=1}^{C}\exp(-\lambda_{\text{ent}}^{-1}f^{k }(\mathbf{w}_{c,t}^{k})-C)\implies\bm{\pi}^{k}_{c,t}=\frac{\exp(-\lambda_{ \text{ent}}^{-1}f^{k}(\mathbf{w}_{c,t}^{k}))}{\sum_{c=1}^{C}\exp(-\lambda_{ \text{ent}}^{-1}f^{k}(\mathbf{w}_{c,t}^{k}))}.$ $$

The above implies that the update 5 is, indeed, solving the following subproblem

$$ $\operatorname*{arg\,min}_{\bm{\pi}\in\Delta^{C-1}}\quad\sum_{c=1}^{C}\bm{\pi}_ {c}f^{k}(\mathbf{w}_{c,t}^{k})+\frac{1}{\eta_{t}}\sum_{c=1}^{C}\bm{\pi}_{c} \log\bm{\pi}_{c}.$ (34) $$

### C.2 Connection to gradient descent on a Softmax-parameterized router

Here we show that using the router parameterization $\hat{\bm{\pi}}_{c}\propto\exp\theta_{c}$ and the update in Algorithm 1 produces similar updates to 5 up to second-order terms in the exponent given a uniform router. We first note that $\hat{\bm{\pi}}_{c}$ is invariant to constant shifts in $\theta_{c}$ under the parameterization given above. This equivalently means that $\hat{\bm{\pi}}_{c}$ is invariant to constant multiplications (as it is always normalized). Note that we do not make use of the time index $t$ as we will be concerned with a single update across cluster indices $c$, and since $k$ is arbitrary, we drop it for clarity.

First, we rederive the Jacobian of Softmax, i.e., $\frac{\partial\hat{\bm{\pi}}_{c^{\prime}}}{\partial\theta_{c}}$ where $\hat{\bm{\pi}}_{c}=\frac{\exp\theta_{c}}{\sum_{c=1}^{C}\exp\theta_{c}}$. Using the fact that the gradient of LogSumExp is Softmax, i.e., $\frac{\partial}{\partial\theta_{c}}\log\sum_{c=1}^{C}\exp\theta_{c}=\hat{\bm{
\pi}}_{c}$, we get

$$ $\frac{\partial\hat{\bm{\pi}}_{c^{\prime}}}{\partial\theta_{c}}=\frac{\partial \log\hat{\bm{\pi}}_{c^{\prime}}}{\partial\theta_{c}}\hat{\bm{\pi}}_{c^{\prime} }=(\delta_{cc^{\prime}}-\hat{\bm{\pi}}_{c})\hat{\bm{\pi}}_{c^{\prime}},$ $$

where $\delta_{cc^{\prime}}$ equals 1 if $c=c^{\prime}$, 0 otherwise.

Let $\hat{\mathbf{w}}:=\sum_{c=1}^{C}\hat{\bm{\pi}}_{c}\mathbf{w}_{c}$. The gradient of FML with respect to $\theta_{c}$ is

$$ $\displaystyle\frac{\partial}{\partial\theta_{c}}f(\hat{\mathbf{w}})$ $\displaystyle=\sum_{c^{\prime}=1}^{C}\langle\nabla f(\hat{\mathbf{w}}),\mathbf {w}_{c^{\prime}}\rangle\frac{\partial\hat{\bm{\pi}}_{c^{\prime}}}{\partial \theta_{c}}$ $\displaystyle=\sum_{c^{\prime}=1}^{C}\langle\nabla f(\hat{\mathbf{w}}),\mathbf {w}_{c^{\prime}}\rangle(\delta_{cc^{\prime}}-\hat{\bm{\pi}}_{c})\hat{\bm{\pi}} _{c^{\prime}}$ $\displaystyle=\langle\nabla f(\hat{\mathbf{w}}),\sum_{c^{\prime}=1}^{C}\delta_ {cc^{\prime}}\hat{\bm{\pi}}_{c^{\prime}}\mathbf{w}_{c^{\prime}}\rangle-\langle \nabla f(\hat{\mathbf{w}}),\sum_{c^{\prime}=1}^{C}\hat{\bm{\pi}}_{c}\hat{\bm{ \pi}}_{c^{\prime}}\mathbf{w}_{c^{\prime}}\rangle$ $\displaystyle=\hat{\bm{\pi}}_{c}\langle\nabla f(\hat{\mathbf{w}}),\mathbf{w}_{ c}-\hat{\mathbf{w}}\rangle.$ $$

Using Taylor series expansion, we get

$$ $\frac{\partial}{\partial\theta_{c}}f(\hat{\mathbf{w}})=\hat{\bm{\pi}}_{c} \langle\nabla f(\hat{\mathbf{w}}),\mathbf{w}_{c}-\hat{\mathbf{w}}\rangle=\hat{ \bm{\pi}}_{c}(f(\mathbf{w}_{c})-f(\hat{\mathbf{w}}))-\hat{\bm{\pi}}_{c}\Omega( \lVert\mathbf{w}_{c}-\hat{\mathbf{w}}\rVert^{2}).$ $$

If we assume low curvature and $\hat{\bm{\pi}}_{c}^{-1}=\Omega(\lVert\mathbf{w}_{c}-\hat{\mathbf{w}}\rVert^{2})$ for $\hat{\bm{\pi}}_{c}>0$, then the approximation becomes exact up to $\Theta(1)$.
In other words, as the difference between cluster $c$ and the mixture increases, i.e., $\lVert\mathbf{w}_{c}-\hat{\mathbf{w}}\rVert^{2}$ becomes larger, we need $\hat{\bm{\pi}}_{c}$ to decrease at least as quickly so that it balances the second-order term out.

Let us simply assume that $\langle\nabla f(\hat{\mathbf{w}}),\mathbf{w}_{c}-\hat{\mathbf{w}}\rangle
\approx f(\mathbf{w}_{c})-f(\hat{\mathbf{w}})$ and that we reset $\theta_{c}$ before every update so that $\hat{\bm{\pi}}_{c}=1/C$. Recall that $\theta_{c}$ is invariant to constant shifts. Thus, the step above will be

$$ $\theta_{c}-\eta\frac{\partial}{\partial\theta_{c}}f(\hat{\mathbf{w}})\approx \theta_{c}-\eta\hat{\bm{\pi}}_{c}(f(\mathbf{w}_{c})-f(\hat{\mathbf{w}}))=- \frac{\eta}{C}f(\mathbf{w}_{c})\underbrace{+\frac{\eta}{C}f(\hat{\mathbf{w}})+ \frac{1}{C}}_{\text{do not depend on $c$}}.$ (35) $$

This implies that $\hat{\bm{\pi}}_{c}\propto\exp(-\frac{\eta}{C}f(\mathbf{w}_{c}))$ since $\theta_{c}$ is shift-invariant, which is equal to 5 with the learning rate multiplied by $C$.
In fact, we can remove router resetting, but it will then be related to the momentum-like router update $\hat{\bm{\pi}}_{c,t+1}\propto\hat{\bm{\pi}}_{c,t}\exp(-\eta f(\mathbf{w}_{c,t}))$ for a properly scaled $\eta$ with respect to $\sum_{\tau=0}^{t}\hat{\bm{\pi}}_{c,\tau}$. We leave this exposition for another work.

It should be noted that ignoring the second-order terms is not trivial. Nonetheless, it allowed us to make a direct connection between the updates we use in practice to the theory. We also understand now that the Softmax-parameterization is inferior when the curvature is high or when the mixed weights are far from the "active" clusters ($\mathbf{w}_{c}$ with large $\hat{\bm{\pi}}_{c}$). The second case happens, for example, when $\hat{\mathbf{w}}$ is in the origin and $\mathbf{w}_{1}$ and $\mathbf{w}_{2}$ are far and opposite to each other with $\hat{\bm{\pi}}_{1}=\hat{\bm{\pi}}_{2}$, but this ambiguity is inherent. Thus, we conclude that the main difficulty that could face a Softmax-parameterized router trained with gradient descent is high curvature, which is a sound conclusion since the log-weights are linear approximations of the function objectives.

## Appendix D Preconditioning LoRAs

Consider the gradient of a linear adaptive layer $\mathbf{W}+\mathbf{L}=\mathbf{W}+\mathbf{U}\mathbf{V}^{\top}$. Let $\mathbf{G}_{\mathbf{U}}:=\nabla_{\mathbf{U}}f(\mathbf{W}+\mathbf{U}\mathbf{V}^
{\top})$ be the gradient w.r.t. parameter $\mathbf{U}$, and similarly for $\mathbf{V}$ and $\mathbf{W}$. Note that $\mathbf{G}_{\mathbf{W}}=\mathbf{G}:=\nabla f(\mathbf{W}+\mathbf{U}\mathbf{V}^{
\top})$ because $\partial(\mathbf{W}+\mathbf{U}\mathbf{V}^{\top})/\partial\mathbf{W}=\mathbf{I}$.

$$ $\displaystyle\mathbf{U}\mathbf{V}^{\top}$ $\displaystyle\leftarrow(\mathbf{U}-\eta_{t}\mathbf{G}_{\mathbf{U}})(\mathbf{V} -\eta_{t}\mathbf{G}_{\mathbf{V}})^{\top}$ $\displaystyle=\mathbf{U}\mathbf{V}^{\top}-\eta_{t}(\mathbf{U}\mathbf{G}_{ \mathbf{V}}^{\top}+\mathbf{G}_{\mathbf{U}}\mathbf{V}^{\top})+\mathcal{O}(\eta_ {t}^{2})$ $\displaystyle=\mathbf{U}\mathbf{V}^{\top}-\eta_{t}(\mathbf{U}\mathbf{U}^{\top} \mathbf{G}+\mathbf{G}\mathbf{V}\mathbf{V}^{\top})+\mathcal{O}(\eta_{t}^{2}),$ $$

where we used the chain rule, $\mathbf{G}_{\mathbf{U}}=\mathbf{G}\mathbf{V}$ and $\mathbf{G}_{\mathbf{V}}=\mathbf{G}\mathbf{U}$. For linear layers, we consider a specific preconditioner designed for low-rank estimation (Tong et al., ).

$$ $\mathbf{G}_{\mathbf{U}}\leftarrow\mathbf{G}_{\mathbf{U}}(\mathbf{V}^{\top} \mathbf{V}+\epsilon\mathbf{I})^{-1},\quad\quad\quad\mathbf{G}_{\mathbf{V}} \leftarrow\mathbf{G}_{\mathbf{V}}(\mathbf{U}^{\top}\mathbf{U}+\epsilon\mathbf{ I})^{-1},$ (36) $$

for some small $\epsilon>0$. We note that this idea has also been recently explored in the context of LoRAs (Zhang & Pilanci, ).
The problem of learning a mixture of LoRAs can be ill-conditioned since they can learn at different rates, so we normalize their gradients to help them learn at the same rate (Chen et al., ).
Note that, as $\epsilon\to 0$, the scale of the dynamics of $\mathbf{U}\mathbf{V}^{\top}$ follows that of $\mathbf{W}$, i.e., $\mathbf{U}\mathbf{V}^{\top}-\eta_{t}(\mathbf{P}_{\mathbf{U}}\mathbf{G}+\mathbf
{G}\mathbf{P}_{\mathbf{V}})$,
where $\mathbf{P}_{\mathbf{U}}:=\mathbf{U}(\mathbf{U}^{\top}\mathbf{U})^{-1}\mathbf{U
}^{\top}$ is the projection matrix onto the column space of $\mathbf{U}$, and similarly for $\mathbf{V}$.
For convolution layers, we scale by the Frobenius norm of the preconditioner instead, as the problem would otherwise involve finding the deconvolution of the preconditioner, which is out of the scope of this work. Since $\mathbf{U}^{\top}\mathbf{U}$ and $\mathbf{U}\mathbf{U}^{\top}$ have the same eigenvalues and thus the same norms, the change in $\mathbf{U}\mathbf{V}^{\top}$ will be proportional to $\frac{\mathbf{U}\mathbf{U}^{\top}}{\|\mathbf{U}\mathbf{U}^{\top}\|_{F}}\mathbf
{G}+\mathbf{G}\frac{\mathbf{V}\mathbf{V}^{\top}}{\|\mathbf{V}\mathbf{V}^{\top}
\|_{F}}$.

## Appendix E Centering LoRAs

The condition 30 in B.2 is intuitive as a practical implementation detail. Indeed, Suppose that we have $C=2$, and at synchronization, we have $\mathbf{u}=5$, $\mathbf{a}_{1}=4$, and $\mathbf{a}_{2}=6$. If the model is $\mathbf{u}+\sum_{c}\bm{\pi}_{c}\mathbf{a}_{c}$, then an equivalent parameterization is $\mathbf{u}=10$, $\mathbf{a}_{1}=-1$, and $\mathbf{a}_{2}=1$, which has less variation across $\mathbf{a}_{1}$ and $\mathbf{a}_{2}$. What we have done is simply the following

$$ $\displaystyle\mathbf{u}$ $\displaystyle\leftarrow\mathbf{u}+\mathbb{E}_{c}[\mathbf{a}_{c}],$ $\displaystyle\mathbf{a}_{c}$ $\displaystyle\leftarrow\mathbf{a}_{c}-\mathbb{E}_{c}[\mathbf{a}_{c}],\forall c \in[C],$ $$

where $p(c)=1/2$. Since we have additive personalization, it is always possible to add and subtract arbitrary constants that will still yield the same parameterizations.
Choosing $\mathbb{E}_{c}[\mathbf{a}_{c}]$ would simply center the adaptors around zero.

In case of LoRAs, this is not exactly as straightforward as it might seem.
Consider a LoRA $\mathbf{a}_{c}=(\mathbf{U}_{c},\mathbf{V}_{c})$, for example. The update $\mathbf{a}_{c}=(\mathbf{U}_{c}-\mathbb{E}_{c}[\mathbf{U}_{c}],\mathbf{V}_{c}-
\mathbb{E}_{c}[\mathbf{V}_{c}])$ would not really preserve the parameterization. We should, in fact, have that $\mathbf{U}_{c}\mathbf{V}_{c}^{\top}\leftarrow\mathbf{U}_{c}\mathbf{V}_{c}^{
\top}-\mathbb{E}_{c}[\mathbf{U}_{c}\mathbf{V}_{c}^{\top}]$.
It remains to get the values of $\mathbf{U}_{c}$ and $\mathbf{V}_{c}$ individually after the reparameterization.
We can take the closest such values by minimizing the quantity

$$ $\operatorname*{arg\,min}_{\mathbf{U},\mathbf{V}}\quad\lVert\mathbf{U}\mathbf{V }^{\top}-(\mathbf{U}_{c}\mathbf{V}_{c}^{\top}-\mathbb{E}_{c}[\mathbf{U}_{c} \mathbf{V}_{c}^{\top}])\rVert^{2}$ $$

But the solution is straightforward, as it is precisely the truncated SVD of $\mathbf{U}_{c}\mathbf{V}_{c}^{\top}-\mathbb{E}_{c}[\mathbf{U}_{c}\mathbf{V}_{c
}^{\top}]$ (which is not unique). Namely,

$$ $\mathbf{U},\mathbf{\Sigma},\mathbf{V}^{\top}\leftarrow\text{Trunc-SVD}_{r}( \mathbf{U}_{c}\mathbf{V}_{c}^{\top}-\mathbb{E}_{c}[\mathbf{U}_{c}\mathbf{V}_{c }^{\top}]),\quad\mathbf{U}_{c}\leftarrow\mathbf{U}\mathbf{\Sigma}^{1/p},\quad \mathbf{V}_{c}\leftarrow\mathbf{V}\mathbf{\Sigma}^{1/q},$ (37) $$

where $r$ is the original rank of $\mathbf{U}_{c}$ and $\mathbf{V}_{c}$, and $p$ and $q$ are chosen such that $1/p+1/q=1$. The choice $p=2$ and $q=2$ is standard, but it is not exactly clear how to optimally choose $p$ and $q$ in case of LoRAs or in training FLoRAL models.

## Appendix F Adaptors

### F.1 Convolution layer

Here, we explain some of the implementations of ConvLoRAs. In our experiments, we choose the channel+filter ConvLoRA, also called Balanced 2D, because it is the most parameter-efficient and have the best performance as per Table 5.

#### Channel-wise

We define $\mathbf{U}\in\mathbb{R}^{c_{out}\times r\times k_{1}\times k_{2}}$ and $\mathbf{V}\in\mathbb{R}^{r\times c_{in}\times 1\times 1}$. Let us assume that $c_{out}\leq c_{in}$, without loss of generality. This could be seen as a linear transformation $\mathbf{U}$ of the $c_{in}$ filters to $r$ filters, followed by the a convolution layer $\mathbf{V}$ that is similar to the original one, except that it operates on $r$ filters instead. The order of the linear transformation and convolution can also be reversed adaptively so that the number of parameters is minimized. In general, the given construction is more economical in terms of added parameters when $c_{out}\leq c_{in}$. This operation can be written as

$$ $\mathbf{L}_{ijab}^{\text{channel}}:=\sum_{k=1}^{r}\mathbf{U}_{ikab}\mathbf{V}_ {kj11},$ (38) $$

and the number of its parameters is $(c_{out}k_{1}k_{2}+c_{in})r$.

#### Filter-wise

The filter size of the convolution layer $(k_{1},k_{2})$ can be reduced to rank-1 filters by two consecutive convolutions with filter sizes $(k_{1},1)$ and $(1,k_{2})$. Thus, for rank-$r$ filters, we define $\mathbf{U}\in\mathbb{R}^{c_{out}\times rc_{out}\times 1\times k_{2}}$ and $\mathbf{V}\in\mathbb{R}^{rc_{out}\times c_{in}\times k_{1}\times 1}$ as if we are decomposing the filter as a sum of rank-1 matrices. Thus, with some abuse of notation, we get the following low-rank layer

$$ $\mathbf{L}_{ijab}^{\text{filter}}:=\sum_{k=1}^{r}\mathbf{U}_{i(rj+k)1b}\mathbf {V}_{(rj+k)ja1}.$ (39) $$

It is understood here that the evaluation of what is between the parenthesis gives the index of a single dimension.
This adaptor has $(c_{out}k_{2}+c_{in}k_{1})c_{out}r$ parameters, which is significantly more than the channel-wise LoRA.

#### Channel+filter-wise

: In case we want to combine channel-wise and filter-wise low-rank adaptation for channel-wise low rank $r_{c}$ and filter-wise low rank $r_{f}$, we define $\mathbf{U}\in\mathbb{R}^{c_{out}\times r_{f}r_{c}\times 1\times k_{2}}$ and $\mathbf{V}\in\mathbb{R}^{r_{f}r_{c}\times c_{in}\times k_{1}\times 1}$, and the adaptive layer becomes

$$ $\mathbf{L}_{ijab}^{\text{mix}}:=\sum_{k_{c}=1}^{r_{c}}\sum_{k_{f}=0}^{r_{f}-1} \mathbf{U}_{i(r_{f}k_{c}+k_{f})1b}\mathbf{B}_{(r_{f}k_{c}+k_{f})ja1}=\sum_{k=1 }^{r_{f}r_{c}}\mathbf{U}_{ik1b}\mathbf{V}_{kja1}.$ (40) $$

Letting $r:=r_{f}r_{c}$, this formulation has $(c_{out}k_{2}+c_{in}k_{1})r$ parameters, which is an order of $c_{out}$ less parameters. In general, we always set $r_{f}=1$ as filters are usually small. It is sufficient to beat the channel-wise implementation as can will be seen in Section 3.2.

#### Reshaped linear

: We can use a regular linear LoRA by stacking the filter dimension of the convolution layer on the input or output channels, adding the LoRA, and then reshaping the layer back into the original shape.
In other words, we have $\mathbf{U}\in\mathbb{R}^{c_{out}k_{1}k_{2}\times r}$ and $\mathbf{V}\in\mathbb{R}^{r\times c_{in}}$, and the convolution LoRA would be

$$ $\mathbf{L}^{\text{conv}}_{ijab}:=\mathbf{L}^{\text{linear}}_{(k_{1}k_{2}i+k_{2 }a+b)j}.$ (41) $$

This layer has $(c_{out}k_{1}k_{2}+c_{in})r$, exactly like the channel-wise LoRA.

In our implementation, we choose the channel+filter option as it is the most parameter-efficient. Indeed, let $c_{max}:=\max(c_{in},c_{out})$ and $c_{min}:=\min(c_{in},c_{out})$, and let $k_{max}$ and $k_{min}$ be defined similarly. Note that we can always construct a channel+filter-wise ConvLoRA such that it has $(c_{min}k_{max}+c_{max}k_{min})r$ parameters. Thus, one can check that this is less than $(c_{min}k_{max}k_{min}+c_{max})r$ only when we have $c_{max}/c_{min}\leq k_{max}$, which is likely satisfied as the standard for most architectures is to have $c_{max}/c_{min}\leq 2$, and clearly $k_{max}\geq 2$.
We can constrain the number of parameters similarly to the linear layer as $(c_{min}k_{max}+c_{max}k_{min})r\leq\rho c_{min}c_{max}k_{min}k_{max}$. Indeed, if $c_{max}=c_{min}$ and $k_{max}=k_{min}$, we have $r\leq\rho c_{max}k_{max}/2$. The split of kernel sizes among the two layers can be done adaptively such that $r$ is maximized. In the experiment section, we refer to channel-wise ConvLoRAs methods where $r$ is maximized given $\rho$, and similarly for the channel+filter-wise ConvLoRAs methods where $r$ is maximized given $\rho$, which we denote as Balanced 2D ConvLoRA. We show the comparisons in Figures 10 and 5.

### F.2 Normalization Layers

We consider adaptors to batch normalization, instance normalization, layer normalization, and group normalization. All of these normalization layers start by normalizing a hidden vector of some layer $\mathbf{h}$ along specific dimensions to get $\hat{\mathbf{h}}$ and then take a Hadamard product along the normalized dimension as $\bm{\gamma}\odot\hat{\mathbf{h}}$ (ignoring bias). We propose a simple adaptor $\mathbf{L}_{\bm{\gamma}}$ that has the same shape and works in exactly the same manner but is initialized to zero. The adaptive output will then be $(\bm{\gamma}+\mathbf{L}_{\bm{\gamma}})\odot\hat{\mathbf{h}}$, which is initially equal to the non-adaptive output.

One normalization layer that requires a more thorough treatment is batch normalization. This is because it normalizes $\mathbf{h}$ with respect to running statistics calculated from previous batches, so the adaptor would need to normalize with respect to the same running statistics if we want to maintain the same additive form of the output under the same scale.

We now show a simple reparameterization of the BatchNorA that normalizes $\mathbf{h}$ with respect to the adaptor statistics but trains its parameters with respect to the main statistics. This ensures that the gradient of the adaptor has the same scale as the original gradient. This is useful because we are interested in the federated learning case where those parameters are federated, but the statistics are local. Note that this is not the same as FedBN (Li et al., ), where both the parameters and the statistics are local.

#### Batch NorA

We will show here a batch norm adaptor that might be of interest to the readers, which is left here in the appendix as it is still in the exploratory stage.
Preliminary experiments show decent improvements, as can be seen from Figure 2.

First, recall batch normalization

$$ $\text{BN}(x;\gamma,\beta)=\frac{x-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)+ \epsilon}}\gamma+\beta,$ $$

where $x\in\mathbb{R}^{B\times d}$ for batch size $B$ and dimension $d$, $\hat{\mu}(x)\in\mathbb{R}^{d}$ and $\hat{\sigma}^{2}(x)\in\mathbb{R}^{d}$ are the batch mean and variance (or statistics, for short), $\gamma\in\mathbb{R}^{d}$ and $\beta\in\mathbb{R}^{d}$ are learnable parameters, and $\epsilon$ is a small number for numerical stability. Here, it is understood that the operation is applied on $x$ batch-wise. Often, batch statistics are estimated with a running (exponential) average during training, and then fixed during evaluation.

When we are faced with multiple tasks or non-iid data distributions, batch normalization layers can actually hurt performance because the batch statistics can be inaccurate and might not necessarily converge (Wang et al., ). We would like to introduce an adaptor for batch norm layers $L_{i}=[\gamma_{i},\beta_{i}]$, so an intuitive implementation would be as follows:

$$ $\text{BN-Adaptor}_{i}(x;\gamma,\beta,\gamma_{i},\beta_{i})=\text{BN}(x;\gamma, \beta)+\text{BN}_{i}(x;\gamma_{i},\beta_{i}),$ $$

where both $\gamma_{i}$ and $\beta_{i}$ are initialized to 0 so that it is equivalent to the original case at initialization.

However, we want to ensure that our choice of $\gamma_{i}$ and $\beta_{i}$ is invariant to the local batch statistics. In other words, we want $\gamma_{i}$ to behave as a perturbation to $\gamma$, and similarly for $\beta_{i}$. Let us set $\epsilon=0$. Now, observe that

$$ $\displaystyle\text{BN-Adaptor}_{i}(x)$ $\displaystyle=\frac{x-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}\gamma+\frac{x- \hat{\mu}_{i}(x)}{\sqrt{\hat{\sigma}^{2}_{i}(x)}}\gamma_{i}+\beta+\beta_{i}$ $\displaystyle=\frac{x-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}\gamma+\frac{ \sqrt{\hat{\sigma}^{2}(x)}}{\sqrt{\hat{\sigma}^{2}_{i}(x)}}\frac{x-\hat{\mu}_{ i}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}\gamma_{i}+\beta+\beta_{i}$ $\displaystyle=\frac{x-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}\gamma+\frac{ \sqrt{\hat{\sigma}^{2}(x)}}{\sqrt{\hat{\sigma}^{2}_{i}(x)}}\left(\frac{x-\hat{ \mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}-\frac{\hat{\mu}_{i}(x)-\hat{\mu}(x)}{ \sqrt{\hat{\sigma}^{2}(x)}}\right)\gamma_{i}+\beta+\beta_{i}.$ $$

Let $\hat{m}_{i}:=\frac{\hat{\mu}_{i}(x)-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}$ be the (normalized) mean shift w.r.t. the global mean and $\hat{s}_{i}:=\frac{\hat{\sigma}_{i}(x)}{\hat{\sigma}(x)}$ be the relative deviation w.r.t. the global deviation. We can rewrite the above expression as

$$ $\displaystyle\text{BN-Adaptor}_{i}(x)$ $\displaystyle=\frac{x-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}\gamma+\hat{s}_ {i}^{-1}\left(\frac{x-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}-\hat{m}_{i} \right)\gamma_{i}+\beta+\beta_{i}$ $\displaystyle=\frac{x-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}(\gamma+\hat{s} _{i}^{-1}\gamma_{i})-\hat{m}_{i}\hat{s}_{i}^{-1}\gamma_{i}+\beta+\beta_{i}.$ $$

Thus, consider a reparameterization $\tilde{\gamma}_{i}:=\hat{s}_{i}\gamma_{i}$ and $\tilde{\beta}_{i}:=\beta_{i}+\hat{m}_{i}\gamma_{i}$ so that $\text{LoRA-BN}_{i}(x)=\text{BN}(x;\gamma,\beta)+\text{BN}_{i}(x;\tilde{\gamma}
_{i},\tilde{\beta}_{i})$.
We would then have that

$$ $\displaystyle\text{BN-Adaptor}_{i}(x)$ $\displaystyle=\frac{x-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}(\gamma+\hat{s} _{i}^{-1}\tilde{\gamma}_{i})+\hat{m}_{i}\hat{s}_{i}^{-1}\tilde{\gamma}_{i}+ \beta+\tilde{\beta}_{i}$ $\displaystyle=\frac{x-\hat{\mu}(x)}{\sqrt{\hat{\sigma}^{2}(x)}}(\gamma+\gamma_ {i})+\beta+\beta_{i}.$ $$

Therefore, a reparameterization that is invariant to local batch statistics would be as follows

$$ $\gamma_{i}\longrightarrow\frac{\hat{\sigma}_{i}(x)}{\hat{\sigma}(x)}\gamma_{i} ,\quad\quad\beta_{i}\longrightarrow\beta_{i}+\frac{\hat{\mu}_{i}(x)-\hat{\mu}( x)}{\sqrt{\hat{\sigma}^{2}(x)}}\text{sg}(\gamma_{i}),$ (42) $$

where we used the stop gradient operator $\text{sg}(\gamma_{i})$ to emphasize that $\gamma_{i}$ is given in $\beta_{i}$’s parameterization (i.e., would not pass its gradients through $\beta_{i}$). Note that this $\gamma_{i}$ is not the reparameterized one. It is helpful to think of the expressions on the RHS of the arrows in 42 as arguments to the batch norm function, and that $\gamma_{i}$ and $\beta_{i}$ are parameters to be optimized.

#### Experiment

Consider the following small adjustment to the synthetic MLP task. For each client $k$, we first take a fixed sample of $\mathbf{x}^{k}$, compute the hidden vectors, and then normalize them before feeding them to the activation function and final layer. The normalization is critically dependent on the sampled $\mathbf{x}^{k}$ for each client. This construction makes the problem more amenable to a batch normalization layer after the first layer, so we use this model and consider Batch-NorA. In addition, we consider use batch normalization in the VGG-8 model we originally used for CIFAR-100.

The results in Figure 2 are decent and show that the particular setting of reparameterized Batch-NorA Section F.2 with local statistics can offer good improvements. We note that the reparameterization is equivalent to normalization with respect to the main batch norm and then rescaling and shifting with respect to the adaptor’s parameters. The convenience of this reparameterization is that it does not require any adjustment to the batch norm layer in the adaptor, and the reparameterization can be seamlessly done with PyTorch’s parameterization module.

Figure: Figure 2: Loss on Synthetic MLP + BN dataset.
Refer to caption: x4.png

## Appendix G Extra Experimental Details

In this section, we show extra experimental details and show missing tables and figures.

### G.1 Synthetic Linear

Consider a regression task where we want to learn $\mathbf{y}\in\mathbb{R}^{d_{y}}$ given $\mathbf{x}\in\mathbb{R}^{d_{x}}$, where $\mathbf{x}\sim\mathcal{N}(0,\mathbf{I}_{d_{x}})$. We construct two versions of this regression task: one is based on a linear model plus a personalized LoRA, and the other is based on a similar setup on the first layer of a two-layer ReLU net.
For both problems, we sample the parameters of the dataset element-wise from the normal distribution $\mathcal{N}(0,\frac{1}{\sqrt{d_{in}}})$, where $d_{in}$ is the input dimension of the layer.
The target and the model are such that

$$ $\mathbf{y}^{k}(\mathbf{x})=\sum_{c=1}^{C}\bm{\pi}^{k}_{c}(\mathbf{W}+\alpha \mathbf{U}_{c}\mathbf{V}_{c}^{\top})\mathbf{x},\quad\quad\hat{\mathbf{y}}^{k}( \mathbf{x})=\sum_{c=1}^{C}\hat{\bm{\pi}}^{k}_{c}(\hat{\mathbf{W}}^{k}+\hat{ \mathbf{U}}^{k}_{c}(\hat{\mathbf{V}}^{k}_{c})^{\top})\mathbf{x},$ (43) $$

where $\mathbf{W}\in\mathbb{R}^{d_{y}\times d_{x}}$, $\mathbf{U}_{c}\in\mathbb{R}^{d_{y}\times r}$, $\mathbf{V}_{c}\in\mathbb{R}^{d_{x}\times r}$, and $\alpha\in\mathbb{R}$, and similarly for the trained parameters. The ground-truth model is designed such that the clients share a common structure without making any assumption about the distances of the personal solutions to the solution of FL.
Notice that $\alpha$ can make the personal solutions arbitrarily far from $\mathbf{W}$, yet they differ in rank $r$ only. For example, a simple construction would be $\mathbf{W}=\mathbf{I}$ and $\mathbf{U}_{c}=\mathbf{V}_{c}=\mathbf{e}_{c}$, where $\mathbf{e}_{i}$ is the standard basis vector of the $i$-th coordinate (e.g., $\mathbf{e}_{1}=(1,0,\cdots)^{\top}$). As for the ground-truth router assignment, we consider a diagonal assignment such that $\bm{\pi}^{k}_{c}=\delta_{(k\mod C)c}$, so clients $mk$ are in the same cluster for positive integers $m$.
For each client $k$, we take a fixed sample of $\mathbf{x}^{k}$ and $\mathbf{y}^{k}$ of size $N^{k}$ such that $N^{k}<d$, but $\sum_{k=1}^{K}N^{k}>d$, where $d=d_{y}d_{x}$ is the original model size. This is to make it difficult for the model to fit $\hat{\mathbf{W}}$ locally due to under-parameterization. Thus, collaboration is important to generalize well, but collaboration with the wrong clients can be detrimental. For this dataset, we chose $N^{k}\approx 0.25d$. The objective for this regression task is the MSE loss $\frac{1}{2}\lVert\hat{\mathbf{y}}^{k}(\mathbf{x})-\mathbf{y}^{k}\rVert^{2}.$.

### G.2 Synthetic MLP

Consider a 2-layer ReLU neural net, or multi-layer perceptron (MLP) for short(^6^66We write the ReLU function as $(\cdot)_{+}$.)

$$ $\mathbf{y}^{k}:=\mathbf{\Phi}\left(\sum_{c=1}^{C}\bm{\pi}^{k}_{c}(\mathbf{W}+ \mathbf{U}_{c}\mathbf{V}_{c}^{\top})\mathbf{x}\right)_{+},$ (44) $$

where now $\mathbf{W}\in\mathbb{R}^{d_{h}\times d_{x}}$, $\mathbf{U}_{c}\in\mathbb{R}^{d_{h}\times r}$, $\mathbf{V}_{c}\in\mathbb{R}^{d_{x}\times r}$, and $\mathbf{\Phi}\in\mathbb{R}^{d_{y}\times d_{h}}$ for some hidden dimension $d_{h}$, and a diagonal router assignment $\bm{\pi}^{k}_{c}=\delta_{(k\mod C)c}$. We use normal initialization with variance proportional to the input dimension of the layer.
The regression model has the exact same form. However, the hidden dimension is wider, i.e., it is $md_{h}$ for some integer $m\geq 1$.
This is mainly because we want to control for the effect of not being able to fit the target model (we set $m=2$ in our experiments). We also have $N^{k}\approx 0.5d$, which is twice as many data points than the linear task as this task is more difficult.

### G.3 Ablation and Hyperparameters

**Table 4: Ablation of ConvLoRAs.**
| ConvLoRA | CIFAR-10 | CIFAR-100 |  |
| --- | --- | --- | --- |
| R | LS |  |  |
| Balanced 2D | 70.2 | 74.1 | 51.7 |
| In Layer | 67.6 | 73.5 | 49.1 |
| Out Layer | 68.5 | 74.0 | 51.9 |
| None | 67.6 | 73.9 | 50.8 |

Adaptors. We study the effect of removing each of the adaptors introduced in Section 3.2. We chose the CIFAR-10 with both tasks and CIFAR-100 for the ablation study of the LoRAs, ConvLoRAs, and bias adaptors.
We show in Figure 8 and Table 5 that the full combination of LoRA, ConvLoRA, and adaptive biases can consistently achieve the top accuracy.

$\rho$ and $C$.
In Table 3, we see that choosing $C$ to be less than the number of ground-truth clusters can hurt performance.
On the other hand, using a significantly larger $C$ can hurt performance for smaller $\rho$,
but a larger $\rho$ fixes this by reaching similar accuracies to the case where we know the exact number of ground-truth clusters.
We can also see the plots in Figure 9.

ConvLoRA.
We compare the different methods for implementing ConvLoRAs as proposed in Section 3.2.
We propose to balance the channels and the kernel sizes such that we achieve the most parameter-efficient ConvLoRA, which we refer to as Balanced 2D as it is specific to the two dimensional case. On the other hand, we can balance only the channels and fix the kernel sizes to either the in layer or the out layer.
We show in Tables 5 and 10 that the Balanced 2D case is consistently the best option given a fixed $\rho$.
Recall that MNIST and CIFAR-10 have 4 ground-truth clusters, and CIFAR-100 have 10.

### G.4 Datasets Meta-data

See Table 6.

**Table 6: Metadata of the considered federated datasets ($K$ = # of clients, $C$ = # of clusters, $p$ = ratio of sampled clients per round).**
| Dataset | $K$ | $C$ | $p$ | Model |
| --- | --- | --- | --- | --- |
| Synthetic Linear | 10 | 2 | 100% | Linear 43 |
| Synthetic MLP | 20 | 4 | 100% | MLP 44 |
| MNIST | 300 | 4 | 10% | MLP |
| CIFAR-10 | 20 | 4 | 100% | 2$\times$Conv$\to$MLP |
| CIFAR-100 | 100 | 10 | 50% | VGG-8 |

### G.5 Missing Figures

In this section, we simply show missing figures from our experiments for completeness.
In particular, we show plots of the aggregated testing loss per client, which shows how the other methods overfit in comparison to FLoRAL, especially in the low-data regime.

Figure: Figure 3: Test loss on MNIST-R (left = Full, right = Reduced).
Refer to caption: x5.png

Figure: Figure 4: Test loss on MNIST-LS (left = Full, right = Reduced).
Refer to caption: x7.png

Figure: Figure 5: Test loss on CIFAR-10-R (left = Full, right = Reduced).
Refer to caption: x9.png

Figure: Figure 6: Test loss on CIFAR-10-LS (left = Full, right = Reduced).
Refer to caption: x11.png

Figure: Figure 7: Test loss on CIFAR-100 (left = Full, right = Reduced).
Refer to caption: x13.png

Figure: Figure 8: Ablation study of FLoRAL Adaptors (left: CIFAR-10-R, middle: CIFAR-10-LS, right: CIFAR-100).
Refer to caption: x15.png

Figure: Figure 9: Varying $\rho$ and $C$ (left: CIFAR-10-R, middle: CIFAR-10-LS, right: CIFAR-100).
Refer to caption: x18.png

Figure: Figure 10: Accuracy of ConvLoRA as described in Section G.3 (left: CIFAR-10-R, middle: CIFAR-10-LS, right: CIFAR-100).
Refer to caption: x21.png

## Peer Reviews

confidence: 5
contribution: 1
initial_rating: 1
presentation: 1
questions: See my comments above.
soundness: 1
strengths: The strength of this paper is its exploration of parameter-efficient personalization in federated learning which is an important topic.
summary: The paper proposes "FLoRAL," a parameter-efficient federated learning framework that uses mixtures of low-rank adaptors (LoRAs) to enable [perhaps] client personalization in heterogeneous settings.
weaknesses: See my comments below:
* The paper lacks a clear presentation of the exact problem it aims to solve. In multiple sections—such as the abstract (lines 11-28) and the introduction (lines 51-57, 72-77)—the objectives and approach remain ambiguous. The methodology section does not clearly delineate the specific FL problem at hand or how FLoRAL is a unique solution to this problem. Overall, the paper needs a more clear writing. 
* Section 3 introduces five different FL setups, but it is unclear which of these the authors ultimately focus on. Are the authors targeting personalized FL, clustered FL, multi-task learning FL, or another variant? Furthermore, the notations "W" and "L" on line 151 are undefined, adding to the confusion.
* The related work section is weak and misses recent studies on personalized FL, multi-task FL, and representation learning. A thorough review of these fields is essential to position FLoRAL relative to state-of-the-art methods. It would help to articulate the novel contributions of FLoRAL more clearly in relation to existing methods, especially highlighting areas where it advances beyond current FL approaches.
* While the methodology is not clear, it appears overly simplistic, consisting mainly of mixing adaptors through weighted combinations. This is a straightforward extension of FedEM, as noted in line 378. Key methodological details are also missing—such as the initialization process, whether only the adaptors are learned and communicated, and whether the mixing of adaptors occurs at the client or the server. Providing a more detailed breakdown of the algorithm would clarify the novelty and rigor of the approach.
* The experimental section lacks critical information regarding the experimental setup and baseline comparisons. The baselines in Table 1 are not clearly explained; for instance, "Ensemble" is introduced without adequate description, and it is unclear how various settings were configured. The purpose of the "reduced 5% data" setting is also not explained. Furthermore, if the authors intend to address multi-task FL, a comparison with state-of-the-art MTL FL methods would be essential to substantiate the claims of FLoRAL’s effectiveness. In overall, the methodology section is not clear at all. 
* The conclusion section does not summarize the key findings of the study but rather discusses potential future work.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: 1. In Theorem 4.5, the authors demonstrate that the convergence rate is influenced by the term $\mathcal{O}\left(\frac{G\Vert \delta_{c,0}\Vert_{1}^2}{\mu T^{1+\beta}}\right)$, where $\delta_{c,0}$ represents the degree of mismatch. Does this imply that, even if the predicted distribution differs significantly from the ground truth, it can still converge to the optimal solution. This seems counterintuitive; could the authors provide some intuition behind this result?
2. There are several typographical errors, and some notations are unclear. For example, in Eq. (2), $\pi_{k'c}$ should be written as $\pi_c^{k'}$.
3. In line 467, the authors state, “we do not aim to improve over the state of the art.” However, the experimental section does not clearly demonstrate the effectiveness of the proposed method. If relevant results are provided in the appendix, I would recommend placing the most significant results that highlight the advantages of the proposed method within the main text.
soundness: 2
strengths: I commend the authors for their clear analysis of the weight selection strategy for aggregation and their thorough examination of how uncertainties in estimating the vector $\pi$ impact convergence.
summary: This paper proposes a lightweight personalized federated learning method, FLoRAL, which integrates multiple shared adapters with client-specific vectors constrained by a simplex. 
The authors discuss the relationship between the proposed method and existing personalized federated learning approaches, talk about the probability selection strategy when aggregating weights, and present convergence properties of the proposed method as well as the impact of inaccurate estimation of the vector $\pi$.
weaknesses: 1. The experiments do not include all relevant baselines. Specifically, methods based on Mixture of Experts (MoE), such as [1], and shared Lora, such as [2, 3], are also closely related to the proposed approach.
2. The convergence analysis and the connection between FML and MFL problems are established under the assumption of convexity. However, the experiments involving neural networks generally do not meet this convexity assumption. A stronger alignment between the analysis and experiments would enhance the study’s validity.
3. The contributions of the work are not clearly articulated. While the authors claim that FLoraL is memory-efficient, similar advantages are also present in previous LoRA-based methods, such as [2, 3]. The authors should consider specifying the unique advantages that the proposed method offers over existing approaches.

[1] Yi, Liping, et al. pFedMoE: Data-Level Personalization with Mixture of Experts for Model-Heterogeneous Personalized Federated Learning. arXiv:2402.01350, arXiv, 11 Feb. 2024. arXiv.org, https://doi.org/10.48550/arXiv.2402.01350.

[2] Yi, Liping, et al. pFedLoRA: Model-Heterogeneous Personalized Federated Learning with LoRA Tuning. arXiv:2310.13283, arXiv, 11 Feb. 2024. arXiv.org, https://doi.org/10.48550/arXiv.2310.13283.

[3] Cho, Yae Jee, et al. "Heterogeneous lora for federated fine-tuning of on-device foundation models." International Workshop on Federated Learning in the Age of Foundation Models in Conjunction with NeurIPS 2023. 2023.

---

confidence: 4
contribution: 1
initial_rating: 3
presentation: 2
questions: 1) The aggregated gradient is implemented in every H step. However, the author did not mention how we can compute the loss function of i_t (the sampled client) over the client's weights (line 303). 
2) In line 316, what is the motivation behind the exponential formula for updating the learned client mixtures?
3) The authors claimed that this is a parameter-efficient framework. However, we see that the base layers are synchronized in the Algorithm 1 (line 419). So, what parameter efficiency could this framework bring? 
4) How are clusters assigned to clients?
soundness: 2
strengths: - This paper has a nice figure illustration.
- FLoRAL uses low-rank adaptation(LoRA) to personalize the model for each client. This significantly reduces the number of parameters that need to be stored and transmitted compared to using full models.
- Adapters in FLoRAL are learned collaboratively between clients, leveraging information from multiple data sources.
summary: The paper introduces FLoRAL. It is claimed to be a memory-efficient federated learning framework focused on model personalization through the combination of LoRA adapters.
weaknesses: Although many efforts can be witnessed in this paper, we still find that the structure of this paper is hard to follow, and we can see a lack of explanation/motivation behind some techniques:
1) The authors implement the aggregated gradient every H step in the whole time zone T and use the modulo operator to describe what happens at some specific timestep. However, this would overcomplicate the problem rather than simply using ‘local and ‘global rounds as usual.
2) More discussion is needed on the communication and computation cost. For example, which parameters (i.e., vectors/matrices) are communicated between the clients and server? Which operations need to be computed by clients/servers? How is the communication cost (regarding the parameter size) compared with the computation cost?
3) Besides, experimental results show that the results are not convincing compared to SoTA baselines. For example, The work did not compare the proposed framework with another popular federated framework, i.e., FFA-LoRA (https://openreview.net/forum?id=NLPzL6HWNl). 
4) The benefits of LORA averaging in FL are not justified in theoretical analysis. For example, what are the effects of averaging the LORA adapters u and a (lines 11 and 12 of Algorithm 1) in the theoretical analysis?
5) Some notations are not clearly explained, i.e. (loss function of sampled client i_t at the weight of client k (w_k) in line 303).

---

confidence: 3
contribution: 2
initial_rating: 3
presentation: 1
questions: - How is θ implemented in practice and what is it exactly? The authors mention it is a vector (Line 388). However, it remains unclear to me what exactly it is and how it relates to other parts of the parameters.
- What are the potential challenges and outcomes for applying FLoRAL to larger models such as language models?
soundness: 2
strengths: - Inspired by LoRA, aggregating partial parameters (adaptors) of federated learning models for better personalization is interesting. It is parameter-efficient and allows local models to benefit both from collaborations and the generalization of their data.
- The idea is well-motivated and presented clearly in the introduction. The results show that a mixture of adaptors sometimes can beat a mixture of models.
- The theoretical analysis is provided. Also, some insights into why aggregating only the adaptors could lead to a good performance are discussed. It is an interesting phenomenon from my perspective and can be explored further.
summary: The paper introduces FLoRAL, a parameter-efficient framework for better personalization. To do this, each client learns to mix between parameter-efficient adaptors according to their task and performs a clustering on top of that. The results show that FLoRAL can outperform an ensemble of full models with optimal cluster assignment. Theoretically, the authors provide a convergence analysis of their framework.
weaknesses: - **Related work is not comprehensively compared and discussed**: Firstly, there are many recent works in personalization for federated learning, such as [1,2] ; authors could discuss in the related work section and compare them in the experimental section. Secondly, in related work, authors can discuss how FLoRAL is different from LoRA-related federated learning methods (what are the strengths, differences, etc).

- **The experimental section is poorly presented**: The experiment part could be greatly improved. 

1. Baselines are not introduced in the main paper and I don't know what they are (what are local adaptors, ensemble?). 
2. Synthetic experiment is confusing. For Table 3, those compared baselines are not defined and I am not sure what messages authors trying to convey from this.
3. The experiments are conducted mostly on MNIST/CIFAR-10 and only simple architectures like CNN/MLP are used. More real-world datasets and more complicated model architectures can be used and tested.
4. Generally, the experiment part is not structured in writing. It is mixed with results, comparisons, conclusions, and ablation studies. Authors can consider presenting it in a more structured way.

- **Minor**: For line 153, what is this  ∆^{C−1}? Authors may define it more explicitly.

[1] https://arxiv.org/abs/2211.15281

[2] https://openreview.net/forum?id=nO5i1XdUS0