## Load Balancing in Federated Learning

Alireza Javani, and Zhiying Wang Center for Pervasive Communications and Computing University of California, Irvine { ajavani, zhiying } @uci.edu

Abstract -Federated Learning (FL) is a decentralized machine learning framework that enables learning from data distributed across multiple remote devices, enhancing communication efficiency and data privacy. Due to limited communication resources, a scheduling policy is often applied to select a subset of devices for participation in each FL round. The scheduling process confronts significant challenges due to the need for fair workload distribution, efficient resource utilization, scalability in environments with numerous edge devices, and statistically heterogeneous data across devices. This paper proposes a load metric for scheduling policies based on the Age of Information and addresses the above challenges by minimizing the load metric variance across the clients. Furthermore, a decentralized Markov scheduling policy is presented, that ensures a balanced workload distribution while eliminating the management overhead irrespective of the network size due to independent client decision-making. We establish the optimal parameters of the Markov chain model and validate our approach through simulations. The results demonstrate that reducing the load metric variance not only promotes fairness and improves operational efficiency, but also enhances the convergence rate of the learning models.

## I. INTRODUCTION

Federated learning (FL), introduced by McMahan et al. [1], emerged as a solution to the limitations of traditional machine learning models that require centralized data collection and processing. FL enables client devices to collaboratively train a global model while keeping all the training data localized, thus addressing privacy concerns. The iterative training process of FL involves clients updating local models with their data before sending these updates to a central server for aggregation. To reduce communication load, a client selection policy can be applied such that only a subset of the clients transmits to the central server in a round. For example, random selection [2] selects each client uniformly at random in each round. However, client selection may lead to an unbalanced communication load and uneven contribution to the global model among clients.

In this paper, we propose the load metric X , defined as the number of rounds between subsequent selections of a client. Assuming the distribution of the load metric for all clients is identical, our goal is to minimize Var[ X ] , the variance of X .

The load metric X is related to the concept of Age of Information (AoI) [3], which is the time elapsed since the last transmission of a client. In fact, X is called the peak age [4]. While most previous approaches in studying AoI in networking problems involve minimizing the average age or the average peak age [5], this paper focuses on reducing the variance of X given the probability of selecting each client.

The benefits of minimizing the variance of X are as follows:

- · Predictable Update Intervals and Load Balancing: By reducing the variance of X , we stabilize peak age and ensure consistent intervals between client selections. This predictability implies a fair and balanced selection process and improves operational efficiency.
- · Improved Convergence and Accuracy: A lower variability in X is essential for maintaining a diverse and representative global model, preventing biases and enhancing overall model accuracy.

We introduce a decentralized policy based on a Markov chain. Here, the state of the Markov chain is determined by the age of the client, and the transition probabilities represent an age-dependent selection policy. We establish the optimal transition probabilities of the Markov model that minimize Var[ X ] . We demonstrate that the optimal Markov model is equivalent to selecting the oldest age. The Markov model is suitable for decentralized client selection, alleviating the management overhead of the central server. Furthermore, the Markov model can be potentially modified to allow for realtime adjustment of client selection probabilities, to accommodate the dynamic nature of client data quality, computation resources, and network configurations and conditions.

Simulation results demonstrate that the application of the Markov model enhances the convergence rate of the learning processes, achieving target accuracies in fewer communication rounds compared to random selection, with improvements exceeding 9% and more than 20% in certain datasets. These findings confirm the efficacy of our approach in addressing issues related to client overloading and under-utilization while maintaining efficiency throughout the learning process.

Related Work. The advancements in improving the Federated Averaging (FedAvg) algorithm by McMahan et al. [1] in terms of partial participation include exploring system diversity and non-IID data distribution. Importance sampling has been employed, focusing on gradient computations on the most informative data, thereby enhancing learning outcomes [6]. Complementing this, various client selection strategies have been developed. A loss-based sampling policy [7] targets clients with high loss values to quicken convergence, though it requires careful hyper-parameter tuning. Alternatively, a sample size-based sampling policy [8] opts for clients with extensive local datasets, which, while effective in accelerating convergence, can falter in non-IID scenarios.

Addressing further challenges such as data staleness and the efficient use of network resources, the Age of Information metric has been adopted [9]. By prioritizing updates based on their timeliness, AoI-centric approaches enhance both accuracy and convergence rates, proving particularly effective in dynamic FL environments. In [10]-[13], authors use the AoI metric to determine device selection and resource allocation in federated learning over wireless networks. Their approach manages subchannel assignments and power allocation. To the best of our knowledge, this paper is the first to address the load balancing issue based on Age of Information.

