Federated Learning over Wireless IoT Networks with Optimized Communication and Resources

Hao Chen, Shaocheng Huang, Deyou Zhang, Ming Xiao, Mikael Skoglund, H. Vincent Poor

I Introduction

With the development of various emerging smart applications (e.g, augmented reality/virtual reality, autonomous driving and digital twin), the number of Internet of things (IoT) devices has increased explosively and the massive data generated from these connected IoT devices have led to a surging demand for very high communication rates in future wireless communications, such as the projected sixth generation (6G) mobile networks. It is envisioned in that by 2025, the active number of IoT devices is expected to be over 75 billion. The massive amounts of data can bring diverse intelligent services due to the recent advances in artificial intelligence (AI) and large-scale machine learning (ML). However, the data originating from massive IoT devices are commonly generated and stored in a distributed manner over wireless networks for a wide range of networked AI applications, e.g., smart grids, remote health monitoring , etc. Due to the nature of limited wireless communication resources as well as privacy concerns, it is often inefficient or impractical to directly collect all raw data of devices at a central entity (e.g., the cloud). Alternatively, it is increasingly attractive to process data directly in edge clients for data analysis and inference by leveraging edge computing and intelligence with data kept locally.

In the regime of distributed machine learning, federated learning (FL), first coined by Google in 2016 , is a paradigm of distributed ML, which pushes the computation of AI applications into edge clients. Therefore, FL decouples the ability of ML from the need to reveal the data to a centralized location, which helps mitigate privacy and latency concerns. During the training process of FL, in which edge clients seek to train a common ML model, each client periodically transmits its locally derived model parameters to a central parameter server (PS). A set of global model parameters are updated in the PS according to aggregation strategies such as federated averaging algorithm (FedAvg) , and the PS then sends its updated global model parameters to clients for their local model updates. Compared with the traditional data-sharing based collaborative learning, both communication efficiency and user data privacy are significantly improved in FL. Since the ML parameters are frequently exchanged between the PS and the edge clients over a wireless network, the performance of FL is largely constrained by the properties of wireless communication networks, which can be unstable and may even fluctuate significantly over time because of the limited wireless resources (e.g., bandwidth) and unreliable wireless channels. Thus, this calls for a new design principle for FL from both learning and wireless communication perspectives.

Since the proposal of FL , there has been an increasing number of studies related to the implementation of FL over wireless networks . Specifically, the authors in report on a system design of FL algorithms in the domain of Android mobile phones and sketch the challenges and corresponding solutions.

Despite the advantages of FL in terms of communication overheads and user data privacy over the traditional data-sharing based collaborative learning, the implementation of FL over wireless networks still suffers from bottlenecks. More specifically, since multiple communication rounds are required to reach a desired ML accuracy, especially when the number of participating clients is comparably large, the communication costs incurred by unreliable wireless transmission become non-negligible in wireless FL systems. To reduce communication overhead in distributed ML, various learning algorithms have been proposed in recent years . Among these efforts, one research direction is to reduce the communication footprint in the uploading phase to make the model training communication efficient. Typical approaches in this direction range from i) compressing the uploaded gradients via coding , quantization and sparsification , ii) limiting the model sharing by only updating clients with significant training improvement , or iii) accelerating the training process by adopting a momentum method in the sparse update . More specifically, a lazily aggregated gradient approach is proposed in to skip unnecessary uploads, among which communication censoring schemes are developed to avoid less informative local updates so as to reduce the communication burden. It is also worth mentioning that the impact of network resources on the learning performance is not considered in any of those methods.

In addition to communication overhead, another series of work have focused on resource allocation in order to optimize the FL learning performance . To improve wireless network efficiency, considerable research has been carried out and two main research directions play crucial roles including admission control and device scheduling and resource scheduling management (e.g., spectrum and power) . In , a new FedCS protocol is proposed to schedule as many devices as possible in a limited time frame. Another device scheduling policy is proposed in , among which the channel conditions and the significance of the local model updates are jointly considered. Nonetheless, these proposed policies are only evaluated via experiments and the convergence performance has not been theoretically analyzed. To characterize the performance of FL in wireless networks, an analytical model with regard to the FL convergence rate has been developed and the impacts have been evaluated by three different client scheduling policies, i.e., random scheduling, round-robin, and proportional fair . By building a connection between the wireless resource allocation and the FL learning performance, the authors in propose to optimize the user selection and power allocation to minimize the FL training loss. Despite of all these results, the existing methods often still involve high overhead both in computation and communication, especially for large-scale ML.

I-B Contributions

Motivated by the above observations, we investigate FL with limited wireless resources. We study the problem of jointly optimizing resource and learning performance for reducing communication costs and improving learning performance in wireless FL systems. Different from existing results, in what follows, we will study FL over wireless IoT networks from the aspect of communication efficiency and wireless resource optimization co-design. Particularly, a communication efficient federated learning (CEFL) scheme is proposed for wireless FL systems jointly taking communication efficiency and resource optimization into account. The main contributions of our work can be summarized as follows:

We aim at communication efficient FL over wireless IoT networks with limited resources. The joint optimization problem on communication efficiency and resource allocation is first formulated and then decoupled into a client scheduling sub-problem and a resource allocation sub-problem considering both bandwidth and power constraints.

