Byzantine-Robust Distributed Learning: Towards Optimal Statistical Rates
Dong Yin, Yudong Chen, Kannan Ramchandran, Peter Bartlett
Introduction
Many tasks in computer vision, natural language processing and recommendation systems require learning complex prediction rules from large datasets. As the scale of the datasets in these learning tasks continues to grow, it is crucial to utilize the power of distributed computing and storage. In such large-scale distributed systems, robustness and security issues have become a major concern. In particular, individual computing units—known as worker machines—may exhibit abnormal behavior due to crashes, faulty hardware, stalled computation or unreliable communication channels. Security issues are only exacerbated in the so-called Federated Learning setting, a modern distributed learning paradigm that is more decentralized, and that uses the data owners’ devices (such as mobile phones and personal computers) as worker machines (McMahan and Ramage, 2017, Konečnỳ et al., 2016). Such machines are often more unpredictable, and in particular may be susceptible to malicious and coordinated attacks.
Due to the inherent unpredictability of this abnormal (sometimes adversarial) behavior, it is typically modeled as Byzantine failure (Lamport et al., 1982), meaning that some worker machines may behave completely arbitrarily and can send any message to the master machine that maintains and updates an estimate of the parameter vector to be learned. Byzantine failures can incur major degradation in learning performance. It is well-known that standard learning algorithms based on naive aggregation of the workers’ messages can be arbitrarily skewed by a single Byzantine-faulty machine. Even when the messages from Byzantine machines take only moderate values—and hence are difficult to detect—and when the number of such machines is small, the performance loss can still be significant. We demonstrate such an example in our experiments in Section 7.
In this paper, we aim to develop distributed statistical learning algorithms that are provably robust against Byzantine failures. While this objective is considered in a few recent works (Feng et al., 2014, Blanchard et al., 2017, Chen et al., 2017), a fundamental problem remains poorly understood, namely the optimal statistical performance of a robust learning algorithm. A learning scheme in which the master machine always outputs zero regardless of the workers’ messages is certainly not affected by Byzantine failures, but it will not return anything statistically useful either. On the other hand, many standard distributed algorithms that achieve good statistical performance in the absence of Byzantine failures, become completely unreliable otherwise. Therefore, a main goal of this work is to understand the following questions: what is the best achievable statistical performance while being Byzantine-robust, and what algorithms achieve this performance?
To formalize this question, we consider a standard statistical setting of empirical risk minimization (ERM). Here data points are sampled independently from some distribution and distributed evenly among machines, of which are Byzantine. The goal is to learn a parametric model by minimizing some loss function defined by the data. In this statistical setting, one expects that the error in learning the parameter, measured in an appropriate metric, should decrease when the amount of data becomes larger and the fraction of Byzantine machines becomes smaller. In fact, we can show that, at least for strongly convex problems, no algorithm can achieve an error lower than
regardless of communication costs;Throughout the paper, unless otherwise stated, and hide universal multiplicative constants; and further hide terms that are independent of or logarithmic in see Observation 1 in Section 6. Intuitively, the above error rate is the optimal rate that one should target, as is the effective standard deviation for each machine with data points, is the bias effect of Byzantine machines, and is the averaging effect of normal machines. When there are no or few Byzantine machines, we see the usual scaling with the total number of data points; when some machines are Byzantine, their influence remains bounded, and moreover is proportional to . If an algorithm is guaranteed to attain this bound, we are assured that we do not sacrifice the quality of learning when trying to guard against Byzantine failures—we pay a price that is unavoidable, but otherwise we achieve the best possible statistical accuracy in the presence of Byzantine failures.
Another important consideration for us is communication efficiency. As communication between machines is costly, one cannot simply send all data to the master machine. This constraint precludes direct application of standard robust learning algorithms (such as M-estimators (Huber, 2011)), which assume access to all data. Instead, a desirable algorithm should involve a small number of communication rounds as well as a small amount of data communicated per round. We consider a setting where in each round a worker or master machine can only communicate a vector of size , where is the dimension of the parameter to be learned. In this case, the total communication cost is proportional to the number of communication rounds.
To summarize, we aim to develop distributed learning algorithms that simultaneously achieve two objectives:
Statistical optimality: attain an rate.
Communication efficiency: communication per round, with as few rounds as possible.
To the best of our knowledge, no existing algorithm achieves these two goals simultaneously. In particular, previous robust algorithms either have unclear or sub-optimal statistical guarantees, or incur a high communication cost and hence are not applicable in a distributed setting—we discuss related work in more detail in Section 2.
We propose two robust distributed gradient descent (GD) algorithms, one based on coordinate-wise median, and the other on coordinate-wise trimmed mean. We establish their statistical error rates for strongly convex, non-strongly convex, and non-convex population loss functions. For strongly convex losses, we show that these algorithms achieve order-optimal statistical rates under mild conditions. We further propose a median-based robust algorithm that only requires one communication round, and show that it also achieves the optimal rate for strongly convex quadratic losses. The statistical error rates of these three algorithms are summarized as follows.
Median-based GD: , order-optimal for strongly convex loss if .
Trimmed-mean-based GD: , order-optimal for strongly convex loss.
Median-based one-round algorithm: , order-optimal for strongly convex quadratic loss if .
A major technical challenge in our statistical setting here is as follows: the data points are sampled once and fixed, and each worker machine has access to a fixed set of data throughout the learning process. This creates complicated probabilistic dependency across the iterations of the algorithms. Worse yet, the Byzantine machines, which have complete knowledge of the data and the learning algorithm used, may create further unspecified probabilistic dependency. We overcome this difficulty by proving certain uniform bounds via careful covering arguments. Furthermore, for the analysis of median-based algorithms, we cannot simply adapt standard techniques (such as those in Minsker et al. (2015)), which can only show that the output of the master machine is as accurate as that of one normal machine, leading to a sub-optimal rate even without Byzantine failures (). Instead, we make use of a more delicate argument based on normal approximation and Berry-Esseen-type inequalities, which allows us to achieve the better rates when is small while being robust for a nonzero .
Above we have omitted the dependence on the parameter dimension ; see our main theorems for the precise results. In some settings the rates in these results may not have the optimal dependence on . Understanding the fundamental limits of robust distributed learning in high dimensions, as well as developing algorithms with optimal dimension dependence, is an interesting and important future direction.
2 Notation
Related Work
Outlier-robust estimation in non-distributed settings is a classical topic in statistics (Huber, 2011). Particularly relevant to us is the so-called median-of-means method, in which one partitions the data into subsets, computes an estimate from each subset, and finally takes the median of these estimates. This idea is studied in Nemirovskii et al. (1983), Jerrum et al. (1986), Alon et al. (1999), Lerasle and Oliveira (2011), Minsker et al. (2015), and has been applied to bandit and least square regression problems (Bubeck et al., 2013, Lugosi and Mendelson, 2016, Kogler and Traxler, 2016) as well as problems involving heavy-tailed distributions (Hsu and Sabato, 2016, Lugosi and Mendelson, 2017). In a very recent work, Minsker and Strawn (2017) provide a new analysis of median-of-means using a normal approximation. We borrow some techniques from this paper, but need to address a significant harder problem: 1) we deal with the Byzantine setting with arbitrary/adversarial outliers, which is not considered in their paper; 2) we study iterative algorithms for general multi-dimensional problems with convex and non-convex losses, while they mainly focus on one-shot algorithms for mean-estimation-type problems.
The median-of-means method is used in the context of Byzantine-robust distributed learning in two recent papers. In particular, the work of Feng et al. (2014) considers a simple one-shot application of median-of-means, and only proves a sub-optimal error rate as mentioned. The work of Chen et al. (2017) considers only strongly convex losses, and seeks to circumvent the above issue by grouping the worker machines into mini-batches; however, their rate still falls short of being optimal, and in particular their algorithm fails even when there is only one Byzantine machine in each mini-batch.
Other methods have been proposed for Byzantine-robust distributed learning and optimization; e.g., Su and Vaidya (2016a, b). These works consider optimizing fixed functions and do not provide guarantees on statistical error rates. Most relevant is the work by Blanchard et al. (2017), who propose to aggregate the gradients from worker machines using a robust procedure. Their optimization setting—which is at the level of stochastic gradient descent and assumes unlimited, independent access to a strong stochastic gradient oracle—is fundamentally different from ours; in particular, they do not provide a characterization of the statistical errors given a fixed number of data points.
Communication efficiency has been studied extensively in non-Byzantine distributed settings (McMahan et al., 2016, Yin et al., 2017). An important class of algorithms are based on one-round aggregation methods (Zhang et al., 2012, 2015, Rosenblatt and Nadler, 2016). More sophisticated algorithms have been proposed in order to achieve better accuracy than the one-round approach while maintaining lower communication costs; examples include DANE (Shamir et al., 2014), Disco (Zhang and Lin, 2015), distributed SVRG (Lee et al., 2015) and their variants (Reddi et al., 2016, Wang et al., 2017). Developing Byzantine-robust versions of these algorithms is an interesting future direction.
For outlier-robust estimation in non-distributed settings, much progress has been made recently in terms of improved performance in high-dimensional problems (Diakonikolas et al., 2016, Lai et al., 2016, Bhatia et al., 2015) as well as developing list-decodable and semi-verified learning schemes when a majority of the data points are adversarial (Charikar et al., 2017). These results are not directly applicable to our distributed setting with general loss functions, but it is nevertheless an interesting future problem to investigate their potential extension for our problem.
Problem Setup
The parameter space is assumed to be convex and compact with diameter , i.e., . We consider a distributed computation model with one master machine and worker machines. Each worker machine stores data points, each of which is sampled independently from . Denote by the -th data on the -th worker machine, and the empirical risk function for the -th worker. We assume that an fraction of the worker machines are Byzantine, and the remaining fraction are normal. With the notation , we index the set of worker machines by , and denote the set of Byzantine machines by (thus ). The master machine communicates with the worker machines using some predefined protocol. The Byzantine machines need not obey this protocol and can send arbitrary messages to the master; in particular, they may have complete knowledge of the system and learning algorithms, and can collude with each other.
We introduce the coordinate-wise median and trimmed mean operations, which serve as building blocks for our algorithm.
For the analysis, we need several standard definitions concerning random variables/vectors.
Robust Distributed Gradient Descent
We describe two robust distributed gradient descent algorithms, one based on coordinate-wise median and the other on trimmed mean. These two algorithms are formally given in Algorithm 1 as Option I and Option II, respectively, where the symbol represents an arbitrary vector.
In each parallel iteration of the algorithms, the master machine broadcasts the current model parameter to all worker machines. The normal worker machines compute the gradients of their local loss functions and then send the gradients back to the master machine. The Byzantine machines may send any messages of their choices. The master machine then performs a gradient descent update on the model parameter with step-size , using either the coordinate-wise median or trimmed mean of the received gradients. The Euclidean projection ensures that the model parameter stays in the parameter space .
Below we provide statistical guarantees on the error rates of these algorithms, and compare their performance. Throughout we assume that each loss function and the population loss function are smooth:
For any , the partial derivative of with respect to the -th coordinate of its first argument, denoted by , is -Lipschitz for each , and the function is -smooth. Let . Also assume that the population loss function is -smooth.
It is easy to see hat . When the dimension of is high, the quantity may be large. However, we will soon see that only appears in the logarithmic factors in our bounds and thus does not have a significant impact.
We first consider our median-based algorithm, namely Algorithm 1 with Option I. We impose the assumptions that the gradient of the loss function has bounded variance, and each coordinate of the gradient has coordinate-wise bounded absolute skewness:
For any , .
For any , .
These assumptions are satisfied in many learning problems with small values of and . Below we provide a concrete example in terms of a linear regression problem.
We prove Proposition 1 in Appendix A.1. In this example, the upper bound on depends on dimension and the diameter of the parameter space. If the diameter is a constant, we have . Moreover, the gradient skewness is bounded by a universal constant regardless of the size of the parameter space. In Appendix A.2, we provide another example showing that when the features in are i.i.d. Gaussian distributed, the coordinate-wise skewness can be upper bounded by .
We first consider the case where the population loss function is strongly convex. Note that we do not require strong convexity of the individual loss functions .
Consider Option I in Algorithm 1. Suppose that Assumptions 1, 2, and 3 hold, is -strongly convex, and the fraction of Byzantine machines satisfies
for some . Choose step-size . Then, with probability at least , after parallel iterations, we have
with being the inverse of the cumulative distribution function of the standard Gaussian distribution .
We prove Theorem 1 in Appendix B. In (3), we hide universal constants and a higher order term that scales as , and the factor is a function of ; as a concrete example, when . Theorem 1 together with the inequality , guarantees that after running parallel iterations, with high probability we can obtain a solution with error .
Here we achieve an error rate (defined as the distance between and the optimal solution ) of the form . In Section 6, we provide a lower bound showing that the error rate of any algorithm is . Therefore the first two terms in the upper bound cannot be improved. The third term is due to the dependence of the median on the skewness of the gradients. When each worker machine has a sufficient amount of data, more specifically , we achieve an order-optimal error rate up to logarithmic factors.
Non-strongly Convex Losses:
We next consider the case where the population risk function is convex, but not necessarily strongly convex. In this case, we need a mild technical assumption on the size of the parameter space .
We then have the following result on the convergence rate in terms of the value of the population risk function.
Consider Option I in Algorithm 1. Suppose that Assumptions 1, 2, 3 and 4 hold, and that the population loss is convex, and satisfies (2) for some . Define as in (3), and choose step-size . Then, with probability at least , after parallel iterations, we have
We prove Theorem 2 in Appendix C. We observe that the error rate, defined as the excess risk , again has the form \widetilde{\mathcal{O}}\big{(}\frac{\alpha}{\sqrt{n}}+\frac{1}{\sqrt{nm}}+\frac{1}{n}\big{)}.
Non-convex Losses:
When is non-convex but smooth, we need a somewhat different technical assumption on the size of .
We have the following guarantees on the rate of convergence to a critical point of the population loss .
Consider Option I in Algorithm 1. Suppose that Assumptions 1 2, 3 and 5 hold, and satisfies (2) for some . Define as in (3), and choose step-size . With probability at least , after parallel iterations, we have
We prove Theorem 3 in Appendix D. We again obtain an error rate in terms of the gap to a critical point of .
2 Guarantees for Trimmed-mean-based Gradient Descent
We next analyze the robust distributed gradient descent algorithm based on coordinate-wise trimmed mean, namely Option II in Algorithm 1. Here we need stronger assumptions on the tail behavior of the partial derivatives of the loss functions—in particular, sub-exponentiality.
We assume that for all and , the partial derivative of with respect to the -th coordinate of , , is -sub-exponential.
The sub-exponential property implies that all the moments of the derivatives are bounded. This is a stronger assumption than the bounded absolute skewness (hence bounded third moments) required by the median-based GD algorithm.
We use the same example as in Proposition 1 and show that the derivatives of the loss are indeed sub-exponential.
Consider the regression problem in Proposition 1. For all and , the partial derivative is -sub-exponential.
Consider Option II in Algorithm 1. Suppose that Assumptions 1 and 6 hold, is -strongly convex, and for some . Choose step-size . Then, with probability at least , after parallel iterations, we have
We prove Theorem 4 in Appendix E. In (5), we hide universal constants and higher order terms that scale as or . By running parallel iterations, we can obtain a solution satisfying . Note that one needs to choose the parameter for trimmed mean to satisfy . If we set for some universal constant , we can achieve an order-optimal error rate .
Non-strongly Convex Losses:
Again imposing Assumption 4 on the size of , we have the following guarantee.
Consider Option II in Algorithm 1. Suppose that Assumptions 1, 4 and 6 hold, is convex, and for some . Choose step-size , and define as in (5). Then, with probability at least , after parallel iterations, we have
The proof of Theorem 5 is similar to that of Theorem 2, and we refer readers to Remark 1 in Appendix E. Again, by choosing , we obtain the error rate in the function value of .
Non-convex Losses:
In this case, imposing a version of Assumption 5 on the size of , we have the following.
Consider Option II in Algorithm 1, and define as in (5). Suppose that Assumptions 1 and 6 hold, Assumption 5 holds with replaced by , and for some . Choose step-size . Then, with probability at least , after parallel iterations, we have
The proof of Theorem 6 is similar to that of Theorem 3; see Remark 1 in Appendix E. By choosing with , we again achieve the statistical rate .
3 Comparisons
We compare the performance guarantees of the above two robust distribute GD algorithms. The trimmed-mean-based algorithm achieves the statistical error rate , which is order-optimal for strongly convex loss. In comparison, the rate of the median-based algorithm is , which has an additional term and is only optimal when . In particular, the trimmed-mean-based algorithm has better rates when each worker machine has small local sample size—the rates are meaningful even in the extreme case . On the other hand, the median-based algorithm requires milder tail/moment assumptions on the loss derivatives (bounded skewness) than its trimmed-mean counterpart (sub-exponentiality). Finally, the trimmed-mean operation requires an additional parameter , which can be any upper bound on the fraction of Byzantine machines in order to guarantee robustness. Using an overly large may lead to a looser bound and sub-optimal performance. In contrast, median-based GD does not require knowledge of . We summarize these observations in Table 1. We see that the two algorithms are complementary to each other, and our experiment results corroborate this point.
Robust One-round Algorithm
As mentioned, in our distributed computing framework, the communication cost is proportional to the number of parallel iterations. The above two GD algorithms both require a number iterations depending on the desired accuracy. Can we further reduce the communication cost while keeping the algorithm Byzantine-robust and statistically optimal?
A natural candidate is the so-called one-round algorithm. Previous work has considered a standard one-round scheme where each local machine computes the empirical risk minimizer (ERM) using its local data and the master machine receives all workers’ ERMs and computes their average (Zhang et al., 2012). Clearly, a single Byzantine machine can arbitrary skew the output of this algorithm. We instead consider a Byzantine-robust one-round algorithm. As detailed in Algorithm 2, we employ the coordinate-wise median operation to aggregate all the ERMs.
The loss function is quadratic if it can be written as
where , , and , and are drawn from the distributions , , and , respectively.
Denote by , , and the expectations of , , and , respectively. Thus the population risk function takes the form .
We need a technical assumption which guarantees that each normal worker machine has unique ERM.
With probability , the empirical risk minimization function on each normal machine is strongly convex.
Note that this assumption is imposed on , rather than on the individual loss associated with a single data point. This assumption is satisfied, for example, when all ’s are strongly convex, or in the linear regression problems with the features drawn from some continuous distribution (e.g. isotropic Gaussian) and . We have the following guarantee for the robust one-round algorithm.
for some , where is a quantity that depends on , , and is monotonically decreasing in . Then, with probability at least , the output of the robust one-round algorithm satisfies
where is defined as in (4) and
with and drawn from and , respectively.
We prove Theorem 7 and provide an explicit expression of in Appendix F. In terms of the dependence on , , and , the robust one-round algorithm achieves the same error rate as the robust gradient descent algorithm based on coordinate-wise median, i.e., , for quadratic problems. Again, this rate is optimal when . Therefore, at least for quadratic loss functions, the robust one-round algorithm has similar theoretical performance as the robust gradient descent algorithm with significantly less communication cost. Our experiments show that the one-round algorithm has good empirical performance for other losses as well.
Lower Bound
In this section, we provide a lower bound on the error rate for strongly convex losses, which implies that the term is unimprovable. This lower bound is derived using a mean estimation problem, and is an extension of the lower bounds in the robust mean estimation literature such as Chen et al. (2015), Lai et al. (2016).
We consider the problem of estimating the mean of some random variable , which is equivalent to solving the following minimization problem:
Note that this is a special case of the general learning problem (1). We consider the same distributed setting as in Section 4, with a minor technical difference regarding the Byzantine machines. We assume that each of the worker machines is Byzantine with probability , independently of each other. The parameter is therefore the expected fraction of Byzantine machines. This setting makes the analysis slightly easier, and we believe the result can be extended to the original setting.
In this setting we have the following lower bound.
Consider the distributed mean estimation problem in (6) with Byzantine failure probability , and suppose that is Gaussian distribution with mean and covariance matrix . Then, any algorithm that computes an estimation of the mean from the data has a constant probability of error .
We prove Observation 1 in Appendix G. According to this observation, we see that the dependence cannot be avoided, which in turn implies the order-optimality of the results in Theorem 1 (when ) and Theorem 4.
Experiments
We conduct experiments to show the effectiveness of the median and trimmed mean operations. Our experiments are implemented with Tensorflow (Abadi et al., 2016) on Microsoft Azure system. We use the MNIST (LeCun et al., 1998) dataset and randomly partition the 60,000 training data into subsamples with equal sizes. We use these subsamples to represent the data on machines.
In the first experiment, we compare the performance of distributed gradient descent algorithms in the following four settings: 1) (no Byzantine machines), using vanilla distributed gradient descent (aggregating the gradients by taking the mean), 2) , using vanilla distributed gradient descent, 3) , using median-based algorithm, and 4) , using trimmed-mean-based algorithm. We generate the Byzantine machines in the following way: we replace every training label on these machines with , e.g., is replaced with , is replaced with , etc, and the Byzantine machines simply compute gradients based on these data. We also note that when generating the Byzantine machines, we do not simply add extreme values in the features or gradients; instead, the Byzantine machines send messages to the master machine with moderate values.
We train a multi-class logistic regression model and a convolutional neural network model using distributed gradient descent, and for each model, we compare the test accuracies in the aforementioned four settings. For the convolutional neural network model, we use the stochastic version of the distributed gradient descent algorithm; more specifically, in every iteration, each worker machine computes the gradient using of its local data. We periodically check the test errors, and the convergence performances are shown in Figure 1. The final test accuracies are presented in Tables 2 and 3.
As we can see, in the adversarial settings, the vanilla distributed gradient descent algorithm suffers from severe performance loss, and using the median and trimmed mean operations, we observe significant improvement in test accuracy. This shows these two operations can indeed defend against Byzantine failures.
In the second experiment, we compare the performance of distributed one-round algorithms in the following three settings: 1) , mean aggregation, 2) , mean aggregation, and 3) , median aggregation. In this experiment, the training labels on the Byzantine machines are i.i.d. uniformly sampled from , and these machines train models using the faulty data. We choose the multi-class logistic regression model, and the test accuracies are presented in Table 4.
As we can see, for the one-round algorithm, although the theoretical guarantee is only proved for quadratic loss, in practice, the median-based one-round algorithm still improves the test accuracy in problems with other loss functions, such as the logistic loss here.
Conclusions
In this paper, we study Byzantine-robust distributed statistical learning algorithms with a focus on statistical optimality. We analyze two robust distributed gradient descent algorithms — one is based on coordinate-wise median and the other is based on coordinate-wise trimmed mean. We show that the trimmed-mean-based algorithm can achieve order-optimal error rate, whereas the median-based algorithm can achieve under weaker assumptions. We further study learning algorithms that have better communication efficiency. We propose a simple one-round algorithm that aggregates local solutions using coordinate-wise median. We show that for strongly convex quadratic problems, this algorithm can achieve error rate, similar to the median-based gradient descent algorithm. Our experiments validates the effectiveness of the median and trimmed mean operations in the adversarial setting.
D. Yin is partially supported by Berkeley DeepDrive Industry Consortium. Y. Chen is partially supported by NSF CRII award 1657420 and grant 1704828. K. Ramchandran is partially supported by NSF CIF award 1703678 and Gift award from Huawei. P. Bartlett is partially supported by NSF grant IIS-1619362. Cloud computing resources are provided by a Microsoft Azure for Research award.
References
Appendix
Appendix A Variance, Skewness, and Sub-exponential Property
We use the simplified notation . One can directly compute the gradients:
Define with its -th element being . We now compute the variance and absolute skewness of .
Then we proceed to bound . By Jensen’s inequality, we know that
We first find a lower bound for . According to (8), we know that
where in the last inequality we use the moments of Gaussian random variables. Then, we compute the first term in (15). By algebra, one can obtain
A.2 Example of Regression with Gaussian Features
with some . Assume that the elements of are i.i.d. samples of standard Gaussian distribution, and that the noise is independent of and drawn from Gaussian distribution . Define the quadratic loss function . Then, we have
We use the same simplified notation as in Appendix A.1. One can also see that (7) still holds for in the Gaussian setting. Thus,
Then we proceed to bound . By Jensen’s inequality, we know that
We first find a lower bound for . According to (18), we know that
Define the , , and as in (10), (11), and (12). We can also see that (13) still holds, and thus
where in the last inequality we use the moments of Gaussian random variables. Then, we compute the first term in (22). By algebra, one can obtain
A.3 Proof of Proposition 2
We use the same notation as in Appendix A.1. We have
Appendix B Proof of Theorem 1
The proof of Theorem 1 consists of two parts: 1) the analysis of coordinate-wise median estimator of the population gradients, and 2) the convergence analysis of the robustified gradient descent algorithm.
Recall that at iteration , the master machine sends to all the worker machines. For any normal worker machine, say machine , the gradient of the local empirical loss function is computed and returned to the center machine, while the Byzantine machines, say machine , the returned message can be arbitrary or even adversarial. The master machine then compute the coordinate-wise median, i.e.,
The following theorem provides a uniform bound on the distance between and .
and the coordinate-wise median of :
Suppose that Assumptions 1, 2, and 3 hold, and inequality (2) is satisfied with some . Then, we have with probability at least ,
for all , where is defined as in (4).
Then, we proceed to analyze the convergence of the robust distributed gradient descent algorithm. We condition on the event that the bound in (27) is satisfied for all . Then, in the -th iteration, we define
Thus, we have . By the property of Euclidean projection, we know that
Since is -strongly convex, by the co-coercivity of strongly convex functions (see Lemma 3.11 in Bubeck et al. (2015) for more details), we obtain
where in the second inequality we use the fact that . Using the fact , we get
Then we can complete the proof by iterating (31).
The proof of Theorem 8 relies on careful analysis of the median of means estimator in the presence of adversarial data and a covering net argument.
for some . Then, with probability at least , we have
where is defined as in (4).
We further define the distribution function of all the machines as . We have the following direct corollary on and the median of means estimator .
Suppose that condition (32) is satisfied. Then, with probability at least , we have,
Thus, we have with probability at least ,
We use the symbol to denote the partial derivative of any function with respect to its -th argument. We also use the simplified notation , and . Then, according to Lemma 1, when (32) is satisfied, for any fixed and , we have with probability at least ,
Further, according to Corollary 1, we know that with probability ,
Here, the inequality (42) gives a bound on the accuracy of the median of means estimator for the gradient at any fixed and any coordinate . To extend this result to all and all the coordinates, we need to use union bound and a covering net argument.
Again, by gathering all the coordinates we get
where we use the fact that . Then, by Assumption 2 and 3, we further obtain
where we use the fact that . Combining (43) and (46), we conclude that for any , with probability at least , (46) holds for all . We simply choose , and . Then, we know that with probability at least , we have
B.2 Proof of Lemma 1
We recall the Berry-Esseen Theorem (Berry, 1941, Esseen, 1942, Shevtsova, 2014) and the bounded difference inequality, which are useful in this proof.
where and is the cumulative distribution function of the standard normal random variable.
Let be i.i.d. random variables, and assume that , where satisfies that for all and all ,
on the draw of , with probability at least . Let be such that , and . Then, by union bound, we know that with probability at least , and . The next step is to choose and . According to Theorem 9, we know that
and thus, it suffices to find such that
By mean value theorem, we know that there exists such that
Suppose that for some fix constant , we have
Then, we know that , and thus we have
For simplicity, let . We conclude that with probability , we have
Appendix C Proof of Theorem 2
Since Theorem 8 holds without assuming the convexity of , when is non-strongly convex, the event that (27) holds for all still happens with probability at least . We condition on this event. We first show that when Assumption 4 is satisfied and we choose , the iterates stays in without using projection. Namely, define
for , then for all . To see this, we have
where the inequality is due to the co-coercivity of convex functions. Thus, we get
and since , according to Assumption 4 we know that for all . Then, we proceed to study the algorithm without projection. Here, we define for .
Using the smoothness of , we have
Since and , by simple algebra, we obtain
Condition on the event that (27) holds for all . When is convex, by running parallel iterations, there exists such that
We first notice that since , we have for all . According to the first order optimality of convex functions, for any ,
Suppose that there exists such that . Then we have
Otherwise, for all , . Then, according to (49) and (50), we have for all ,
Multiplying both sides by and rearranging the terms, we obtain
Then, we obtain using the fact that . ∎
Next, we show that . More specifically, let be the first time that , and we show that for any , . If this statement is not true, then we let be the first time that . Then there must be . According to (49), there should also be
Then according to (49), this implies , which contradicts with the fact that .
Appendix D Proof of Theorem 3
Since Theorem 8 holds without assuming the convexity of , when is non-convex, the event that (27) holds for all still happens with probability at least . We condition on this event. We first show that when Assumption 5 is satisfied and we choose , the iterates stays in without using projection. Since we have
Then, we know that by running parallel iterations, using Assumption 5, we know that for without projection.
We proceed to study the convergence rate of the algorithm. By the smoothness of , we know that when choosing , the inequality (49) still holds. More specifically, for all ,
Sum up (51) for . Then, we get
Appendix E Proof of Theorem 4
The proof of Theorem 4 consists of two parts: 1) the analysis of coordinate-wise trimmed mean of means estimator of the population gradients, and 2) the convergence analysis of the robustified gradient descent algorithm. Since the second part is essentially the same as the proof of Theorem 1, we mainly focus on the first part here.
and the coordinate-wise trimmed mean of :
Suppose that Assumptions 1 and 6 are satisfied, and that . Then, with probability at least ,
The rest of the proof is essentially the same as the proof of Theorem 1. In fact, we essentially analyze a gradient descent algorithm with bounded noise in the gradients. In the proof of Theorem 1 in Appendix B. The bound on the noise in the gradients is
while here we replace with :
and the same analysis can still go through. Therefore, we omit the details of the analysis here.
The same arguments still go through when the population risk function is non-strongly convex or non-convex. One can simply replace the bound on the noise in the gradients in Theorems 2 and 3 with here. Thus we omit the details here.
Suppose that the one dimensional samples on all the normal machines are i.i.d. -sub-exponential with mean . Then, we have for any ,
and when , , and , we have
Lemma 3 can be directly applied to the -th partial derivative of the loss functions. Since we assume that for any and , is -sub-exponential, we have for any , ,
and consequently with probability at least
hold for all . This implies that for all and ,
The proof is completed by choosing ,
and using the fact that .
E.2 Proof of Lemma 3
We first recall Bernstein’s inequality for sub-exponential random variables.
Suppose that are i.i.d. -sub-exponential random variables with mean . Then for any ,
Similarly, for any , and any
We proceed to analyze the trimmed mean of means estimator. To simplify notation, we define as the set of all normal worker machines, as the set of all untrimmed machines, and as the set of all trimmed machines. The trimmed mean of means estimator simply computes
We also know that . In addition, since , without loss of generality, we assume that , and then . Then we directly obtain the desired result.
Appendix F Proof of Theorem 7
Since the loss functions are quadratic, we denote the loss function by
We further define , , and . Thus the empirical risk function on the -th machine is
Then, for any worker machine , . In addition, the population risk minimizer is . We further define , , , and . Then
Let be the -th vector in the standard basis, i.e., the -th column of the identity matrix. We proceed to study the distribution of the -th coordinate of , , i.e.,
Similar to the proof of Theorem 1, we need to obtain a Berry-Esseen type bound for . However, here, is not a sample mean of i.i.d. random variables, and thus we cannot directly apply the vanilla Berry-Esseen bound. Instead, we apply the following bound in Pinelis and Molzon (2016) on functions of sample means.
where , with
where denotes the Frobenius norm of matrices. We then provide the following lemma on .
Lemma 4 tells us that the condition (61) is satisfied with and . For all normal worker machine , denote the distribution of and by and , respectively. Since , Theorem 13 directly gives us the following lemma.
We have the following lemma on .
for some . Then, with probability at least , we have
where is defined as in (4).
The proof is essentially the same as the proof of Lemma 1. One can simply replace in Lemma 1 with and in Lemma 1 with . Then the same arguments still apply. Thus, we skip the details of this proof. ∎
Then, define . Using the same arguments as in Corollary 1, we know that
which implies that . Then, let
and , we have with probability at least ,
We complete the proof by choosing .
Let and and define
Then, , with where
F.1 Proof of Lemma 4
We use and to denote the operator norm and the Frobenius norm of matrices, respectively. We have the identity
Let us consider the set of matrices such that . One can check that for any such matrix, we have . Let
Denote the operator norm of matrices by . We further have for any ,
where we use the fact . In addition, for any ,
Then, we plug (71) and (72) into (70), and obtain
Appendix G Proof of Observation 1
We show that for two dimensional distributions and , there exist two dimensional distributions and such that
If this happens, then no algorithm can distinguish between and . Let and be the PDF of and , respectively. Let and be such that the total variation distance between and is
By the results of the total variation distance between Gaussian distributions, we know that
Let be the distribution with PDF and be the distribution with PDF . One can verify that (73) is satisfied. In this case, by the lower bound in (74), we get
This implies that for two Gaussian distributions such that , in the worst case it can be impossible to distinguish these two distributions due to the existence of the adversary. Thus, to estimate the mean of a Gaussian distribution in the distributed setting with fraction of Byzantine machines, any algorithm that computes an estimation of the mean has a constant probability of error .
Further, according to the standard results from minimax theory (Wu, 2017), we know that using data, there is a constant probability that . Combining these two results, we know that .