Federated Learning over Wireless Fading Channels
Mohammad Mohammadi Amiri, Deniz Gunduz

TL;DR
This paper compares digital and analog distributed stochastic gradient descent schemes for federated learning over wireless fading channels, demonstrating the advantages of analog over-the-air methods in convergence speed and accuracy.
Contribution
It introduces a novel compressed analog DSGD scheme that leverages the additive wireless channel for improved federated learning performance.
Findings
CA-DSGD converges faster than D-DSGD and other schemes.
CA-DSGD achieves higher accuracy, especially with non-i.i.d. data.
Analog scheme is robust to imperfect channel state information.
Abstract
We study federated machine learning at the wireless network edge, where limited power wireless devices, each with its own dataset, build a joint model with the help of a remote parameter server (PS). We consider a bandwidth-limited fading multiple access channel (MAC) from the wireless devices to the PS, and propose various techniques to implement distributed stochastic gradient descent (DSGD). We first propose a digital DSGD (D-DSGD) scheme, in which one device is selected opportunistically for transmission at each iteration based on the channel conditions; the scheduled device quantizes its gradient estimate to a finite number of bits imposed by the channel condition, and transmits these bits to the PS in a reliable manner. Next, motivated by the additive nature of the wireless MAC, we propose a novel analog communication scheme, referred to as the compressed analog DSGD (CA-DSGD),…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Federated Learning over Wireless
Fading Channels
Mohammad Mohammadi Amiri and Deniz Gündüz M. Mohammadi Amiri is with the Department of Electrical Engineering, Princeton University, Princeton, NJ 08544, USA (e-mail: [email protected]).D. Gündüz is with the Department of Electrical and Electronic Engineering, Imperial College London, London SW7 2AZ, U.K. (e-mail: [email protected]).
Abstract
We study federated machine learning at the wireless network edge, where limited power wireless devices, each with its own dataset, build a joint model with the help of a remote parameter server (PS). We consider a bandwidth-limited fading multiple access channel (MAC) from the wireless devices to the PS, and propose various techniques to implement distributed stochastic gradient descent (DSGD) over this shared noisy wireless channel. We first propose a digital DSGD (D-DSGD) scheme, in which one device is selected opportunistically for transmission at each iteration based on the channel conditions; the scheduled device quantizes its gradient estimate to a finite number of bits imposed by the channel condition, and transmits these bits to the PS in a reliable manner. Next, motivated by the additive nature of the wireless MAC, we propose a novel analog communication scheme, referred to as the compressed analog DSGD (CA-DSGD), where the devices first sparsify their gradient estimates while accumulating error from previous iterations, and project the resultant sparse vector into a low-dimensional vector for bandwidth reduction. We also design a power allocation scheme to align the received gradient vectors at the PS in an efficient manner. Numerical results show that D-DSGD outperforms other digital approaches in the literature; however, in general the proposed CA-DSGD algorithm converges faster than the D-DSGD scheme and other schemes in the literature, and reaches a higher level of accuracy. We have observed that the gap between the analog and digital schemes increases when the datasets of devices are not independent and identically distributed (i.i.d.). Furthermore, the performance of the CA-DSGD scheme is shown to be robust against imperfect channel state information (CSI) at the devices. Overall these results show clear advantages for the proposed analog over-the-air DSGD scheme, which suggests that learning and communication algorithms should be designed jointly to achieve the best end-to-end performance in machine learning applications at the wireless edge.00footnotetext: This work was supported in part by the European Research Council (ERC) Starting Grant BEACON (grant agreement no. 725731).
I Introduction
As the dataset sizes and model complexities grow, distributed machine learning (ML) is becoming the only viable alternative to centralized ML. In particular, with the increasing amount of information collected through wireless edge devices, such centralized solutions are becoming increasingly costly, due to the limited power and bandwidth available, and less desirable due to privacy concerns. Federated learning (FL) has been proposed as an alternative privacy-preserving distributed ML scheme, where each device participates in training using only locally available data with the help of a parameter server (PS) [1]. In FL devices exchange model parameters and their local updates with the PS, but the data never leaves the devices. As mentioned, in addition to privacy benefits, this is an attractive approach for wireless edge devices when dataset sizes are very large.
ML problems often involve the minimization of the empirical loss function
[TABLE]
where denotes the model parameters to be optimized, is the training dataset of size consisting of data samples and their labels, and is the loss function defined by the learning task. The minimization of is typically carried out through iterative stochastic gradient descent (SGD) algorithm, in which the model parameter vector at iteration , , is updated with a stochastic gradient
[TABLE]
which satisfies , where is the learning rate. SGD can easily be implemented across multiple devices, each of which has access to only a small fraction of the dataset. In distributed SGD (DSGD), at each iteration, device computes a gradient vector based on the global parameter vector with respect to its local dataset, denoted by , and sends the result to the PS, which updates the global parameter vector according to
[TABLE]
where denotes the number of wireless devices, and , . In FL, each device participating in the training can also carry out multiple model updates as in (3) locally, and share the overall difference with respect to the previous global model parameters with the PS [1].
What distinguishes FL from conventional ML is the large number of devices that participate in the training, and the low-capacity and unreliable links that connect these devices to the PS. Therefore, there have been significant research efforts to reduce the communication requirements in FL [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]. However, these and follow-up studies ignore the physical layer aspects of wireless connections and consider interference-and-error-free links from the participating devices to the PS, even though FL has been mainly motivated for mobile devices.
In this paper, we consider DSGD over-the-air; that is, we consider a wireless shared medium from the devices to the PS over which they send their gradient estimates. To emphasize the limitations of the wireless medium, we note that the dimension of some of the recent ML models, which also determines the size of the gradient estimates or model updates that must be transmitted to the PS at each iteration, can be extremely large, e.g., the 50-layer ResNet network has million weight parameters, while the VGGNet architecture has approximately million parameters. On the other hand, available channel bandwidth is typically small due to the bandwidth and latency limitations; for example 1 LTE frame of 5MHz bandwidth and duration 10ms can carry only 6000 complex symbols. In principle, we can treat each iteration of the DSGD algorithm as a distributed over-the-air lossy computation problem. FL over a static Gaussian MAC is studied in [25], where both a digital scheme, which separates computation and communication, and an analog over-the-air computation scheme are introduced. While the digital scheme exploits gradient quantization followed by independent channel coding at the participating wireless devices, the analog scheme exploits the additive nature of the wireless channel and gradient sparsification, and employs random linear projection for dimensionality reduction. In [26] the authors consider a fading MAC, and also apply analog transmission, where each entry of a gradient vector at each of the devices is scheduled for transmission depending on the corresponding channel condition. A multi-antenna PS is considered in [27], where receive beamforming is used to maximize the number of devices scheduled for transmission at each iteration.
Here, we extend our previous works [25, 28], and study DSGD over a wireless fading MAC. While we consider gradient descent, where each device sends its local gradient estimate at each iteration, the results can easily be extended by letting the devices send their model updates after several local SGD iterations. We first consider the separate computation and communication approach, and propose a digital DSGD (D-DSGD) scheme, in which only a single device is opportunistically scheduled for transmission at each iteration of DSGD based on the channel conditions from the devices to the PS. The scheduled device quantizes its gradient estimate to a finite number of bits using the gradient compression scheme in [18] while accumulating the error from previous iterations (this will be clarified later), and employs a channel code to transmit the bits over the available bandwidth-limited channel to the PS. For the MNIST classification task, it is shown that the proposed digital approach D-DSGD outperforms digital schemes that employ QSGD [8] or SignSGD [12] for gradient compression. We also observe that the proposed opportunistic scheduling scheme outperforms the scheme when all the devices participate in the transmission, with each device allocated orthogonal channel resources to communicate with the PS.
We then study analog transmission from the devices to the PS motivated by the signal-superposition property of the wireless MAC. At first, we extend the scheme in [26] by introducing error accumulation, which is shown to improve the performance. We then propose a novel scheme, inspired by the random projection used in [25] for dimensionality reduction, which we will refer to as the compressed analog DSGD (CA-DSGD). With CA-DSGD, we exploit the similarity in the sparsity patterns of the gradient estimates at different devices to speed up the computations, where each device projects its gradient estimate to a low-dimensional vector and transmits only the important gradient entries while accumulating the error. CA-DSGD scheme provides the flexibility of adjusting the dimension of the gradient estimate sent by each device, which is particularly important for bandwidth-limited wireless channels, where the bandwidth available for transmission may not be sufficient to send the entire gradient vector at a single time slot. A power allocation scheme is also designed, which aligns the vectors sent by different devices at the PS while satisfying the average power constraint. Numerical results for the MNIST classification task show that the proposed CA-DSGD scheme improves upon the other analog and digital schemes under consideration with the same average power constraint and bandwidth resources, with the improvement more significant when the datasets across devices are non-independent and identically distributed (i.i.d.). Its performance is also shown to be robust against imperfect channel state information (CSI) at the devices, whereas digital schemes are sensitive to accurate CSI at the devices, particularly if close to capacity operation is desired. In addition to these benefits of the proposed CA-DSGD scheme we make the following observations:
The improvement of analog over-the-air computation compared to the D-DSGD scheme is particularly striking in the low power regime. This is mainly due to the “beamforming” effect of simultaneously transmitting highly correlated gradient estimates. 2. 2)
While both the convergence speed and the accuracy of the D-DSGD scheme increase significantly with the available average power, the performance of the analog schemes improve marginally. This highlights the energy efficiency of over-the-air computation, and makes it particularly attractive for FL across low-power IoT sensors. 3. 3)
Increasing the number of devices improves the accuracy for all the schemes even if the total dataset size and total power consumption remain the same. This “diversity gain” is much more limited for the analog scheme, and diminishes further as the training duration increases. 4. 4)
We observe that the performance of the CA-DSGD scheme improves if we reduce the bandwidth used at each iteration, and increase the number of DSGD iterations instead.
Notations: and represent the sets of real and complex values, respectively. For vectors and with the same dimension, returns their Hadamard/entry-wise product. For a vector , and return the entry-wise real and imaginary components of , respectively. Also, represents the concatenation of two row vectors and . We denote a zero-mean normal distribution with variance by , and represents a complex normal distribution with independent real and imaginary terms each distributed according to . For positive integer , we let . We denote the cardinality of set by , and norm of vector by . The imaginary unit is represented by .
II System Model
We consider FL across wireless devices, each with its own local dataset, which employ DSGD with the help of a remote PS. We model the channel from the devices to the PS as a wireless fading MAC, and OFDM is employed for transmission. The system model is illustrated in Fig. 1. The parameter vector at iteration is denoted by , and we assume that it is delivered from the PS to the devices over an error-free shared link. We denote the set of data samples available at device by , with , , and the stochastic gradient computed by device with respect to local data samples by , . At the -th iteration of the DSGD algorithm in (3), the local gradient estimates of the devices are sent to the PS over a wireless fading MAC using subchannels for a total of time slots, where (in practice, we typically have ). We denote the length- channel input vector transmitted by device at the -th time slot of the -th iteration of the DSGD by . The channel output received by the PS at the -th time slot of the -th iteration, , is given by
[TABLE]
where is the entry-wise scheduling vector with the -th entry , if , and , otherwise111 is a subset of the devices that will be specified for each of the schemes., is the channel gains vector from device to the PS with the -th entry i.i.d. according to , e.g., Rayleigh fading, and is complex Gaussian noise vector with the -th entry i.i.d. according to . The channel input vector of device at the -th time slot of iteration , , is a function of the channel gain vector , current parameter vector , the local dataset , and the current gradient estimate at device , , . We assume that, at each time slot, the CSI is known by the devices and the PS. For a total of iterations of the DSGD algorithm, the following total average transmit power constraint is imposed at device :
[TABLE]
where the expectation is taken over the randomness of the channel gains.
The goal is to recover at the PS, which then updates the model parameter as in (3) after time slots. However, due to the pre-processing performed at each device and the distortion caused by the wireless channel, the PS uses a noisy estimate to update the model parameter. Having defined , we have for some update function . The updated model parameter is then multicast to the devices by the PS through an error-free shared link, so the devices receive a consistent parameter vector for their computations in the next iteration.
We remark that the goal is to recover the average of the local gradient estimates of the devices at the PS, which is a distributed lossy computation problem over a noisy MAC. We will consider both a digital approach based on separating computations and communication, and an analog transmission approach, where the gradients are transmitted simultaneously over the wireless MAC in an analog fashion, without being converted into bits first. Analog transmission has been well studied for image/ video multicasting over wireless channels in recent years [29, 30, 31], and here we employ the random projection technique proposed in [31] for image transmission over a bandwidth limited wireless channel.
III Digital DSGD
We first consider DSGD with digital transmission of the gradient estimates by the devices over the wireless fading MAC, referred to as the digital DSGD (D-DSGS) scheme. For D-DSGD, we consider , i.e., the parameter vector is updated after each time slot, and drop the dependency on time slot parameter .
The goal here is to schedule devices and employ power allocation across time slots such that devices can transmit to the PS their local gradient estimates as accurately as possible. A possible approach is to schedule all the devices at all the iterations; however, due to the interference among the devices this will result in each device sending a very coarse description of its local gradient estimate. Instead here we will schedule the devices opportunistically according to their channel states.
In particular, with the knowledge of channel state information (CSI), at each iteration , we select the device with the largest value of , . Accordingly, the index of the transmitting device at iteration is given by:
[TABLE]
We note that, due to the symmetry in the model, the probability of selecting a device at any time is the same, . The power allocated to device at the -th iteration is given by , where , if , and it should satisfy
[TABLE]
For the rate of transmission, we will use a capacity upper bound. The -th entry of the channel output at the -th iteration, which is the result of transmission from device , is given by
[TABLE]
which is equivalent to a wireless fast fading channel with a limited number of channel uses, with CSI known at both the transmitter and the receiver. In the following, we provide an upper bound on the capacity of this channel by treating it as parallel Gaussian channels. This is equivalent to coding across infinitely many realizations of this -dimensional channel. For a transmit power , the capacity of this parallel Gaussian channel is the result of the following optimization problem [32, Section 5.4.6]:
[TABLE]
The optimization problem in (III) is solved through waterfilling, and the optimal power allocation is given by
[TABLE]
where is determined such that . Having calculated , the capacity of the wireless channel in (8) is given by
[TABLE]
which provides an upper bound on the capacity of the communication channel between device and the PS. We would like to emphasize that this capacity upper bound can be quite loose especially for small values.
We adopt the D-DSGD scheme proposed in [25, Section III], in which the gradient estimate , computed at device , is added to the error accumulated from previous iterations, denoted by , where we set , . For the compression of the error compensated gradient vector , we employ the scheme in [18], where it is first sparsified by setting all but the highest positive and the smallest negative entries to zero, where (in practice, the goal is to have , ). Then, device computes the mean value of the positive and negative entries of the resultant sparse vector, denoted by and , respectively, . If , device sets all the negative entries of the sparse vector to zero and all the positive entries to , and vice versa, if , . Let denote the resultant sparse vector at device , . After computing at device , , the error accumulation vector, which maintains those entries of vector that are not transmitted, is updated as follows:
[TABLE]
We note that, if user is scheduled, the accumulated error at device is the difference between and its sparsified version , ; on the other hand, if device is not scheduled, we maintain vector entirely as the accumulated error. For a sparsity level , the D-DSGD scheme requires transmission of a total of [25, Equation (10)]
[TABLE]
We assume that device employs a capacity achieving channel code using the optimal value of the capacity upper bound in (11), and we set the sparsity level as the highest integer satisfying .
We highlight here that with the proposed D-DSGD algorithm, all the devices compute the gradient estimates based on the parameter vector received from the PS and their local datasets; however, only a single device is scheduled for transmission over the MAC with the scheduling policy given in (6). The PS updates the parameter vector after receiving the gradient estimate from the scheduled device and shares it with all the devices to continue their computations.
Remark 1**.**
An alternative device selection criteria, rather than the one in (6), is to select the device with the highest capacity upperbound. Here we do not employ this selection criteria due to the overhead introduced by solving the waterfilling power allocation for all devices. This will be prohibitive for large and avlues.
Remark 2**.**
Instead of scheduling a single device at each iteration, we can schedule all or a subset of the devices at each iteration, and allocate distinct subchannels to different devices. In Section V we consider the so-called orthogonal digital DSGD (OD-DSGD) scheme, which schedules all the devices at each iteration, where each device is allocated distinct subchannels. We have observed that OD-DSGD performs much worse than D-DSGD. It is worth noting that scheduling multiple devices reduces the number of subchannels allocated to each device for orthogonal transmission, and forces the devices to transmit their information at shorter blocklengths. In practice, this would result in a higher error probability or reduced transmission rate [33]. An alternative approach is to code across time slots by allocating multiple time slots to a scheduled user. This requires the information about the future channel gains, which is not possible in our model since the channel gains are assumed to be i.i.d. across time slots and users.
We will evaluate the performance of the D-DSGD scheme in Section V, and study in detail the impact of various system parameters, such as the average power constraint and the number of devices on the performance. We will also compare the D-DSGD scheme with other compression schemes in the literature, as well as the analog transmission of local gradients, which we present next.
IV Analog DSGD
Analog DSGD is motivated by the fact that the PS is only interested in the average of the gradient vectors, and the underlying wireless MAC can provide the sum of the gradients if they are sent in an uncoded fashion. We first present a generalization of the over-the-air computation approach introduced in [26], referred to as entry-wise scheduled analog DSGD (ESA-DSGD), and then extend it by introducing error accumulation, referred to as error compensated ESA-DSGD (ECESA-DSGD). Finally, we propose a novel analog scheme, built upon our previous work [25], referred to as compressed analog DSGD (CA-DSGD).
IV-A ESA-DSGD
With the ESA-DSGD scheme studied in [26], each device sends its gradient estimate entirely after applying power allocation, which is to satisfy the average power constraint. At the -th iteration of the DSGD, device , , transmits its local gradient estimate over time slots by utilizing both the real and imaginary components of the available subchannels. We define, for , ,
[TABLE]
where is the -th entry of , and we zero-pad to have dimension . We note that, according to (14),
[TABLE]
where . At the -th time slot of the -th iteration, device , , sends , where is the power allocation vector, which is set to satisfy the average transmit power constraint. Thus, after time slots, each device sends its gradient estimate of dimension entirely. The -th entry of the power allocation vector is set as follows:
[TABLE]
for some , set to satisfy the average transmit power constraint. According to (16), each entry of a gradient vector is transmitted if its corresponding channel gain is over a threshold. The set of devices selected to transmit the -th entry of the channel input vector at the -th time slot is given by, , ,
[TABLE]
In the following, we analyze the average transmit power of the ESA-DSGD scheme based on the power allocation design given in (16). We set the parameters and to obtain the same average transmit power at device , , in time slot , , of iteration , which satisfies
[TABLE]
According to (16), , we have
[TABLE]
We highlight that the entries of the gradient vector are independent of the channel gains , . Since the power allocation vector is a function of , it follows that, for , ,
[TABLE]
Note that follows an exponential distribution with mean , . Thus, we have
[TABLE]
where . It follows that, ,
[TABLE]
where we define . Given the threshold value , we set
[TABLE]
which we note that it does not differ significantly across devices, since values of , , are not too different. We assume that, before transmitting , device , , sends to the PS in an error-free fashion using an error correcting code, and the PS computes
[TABLE]
This factor will be used at the PS to scale down the received signal.
Here we analyze the received signal at the PS. By substituting and into (4), it follows that, for , ,
[TABLE]
The PS has perfect CSI, and hence, knows set . Its goal is to recover and , which provide estimates for and , respectively. The PS estimates , for , , using its noisy observation , given in (25), as
[TABLE]
and estimates through
[TABLE]
Estimated vector is then used to update the parameter vector as .
Remark 3**.**
We remark here that the scheme in [26] imposes a stricter average power constraint per iteration of the DSGD, i.e., at device we should have
[TABLE]
For fairness in our comparisons we relax this power constraint, and impose the one in (5), which constrains the average power over all the iterations.
IV-B ECESA-DSGD
With the ESA-DSGD scheme, entries of the gradient vectors that are not sent due to poor channel conditions are completely forgotten. The proposed ECESA-DSGD scheme modifies ESA-DSGD by incorporating error accumulation technique to retain the accuracy of local gradients.
We denote the error accumulation vector calculated by device at the -th time slot of the -iteration by , and set , . Similarly to the ESA-DSGD scheme, with ECESA-DSGD, each device sends its entire gradient estimate of dimension through time slots, where the gradient estimates at the devices are zero-padded to dimension . After computing and obtaining according to (14), device , , updates its gradient estimate with the accumulated error as , for , and transmits vector , where is the power allocation vector, whose -th entry is determined as follows:
[TABLE]
for some . Device , , then updates the -th entry of vector as follows:
[TABLE]
where is the indicator function, and denotes the -th entry of , for , . Thus, the -th entry of vector is given by, for , ,
[TABLE]
According to (IV-B), each entry of the gradient vector that is not transmitted due to the power allocation given in (29), is retained in the error accumulation vector for possible transmission in the next iteration.
Here we provide the power analysis of the ECESA-DSGD scheme. For fairness, we set the parameters and yielding an average transmit power at device , , in time slot , , of iteration , satisfying the constraint in (18). Since the power allocation vector of ECESA-DSGD, given in (29), is similar to that of the ESA-DSGD, by following a similar procedure we obtain the following average power at device for ECESA-DSGD:
[TABLE]
where we define . For a fixed , we set
[TABLE]
shared with the PS in an error-free manner, through which the PS computes
[TABLE]
From the power allocation in (29), it follows that, for , ,
[TABLE]
where we have
[TABLE]
Having perfect CSI, the PS’s goal is to recover , the real and imaginary terms of which provide estimates for and , respectively, for , . The PS estimates as
[TABLE]
and estimates through
[TABLE]
for , . After time slots, estimated vector is then used to update the parameter vector as .
IV-C CA-DSGD
As opposed to ESA-DSGD and ECESA-DSGD, which aim to transmit all the gradient entries to the PS at each DSGD iteration, i.e., , the CA-DSGD scheme proposed here reduces the transmission bandwidth by reducing the dimension of the gradient vector by a linear projection. Each device projects its gradient estimate to dimension , which can then be transmitted through time slots, for some . The details of CA-DSGD are given in Algorithm 1.
We describe the CA-DSGD scheme for an arbitrary number of time slots per iteration of DSGD, which is determined later. At each iteration the devices sparsify their gradient estimates as described below. They employ error accumulation [7], where the accumulated error vector at device until iteration is denoted by , where we set , . After computing , device updates its estimate with the accumulated error as , . Next, the devices apply gradient sparsification, where device sets all but elements with the highest magnitudes of vector to zero, where is a design parameter, and obtains a sparse vector , . This -level sparsification is represented by function in Algorithm 1, i.e., . device , , then updates as . To transmit the sparse vectors over the limited-bandwidth channel, devices employ a random projection matrix, similarly to compressive sensing.
A pseudo-random matrix , with each entry i.i.d. according to , is generated and shared between the PS and the devices, where , for an arbitrary . At each iteration , device computes , and aims to transmit it to the PS over time slots. We define, for , ,
[TABLE]
where is the -th entry of , . At the -th time slot of the -th iteration of DSGD, device , , sends , where is the power allocation vector. The -th entry of the power allocation vector is set as follows:
[TABLE]
for some . The set of devices scheduled to transmit the -th entry of the channel input vector at the -th time slot is given by, , ,
[TABLE]
Similarly to ESA-DSGD and ECESA-DSGD, we set the average transmit power at device , , in time slot , , of iteration for CA-DSGD to ,
[TABLE]
where we define . Given , we set
[TABLE]
and the PS computes
[TABLE]
after receiving .
By substituting and into (4), it follows that, for ,
[TABLE]
where denotes the -th row of measurement matrix , and we note that , . The PS wants to recover from its noisy observations in (IV-C). For this, using its knowledge of matrix and the CSI, PS employs the approximate message passing (AMP) algorithm [34]. The AMP algorithm is represented by in Algorithm 1. The PS first obtains, for , ,
[TABLE]
and then estimates
[TABLE]
where we define . If , is used to update the parameter vector as . On the other hand, if , the previous parameter vector is simply used as the new one, i.e., .
Remark 4**.**
For , in which the entire gradient vectors are transmitted to the PS at each iteration, the CA-DSGD scheme reduces to the ECESA-DSGD scheme; that is, sparsification and projection to a vector of smaller dimension, given in lines 6 and 8 of Algorithm 1, respectively, are not performed at the devices.
Remark 5**.**
We remark that is a design parameter which can take different values limited to . For relatively small values, can be recovered from in a more reliable manner as we have more noisy measurements of the sparsified gradient estimate than the number of its non-zero elements; however, provides a less accurate estimate of the actual average gradient as we have removed more componenets from the gradient estimates. On the other hand, for a relatively high value, provides a better estimate for ; however, it becomes harder to recover from in a reliable manner.
Remark 6**.**
We note that, even though each device transmits a sparse vector , their sum received over the channel does not need to be sparse. However, when the datasets are i.i.d. across devices and is large, we expect the gradient estimates across devices to be statistically uniform, and thus, will have similar sparsity patterns. Note, however, that the proposed CA-DSGD scheme does not require data to be independent across devices. As it will be shown in Fig. 2, the CA-DSGD scheme converges even when the local datasets across the devices are biased, i.e., non-IID data distribution scenario described later, where the sparsity patterns of the local gradient estimates are expected to be more diverse. We observe that the transmissions from multiple devices still align on a small number of coordinates thanks to the superposition property of analog transmission. Thus, AMP still manages to recover the average gradient with reasonable accuracy, and the DSGD process converges, albeit more slowly compared to the IID data distribution scenario. We will see in Fig. 2 that CA-DSGD outperforms alternative analog and digital schemes with even a higher performance gap in the non-IID data distribution scenario.
Remark 7**.**
With ESA-DSGD, each device transmits only the entries of its estimated gradient whose corresponding channel conditions are sufficiently good. Thus, the gradient vector is inherently sparsified, but only based on the channel gains, regardless of the importance of the gradient entries. Then the entire gradient vector is sent over the bandwidth-limited wireless MAC over orthogonal time periods. On the other hand, with CA-DSGD, each device sends only important gradient entries, where the magnitude of each entry is regarded as the importance metric, by projecting the sparse gradient vector to a low-dimensional vector of length . We further highlight the error accumulation technique incorporated into ECESA-DSGD and CA-DSGD, whereas with ESA-DSGD, entries of the gradient vectors that are not sent are forgotten.
Remark 8**.**
We highlight that, thanks to the wireless MAC providing a noisy version of the average of the gradient estimates, the analog schemes can potentially help preserve the privacy as well. This is particularly compelling for the proposed CA-DSGD scheme, where the gradient estimates are compressed through linear projection before transmission.
V Numerical Experiments
Here we compare the performances of the presented wireless edge learning schemes for the task of image classification. We run experiments on the MNIST dataset [35] with training and test samples, and train a single layer neural network with parameters utilizing ADAM optimizer [36]. Throughout the experiments, we consider , and parallel subchannels, which results in for ESA-DSGD and ECESA-DSGD; and for any of the CA-DSGD scheme, we set the sparsity level to . For a fair comparison between the analog DSGD schemes, we set , and for average transmit power at the -th time slot, , of the -th iteration, , we calculate values of , and for ESA-DSGD, ECESA-DSGD and CA-DSGD through (23), (33) and (43), respectively. Also, we consider , , for the analog schemes, and , , for the digital schemes. The performance is measured as the accuracy with respect to the test data samples, called test accuracy, versus the normalized time .
We consider two scenarios to model the data distribution across the devices: in IID data distribution, randomly selected training data samples are assigned to each device at the beginning of training; while in non-IID data distribution, each device has training data samples, where half of them are selected at random from only one class/label; that is, for each device, we first select two classes/labels at random, and then randomly select data samples from each of the two classes/labels. At each iteration, devices use all the local data samples to compute their gradient estimates, i.e., the batch size is equal to the size of the local datasets.
For numerical comparison, we also consider the error-free shared link approach, where at each time slot the PS receives the average of the actual gradient estimates computed by the devices, , in a noiseless fashion, and updates the parameters based on this error-free observation. We note that, for the error-free shared link approach, we have . We consider three alternative digital schemes employing sparse binary compression [18], QSGD [8] and SignSGD [12] algorithms for gradient compression, respectively. When we refer to D-DSGD it refers to using the sparse binary compression technique. For a fair comparison, we apply QSGD and SignSGD to a limited number of gradient entries such that the final number of bits does not exceed the capacity of the underlying fading MAC. To be more precise, considering the device scheduling policy given in (6), and gradient entries with highest magnitudes are selected for transmission for SignSGD and QSGD, respectively, while all the other entries are set to zero. With the SignSGD algorithm [12], the scheduled device transmits only the signs of the selected entries, and a total of
[TABLE]
are required to send the sign of each selected entry, as well as their locations, and is set as the largest integer satisfying . With the QSGD algorithm [8], the scheduled device transmits a quantized version of each of the selected entries with a quantization level of , the -norm of the resultant vector with non-zero entries, and the locations of the non-zero entries. Thus, a total of
[TABLE]
are sent over the wireless fading MAC, where is set as the largest integer satisfying . Here we consider a quantization level for QSGD.
We further consider the OD-DSGD scheme, where each device has access to distinct subchannels to perform digital transmission without interfering with other devices. Due to symmetry across devices, we allocate subchannels to to device , . Similarly to the D-DSGD scheme, we use the capacity upperbound to determine the number of bits each user can convey to the PS at each iteration. This bound is computed by waterfilling across the channels available to each device as in (III)-(11). We use sparse binary compression with the OD-DSGD scheme as well with the sparsity level set as the largest integer satisfying , .
In Fig. 2, we compare the performances of different analog and digital schemes for IID and non-IID data distribution scenarios, for devices, training data samples and average transmit power constraint . We consider , i.e., for CA-DSGD, and we set the threshold value to . Observe that for both IID and non-IID data distribution cases CA-DSGD outperforms all other analog and digital schemes with the improvement substantially larger for non-IID data distribution, which shows its robustness to bias in the data distribution. CA-DSGD has a smaller convergence speed in non-IID case which is due to the reduction in the similarity of the sparsity patterns of the gradients across devices, although it does converge much faster and to a much higher accuracy level compared to the other schemes under consideration. The gap between the error-free shared link approach and CA-DSGD is relatively small for the IID case, and the final test accuracies of the two approaches are also similar for the non-IID case, although CA-DSGD converges more slowly in this case. Unlike the digital schemes, CA-DSGD benefits from the superposition property of the underlying wireless MAC by aligning the transmit powers to dominate the noise. We further highlight that the main reasons for the degradation of the ESA-DSGD over CA-DSGD are i) scheduling gradient entries for transmission only based on the channel gains; ii) transmitting the entire gradient vectors of relatively huge dimensions (compared to the channel bandwidth); iii) ignoring the gradient entries which have not been transmitted due to the poor conditions of their corresponding channels. We note that ECESA-DSGD resolves the last issue by utilizing error accumulation technique, which provides some gains with respect to ESA-DSGD, but we observe that better scheduling of the gradient transmissions and more efficient utilization of the bandwidth through linear projection provide significant gains, especially for the non-IID case, where the performances of ESA-DSGD and ECESA-DSGD significantly degrade in terms of the test accuracy, as well as the convergence speed. Also, D-DSGD provides a better accuracy than SignSGD and QSGD for both data distribution scenarios, and the performance of all the digital schemes under consideration deteriorate substantially for the non-IID case; this performance loss is more severe for the QSGD scheme.
In the following experiments, we only consider IID data distribution. In Fig. 3, we compare the performances of different analog and digital algorithms for two different average transmit power values and . We consider and , and we set , i.e., for CA-DSGD, and . As it can be seen, CA-DSGD continues to outperform all the other schemes, with a relatively small gap to the error-free shared link approach. By comparing Figures 3(a) and 3(b), it can be seen that the performances of all the schemes improve with , but the improvement is more significant for the digital schemes in terms of both the accuracy and the convergence speed, except QSGD which only improves in terms of accuracy. This shows that the analog schemes are less sensitive to a reduction in the average transmit power than the digital ones. This is because the signal-superposition property of the wireless MAC aligns the transmission power of all the transmitting devices in the case of analog transmission, which provides stronger protection against noise collectively, as the system continues to operate in a relatively high effective signal-to-noise ratio (SNR) regime despite some reduction in the transmission power of individual devices.
In Fig. 4, we compare the performances of analog and digital schemes for different pairs, , both having the same size of training data in total. We consider , and we set , and , which results in for CA-DSGD. It is again evident that CA-DSGD outperforms all the other schemes with the improvement over ESA-DSGD and ECESA-DSGD more noticeable for the higher value. As it can be seen, the performances of the analog schemes improve with , since increasing provides additional power introduced by each device and increases the robustness of the estimation against noise. We note that this improvement is larger for CA-DSGD, which is due to the more efficient utilization of the gradient estimates computed by the devices. Digital schemes also gain from increasing , which is due to the additional power allocated to the selected device, as the devices are less frequently scheduled for transmission. We note that the superiority of the ECESA-DSGD over ESA-DSGD reduces with , which shows that error accumulation is less effective for higher values when is fixed. This is because for larger , the chance of receiving more estimates for each entry of the actual gradient vector is higher (each gradient entry is estimated more accurately at the PS), and it is less likely that no estimate of any gradient entry is received by the PS. Accordingly, the benefit of error accumulation becomes less significant for higher number of devices.
In Fig. 5, we compare the performance of D-DSGD with that of OD-DSGD for different values, , when and . For both power values we observe that D-DSGD significantly outperforms OD-DSGD in terms of accuracy and convergence speed, while the superiority is more highlighted for the higher value. This shows that opportunistically allocating all the available bandwidth to only a single device is better than sharing it equally among all the devices which indicates that it is better to receive an accurate gradient estimate from a single device at each iteration, instead of receiving coarse estimates from all the devices. This improvement is more significant when increases.
In Fig. 6 we investigate the impact of on the performance of CA-DSGD. We consider for CA-DSGD, in which and are equivalent to and , respectively. We have , and , ans we set . We highlight the superiority of the CA-DSGD scheme for both values under consideration over ESA-DSGD. The ECESA-DSGD scheme, which is equivalent to CA-DSGD for , also outperforms ESA-DSGD slightly. However, as it can be seen, the performance of CA-DSGD degrades as increases, which indicates that transmitting more sparse versions of the gradient estimates while using the available channel bandwidth for further iterations results in a higher accuracy. The flexibility in choosing the dimension of the transmitted gradient estimates makes the proposed CA-DSGD scheme particularly compelling for learning at the wireless edge under strict bandwidth limit.
In Fig. 7, we consider the impact of imperfect CSI on the performance of analog schemes CA-DSGD and ECESA-DSGD for , and . We set , and , which results in for CA-DSGD. We assume a noisy CSI at device given by , , where is i.i.d. according to , i.e., a complex normal random variable with the same variance as the actual channel gain . We note that all the processing at the devices, such as power allocation, finding the set , and obtaining and , and consequently and for CA-DSGD and ECESA-DSGD, respectively, are performed based on the imperfect CSI , . As it can be seen, both the CA-DSGD and ECESA-DSGD are robust against the imperfect CSI, and their performance loss is negligible. To be more precise, after 2250 time slots (2250 SGD iterations for CA-DSGD and 225 SGD iterations for ECESA-DSGD), the final test accuracy reduction for CA-DSGD due to the imperfect CSI is , and that of ECESA-DSGD is . We highlight that, with imperfect CSI, even though the users will allocate higher or lower power to each subchannel than the optimal one, the cumulative effect becomes negligible since these variations across users are averaged out thanks to the superposition property.
VI Conclusions
We have studied FL at the wireless edge, where devices with limited transmit power and datasets communicate with the PS over a bandwidth-limited fading MAC to minimize a loss function by performing DSGD. The PS updates the parameter vector, and shares it with the devices over an error-free shared link. We first presented a digital approach that treats computation and communication separately. At each iteration of the proposed D-DSGD scheme, one device is selected depending on the channel states, and the selected device first quantizes its gradient estimate, and transmits the quantized bits to the PS using a capacity-achieving channel code. Then we studied an alternative analog transmission approach, which does not employ quantization or channel coding, and exploits the superposition property of the wireless MAC, rather than orthogonalizing the transmissions from different devices. We have proposed the CA-DSGD scheme, where each device employs gradient sparsification with error accumulation followed by linear projection to reduce the typically very large parameter vector dimension to the limited channel bandwidth. We have also designed a power allocation scheme to align the received vectors at the PS while satisfying the average power constraints at the devices. The CA-DSGD scheme allows a much more efficient use of the limited channel bandwidth, and benefits from the “beamforming effect” thanks to the similarity in the patterns of the gradient estimates across devices. The impact of various system parameters on the performance is studied numerically considering MNIST classification across edge devices as an example. Numerical results show that CA-DSGD outperforms D-DSGD and other state-of-the-art analog schemes consistently, while this improvement is even more significant for the non-IID data distribution scenario.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] J. Konecny, H. B. Mc Mahan, F. X. Yu, P. Richtarik, A. T. Suresh, and D. Bacon, “Federated learning: Strategies for improving communication efficiency,” ar Xiv:1610.05492 v 2 [cs.LG] , Oct. 2017.
- 2[2] B. Mc Mahan and D. Ramage, “Federated learning: Collaborative machine learning without centralized training data,” [online]. Available. https://ai.googleblog.com/2017/04/federated-learning-collaborative.html , Apr. 2017.
- 3[3] J. Konecny and P. Richtarik, “Randomized distributed mean estimation: Accuracy vs communication,” ar Xiv:1611.07555 [cs.DC] , Nov. 2016.
- 4[4] H. B. Mc Mahan, E. Moore, D. Ramage, S. Hampson, and B. A. y Arcas, “Communication-efficient learning of deep networks from decentralized data,” in AISTATS , 2017.
- 5[5] V. Smith, C.-K. Chiang, M. Sanjabi, and A. S. Talwalkar, “Federated multi-task learning,” in Proc. Neural Information Processing Systems (NIPS) , Long Beach, CA, USA, 2017.
- 6[6] S. Gupta, A. Agrawal, K. Gopalakrishnan, and P. Narayanan, “Deep learning with limited numerical precision,” in ICML , Jul. 2015.
- 7[7] F. Seide, H. Fu, J. Droppo, G. Li, and D. Yu, “1-bit stochastic gradient descent and its application to data-parallel distributed training of speech DN Ns,” in INTERSPEECH , Singapore, Sep. 2014, pp. 1058–1062.
- 8[8] D. Alistarh, D. Grubic, J. Z. Li, R. Tomioka, and M. Vojnovic, “QSGD: Communication-efficient SGD via randomized quantization and encoding,” in NIPS , Long Beach, CA, Dec. 2017, pp. 1709–1720.