To reduce the communication costs of FL in wireless IoT networks, a communication-efficient client scheduling policy is proposed by limiting communication exchanges and reusing stale local model parameters. To optimize the resource allocation at each communication round of FL training, the Lagrange multiplier method is leveraged to reformulate the resource optimization problem and an optimal solution based on linear search method is then derived.

We investigate the convergence and communication properties of the proposed CEFL algorithm both analytically and by simulation. Given a proper hyper-parameter, we show that CEFL achieves a strong linear convergence rate and O(log⁡1ϵ)O\left(\log{\frac{1}{\epsilon}}\right) communication loads, where ϵ\epsilon is the target accuracy. In addition, the relation between the learning performance and wireless resources, namely bandwidth and power is theoretically analyzed. Experiment results also indicate that the proposed framework is communication efficient and resource optimized over wireless IoT networks. Our CEFL algorithm outperforms the vanilla FL approach both in communication overhead and training and test performance.

The rest of this paper is structured as follows. Section II describes the system model, while Section III discusses the design of our proposed FL algorithm optimized for the underlying wireless IoT network. In Section IV, we characterize the performance of our proposed framework over a wireless channel, which is validated via experiments in Section V. We conclude the paper in Section VI and technical proofs are provided in the Appendix.

I-C Notation

II System Model and Problem Formulation

In this section, we describe the framework of FL over wireless multi-client systems. We will discuss the network model, learning model, communication model and problem formulation. For ease of illustration, the notations used frequently in this paper are summarized in Table I.

As depicted in Fig. 1, we consider a general one-hop FL-supported wireless IoT network with a base station (BS) and NN distributed clients denoted as the set N={1,..,N}\mathcal{N}=\{1,..,N\}. In this system, the BS directly connects to the PS, which is equipped with computational resources to provide communication and computation services to the clients. The clients represent IoT sensors gathering data for an FL task, such as mobile devices or organizations, which are communicated with the BS via wireless links. We assume that each client ii collects measurement data and owns a fraction of labeled training samples, which is denoted as Di={ξi,l}l=1Di\mathcal{D}_{i}=\{\bm{\xi}_{i,l}\}_{l=1}^{D_{i}} with Di=∣Di∣D_{i}=|\mathcal{D}_{i}| data samples and ξi,l\bm{\xi}_{i,l} representing the ll-th training sample at client i,∀i∈Ni,\forall i\in\mathcal{N}. The whole dataset is thus denoted by D=⋃i∈NDi\mathcal{D}=\bigcup_{i\in\mathcal{N}}\mathcal{D}_{i} with the total number of data samples D=∑i=1NDiD=\sum_{i=1}^{N}D_{i}. We consider training an ML model of interest over this network (e.g., a classifier), where the PS and clients collaboratively build a shared model parameter for data analysis and inference by exchanging model parameters information while keeping all the data locally.

II-B Federated Learning Process

where the local loss function fi(w)f_{i}(\bm{w}) of client ii is defined as fi(w)=Δ1Di∑l=1DiFi(w,ξi,l)f_{i}(\bm{w})\overset{\Delta}{=}\frac{1}{D_{i}}\sum_{l=1}^{D_{i}}F_{i}(\bm{w},\bm{\xi}_{i,l}) and Fi(w,ξi,l)F_{i}(\bm{w},\bm{\xi}_{i,l}) characterizes the loss of the model parameter w\bm{w} on the training sample ξi,l\bm{\xi}_{i,l}.

Our analysis is based on the widely used federated averaging (FedAvg) algorithm . The whole training process is periodical with an arbitrary number of communication rounds (denoted as TT), each of which has EE local epochs. Then the tt-th communication round is described by the following phases:

Broadcasting phase: The PS (located in BS) wirelessly broadcasts the global model parameter wt\bm{w}^{t} to all clients in the tt-th round;

Local updating phase: After receiving the global model parameter, each client i∈Ni\in\mathcal{N} trains its local model wit+1\bm{w}_{i}^{t+1} by applying EE epochs of the gradient descent (GD) method, i.e.,

where η\eta is the learning rate and ∇fi(wt)\nabla f_{i}(\bm{w}^{t}) is the gradient of local loss function. Then client ii uploads its updated local parameter wit+1\bm{w}_{i}^{t+1} back to the PS. It is noted that alternative methods, such as stochastic gradient descent (SGD), can also be used for local updates;

Aggregating and averaging phase: For general FL framework, once receiving all the local model parameters, the PS aggregates them and obtains an updated global model by

The FL learning process implies that the FL model parameters are iteratively exchanged between the edge clients and the PS over wireless networks.

II-C Communication Model

We consider FL over a wireless medium with limited bandwidth and power. After local training, clients upload their local FL models to the BS via frequency-division multiple access (FDMA). Therefore, the achievable rate of client ii at the tt-th communication round is given by