Notations. Random variables are denoted by capital letters. E [ · ] and Var[ ] · denote the expectation and variance of a random variable, respectively.

## II. PROBLEM SETTING

This section briefly reviews FedAvg algorithm [1]. The load metric X is defined and the optimization problem on Var[ X ] is formulated afterward.

FedAvg algorithm. Consider a group of n clients coordinated by a central server to collaboratively train a common neural model using federated learning (FL). Each participating client i , i ∈ { 1 2 , , . . . , n } , has a dataset D i = { X , Y i i } , where X i is the input vector and Y i is the corresponding output vector. These datasets are used to parameterize local models directly through weights W i . The goal of FL is to optimize the collective average of each client's local loss function, formulated as:

$$\min _ { \{ W _ { i } \} _ { i = 1 } ^ { n } } \sum _ { i = 1 } ^ { n } \frac { | D _ { i } | } { \sum _ { j } | D _ { j } | } L ( X _ { i }, Y _ { i }, W _ { i } ), \quad ( 1 ) & \text{$\quad $(1)$} \text{ as fol} \\ \text{e $n$ represents the number of clients participating in the} \text{in $1.1$ denote the cardinality of $a$ $cet $ and $L$ denotes $where$}$$

where n represents the number of clients participating in the training, | · | denote the cardinality of a set, and L denotes the loss function. In this paper, we assume | D i | are all equal. FedAvg algorithm comprises two steps that are repeated until the model converges or a set number of rounds is completed:

(i) Local training: In Round t , clients use their local data D i to update the local model parameters to W ( ) t i . This involves calculating the gradient of the loss function L , typically through batches of data to perform multiple gradient descent steps.

(ii) Global aggregation: all clients periodically send their updated parameters W ( ) t i to the central server. The central server aggregates these parameters using a specified algorithm, commonly by averaging: W ( ) t global = 1 k ∑ k i =1 W ( ) t i . The aggregated global model parameters W ( ) t global are then sent back to all participating clients. Each client sets its local model parameters to W ( ) t global .

Client selection and load balancing. Since communication usually occurs through a limited spectrum, only a subset k out of n total clients can update their parameters during each global aggregation round. This necessitates a strategy for client selection .

We aim to achieve load balancing by equalizing the number of iterations between consecutive client selections, assuming each client is selected with equal probability k n . To that end, we define the load metric X as the random variable for the number of rounds between subsequent selections of a client. Assume X follows the same distribution for all clients. We propose the following optimization problem:

$$\begin{smallmatrix} c \text{ to} \\ \text{ated} \end{smallmatrix} \quad \begin{smallmatrix} \min \text{Var} [ X ], \\ \mathcal { S } \end{smallmatrix}$$

$$\sup _ { \intercal } \, \stackrel { \dots \dots } { \text{sub-} } \, \quad \text{s.t. } P ( S _ { i } ^ { ( t ) } = 1 ) = \frac { k } { n }, i \in \{ 1, \dots, n \}, t \in \{ 1, \dots, T \}. \quad ( 3 )$$

Here, S represents the set of permissible client selection policies, and T is the total number of communication rounds. In addition, S ( ) t i takes value 1 if client i is selected during the t -th round, and takes value 0 otherwise.

Despite that all clients share the same selection probability and average workload over all iterations, as required in constraint (3), Var[ X ] focuses on the workload dynamics even when a small number of iterations is considered. Minimizing Var[ X ] creates predictable update intervals and promotes equitable load distribution among all clients. Moreover, the staleness of local updates, represented by a large X , may slow down the convergence of the training process; and frequent updates from any single client, or a small X , may disproportionately affect the model. Thus, (2) can improve learning convergence and accuracy by ensuring consistent data freshness, which is verified in our simulation.

Relation to Age of Information. A relevant metric is AoI, defined as the number of rounds elapsed since the last time a client was selected. The age A i for Client i in Round t evolves as follows:

$$& A _ { i } ^ { ( t + 1 ) } = \left ( A _ { i } ^ { ( t ) } + 1 \right ) \left ( 1 - S _ { i } ^ { ( t ) } \right ), S _ { i } ^ { ( t ) } \in \{ 0, 1 \} \,, \quad ( 4 ) \\ \text{where } & A _ { i } ^ { ( 0 ) } \ = \ 0. \text{ Therefore, in each round, a client's age}$$

where A (0) i = 0 . Therefore, in each round, a client's age increases by one if it is not selected and it resets to zero if it is selected. The load metric X is equal to the peak age, or the age before a client is selected.

## III. CLIENT SELECTION

This section investigates random selection and a decentralized policy based on a Markov chain, assesses their load metric variances, and explores how to optimize the Markov model to contribute to a balanced federated learning environment. Random Selection

The random selection method [2] involves choosing k out of n clients uniformly at random in each round for federated training. This approach, modeled mathematically by a geometric distribution, assumes each client has an equal probability p = k n of being selected per round. The selection dynamics are described by:

$$P ( X = x ) = p ( 1 - p ) ^ { x - 1 },$$

where X is the number of rounds until a client is selected and x ∈ { 1 2 , , . . . } . The mean and variance of X are:

$$E [ X ] = \frac { 1 } { p } = \frac { n } { k }$$

$$\text{Var} [ X ] = \frac { 1 - p } { p ^ { 2 }$$

Fig. 1. Markov chain with m +1 states.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00217v1-figure-575af4f0-7599-4452-8f59-3f3076e1ae48.jpg)

## Decentralized Decision-Making Based on Local State

This policy utilizes a decentralized approach where each client independently decides whether to send its data based on its current Age of Information, ranging from 0 to m , with m representing the maximum permissible age. We formulate a Markov chain whose states represent the age of the client. The probability of sending data at State j is p j , for j = 0 1 , , . . . , m , and in this case the state transitions to State 0 . With probability 1 -p j , a client does not send data at State j . Accordingly, the state transitions to State j + 1 for j = 0 1 , , . . . , m -1 ; and the state remains the same for j = m . States, transitions, and transition probabilities are depicted in Figure 1.

For a fair comparison with the random selection method, we impose a condition that the average number of clients selected in each round at steady state is k out of n .

This approach allows each client to autonomously manage its participation based on its current AoI without requiring communication or coordination with the central server or other clients.

In the following, we find the optimal transition probabilities to minimize the variance of X assuming that the client is at the steady state. We first develop the expression of Var[ X ] , then find the optimal Markov model with maximum permissible age m = 1 in Theorem 1, and at last establish the optimal Markov model with a general m in Theorem 2.

Steady-state probabilities for the Markov chain are as follows:

$$\begin{array} {$$

$$\pi _ { i } = \pi _ { i - 1 } \cdot ( 1 - p$$

$$\pi _ { m } = \pi _ { m - 1 } \cdot ( 1 - p$$

$$\sum _ { i = 0 } ^ { \cdots m } \stackrel { \cdots m - 1 } { \vee } \stackrel { \vee } { \ r m - 1 } / \stackrel { \cdots } { \cdots m } \stackrel { \vee } { \vee } \stackrel { \ r m } / \stackrel { \cdots } { \cdots } / \\ \sum _ { i = 0 } ^ { m } \pi _ { i } = 1. \quad \ \ ( 1 1 ) \text{Accor} ( 1 1 ) \text{Accor} ( 1 1 ) \text{Theor} )$$

By solving these equations we obtain:

$$\dot { \pi } _ { 0 } = \frac { k } { n } = \frac { \dot { \lambda } } { 1 + \sum _ { i = 0 } ^ { m - 2 } \prod _ { j = 0 } ^ { i } ( 1 - p _ { j } ) + \frac { 1 } { p _ { m } } \prod _ { j = 0 } ^ { m - 1 } ( 1 - p _ { j } ) }, \quad \begin{array} { c } \frac { \lambda \cdot r v _ { i } } { p _ { m } } \\ \text{depend} ^ { p } \\ \text{$f$} _ { i } \end{array}.$$

for i ∈ { 1 , .., m - } 1 ,

$$\stackrel { \bigcup } { m } \\ \stackrel { \bigcup } { \sim } \frac { \cdot \cdot \cdot } { \pi _ { i } } = \frac { \cdot \cdot \cdot } { 1 + \sum _ { i = 0 } ^ { m - 2 } \prod _ { j = 0 } ^ { i - 1 } ( 1 - p _ { j } ) } { \prod _ { j = 0 } ^ { i } ( 1 - p _ { j } ) + \frac { 1 } { p _ { m } } \prod _ { j = 0 } ^ { m - 1 } ( 1 - p _ { j } ) }, \ ( 1 3 ) \\ \frac { 1 } { \sim } \prod _ { i = \Lambda } ^ { m - 1 } ( 1 - p _ { i } )$$

Our objective is to compute and minimize the variance of X , which represents the number of rounds required for a specific client to be returned to State 0 . Noting that Var[ X ] = E X [ 2 ] -E X [ ] 2 , we will derive both terms in this expression. Let us define E 0 = E X [ ] , and E i to be the average time it takes to go to State 0 from State i . Then we have the following set of equations:

$$\pi _ { m } = \frac { \frac { 1 } { p _ { m } } \prod _ { j = 0 } ^ { m - 1 } ( 1 - p _ { j } ) } { 1 + \sum _ { i = 0 } ^ { m - 2 } \prod _ { j = 0 } ^ { i } ( 1 - p _ { j } ) + \frac { 1 } { p _ { m } } \prod _ { j = 0 } ^ { m - 1 } ( 1 - p _ { j } ) }. \ ( 1 4 ) \\ \text{Our objective is to compute and minimize the variance of } X, \\ \text{which represents the number of rounds required for a specific}$$

$$\mathbf a \quad E _ { i } = 1 + ( 1 - p _ { i } ) E _ { i + 1 }, \ \ i \in \{ 0, 1, \dots, m - 1 \}, \quad ( 1 5 )$$

$$\Theta \quad \ E _ { m } = 1 + ( 1 - p _ { m } ) E _ { m }.$$

Equation (16) implies that E m = 1 p m . By (12) and solving the above equations, we can calculate E 0 as:

$$\text{ and } \quad E _ { 0 } = 1 + \sum _ { i = 0 } ^ { m - 2 } \prod _ { j = 0 } ^ { i } ( 1 - p _ { j } ) + \frac { 1 } { p _ { m } } \prod _ { i = 0 } ^ { m - 1 } ( 1 - p _ { i } ) = \frac { n } { k }, \quad ( 1 7 ) \\ \text{l, we } \quad \text{and for } \, \iota \subset \iota 1 \quad m - 1 \iota \text{ was how}.$$

and for k ∈ { 1 ..., m - } 1 we have:

$$\Re \Re _ { \shortparallel \mathfrak { g } } \Re E _ { k } = 1 + \sum _ { i = k } ^ { m - 2 } \prod _ { j = k } ^ { i } ( 1 - p _ { j } ) + \frac { 1 } { p _ { m } } \prod _ { i = k } ^ { m - 1 } ( 1 - p _ { i } ). \quad ( 1 8 ) \\ \Gamma \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \R \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \Re \end{cases}$$

Similarly, we can write the equations for E X [ 2 ] as follows:

$$\text{abilities} \quad E [ X ^ { 2 } ] = 1 + ( 1 - p _ { 0 } ) ( 2 E _ { 1 } + E [ X _ { 1 } ^ { 2 } ] ),$$

$$E [ X _ { i } ^ { 2 }$$

$$\text{at the } \stackrel { \cdot } { E [ X _ { i } ^ { 2 } ] } = 1 + ( 1 - p _ { i } ) ( 2 E _ { i + 1 } + E [ X _ { i + 1 } ^ { 2 } ] ), i \in \{ 1, \dots, m - 1 \}, \\ \text{$e$ so}$$

$$\text{sible age} \\ \text{Markov} \quad E [ X _ { m } ^ { 2 } ] = 1 + ( 1 - p _ { m } ) ( 2 E _ { m } + E [ X _ { m } ^ { 2 } ] ) = \frac { 2 - p _ { m } } { p _ { m } ^ { 2 } }. \quad \ ( 2 1 )$$

By solving equations (19), (20), and (21) and performing algebraic simplifications, we derive the expression for E X [ 2 ] as follows:

$$\text{as follows:} \\ 1 & + \sum _ { i = 0 } ^ { m - 2 } \prod _ { j = 0 } ^ { i } ( 1 - p _ { j } ) + 2 \sum _ { i = 0 } ^ { m - 1 } E _ { i + 1 } \prod _ { j = 0 } ^ { i } ( 1 - p _ { j } ) \\ & + E [ X _ { m } ^ { 2 } ] \prod _ { i = 0 } ^ { m - 1 } ( 1 - p _ { i } ). \\ \text{Accordingly, we can write the expression of Var} [ X ].$$

Accordingly, we can write the expression of Var[ X ] .

Theorem 1. If m = 1 , the variance of X is given by Var[ X ] = (1+ p 0 -p 1 )(1 -p 0 ) p 2 1 . Considering this, the optimal values of p , p 0 1 depend on the relationship between k and n 2 . Specifically:

- · If k ≤ n 2 , then the optimal values are [ p , p ∗ 0 ∗ 1 ] = [0 , k n -k ] , resulting in a variance of ( n -k )( n -2 k ) k 2 .
- · If k ≥ n 2 , then the optimal values are [ p , p ∗ 0 ∗ 1 ] = [ 2 k -n k , 1] , resulting in a variance of ( n -k )(2 k -n ) k 2 .

Proof. We simplify the constraint (17) to obtain:

$$1 + \frac { 1 - p _ { 0 } } { p _ { 1 } } = \frac { n } { k }. \quad \quad \ ( 2 3 ) \quad =$$

By writing down equations for Var[ X ] , we have:

$$\text{Var} [ X ] & = 1 + ( 1 - p _ { 0 } ) \frac { 2 + p _ { 1 } } { p _ { 1 } ^ { 2 } } - \left ( \frac { n } { k } \right ) ^ { 2 } \quad \ ( 2 4 ) \quad = \frac { n } { k } \\ & = 1 + \frac { n } { } - \left ( \frac { n } { } \right \rangle ^ { 2 } + \mathcal { U } \frac { 1 - p _ { 0 } } { \mathcal { U } } \quad \ \text{There} \, \mathcal { U }$$

$$& = 1 + \frac { n } { k } - \binom { n } { k }$$

$$& = 1 + \frac { n } { k } - \left ( \frac { n } {$$

where in (25) and (26), we use (23). In order to minimize Var[ X ] , we should set p 1 to its maximum value within its feasible range given the constraint (23). Since 0 ≤ p 0 ≤ 1 , constraint (23) implies 1 p 1 ≥ n k -1 , or p 1 ≤ k n -k . When k ≤ n 2 , k n -k ≤ 1 and it becomes the maximum feasible value for p ∗ 1 . Consequently, we can find p ∗ 0 = 0 from 1+ 1 -p 0 p 1 = n k . If k ≥ n 2 , then the maximum feasible value for p ∗ 1 becomes 1 and then we can find p ∗ 0 = 2 k -n k .

In both scenarios of Theorem 1, the variance of the Markov model is less than n n ( -k ) k 2 , which is the variance achieved by random selection.

## Theorem 2. Consider an arbitrary m ≥ 1 .

- · When m ≤ /floorleft n k /floorright -1 , the optimal values of p i for minimizing the variance are [ p , p ∗ 0 ∗ 1 , . . . , p ∗ m -1 , p ∗ m n ] = [0 , 0 , . . . , 0 , 1 n k -m ] , and the minimum variance is ( k -m )( n k -( m +1)) .
- · When m ≥ /floorleft n k /floorright , setting i = /floorleft n k /floorright , the optimal values are [ p , p ∗ 0 ∗ 1 , . . . , p ∗ i -2 , p ∗ i -1 , p ∗ i , . . . , p ∗ m ] = [0 0 , , . . . , 0 , i +1 -n k , 1 , . . . , 1] , and the minimum variance is c (1 -c ) , where c = n k -/floorleft n k /floorright .

Proof. Based on (22) and (21), Var[ X ] can be calculated as:

$$1 + \sum _ { i = 0 } ^ { m - 2 } \prod _ { j$$

Using the condition that E 0 = n k , we can simplify this expression as:

$$\begin{array} {$$

$$\varphi _ { p \cos \min } \, \text{a}. \\ \text$$

$$( 2 9 )$$

Based on (18), we have:

$$\begin{smallmatrix} \cdot & & \\ & E _ { i + 1 } \prod _ { j = 0 } ^ { i } ( 1 - p _ { j } ) & & \\ \tau \infty & & \frac { i } { 2 } & \frac { m - 2 } { 2 } \frac { t } { 2 } & & 1 \stackrel { m - 1 } { 2 } \end{smallmatrix}$$

$$= & \frac { n } { k } - 1 + \prod _ { j = 0 } ^ { i } ( 1 - p _ { j } ) - \sum _ { t = 0 } ^ { i } \prod _ { j = 0 } ^ { t } ( 1 - p _ { j } ). \\ & \text{Therefore we can further simplify the expression in (29) as:}$$

$$( 2 3 ) \quad = \prod _ { \substack { j = 0 \\ n } } ^ { i } ( 1 - p _ { j } ) + \sum _ { \substack { t = i + 1 \\ \overline { \lambda } } } ^ { m - 2 } \prod _ { \substack { i } } ^ { t } ( 1 - p _ { j } ) + \frac { 1 } { p _ { m } } \prod _ { t = 0 } ^ { m - 1 } ( 1 - p _ { t } ) \ ( 3 1 )$$

Therefore we can further simplify the expression in (29) as:

$$m - 1$$

$$2 \sum _ { i = 0 } ^ { m - 2 } \sum _ { t = 0 } ^ { \imath - 1 } \prod _ { j = 0 } ^ { \imath } ( 1 \\ t \text{ is a when the } t h$$

$$( 2 4 ) ^ { - k } \, \stackrel { n } { \stackrel { k } { \stackrel { n } { \stackrel { k } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel n } { \stackrel { n } { \stackrel { n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n  { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stack | n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n. } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } } } ) ^ { ( 3 4 ) } \underset { k } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel { n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackreln } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n  \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \strrel { n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stacketrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackreln  \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stacklet n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n} { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { n} { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n  { n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stackrel n } { \stack$$

From (35), it is obvious that for Var[ X ] to be minimized, assuming other parameters are fixed, p i for i ∈ { 0 1 , , ..., m - } 1 should be minimum in its feasible range where the condition in (17) is satisfied. Similarly, by condition (17), the second term in (35) is positive, and p m should be maximum when other parameters are fixed.

When m ≤ /floorleft n k /floorright -1 , we show that the above minimum and maximum values can be achieved at the same time. From (17), we find the following upper bound for p m and it happens when all p i values are 0 :

$$\frac { n } { k } \leq 1 + m - 1 + \frac { 1 } { p _ { m } } \implies p _ { m } \leq \frac { 1 } { \frac { n } { k } - m }. \quad ( 3 6 )$$

Consequently, by choosing p ∗ i = 0 for i ∈ { 0 1 , , ..., m -1 } and p ∗ m = 1 n k -m , we achieve the minimum of Var[ X ] while satisfying the constraint in (17).

Next consider m ≥ /floorleft n k /floorright . By defining y t /defines ∏ t j =0 (1 -p i ) we can rewrite the expression of Var[ X ] and make further simplifications. Based on Equation (35), we need to minimize:

$$\mu \\ \frac { 2 } { p _ { m } } \left ( \frac { n } { k } - 1 - \sum _ { i = 0 } ^ { \mu } y _ { i } \right ) - 2 \sum _ { i = 0 } ^ { m - 2 } \sum _ { t = 0 } ^ { i - 1 } y _ { t }. \quad ( 3 7 )$$

The constraint (17) becomes

$$1 + y _ { 0 } + y _ { 1 } + \dots + \frac { 1 } { q _ { m } } y _ { m - 1 } = \frac { n } { k }. \quad \quad ( 3 8 )$$

The constraint 0 ≤ p i ≤ 1 , for all i ∈ { 0 1 , , . . . , m -1 } , becomes

$$0 \leq y _ { m - 1 } \leq y _ { m - 2 } \leq \cdots \leq y _ { 0 } \leq 1. \quad \ \ ( 3 9 )$$

Increasing p m can only increase y i 's due to (38), and hence reduce the objective function (37). Thus, we choose p ∗ m to its maximum feasible value, p ∗ m = 1 . Now, minimizing (37) becomes maximizing

$$2 \sum _ { i = 0 } ^ { m - 2 } y _ { i } + 2 \sum _ { i = 0 } ^ { m - 2 } \sum _ { t = 0 } ^ { i - 1 } y _ { t } = 2 \sum _ { i = 0 } ^ { m - 2 } ( ( m - 1 - i ) y _ { i } ), \quad ( 4 0 ) \\ \text{subject to $1+u_{u}+u_{1}+...+u_{m-1}=\frac{n}{n}$. and $(39). This is a}$$

subject to 1 + y 0 + y 1 + ... + y m -1 = n k , and (39). This is a linear programming optimization problem, where we start with y 0 and set it to the maximum value possible, and then continue with the rest of y i 's. Let i = /floorleft n k /floorright , we should set y , ...y 0 i -2 to 1 , y i -1 = n k -i , and y , ..., y i m -1 to 0 . This translates to p , ..., p ∗ 0 ∗ i -2 = 0 , p ∗ i -1 = 1 -( n k -i ) , and p , ..., p ∗ i ∗ m -1 = 1 .

Finally, the minimum variance can be computed by plugging the optimal p , . . . , p ∗ 0 ∗ m into the expression of Var[ X ] .

Remark 1. The optimal Markov model in Theorem 2 resembles the oldest-age method, which selects k clients with the highest age in each iteration. The general Markov model, although not fully utilized in our current implementation, holds significant potential due to its flexibility. One can adaptively choose the transition probabilities in the Markov model based on real-time performance, system conditions, and client dropout probabilities. For example, one can set p i &gt; 0 for all i ∈ { 0 1 , , . . . , m } , and a client can be selected even if it does not have the oldest age, increasing the chance of getting an update from the client before it drops out of the network.

Remark 2. For fixed n k , as we increase m , the optimal variance of X gets smaller, and the optimal Var[ X ] reaches the minimum for all m ≥ /floorleft n k /floorright . For any m ≤ /floorleft n k /floorright -1 , the optimal Var[ X ] is given by ( n k -m )( n k -( m + 1)) , which is smaller than the variance of the random selection policy, n k ( n k -1) . Hence, for all choices of m , the optimal Markov model provides better load balancing than random selection.

## IV. SIMULATION RESULTS

In this section, we present the model's convergence and accuracy in scenarios where only a partial subset of clients (15%) participate in each communication round. We compare random selection with the proposed decentralized client selection policy based on the optimal Markov model. The experiments are conducted on the MNIST, CIFAR-10, and CIFAR-100 datasets. In our simulations, we utilize a convolutional neural network (CNN) as described in [1] to classify samples from the datasets. We employ the stochastic gradient descent (SGD) algorithm as

Fig. 2. Comparison of accuracy between our proposed method (orange) and the random client selection method (blue) on the CIFAR-10 dataset with IID data distribution. The simulation parameters are n = 100 , k = 15 , and m = 10 .

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00217v1-figure-2fb15a8c-13b9-4c36-a53e-8c300d8c6c3e.jpg)

Fig. 3. Comparison of accuracy between our proposed method (orange) and the random client selection method (blue) on the CIFAR-100 dataset with IID data distribution. The simulation parameters are n = 100 , k = 15 , and m = 10 .

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00217v1-figure-60718866-0542-4c1c-9bfd-09b94943e3f0.jpg)

the local optimizer, standardizing the batch size at 50 during the local training phase. The local training epochs are set to 5 per round, with an initial learning rate of 0.1 and a learning rate decay of 0.998. In our tests, we configure the parameters as follows: the number of devices n = 100 , the number of selected devices in a round k = 15 , and for the Markov model the largest age m = 10 .

As illustrated in Figure 2, for the CIFAR-10 dataset, our proposed Markov model for client selection achieves faster convergence. Specifically, it reaches the target accuracy of 80% in just 240 communication rounds, compared to 265 rounds required by the random selection method, representing a 9.4% improvement in convergence speed. Additionally, as depicted in Figure 3, for the CIFAR-100 dataset, we observe that the Markov model reaches the target accuracy of 40% in just 500 communication rounds, compared to over 600 rounds required by the random selection method. This results in an improvement of more than 20% in convergence speed.

In Figure 4, we present the performance analysis for the MNIST dataset under both IID and non-IID client data distributions. In the IID setting, our model achieves the target accuracy of 97% in just 37 communication rounds, which is faster than the 41 rounds required by the random selection method, marking a 9 7% . increase in convergence speed. For

Fig. 4. Comparison of accuracy between our proposed method (orange) and the random client selection method (blue) on the MNIST dataset with IID (top) and non-IID (bottom) data distribution. The simulation parameters are n = 100 , k = 15 , and m = 10 .

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00217v1-figure-ace25d96-9a92-498c-8af1-e03e0f720e2c.jpg)

the non-IID scenario, where client data follows a Dirichlet distribution with a parameter of 0 6 . [14], our model reaches the same target accuracy in 56 rounds, compared to 64 rounds with random selection, reflecting an improvement of 12 5% . in convergence speed.

## V. CONCLUSION

In conclusion, our research suggests that the decentralized client selection policy based on the Markov chain can lead to load balancing and efficient training in federated learning.

Future investigations should focus on a dynamic Markov chain policy for federated learning, adapting to the ongoing changes in network and client activity. By dynamically adjusting transition probabilities, we could enhance control over the Age of Information and improve responsiveness, thereby optimizing the trade-off between equitable client participation and overall system performance.

## REFERENCES

- [1] B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. A. y Arcas, 'Communication-efficient learning of deep networks from decentralized data,' in Artificial intelligence and statistics , PMLR, 2017, pp. 1273-1282.
- [2] X. Li, K. Huang, W. Yang, S. Wang, and Z. Zhang, 'On the convergence of fedavg on non-iid data,' arXiv preprint arXiv:1907.02189 , 2019.
- [3] S. Kaul, R. Yates, and M. Gruteser, 'Real-time status: How often should one update?' In INFOCOM, 2012 Proceedings IEEE , IEEE, 2012.
- [4] M. Costa, M. Codreanu, and A. Ephremides, 'Age of information with packet management,' in 2014 IEEE International Symposium on Information Theory , IEEE, 2014, pp. 1583-1587.
- [5] R. D. Yates, Y. Sun, D. R. Brown, S. K. Kaul, E. Modiano, and S. Ulukus, 'Age of information: An introduction and survey,' IEEE Journal on Selected Areas in Communications , vol. 39, no. 5, pp. 1183-1210, 2021.
- [6] R. Balakrishnan, M. Akdeniz, S. Dhakal, A. Anand, A. Zeira, and N. Himayat, 'Resource management and model personalization for federated learning over wireless edge networks,' Journal of Sensor and Actuator Networks , vol. 10, no. 1, p. 17, 2021.
- [7] J. Goetz, K. Malik, D. Bui, S. Moon, H. Liu, and A. Kumar, 'Active federated learning,' arXiv preprint arXiv:1909.12641 , 2019.
- [8] Y. Fraboni, R. Vidal, L. Kameni, and M. Lorenzi, 'Clustered sampling: Low-variance and improved representativity for clients selection in federated learning,' in International Conference on Machine Learning , PMLR, 2021, pp. 3407-3416.
- [9] H. H. Yang, A. Arafa, T. Q. Quek, and H. V. Poor, 'Age-based scheduling policy for federated learning in mobile edge networks,' in ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) , IEEE, 2020, pp. 8743-8747.
- [10] K. Wang, Y. Ma, M. B. Mashhadi, C. H. Foh, R. Tafazolli, and Z. Ding, 'Age of information in federated learning over wireless networks,' arXiv preprint arXiv:2209.06623 , 2022.
- [11] M. Ma, V. W. Wong, and R. Schober, 'Aoi-driven client scheduling for federated learning: A lagrangian index approach,' in ICC 2023 -IEEE International Conference on Communications , 2023, pp. 3958-3963. DOI: 10.1109/ICC45041.2023.10279272.
- [12] B. Wu, F. Fang, and X. Wang, 'Joint agebased client selection and resource allocation for communication-efficient federated learning over noma networks,' IEEE Transactions on Communications , vol. 72, no. 1, pp. 179-192, 2024. DOI: 10.1109/TCOMM.2023.3317300.
- [13] M. A. Khan, H. H. Yang, Z. Chen, A. Iera, and N. Pappas, 'Value of information and timing-aware scheduling for federated learning,' arXiv preprint arXiv:2312.10512 , 2023.
- [14] M. Yurochkin, M. Agarwal, S. Ghosh, K. Greenewald, N. Hoang, and Y. Khazaeni, 'Bayesian nonparametric federated learning of neural networks,' in International conference on machine learning , PMLR, 2019, pp. 7252-7261.
Alireza Javani Zhiying Wang
Load Balancing in Federated Learning
Federated Learning (FL) is a decentralized machine learning framework that
enables learning from data distributed across multiple remote devices,
enhancing communication efficiency and data privacy. Due to limited
communication resources, a scheduling policy is often applied to select a
subset of devices for participation in each FL round. The scheduling process
confronts significant challenges due to the need for fair workload
distribution, efficient resource utilization, scalability in environments with
numerous edge devices, and statistically heterogeneous data across devices.
This paper proposes a load metric for scheduling policies based on the Age of
Information and addresses the above challenges by minimizing the load metric
variance across the clients. Furthermore, a decentralized Markov scheduling
policy is presented, that ensures a balanced workload distribution while
eliminating the management overhead irrespective of the network size due to
independent client decision-making. We establish the optimal parameters of the
Markov chain model and validate our approach through simulations. The results
demonstrate that reducing the load metric variance not only promotes fairness
and improves operational efficiency, but also enhances the convergence rate of
the learning models.