where BitB_{i}^{t} and PitP_{i}^{t} are the allocated bandwidth and transmission power of client ii, respectively. ∣hit∣2|h_{i}^{t}|^{2} denotes the corresponding single-carrier block-fading channel gain, and N0N_{0} denotes the noise power spectral density. For simplicity, it is also assumed that for client ii, wit+1\bm{w}_{i}^{t+1} is transmitted as a single packet in the uplink. Denoting by SS the packet size of transmitted FL model as , the communication time from client ii to the BS can be then given by

Since the transmit power of the BS can be generally much higher than that of the client and the whole downlink bandwidth can be utilized to broadcast the global model wt\bm{w}^{t}, the latency of downlink transmission is ignored to simplify illustration . Moreover, to capture the effect of random channel variations on the transmission of each local model parameter wit\bm{w}_{i}^{t}, we consider the current transmission failure if τit>Γt\tau_{i}^{t}>\Gamma^{t} holds in a time duration Γt\Gamma^{t}, and the corresponding outage probability is defined as:

II-D Problem Formulation

To achieve fast learning, the FL training process typically schedules as many clients as possible at each communication round . However, it is undesirable for all clients engaged in learning to transmit their fresh local FL models to the PS especially when the updates are conveyed over a wireless medium with limited resources (e.g., transmit power and network bandwidth). Having more clients scheduled and uploading local models simultaneously can result in large overheads in communication, more unstable connections, and higher latency, which inevitably lead to learning task with less accuracy. To this end, we aim for an optimal solution of joint client scheduling and their associated resource allocation scheme in each communication round to pursue the best learning performance. By denoting the transmission indicating vector as at\bm{a}^{t}, we formulate the following optimization problem with the objective of optimizing both communication and resource for FL over wireless IoT networks:

where the objective of (P-0) is to maximize the utilization of transmitted FL parameters (i.e., the number of successful transmission) while sustaining the learning performance. Constraints (7a) and (7b) are the feasibility conditions on the power allocation of clients and the bandwidth limits, respectively. Constraint (7c) represents the successful transmission condition. Here ait=1a_{i}^{t}=1 represents the successful transmission of the fresh local model wit+1\bm{w}_{i}^{t+1} from client ii; otherwise, we have ait=0a_{i}^{t}=0.

III Federated Learning Algorithm Design over Wireless IoT Networks

(P-0) is a non-convex optimization problem due to the nonconvexity of its objective function and constraint (7c). To solve problem (P-0), we decompose it into two sub-problems, i.e., i) determining the client scheduling policy at each communication round, and ii) deciding the optimal resource allocation scheme for the clients that have been selected from sub-problem i). We refer to the first subproblem as the client scheduling problem and the second subproblem as the resource allocation problem.

With the rapid development of integrated circuits, local computation time can be several orders of magnitude shorter than communication time between the clients and PS. The vanilla FL framework can lead to large communication overheads (e.g., communication time) and it can be inefficient to sequentially update the trained models from all clients before global aggregating and averaging . Accordingly, a subgroup of clients can be actively selected to transmit their local FL models simultaneously. Then the communication efficiency can be improved and the communication latency can be reduced. To this end, client scheduling policy plays a crucial role in FL process especially when wireless resources are limited with. With the goal of reducing communication overheads per communication round, a communication-efficient client selection policy will be developed below.

For the FedAvg method in (II-B), in communication round tt, after receiving the global model parameters wt\bm{w}^{t} from the PS, every client i∈Ni\in\mathcal{N} updates its local parameter wit+1\bm{w}_{i}^{t+1} via (2) for EE epochs and is activated to feed updated wit+1\bm{w}_{i}^{t+1} back to the PS. Instead of requesting fresh local model parameters from all clients in (2), our client scheduling policy runs as follows. During each communication round tt, client with informative messages (i.e., wit\bm{w}_{i}^{t}) is enabled to upload its current new model parameters if the following selection criterion meets:

where {δk}k=1K\{\delta_{k}\}_{k=1}^{K} and KK are pre-defined constants, ∇fi(wt)−∇fi(w~it)\nabla f_{i}(\bm{w}^{t})-\nabla f_{i}(\widetilde{\bm{w}}_{i}^{t}) is the gradient difference between two evaluations of ∇fi(w)\nabla f_{i}(\bm{w}) at current model parameter wt\bm{w}^{t} and the previous round model parameter w~it\widetilde{\bm{w}}_{i}^{t}. This condition compares the new local gradient to the stale copy at the client: Only when the gradient difference is larger than the recent changes in w\bm{w}, the new local model will be transmitted. Otherwise, the PS will reuse the stale copy at the PS. In addition, to avoid clients inactive for a long time, we force it to upload its local model parameters wit\bm{w}_{i}^{t} to the PS if any client ii has not been active for transmitting fresh model parameters during the past T0T_{0} communication rounds. To this regard, we set a clock Ti,i∈NT_{i},i\in\mathcal{N} for each client ii, counting the number of inactive communication rounds since last time it uploaded its local models. Thus, it always holds that

Once the fresh local model wit+1\bm{w}_{i}^{t+1} in client ii satisfies the above conditions (8) and (9), it will be uploaded to the PS, whilst the PS in BS will reuse the outdated local model parameters from the rest of clients. We will prove in the next section that the proposed client scheduling policy based algorithm can still converge in a linear rate and is communication efficient. Then, on the PS, the current copy of wi\bm{w}_{i} from client ii, denoted by \savestack\tmpbox\stretchto\scaleto\scalerel∗[\widthofw]⋀0.5ex\stackon[1pt]w\tmpboxit+1\savestack{\tmpbox}{\stretchto{\scaleto{\scalerel*[\widthof{\bm{w}}]{\kern-0.6pt\bigwedge\kern-0.6pt}{\rule[-505.89pt]{4.30554pt}{505.89pt}}}{}}{0.5ex}}\stackon[1pt]{\bm{w}}{\tmpbox}_{i}^{t+1}, is updated as

where \savestack\tmpbox\stretchto\scaleto\scalerel∗[\widthofw]⋀0.5ex\stackon[1pt]w\tmpboxit\savestack{\tmpbox}{\stretchto{\scaleto{\scalerel*[\widthof{\bm{w}}]{\kern-0.6pt\bigwedge\kern-0.6pt}{\rule[-505.89pt]{4.30554pt}{505.89pt}}}{}}{0.5ex}}\stackon[1pt]{\bm{w}}{\tmpbox}_{i}^{t} is the local model of client ii from previous rounds. Here ait=1a_{i}^{t}=1 implies that the server receives the fresh local model wit+1\bm{w}_{i}^{t+1} from client ii, otherwise, we have ait=0a_{i}^{t}=0.

III-B Power and Bandwidth Allocation

Once client scheduling is determined, the remaining subproblem is the bandwidth and power allocation among these scheduled clients. Given the set of scheduled clients Net\mathcal{N}_{e}^{t} in the tt-th communication round, resource allocation subproblem can be formulated as follows:

Problem (P-1) is a mixed integer non-linear programming (MINLP) problem due to the binary variable {ait}\{a_{i}^{t}\} and continuous variables {Bit}\{B_{i}^{t}\} and {Pit}\{P_{i}^{t}\}. By introducing big-MM constant for constraint (10c), problem (P-1) can be equivalently rewritten as

By relaxing each binary variable ait∈{0,1}a_{i}^{t}\in\{0,1\} to a continuous variable a~it∈,∀i∈Net\widetilde{a}_{i}^{t}\in,\forall i\in\mathcal{N}_{e}^{t}, we simplify (P-2) to a non-linear programming problem, given by

(P-3) is still non-convex, and we resort to the Karush-Kuhn-Tucker (KKT) conditions for building the relation between bandwidth and power allocation. More specifically, we first construct the associated Lagrangian function of (P-3) as follows:

where {xi,yi,pi,li,λi,υi,μ∣i∈Net}\{x_{i},y_{i},p_{i},l_{i},\lambda_{i},\upsilon_{i},\mu|i\in\mathcal{N}_{e}^{t}\} are nonnegative Lagrangian multipliers. The KKT conditions for (P-3) are written as

where the solution pair of primal vectors and dual vectors is denoted as (a~∗,B∗,P∗\bm{\widetilde{a}^{*}},\bm{B^{*}},\bm{P^{*}}) and (x∗,y∗,p∗,l∗,λ∗,υ∗,μ∗\bm{x^{*}},\bm{y^{*}},\bm{p^{*}},\bm{l^{*}},\bm{\lambda^{*}},\bm{\upsilon^{*}},\mu^{*}). Then, according to (14)-(19), two lemmas can be obtained, as detailed below.

Given the solution (a~∗,B∗,P∗\bm{\widetilde{a}^{*}},\bm{B^{*}},\bm{P^{*}}) of (P-3), the relation among transmission indicator, bandwidth and power allocation is given by

where ci∗c_{i}^{*} is defined by ci∗=Bi∗log⁡2(1+Pi∗∣hit∣2Bi∗N0)c_{i}^{*}=B_{i}^{*}\log_{2}\left(1+\frac{P_{i}^{*}|h_{i}^{t}|^{2}}{B_{i}^{*}N_{0}}\right).

To prove this lemma, we split {a~i∗}\{\widetilde{a}_{i}^{*}\} into three cases and we will show that (20) is valid in every case. Specifically, Case 1) If 0<a~i∗<10<\widetilde{a}_{i}^{*}<1 holds, it is easy to obtain xi∗=yi∗=0x_{i}^{*}=y_{i}^{*}=0, and (λi∗−υi∗)M=1\left(\lambda_{i}^{*}-\upsilon_{i}^{*}\right)M=1, based on (14)-(19). Thus, λi∗>0,υi∗=0\lambda_{i}^{*}>0,\upsilon_{i}^{*}=0, and Sci∗=Γt+M(1−a~i∗)\frac{S}{c_{i}^{*}}=\Gamma^{t}+M\left(1-\widetilde{a}_{i}^{*}\right) are achieved, ∀i∈Net\forall i\in\mathcal{N}_{e}^{t}; Case 2) If ai∗=0a_{i}^{*}=0 holds, we obtain xi∗=0,(λi∗−υi∗)M=1+yi∗x_{i}^{*}=0,\left(\lambda_{i}^{*}-\upsilon_{i}^{*}\right)M=1+y_{i}^{*}, followed by λi∗>0,υi∗=0\lambda_{i}^{*}>0,\upsilon_{i}^{*}=0, and Sci∗=Γt+M,∀i∈Net\frac{S}{c_{i}^{*}}=\Gamma^{t}+M,\forall i\in\mathcal{N}_{e}^{t}; Case 3) If ai∗=1a_{i}^{*}=1 holds, the following are implied as yi∗=0, υi∗=0, xi∗+Mλi∗=1, Sci∗≤Γty_{i}^{*}=0,~{}\upsilon_{i}^{*}=0,~{}x_{i}^{*}+M\lambda_{i}^{*}=1,~{}\frac{S}{c_{i}^{*}}\leq\Gamma^{t}, and λi∗(Sci∗−Γt)=0\lambda_{i}^{*}\left(\frac{S}{c_{i}^{*}}-\Gamma^{t}\right)=0. In this case, though Sci∗<Γt\frac{S}{c_{i}^{*}}<\Gamma^{t} with λi∗=0\lambda_{i}^{*}=0 satisfies the KKT conditions, such a solution consumes more resources than condition of Sci∗=Γt\frac{S}{c_{i}^{*}}=\Gamma^{t} with λi∗=≥0\lambda_{i}^{*}=\geq 0. Since we aim to achieve a resource optimized FL, we choose Sci∗=Γt\frac{S}{c_{i}^{*}}=\Gamma^{t}, which proves (20) holds as well. This completes the proof. ∎

(P-3) is a direct extension of the MINLP problem (P-1) or (P-2), and the proof of Lemma 1 shows that (20) also holds both in a~i∗=0\widetilde{a}_{i}^{*}=0 and a~i∗=1\widetilde{a}_{i}^{*}=1. Thus, the relation among transmission indicator, allocated bandwidth and transmission power is also applicable for the initial problem (P-1) or (P-2), i.e.,

although it is an MINLP problem. Particularly, for scheduled clients with successful transmission ai∗=1a_{i}^{*}=1, we have S/ci∗=Γt.S/c_{i}^{*}=\Gamma^{t}. In addition, with the allocated power and transmission indicator, bandwidth allocation can be obtained directly via (21).

Given the selected client i(i∈Net)i(i\in\mathcal{N}_{e}^{t}) in communication round tt, its communication time τit\tau_{i}^{t} is a decreasing function of PitP_{i}^{t}, BitB_{i}^{t}, and ∣hit∣2|h_{i}^{t}|^{2}.

The first derivative and second derivative of citc_{i}^{t} with respect to PitP_{i}^{t} can be both proven to be larger than zero. Thus, citc_{i}^{t} is an increasing and convex function of PitP_{i}^{t}. According to (5), τit\tau_{i}^{t} is then a decreasing function of the power PitP_{i}^{t}. The same procedure works for BitB_{i}^{t}, and ∣hit∣2|h_{i}^{t}|^{2}, which proves Lemma 2. ∎

Lemma 2 suggests that allocating larger transmission power PitP_{i}^{t} contributes to less communication time τit\tau_{i}^{t}, which reduces the outage probability of transmission per communication round. In Algorithm 1, we summarize our proposed resource allocation approach, i.e., linear search (LS) algorithm, which is exactly based on these two lemmas. In step 3, we first sort the channel gains of the scheduled clients (∀i∈Net\forall i\in\mathcal{N}_{e}^{t}) in a descending order, which is denoted as H=Δ∣hit∣2,∀i∈NetH\overset{\Delta}{=}|h_{i}^{t}|^{2},\forall i\in\mathcal{N}_{e}^{t}. Then, for client ii with the maximum channel gain in the un-allocated set Unct(i∈Unct)U_{nc}^{t}(i\in U_{nc}^{t}), we allocate its required power PitP_{i}^{t} and bandwidth BitB_{i}^{t} before categorizing it into the allocated set UctU_{c}^{t} via steps 4-8. The above steps are repeated until all scheduled clients are considered or all the available bandwidth and power resources are used up. It is noted that according to the proposed LS method, those clients in the un-allocated set UnctU_{nc}^{t} will not be allocated bandwidth or transmission power resources. Then, we give the performance analysis for the proposed LS method.

The proposed Algorithm 1 can provide an optimal solution for problem (P-1).

The objective of problem (P-1) is to maximize the number of successful transmission. Suppose that the solution based on Algorithm 1 can serve K∗K^{*} clients at most to successfully transmit their local FL models. For the convenience of explanation, based on (22), we assume K∗K^{*} clients from U0t={1,...,K∗}U_{0}^{t}=\{1,...,K^{*}\} are selected and the transmission indicating vector can be denoted as a∗={1,...,1,...,1⏟K∗,0,...,0⏟N−K∗}\bm{a}^{*}=\{\underbrace{1,...,1,...,1}_{K^{*}},\underbrace{0,...,0}_{N-K^{*}}\}. With Lemmas 1 and 2, we obtain

where B1t≤...≤BK∗t≤BK∗+1t≤...≤BNt,∀k∈NB_{1}^{t}\leq...\leq B_{K^{*}}^{t}\leq B_{K^{*}+1}^{t}\leq...\leq B_{N}^{t},\forall k\in\mathcal{N}. Obviously, to support K∗K^{*} clients successfully transmit models, the resource allocation based on Algorithm 1 will consume the minimum bandwidth. We assume that there exists another allocation scheme in which (K∗+1)(K^{*}+1) local fresh FL models can be successfully transmitted to PS. Denote the active clients by U1t(U1t⊂Net,∣U1t∣=K∗+1)U_{1}^{t}(U_{1}^{t}\subset\mathcal{N}_{e}^{t},|U_{1}^{t}|=K^{*}+1), then the following holds

In (25), one possible solution can be {Pl′=Plmax,Bl′≤Blt,∀l∈U1t}\{P_{l}^{{}^{\prime}}=P_{l}^{\text{max}},B_{l}^{{}^{\prime}}\leq B_{l}^{t},\forall l\in U_{1}^{t}\} due to Lemma 2, in which ∑l∈U1tBl′≤∑l∈U1tBlt\sum_{l\in U_{1}^{t}}B_{l}^{{}^{\prime}}\leq\sum_{l\in U_{1}^{t}}B_{l}^{t} holds. Then we could have

where it is shown to lead to a contradiction with (24). Thus, the proposed Algorithm 1 can provide an optimal solution for (P-1), which proves Theorem 1. ∎

Finally, we summarize the proposed CEFL framework in Algorithm 2 for clarity. For each communication round tt, the PS broadcasts the global FL model wt\bm{w}^{t} to all selected clients. Each client trains its local model after receiving wt\bm{w}^{t} and independently decides whether or not to upload its own fresh local model via criteria (8) and (9). Upon receiving the updated models from the scheduled clients, the PS updates the global model with (27). The above steps (i.e., steps 4-19) are repeated until the stopping criterion is satisfied.

IV Convergence and Communication Analysis

In this section, we will first provide the theoretical analysis on the convergence of the proposed CEFL algorithm. Then we analyze the communication cost.

To facilitate the convergence analysis, following , we assume that the BS-to-client transmission is error-free due to the rich power and bandwidth budget at the BS, and we evaluate the impact of noisy upload transmission on the convergence performance. In addition, local epoch E=1E=1 is considered for all clients to train a global FL model. In the following, before analyzing the convergence of the CEFL algorithm, we first provide the following sufficient conditions, which are widely adopted in the analysis of decentralized optimization.

The local loss function f(x)f(\bm{x}) is coercive over its feasible set F\mathcal{F}, i.e., f(x)→∞f(\bm{x})\to\infty if x∈F\bm{x}\in\mathcal{F} and ∥x∥→∞\|\bm{x}\|\to\infty. The global loss function f(x)f(\bm{x}) is lower bounded over x∈F\bm{x}\in\mathcal{F}.

The loss function fi(x)f_{i}(\bm{x}) is μ\mu-strongly convex, satisfying that

With these assumptions, we conclude the convergence properties of CEFL algorithm as follows.

Suppose Assumptions 1 and 2 hold. Let {wt}\{\bm{w}^{t}\} be the iterates generated by FedAvg approach. If the learning rate satisfies η=1L\eta=\frac{1}{L} and the outage probability is pit=0p_{i}^{t}=0, the FedAvg update per communication round yields the following descent

where ΔFedAvgt=Δ12L∥∇f(wt)∥2\Delta_{\textit{FedAvg}}^{t}\overset{\Delta}{=}\frac{1}{2L}\left\lVert\nabla f(\bm{w}^{t})\right\rVert^{2}.

The proof of Lemma 3 is similar to that in and we omit it here due to space limitation. ∎

Suppose Assumptions 1 and 2 hold. Let {wt}\{\bm{w}^{t}\} be the iterates generated by CEFL approach. If the learning rate satisfies η=1L\eta=\frac{1}{L} and the outage probability is pit=0p_{i}^{t}=0, the CEFL update per communication round yields the following descent

where ΔCEFLt\Delta_{\textit{CEFL}}^{t} is defined as

The proof of Lemma 4 is similar to that in , and we omit it here due to space limitation. ∎

With the above lemmas, the rationale of (8) follows next. Similar to the work in , the proposed client scheduling policy selects the fresh local models by assessing its contribution to the loss function decrease. To improve the communication efficiency of CEFL, each CEFL upload should bring more descent, i.e.,

As stated in , ∇f(wt)\nabla f(\bm{w}^{t}) can be approximated by recent gradients or weight differences since f(wt)f(\bm{w}^{t}) is L-smooth. Then we define

where {δk}k=1K\{\delta_{k}\}_{k=1}^{K} and KK are constants. It is also noted that

With (32)-(2), the condition (8) can be easily formed to decide if uploading fresh models.

Then we conclude the convergence rate of CEFL algorithm as follows.

Let Assumptions 1-3 hold and L,μL,\mu be defined therein, our proposed CEFL over wireless IoT networks in Algorithm 2 can achieve a strong expected linear rate, i.e.,

where ρ\rho is a positive constant satisfying the following condition

with pitp_{i}^{t} denoting the outage probability during uploading.

Theorem 2 implies that conditioned on (39), the proposed CEFL still exhibits the same order of convergence rate as that of the original GD method even though some communications are skipped in CEFL. Theorem 2 also presents the impact of wireless factors on the convergence properties i.e., outage probability. Thus, with pit→0p_{i}^{t}\rightarrow 0, the proposed CEFL algorithm will converge in a strong convergence rate. Otherwise, the linear convergence rate does not hold any longer. Note that Theorem 2 provides a sufficient condition to guarantee the convergence speed of the proposed CEFL approach.

IV-B Communication Analysis

Next, we analyze the communication cost based on the linear convergence rate. In following analysis, communication of model parameters between the PS and client is taken as 1 unit of communication.

If we assume ρ=μL∑i∈NetDi(1−pit)D\rho=\frac{\mu}{L}\sum_{i\in\mathcal{N}_{e}^{t}}\frac{D_{i}\left(1-p_{i}^{t}\right)}{D}, we have

To achieve a pre-defined deviation defined by f(wt)−f(w∗)≤ϵf(\bm{w}^{t})-f(\bm{w}^{*})\leq\epsilon, it is sufficient to have

Since the convergence round must be an integer, we get the result in Corollary 1. ∎

Let (39) holds, under the same conditions as Corollary 1, with deviation defined by f(wt)−f(w∗)≤ϵf(\bm{w}^{t})-f(\bm{w}^{*})\leq\epsilon, the communication cost of the proposed CEFL algorithm is O(log⁡1ϵ)O\left(\log{\frac{1}{\epsilon}}\right).

With the formula of change of base of logarithms, Corollary 2 can be easily obtained. ∎

Compared with NN activated clients per communication round in FedAvg-based FL algorithm, only a subset Net\mathcal{N}_{e}^{t} of clients (∣Net∣≤N\left|\mathcal{N}_{e}^{t}\right|\leq N) is active to upload fresh models in the CEFL-based approach. Corollary 2 shows that for the proposed CEFL algorithm, the total communication cost under an accuracy threshold ϵ\epsilon is reduced to O(log⁡1ϵ)O\left(\log{\frac{1}{\epsilon}}\right).

V Simulation Results and Analysis

In this section, we evaluate the performance of the proposed CEFL approach under real datasets.

For simulations, we consider a typical single-cell wireless IoT network that consists of N=10N=10 edge clients and a BS located at its center similar to the example network shown in Fig. 1. We assume that the BS has two ring-shaped boundary regions. The inner and outer boundaries have radii of 10 m and 500 m, respectively. The NN clients are uniformly and randomly distributed between the two boundaries, where the distance (in meter) between client ii and the BS is denoted as did_{i}. The wireless channels from each client to the BS follow i.i.d. Rayleigh fading with the total allowed bandwidth B= 20 MHzB=\text{ 20 MHz}, and the channel hith_{i}^{t} is modeled as

where oit∼CN(0,σ2)o_{i}^{t}\sim\mathcal{CN}\left(0,\sigma^{2}\right) is the small-scale fading coefficient of the link between client ii and BS, and L(di)=β0(di)−αL(d_{i})=\beta_{0}(d_{i})^{-\alpha} is the distance-dependent pathloss with exponent α\alpha and coefficient β0\beta_{0} . β0\beta_{0} is a frequency-dependent constant, which is set as (c4πfc)2(\frac{c}{4\pi f_{c}})^{2} with c=3×108 m/sc=3\times 10^{8}\text{ m/s} and the carrier frequency fc=3 GHzf_{c}=3\text{ GHz}. Then, the pitp_{i}^{t} can be formulated as

where Qit=BitN0L(di)σ2(2SBitΓt−1)Q_{i}^{t}=\frac{B_{i}^{t}N_{0}}{L(d_{i})\sigma^{2}}\left(2^{\frac{S}{B_{i}^{t}\Gamma^{t}}}-1\right). Unless specifically stated otherwise, other parameters are given in Table II, following the studies in . To investigate the performance especially in communication efficiency, we compare our CEFL approach against the vanilla FL approach , over wireless networks, among which FedAvg method is adopted. For the target model, we consider a convolutional neural network (CNN) architecture which has two 5×55\times 5 convolutional layers (the first with 10 channels, the second with 20 channels, each followed by ReLU function), each followed by a 2×22\times 2 max pooling layer, a fully connected layer with 500 units and ReLU function, and a final softmax output layer. Our model was simulated by Tensorflow in Python 3.7 and all experiments were carried out on the environment with the following hardware specifications: CPU Intel Core i5 @2.3 GHz; RAM 16 GB.

V-B Simulation Results

We evaluate the performance of the proposed approach via the MNIST dataset for handwritten digits classification . The MNIST dataset has 60, 000 training images and 10, 000 testing images of the 10 digits. We adopt the common assumption that each client is connected with the equal amount of training data samples and the local training samples are non-overlapping with each other . Besides, different data distributions of training samples are considered, both i.i.d. case and non-i.i.d. case. For the i.i.d. case, the original dataset is first uniformly partitioned into NN pieces and each client is assigned one piece. While for the non-i.i.d. case, the original training dataset is first partitioned into NN pieces according to the label order, and each piece is then randomly partitioned into 2 shards (i.e., 2N2N shards in total). Finally, each of NN clients is assigned 2 shards with different label distribution.

The performance of the proposed CEFL approach for classification on MNIST dataset is evaluated in Fig. V-A by training a CNN model over cumulative communication overhead. We first report the results for i.i.d. data partition case. The corresponding experimental results about the training loss, test accuracy, and the utilization of clients are shown in Fig. 2(a), Fig. 2(b), and Fig. 2(c), respectively. It is observed that under the same total communication overhead, the proposed CEFL approach performs better than the vanilla FL method (FedAvg). This is because that less informative messages (i.e., local FL models) from clients are restricted to upload to the PS in CEFL approach whilst all messages are transmitted to the PS for updating in FedAvg method at each communication round. We use an intuitive explanation as shown in Fig. V-A(c) to showcase the effectiveness of CEFL on selectively uploaded local models. In Fig. V-A(c), one blue stick refers to the percentage of participated clients to upload local models at each communication round. In the initial several communication rounds, communication events happen sparsely. While during the late communication rounds (150-th to 200-th), almost all messages (i.e., local FL models) from clients are critical and selected to transmit in our proposed policy, implying that client scheduling policy works better at the first half communication rounds. Similar performance results have also been observed in Fig. V-A(d)-Fig. V-A(f), where non-i.i.d. case on the MNIST training dataset is taken into account. It is worth noting that compared with that of i.i.d. case, the percentage of participated clients is much higher in non-i.i.d. case.

Furthermore, we evaluate the impact of the resource allocation scheme on the learning performance in Fig. V-B. For performance comparison, we also implement the equal resource allocation approach of as a benchmark. For this allocation scheme, in each communication round tt, both the transmission power and its bandwidth of each client are identical, i.e., Bit=B/N,Pit=Pmax,∀i∈NB_{i}^{t}=B/N,P_{i}^{t}=P^{\text{max}},\forall i\in\mathcal{N}. In Fig. V-B(a), we first show how resource allocation scheme affects the convergence behavior of the global FL model training in terms of the value of the training loss. As the communication cost increases, the training losses of the considered algorithms decrease at different rates, whilst the proposed CEFL framework consisting of the new client scheduling policy and the LS based resource allocation (denoted as ’CEFL-Opt’) achieves the lowest loss. Fig. V-B(b) also represents that the proposed LS based CEFL algorithm achieves the highest test accuracy among all schemes under the same communication budget on MNIST. This is reasonable since both client selection and resource allocation are taken into account in the proposed CEFL framework so as to reduce the effect of wireless transmission errors in FL.

VI Conclusions

We have studied the joint optimization problem of communication and resources with federated learning over wireless IoT networks, in which both client selection and resource allocation are considered. A CEFL framework was proposed combined with a new client scheduling policy and an LS based allocation method, respectively. We showed that the presented LS approach was able to provide an optimal solution for bandwidth and power allocation and the convergence and communication properties of the proposed CEFL algorithm were also theoretically analyzed. Extensive experimental results revealed that the proposed CEFL algorithm outperforms the state-of-the-art baseline method both in communication overheads and learning performance under different data distributions. Besides, the proposed CEFL framework can effectively schedule clients according to both the learned model parameter characteristics and wireless channel dynamics.

Appendix A Supporting Lemma 5

Before proving Theorem 1, we first introduce the following Lemma 5.

Suppose that the iterates {wt}\{\bm{w}^{t}\} of problem (1) are generated by full gradient descent over wireless IoT networks: wt+1=wt−ηgt\bm{w}^{t+1}=\bm{w}^{t}-\eta\bm{g}^{t} with gt=Δ∇f(wt)+et\bm{g}^{t}\overset{\Delta}{=}\nabla f(\bm{w}^{t})+\bm{e}^{t} and learning rate η=1L\eta^{=}\frac{1}{L} and the error et\bm{e}^{t} meets

where ρ≤μL\rho\leq\frac{\mu}{L} is a positive constant. Under Assumptions 1-3, the following inequality holds

Subtracting f(w∗)f(\bm{w}^{*}) from both sides of (A), it gives

where (a) holds due to (31). Taking expectations of (A), we can derive

where (b) uses the condition (49). This completes the proof of Lemma 5.

Appendix B Proof of Theorem 2

Based on the result given in Lemma 5, we present the proof for Theorem 1 in detail. Combing (2) with (27), we have

where et\bm{e}^{t} is gradient deviation caused by the PS at communication round tt that it uses old copy of local FL model from client i∈Ni\in{\mathcal{N}} when the newly local FL model can not be successfully received. Let Net\mathcal{N}_{e}^{t} and Nct\mathcal{N}_{c}^{t} be the sets of clients that do and do not communicate with the PS, respectively. In particular, et\bm{e}^{t} can be expressed as (B), shown on the upper of the next page.

Thus, with ηt=1L\eta^{t}=\frac{1}{L}, we have

Then, by taking expectations and norms in both sides of (B), we have

That is, to guarantee (50), the available ρ\rho must satisfy

According to (28) in Assumption 1 and (31) in Assumption 3, we have

References