Title: ZENO++: ROBUST FULLY ASYNCHRONOUS

Abstract: We propose Zeno++, a new robust asynchronous Stochastic Gradient Descent (SGD) procedure which tolerates Byzantine failures of the workers. In contrast to previous work, Zeno++ removes some unrealistic restrictions on workerserver communications, allowing for fully asynchronous updates from anonymous workers, arbitrarily stale worker updates, and the possibility of an unbounded number of Byzantine workers. The key idea is to estimate the descent of the loss value after the candidate gradient is applied, where large descent values indicate that the update results in optimization progress. We prove the convergence of Zeno++ for non-convex problems under Byzantine failures. Experimental results show that Zeno++ outperforms existing approaches.

1. INTRODUCTION:

Synchronous training and asynchronous training are the two most common paradigms of distributed machine learning. On the one hand, synchronous training requires, periodically, the global updates at the server to be blocked until all the workers respond. In contrast, for asynchronous training, the server updates the global model immediately after a worker responds. Theoretical and experimental analysis (Dutta et al., 2018) suggests that synchronous training is more stable with less noise, but can also be slowed down by the global barrier across all the workers. Asynchronous training is generally faster, but needs to address instability and noisiness due to staleness. In this paper, we focus on asynchronous training.

We study the security of distributed asynchronous Stochastic Gradient Descent (SGD) in a centralized worker-server architecture, also known as the Parameter Server (or PS) architecture. In the PS architecture, there are server nodes and worker nodes. When combined with an asynchronous SGD approach, each worker pulls the global model from the servers, estimates the gradients using the local portion of the training data, then sends the gradient estimates to the servers. The servers update the model as soon as a new gradient is received from any worker.

The security of machine learning has gained increasing attention in recent years. In particular, tolerance to Byzantine failures (Blanchard et al., 2017; Chen et al., 2017; Yin et al., 2018; Feng et al., 2014; Su and Vaidya, 2016a; b; Xie et al., 2018b; Alistarh et al., 2018; Cao and Lai, 2018) has become an important topic in the distributed machine learning literature. Byzantine failures are well-studied for the distributed systems (Lamport et al., 1982a) . However, in distributed machine learning, Byzantine failures have unique properties. In brief, the goal of Byzantine workers is to prevent convergence of the model training. By construction, Byzantine failures (Lamport et al., 1982b ) assume the worst case, i.e., the Byzantine workers can behave arbitrarily. Such failures may be caused by a variety of reasons including but not limited to: hardware/software bugs, vulnerable communication channels, poisoned datasets, or malicious attackers. To make things worse, groups of Byzantine workers can collude, potentially resulting in more harmful attacks. It is also clear that as the worst case, Byzantine failures generalize benign failures such as hardware or software errors.

Unlike previous work (Damaskinos et al., 2018) , we tackle Byzantine tolerance in a more general scenario. The Byzantine tolerance of asynchronous SGD is challenging in this case because of:

• Asynchrony. The lack of synchrony incurs additional noise for the stochastic gradients. Such noise makes it more difficult to distinguish the Byzantine gradients from the benign ones, especially as Byzantine behavior may exacerbate staleness. • Unpredictable successive updates. The lack of synchronous scheduling makes it possible for the server to receive updates from Byzantine workers successively. Thus, even in the standard scenario, where less than half of the workers are Byzantine, the server can be suffocated by successive Byzantine gradients. • Unbounded number of Byzantine workers. For the Byzantine tolerance in fully asynchronous training, the assumption of a bounded number of Byzantine workers is meaningless. In Byzantinetolerant synchronous training (Blanchard et al., 2017; Chen et al., 2017; Yin et al., 2018; Xie et al., 2018b; a) , the servers can compare the candidate gradients with each other, and utilize the majority assumption to filter out the harmful gradients, or use robust aggregation to bound the error. However, such strategies are infeasible in asynchronous training, since there is nothing to compare to or aggregate. Aggregating the successive gradients is also meaningless since the successive gradients could all be pushed by the same Byzantine worker. Furthermore, although most of the previous work (Blanchard et al., 2017; Chen et al., 2017; Yin et al., 2018; Feng et al., 2014; Su and Vaidya, 2016a; b; Alistarh et al., 2018; Cao and Lai, 2018) assumes a majority of honest workers, this requirement is not guaranteed to be satisfied in practice.

The key idea of our approach is to estimate the descent of the loss value after the candidate gradient is applied to the model parameters, based on the Byzantine-tolerant synchronous SGD algorithm, Zeno (Xie et al., 2018b) . Intuitively, if the loss value decreases, the candidate gradient is likely to result in optimization progress. For computational efficiency, we also propose a lazy update.

To the best of our knowledge, this paper is the first to theoretically and empirically study Byzantinetolerant fully asynchronous SGD with anonymous workers, and potentially an unbounded number of Byzantine workers. In summary, our contributions are:

• We propose Zeno++, a new approach for Byzantine-tolerant fully asynchronous SGD with anonymous workers. • We show that Zeno++ tolerates Byzantine workers without any limit on either the staleness or the number of Byzantine workers. • We prove the convergence of Zeno++ for non-convex problems.

• Experimental results validate that 1) existing algorithms may fail in practical scenarios, and 2)

Zeno++ gracefully handles such cases.

2. RELATED WORK:

Most of the existing Byzantine-tolerant SGD algorithms focus on synchronous training. Chen et al. (2017) ; Su and Vaidya (2016a; b) ; Yin et al. (2018) ; Xie et al. (2018a) use robust statistics (Huber, 2011) including the geometric median, coordinate-wise median, and trimmed mean as Byzantinetolerant aggregation rules. Blanchard et al. (2017) ; Mhamdi et al. (2018) propose Krum and its variants, which select the candidates with minimal local sum of Euclidean distances. Alistarh et al. (2018) utilize historical information to identify harmful gradients. Chen et al. (2018) use coding theory and majority voting to recover correct gradients. Most of these synchronous algorithms assume that most of the workers are non-Byzantine. However, in practice, there are no guarantees that the number of Byzantine workers can be controlled. Xie et al. (2018b) ; Cao and Lai (2018) propose synchronous SGD algorithms for an unbounded number of Byzantine workers.

Recent years have witnessed an increasing number of large-scale machine learning algorithms, including asynchronous SGD (Zinkevich et al., 2009; Lian et al., 2018; Zheng et al., 2017; Zhou et al., 2018) . Damaskinos et al. (2018) proposed Kardam, which to our knowledge is the only prior work to address Byzantine-tolerant asynchronous training. Kardam utilizes the Lipschitzness of the gradients to filter out outliers. However, Kardam assumes a threat model much weaker than ours. The major differences in the threat model are listed as follows:

• Verification of worker identity. Unlike Kardam, we do not require verifying the identities of the workers when the server receives gradients. Kardam uses the so-called empirical Lipschitz coefficient, to test the benignity of the gradient sent by a specific worker. Such a mechanism keeps the record of the empirical Lipschitz coefficient of each worker. Thus, whenever a gradient is received, the Kardam server must be able to identify the identity/index of the worker. However, since Byzantine workers can behave arbitrarily, they can fake their identities/indices when sending gradients to the servers. Thus, Kardam assumes a threat model much weaker than the traditional Byzantine failure/threat model. Note that for synchronous training, the server can partially counter the index spoofing attack by simply filtering out all the gradients with duplicated indices. However, such an approach is infeasible for asynchronous training. • Bounded staleness of workers/limit of successive gradients. Unlike Kardam, we do not require bounded staleness of the workers. Kardam requires that the number of gradients successively received from a single worker is bounded above. To be more specific, on the server, any sequence of successively received gradients of length 2q + 1 must contain at least q + 1 gradients from honest workers. However, in real-world asynchronous training, such an assumption is very difficult to satisfy. • A majority of honest workers. Unlike Kardam, we do not require a majority of honest workers.

Kardam requires that the number of Byzantine workers is less than one-third of the total number of workers -much stronger restriction than the standard setting that allows for the number of Byzantine workers to be up to 50% of the total number of workers. Zeno++ further extends this guarantee to allow for not only 50%, but also a majority of Byzantine workers.

3. MODEL:

We consider the following optimization problem:

min x∈R d F (x), where F (x) = 1 m i∈[m] E zi∼Di f (x; z i ), for ∀i ∈ [m]

, z i is sampled from the local data D i on the ith device. We solve this problem in a distributed manner with m workers. Each worker trains the model on local data. In each iteration, the ith worker will sample n independent data points from the dataset D i , and compute the gradient of the local empirical loss

F i (x) = 1 n n j=1 f (x; z i,j ), ∀i ∈ [m]

, where z i,j ∼ D i is the jth sampled data on the ith worker. When there are no Byzantine failures, the servers update the model whenever a new gradient is received:

x t+1 = x t -γ t g τ , g τ = 1 n j∈[n] ∇f (x τ ; z i,j ), τ ≤ t, i ∈ [m].

When there are Byzantine failures, g τ can be replaced by arbitrary value (Damaskinos et al., 2018) . Formally, we define the threat model as follows.

Definition 1. (Threat Model). When the server receives a gradient estimator gτ , it is either correct or Byzantine. If sent by a Byzantine worker, gτ is assigned arbitrary value. If sent by an honest worker, the correct gradient is

1 n n j=1 ∇f (x τ ; z i,j ), τ ≤ t, i ∈ [m]

. Thus, we have gτ = arbitrary value, if sent by a Byzantine worker,

1 n n j=1 ∇f (x τ ; z i,j ), τ ≤ t, i ∈ [m],

otherwise. We assume that q out of m workers are Byzantine, where q ≤ m. Furthermore, the indices of Byzantine workers can change across different iterations. 

4. METHODOLOGY:

In this section, we introduce Zeno++, a Byzantine-tolerant asynchronous SGD algorithm based on inner-product validation. Zeno++ is a computationally efficient version of its prototype: Zeno+.

4.1. ZENO+:

Like Zeno (Xie et al., 2018b) , we compute a score for each candidate gradient estimator by using the stochastic zero-order oracle. However, in contrast to the existing synchronous SGD with majority-based aggregation methods, we need a hard threshold to decide whether a gradient is accepted, as sorting is not meaningful in asynchronous settings. This descent score is described next. Definition 2. (Stochastic Descent Score (Xie et al., 2018b )) Denote f s (x) = 1 ns ns j=1 f (x; z j ), where z j 's are i.i.d. samples drawn from S, where S = D i , ∀i ∈ [m], and n s is the batch size of f s (•). For any gradient estimator (correct or Byzantine) g, model parameter x, learning rate γ, and a constant weight ρ > 0, we define its stochastic descent score as follows:

Score γ,ρ (g, x) = f s (x) -f s (x -γg) -ρ g 2 .

Remark 1. Note that we assume that the dataset S for computing f s (•) is different from the training dataset, e.g., can be a separated validation dataset. In other words,

S = D 1 = • • • = D m = ∪ m i=1 D i .

The score defined in Definition 2 is composed of two parts: the estimated descent of the loss function, and the magnitude of the update. The score increases when the estimated descent of the loss function, f s (x) -f s (x -γg), gets larger. We penalize the score by -ρ g 2 , so that the change of the model parameter will not be too large. A large descent suggests faster convergence. Observe that even when a gradient is Byzantine, a small magnitude indicates that it will be less harmful to the model.

Using the stochastic descent score, we can set a hard threshold parameterized by to filter out candidate gradients with relatively small scores. The detailed algorithm is outlined in Algorithm 1.

Algorithm 1 Zeno+:

Server:

1: x 0 ← rand(), t ← 1 Initialization 2: repeat 3: Randomly sample z j ∼ S, ∀j ∈ [n s ] to compute f s (Note: S = D 1 = • • • = D m ) 4:

Receive g from an arbitrary worker 5:

Normalize g = cg such that g 2 = ∇f s (x t-1 ) 2 , c > 0 6: if Score γ,ρ (g, x t-1 ) ≥ -γ then 7: x t ← x t-1 -γg, t ← t + 1 8:

end if 9: until Convergence Worker i = 1, . . . , m:

1: function WORKER (HONEST) 2: repeat 3: Pull x τ from the server 4: Draw random samples z i,j ∼ D i , ∀j ∈ [n], compute g ← 1 n j∈[n] ∇f (x τ ; z i,j ) 5:

Push g to the server 6:

until Convergence 7: end function

4.2. ZENO++:

Calculating the stochastic descent score for every candidate gradient can be computationally expensive. To reduce the computation overhead, we approximate it by its first-order Taylor's expansion. Definition 3. (Approximated Stochastic Descent Score) Denote f s (x) = 1 ns ns j=1 f (x; z j ), where z j 's are i.i.d. samples drawn from S, where S = D i , ∀i ∈ [m], and n s is the batch size of f s (•). For any gradient estimator (correct or Byzantine) g, model parameter x, learning rate γ, and a constant weight ρ > 0, we approximate its stochastic descent score as follows:

Score γ,ρ (g, x) ≈ γ ∇f s (x), g -ρ g 2 .

In brief, Zeno++ is a computationally efficient version of Zeno+ which uses this approximated stochastic descent score, combined with lazy updates. The detailed algorithm is shown in Algorithm 2.

Compared to Zeno, we highlight several new techniques in Zeno++ (Algorithm 2), specially designed for asynchronous training: 1) re-scaling the candidate gradient (Line 6); 2) first-order Taylor's expansion (Line 7); 3) hard threshold instead of comparison with the others (Line 7); 4) lazy update for reducing the computation overhead (Line 9).

Before moving forward, we wish to highlight several practical remarks for Zeno++:

• Preparing the validation dataset for Zeno++: The dataset S used for calculating v (the validation gradient of Zeno++) can be collected in many ways. It can be a separate validation dataset provided by a trusted third party. Another reasonable choice is that, a group of trusted workers can upload local data perturbed by additional noise (to help protect the users' privacy). Typically, the validation dataset is small and different from the training dataset, thus can only be used to validate the gradients, and cannot be directly used for training, as shown in Section 6.

• Scheduling ZenoU pdater(x): ZenoU pdater(x) updates v in the background. It will only be triggered when the global model x t is updated and the server is idle. Another scheduling strategy is to trigger ZenoU pdater(x) after every k iterations. Thus, k is the upper bound of the delay of v. A reasonable choice is k = m, so that ideally v is updated after all the m workers respond.

• Computational efficiency: We can reduce the computation overhead of the Zeno++ server by decreasing the mini-batch size n s , or the frequency of the activation of ZenoU pdater(x).

However, doing so will potentially incur larger noise for v, which makes a trade-off.

Algorithm 2 Zeno++:

Server:

1: x 0 ← rand(), t ← 1 Initialization 2: repeat 3: repeat 4:

Receive g from an arbitrary worker 5:

Read v with lock (v may be from an old version of

x: v = ∇f s (x τ ), τ ≤ t -1) 6: Normalize g = cg such that g 2 = v 2 , c > 0 7: until γ v, g -ρ g 2 ≥ -γ 8: x t ← x t-1 -γg, t ← t + 1 9:

Lazy update of v: Run non-blocking ZenoU pdater(x t ), if idle, or after every k iterations 10: until Convergence 

5. THEORETICAL GUARANTEES:

In this section, we prove the convergence of Zeno++ (Algorithm 2) under Byzantine failures. We start with definitions used in the convergence analysis. Definition 4. (Smoothness) Differentiable f (x) satisfies L-smoothness if there exists L > 0 such that ∀x, y, f (y) -f (x) ≤ ∇f (x; z), y -x + L 2 y -x 2 . Definition 5. (Polyak-Łojasiewicz (PL) inequality) Differentiable f (x) satisfies the PL inequality (Polyak, 1963) if there exists µ > 0, such that ∀x:

f (x) -f (x * ) ≤ 1 2µ ∇f (x) 2 .

5.1. CONVERGENCE GUARANTEES:

We prove the convergence of Algorithm 2 for non-convex problems with the following assumption. Assumption 1. (Bounded server delay) For Zeno++, we assume that the delay of the validation gradient v is upper-bounded. Without loss of generality, suppose the current model is x t , and v = ∇f s (x τ ), where τ ≤ t. We assume that for ∀t, t -τ ≤ k.

Remark 2. Zeno++ does not require bounded delay for the workers. The bounded delay requirement in Assumption 1 is only for the validation gradient v on the server, not for the workers.

We first analyze the convergence of functions that satisfy the PL inequality. Theorem 1. Assume that F (x) and f s (x) are L-smooth and satisfy the PL inequality. Assume that for ∀x, the correct gradients and validation gradients are upper-bounded:

∇F (x) 2 ≤ V 1 , ∇f s (x) 2 ≤ V 1

, and the validation gradients are always non-zero and lower-bounded:

∇f s (x) 2 ≥ V 2 , where 0 < V 2 ≤ V 1 .

Furthermore, we assume that the validation set is close to the training set, which implies bounded variance:

EQUATION

2µV2 , after T global updates, Algorithm 2 converges to a global optimum:

E [F (x T ) -F (x * )] ≤ (1 -α √ γ) T [F (x 0 ) -F (x * )] + √ γ α O(k 2 V 1 + V 3 + ).

Remark 3. The assumption of the lower bounded gradient ∇f s (x) 2 ≥ V 2 is necessary. We need ∇f s (x) = 0, so that the normalization in Line 6 and inner product in Line 7 of Algorithm 2 are feasible. In practice, if we have a mini-batch with zero gradient ∇f s (x) = 0 on server, we can simply draw additional samples and add them to the mini-batch, until such gradient is non-zero.

For general smooth but non-convex functions, we have the following convergence guarantee. Theorem 2. Assume that F (x) and f s (x) are L-smooth and potentially non-convex. Assume that for ∀x, the true gradients and validation gradients are upper-bounded:

∇F (x) 2 ≤ V 1 , ∇f s (x) 2 ≤ V 1

, and the validation gradients are always non-zero and lower-bounded:

∇f s (x) 2 ≥ V 2 , where 0 < V 2 ≤ V 1 .

Furthermore, we assume that the validation set is close to the training set, which implies bounded variance:

E ∇f s (x) -∇F (x) 2 ≤ V 3 , ∀x. Taking γ < min(1, 1 L ) and ρ ≥ α √ γV1

V2 , after T global updates, Algorithm 2 converges to a critical point:

E t∈[T ] ∇F (x t-1 ) 2 T ≤ E [F (x 0 ) -F (x * )] α √ γT + √ γ α O(k 2 V 1 + V 3 + ).

Furthermore, if we take γ = 1 LT , then we have

E[ t∈[T ] ∇F (xt-1) 2 ] T ≤ O 1 α √ T .

Remark 4. ρ controls the trade-off between the acceptance ratio and the convergence rate. Large positive ρ makes the convergence faster, but fewer candidate gradients pass the test of Zeno++. Small positive ρ increases the acceptance ratio, but may also potentially slow down the convergence or incur larger variance. We use α > 0 to bridge ρ to the convergence rate and the variance. Larger α makes ρ larger, which improves the convergence rate, but also enlarges the variance. Using non-zero potentially results in negative thresholds, which enlarges the acceptance ratio, but also increases the false negative ratio (the ratio of Byzantine gradients that are not filtered out by Zeno++).

6. EXPERIMENTS:

In this section, we evaluate the proposed algorithm, Zeno++. Note that we do not evaluate the prototype algorithm Zeno+, since its computation overhead is too large for practical settings. Due to the space limitation, zoomed figures and additional experiments (including evaluation on an additional label-flipping attack, and testing the sensitivity to hyperparameters) are presented in the appendix.

6.1. DATASETS AND EVALUATION METRICS:

We conduct experiments on the benchmark CIFAR-10 image classification dataset (Krizhevsky and Hinton, 2009) , which is composed of 50k images for training and 10k images for testing. We use a convolutional neural network (CNN) with 4 convolutional layers followed by 2 fully connected layers. The detailed network architecture can be found in our submitted source code (will be released upon publication). In the 50k images for training, we randomly extracted 2.5k of them as the validation set for Zeno++, the remaining are randomly partitioned onto all the workers. In each experiment, we launch 10 worker processes. We repeat each experiment 10 times and take the average. Each experiment is composed of 200 epochs, where each epoch is a full pass of the training dataset. We simulate asynchrony by drawing random delay from a uniform distribution in the range of [0, k w ],

where k w is the maximum worker delay (different from the maximum server delay k of Zeno++).

We use top-1 accuracy on the testing set and the cross-entropy loss function on the training set as the evaluation metrics. We also report the false positive rate (FP), which is the ratio of correct gradients that are recognized as Byzantine and filtered out by Zeno++ or the Kardam baseline.

6.1.1. BASELINES:

We use the asynchronous SGD without failures/attacks as the gold standard, which is referred to as AsyncSGD without attack. Since Kardam is the only previous work on Byzantine-tolerant asynchronous SGD, we use it as the baseline.

One may conjecture that Zeno++ is analogous to training on the validation data. To explore this, we consider training only on S -assumed to be clean data on the server, i.e., update the model only using v = ∇f s (x) on the server, without using any workers. We call this baseline Server-only. We fine-tune the learning rate and show the best results of Server-only.

6.2. NO ATTACK:

We first test the convergence when there are no attacks. In all the experiments, we take the learning rate γ = 0.1, mini-batch size n = n s = 128, ρ = 0.002, = 0.1, k = 10. For Kardam, we take q = 2 (i.e. here Kardam assumes that there are 2 Byzantine workers). The result is shown in Figure 1 . Zeno++ converges a little bit slower than AsyncSGD, but faster than Kardam, especially when the worker delay is large. When k w = 10, Zeno++ converges much faster than Kardam. Server-only performs badly on both training and testing data. 

6.3. SIGN-FLIPPING ATTACK:

We test the Byzantine-tolerance to the "sign-flipping" attack, which was proposed in Damaskinos et al. (2018) . In such attacks, the Byzantine workers send -10∇f (x) instead of the correct gradient ∇f (x) to the server. In all the experiments, we take the learning rate γ = 0.1, mini-batch size n = n s = 128, ρ = 0.002, = 0.1, k = 10. The result is shown in Figure 2 , with different number of Byzantine workers q. It is shown that when q = 4, Zeno++ converges slightly slower than AsyncSGD without attacks, and much faster than Kardam. Actually, we observe that Kardam fails to make progress when the worker delay is large. When the number of Byzantine workers gets larger (q = 8), the convergence of Zeno++ gets slower, but it still makes reasonable progress, while AsyncSGD and Kardam fail. Note that Kardam performs even worse than Server-only, which means that Kardam is not even as good as training on a single honest worker. Thus, when there are Byzantine workers, distributed training with Kardam is meaningless.

6.4. DISCUSSION:

Kardam performs surprisingly badly in our experiments. The experiments in Damaskinos et al. (2018) focus on dampening staleness when there are no Byzantine failures. For Byzantine tolerance, Damaskinos et al. (2018) only reports that Kardam filters out 100% of the Byzantine gradients, which matches the results in our experiments. However, we observe that in addition to filtering out 100% of the Byzantine gradients, Kardam also filters nearly 100% of the correct gradients. In Figure 2 , we For any correct gradient g, if selected to be Byzantine, g will be replaced by -10g. q ∈ {4, 8} out of the 10 workers are Byzantine. ρ = 0.002, = 0.1, k = 10 for Zeno++. FP refers to the fraction of false positive detect ions i.e. incorrect prediction that a message is Byzantine.

report that the false positive rate of Kardam is nearly 99%, which makes the convergence extremely slow. To make things worse, Kardam does not even perform as good as Server-only, which makes the distributed training with Kardam totally meaningless. One reason why Kardam performs badly is that we use a more general threat model in this paper, which does not guarantee an important assumption of Kardam, namely "any sequence of successively received gradients of length 2q + 1 must contain at least q + 1 gradients from honest workers". It is clear that this assumption is quite strong, as in an asynchronous setting, Byzantine workers can easily send long sequences of erroneous responses. Our approach does not depend on such a strong assumption.

In all the experiments, Zeno++ converges faster than the baselines when there are Byzantine failures.

Although the convergence of Zeno++ is slower than AsyncSGD when there are no attacks, we find that it provides a reasonable trade-off between security and convergence speed. In general, larger worker delay k w and more Byzantine workers q add more error and noise to the gradients, which slows down the convergence, because there are fewer valid gradients for the server to use. Zeno++ can filter out most of the harmful gradients at the cost of F P ≈ 50%.

Note that Server-only is an extreme case that only uses the server and the validation dataset to train the model in a non-distributed manner, which will not be affected by Byzantine workers. However, only using the validation data is not enough for training, as shown in Figure 1 . Similarly in practice, we can use a small dataset separated from the training data for cross-validation, but will never directly train the model only on such validation dataset. Furthermore, as shown in Figure 2 , Zeno++ performs much better than Server-only. Thus, we can draw to the conclusion that Zeno++ is efficiently training the model on the honest workers in a distributed manner, which is not equivalent to training on the validation dataset only.

On average, the server computes ns k = 12.8 gradients in each iteration, since the validation gradient v of Zeno++ is updated after every k = 10 iterations. Thus, the workload on the server is much smaller than a worker. Furthermore, since we can parallelize the workload on the server and workers, the computation overhead of v can be hidden, so that Zeno++ can benefit from distributed training.

7. CONCLUSION:

We propose a novel Byzantine-tolerant fully asynchronous SGD algorithm: Zeno++. The algorithm provably converges. Our empirical results show good performance compared to previous work. In future work, we will explore variations of our approach for other settings such as federated learning.

Appendix:



A PROOFS:

A.1 ZENO++

We first analyze the convergence of the functions whose gradients grow as a quadratic function of sub-optimality. Theorem 1. Assume that F (x) and f s (x) have L-smoothness and PL inequality (potentially nonconvex). Assume that for ∀x, the true gradients and stochastic gradients are upper-bounded:

∇F (x) 2 ≤ V 1 , ∇f s (x) 2 ≤ V 1 ,

and the stochastic gradients for Zeno testing are always non-zero and lower-bounded: ∇f s (x) 2 ≥ V 2 , where 0 < V 2 ≤ V 1 . Furthermore, we assume that the validation set is close to the training set, which implies bounded variance:

E ∇f s (x) -∇F (x) 2 ≤ V 3 , ∀x. Taking γ < min(1, 1 L ) and ρ ≥ α √ γV1

2µV2 , after T global updates, Algorithm 2 converges to a global optimum:

E [F (x T ) -F (x * )] ≤ (1 -α √ γ) T [F (x 0 ) -F (x * )] + √ γ α O(k 2 V 1 + V 3 + ).

Proof. If any gradient estimator g passes the test of Zeno++, then we have ∇f s (x τ ), -γg ≤ -ρ g 2 + γ , where τ ≤ t -1.

Thus, we have:

∇F (x t-1 ), -γg ≤ ∇F (x t-1 ) -∇f s (x τ ), -γg -ρ ∇f s (x τ ) 2 + γ ≤ -ρ V 2 V 1 ∇F (x t-1 ) 2 + γ 2 ∇F (x t-1 ) -∇f s (x τ ) 2 + γ 2 ∇f s (x τ ) 2 + γ ≤ -ρ V 2 V 1 ∇F (x t-1 ) 2 + γ ∇F (x τ ) -∇f s (x τ ) 2 + γ ∇F (x t-1 ) -∇F (x τ ) 2 + γ 2 V 1 + γ ≤ -ρ V 2 V 1 ∇F (x t-1 ) 2 + γV 3 + γ ∇F (x t-1 ) -∇F (x τ ) 2 + γ 2 V 1 + γ .

∇F (x t-1 ) -∇F (x τ ) 2 can be upper-bounded using L-smoothness and the bounded delay:

∇F (x t-1 ) -∇F (x τ ) 2 ≤ L 2 x t-1 -x τ 2 ≤ L 2 k 2 γ 2 V 1 . Again, using smoothness, taking ρ ≥ α √ γV1 2µV2 , we have E [F (x t ) -F (x * )] ≤ F (x t-1 ) -F (x * ) + ∇F (x t-1 ), -γE[g] + Lγ 2 2 E g 2 ≤ F (x t-1 ) -F (x * ) -ρ V 2 V 1 ∇F (x t-1 ) 2 + γV 3 + L 2 k 2 γ 3 V 1 + γ 2 V 1 + Lγ 2 V 1 + γ ≤ F (x t-1 ) -F (x * ) -ρ V 2 V 1 ∇F (x t-1 ) 2 + γO(k 2 V 1 + V 3 + ) ≤ 1 -2µρ V 2 V 1 [F (x t-1 ) -F (x * )] + γO(k 2 V 1 + V 3 + ) ≤ (1 -α √ γ) [F (x t-1 ) -F (x * )] + γO(k 2 V 1 + V 3 + ).

By telescoping and taking total expectation, after T global updates, we have

E [F (x T ) -F (x * )] ≤ (1 -α √ γ) T [F (x 0 ) -F (x * )] + √ γ α O(k 2 V 1 + V 3 + ).

Under review as a conference paper at ICLR 2020

For general smooth but non-convex functions, we have the following convergence guarantee.

Theorem 2. Assume that F (x) and f s (x) are L-smooth and potentially non-convex. Assume that for ∀x, the true gradients and stochastic gradients are upper-bounded: ∇F

(x) 2 ≤ V 1 , ∇f s (x) 2 ≤ V 1

, and the stochastic gradients for Zeno testing are always non-zero and lowerbounded: ∇f s (x) 2 ≥ V 2 , where 0 < V 2 ≤ V 1 . Furthermore, we assume that the validation set is close to the training set, which implies bounded variance:

EQUATION

V2 , after T global updates, Algorithm 2 converges to a critical point:

E t∈[T ] ∇F (x t-1 ) 2 T ≤ E [F (x 0 ) -F (x * )] α √ γT + √ γ α O(k 2 V 1 + V 3 + ).

Furthermore, if take γ = 1 LT , then we have

E t∈[T ] ∇F (x t-1 ) 2 T ≤ O 1 α √ T .

Proof. Similar to Theorem 1, we have

∇F (x t-1 ), -γg ≤ -ρ V 2 V 1 ∇F (x t-1 ) 2 + γO(k 2 V 1 + V 3 + ). Using smoothness, taking ρ ≥ α √ γV1 V2 , we have E [F (x t )] ≤ F (x t-1 ) + ∇F (x t-1 ), -γE[g] + Lγ 2 2 E g 2 ≤ F (x t-1 ) -ρ V 2 V 1 ∇F (x t-1 ) 2 + γO(k 2 V 1 + V 3 + ) ≤ F (x t-1 ) -α √ γ ∇F (x t-1 ) 2 + γO(k 2 V 1 + V 3 + ).

Thus, we have

∇F (x t-1 ) 2 ≤ E [F (x t-1 ) -F (x t )] α √ γ + √ γ α O(k 2 V 1 + V 3 + ).

By telescoping and taking total expectation, after T global updates, we have

E t∈[T ] ∇F (x t-1 ) 2 T ≤ E [F (x 0 ) -F (x * )] α √ γT + √ γ α O(k 2 V 1 + V 3 + ).

Furthermore, if we take γ = 1 LT , then we have

E t∈[T ] ∇F (x t-1 ) 2 T ≤ O 1 α √ T .

A.2 ZENO+ Theorem 3. Assume that F (x) and f s (x) have L-smoothness has µ-strong convexity. Assume that for ∀x, the true gradients and stochastic gradients are upper-bounded: ∇F (x) 2 ≤ V 1 , ∇f s (x) 2 ≤ V 1 , and the stochastic gradients for Zeno testing are always non-zero and lowerbounded: ∇f s (x) 2 ≥ V 2 , where 0 < V 2 ≤ V 1 . Furthermore, we assume that the validation set is close to the training set, which implies bounded variance: E ∇f s (x) -∇F (x) 2 ≤ V 3 , ∀x.

Taking γ < min(1, 1 L ) and ρ ≥ α √ γV1 2µV2 -µγ 2 2 , after T global updates, Algorithm 1 converges to a global optimum:

E [F (x T ) -f (x * )] ≤ (1 -α √ γ) T [F (x 0 ) -f (x * )] + √ γ α O(V 1 + V 3 + ).

Proof. Using µ-strong convexity, we have ∇f s (x), -γg + µγ 2 2 g 2 ≤ f s (x -γg) -f s (x) ≤ -ρ g 2 + γ .

Note that ∇fs(x) 2 ∇F (x) 2 ≥ V2 V1 . Thus, we have

∇f s (x), -γg ≤ -ρ + µγ 2 2 ∇f s (x) 2 + γ ≤ -ρ + µγ 2 2 V 2 V 1 ∇F (x) 2 + γ .

Then, we have ∇F (x), -γg = ∇f s (x), -γg + ∇F (x) -∇f s (x), -γg = ∇f s (x), -γg + γ ( ∇F (x) -∇f s (x) ), -g ≤ ∇f s (x), -γg + γ 2 ∇F (x) -∇f s (x) 2 + γ 2 g 2 .

Taking the expectation on both sides, we have

∇F (x), -γE[g] ≤ -ρ + µγ 2 2 V 2 V 1 ∇F (x) 2 + γ 2 (V 1 + V 3 ) + γ .

Using L-smoothness, conditional on x, we have

E [F (x -γg) -F (x)] ≤ ∇F (x), -γE[g] + Lγ 2 2 E g 2 ≤ -ρ + µγ 2 2 V 2 V 1 ∇F (x) 2 + γ 2 (V 1 + V 3 ) + Lγ 2 2 V 1 + γ ≤ -ρ + µγ 2 2 V 2 V 1 ∇F (x) 2 + γO(V 1 + V 3 + ).

Again, using µ-strong convexity, we have

F (x) -F (x * ) ≤ 1 2µ ∇F (x) 2 .

Thus, we have

E [F (x -γg) -f (x * )] ≤ 1 -2µ ρ + µγ 2 2 V 2 V 1 [F (x) -f (x * )] + γO(V 1 + V 3 + ).

Taking x t-1 = x, and x t = x -γg, we have

E [F (x t ) -f (x * )] ≤ 1 -2µ ρ + µγ 2 2 V 2 V 1 [F (x t-1 ) -f (x * )] + γO(V 1 + V 3 ) + . Take ρ ≥ α √ γV1 2µV2 -µγ 2 2 , we have E [F (x t ) -f (x * )] ≤ (1 -α √ γ) [F (x t-1 ) -f (x * )] + γO(V 1 + V 3 + ).

By telescoping and taking total expectation, after T global updates, we have

E [F (x T ) -f (x * )] ≤ (1 -α √ γ) T [F (x 0 ) -f (x * )] + 1 -(1 -α √ γ) T 1 -(1 -α √ γ) γO(V 1 + V 3 + ) ≤ (1 -α √ γ) T [F (x 0 ) -f (x * )] + √ γ α O(V 1 + V 3 + ).

B ADDITIONAL EXPERIMENTS B.1 NO ATTACK:

We first test the convergence when there are no attacks. In all the experiments, we take the learning rate γ = 0.1, mini-batch size n = n s = 128, ρ = 0.002, = 0.1, k = 10. For Kardam, we take 

:



Figures and Tables:

11: function ZENOUPDATER(x) 12: Randomly sample z j ∼ S, ∀j ∈ [n s ] to compute f s (Note: S = D 1 = • • • = D m ) 13: Write with lock: v ← ∇f s (x) = 1 ns ns j=1 ∇f (x; z j ) 14: end function Worker i = 1, . . . , m: z i,j ∼ D i , ∀j ∈ [n], compute g ← 1 n j∈[n] ∇f (x τ ; z i,j )

Cross entropy on training set, kw = 10.

Figure 1: Convergence without attacks, with different maximum worker delays k w . ρ = 0.002, = 0.1, k = 10 for Zeno++. FP refers to the fraction of false positive detect ions i.e. incorrect prediction that a message is Byzantine.

Cross entropy on training set, kw = 5, q = 8. Top-1 accuracy on testing set, kw = 15, q = 8. Cross entropy on training set, kw = 15, q = 8.

Figure2: Convergence with sign-flipping attacks with different maximum worker delays k w . For any correct gradient g, if selected to be Byzantine, g will be replaced by -10g. q ∈ {4, 8} out of the 10 workers are Byzantine. ρ = 0.002, = 0.1, k = 10 for Zeno++. FP refers to the fraction of false positive detect ions i.e. incorrect prediction that a message is Byzantine.

Figure 8: Number of global epochs to reach training loss value 0.2, with sign-flipping attacks and q = 4 Byzantine workers. k = 10 for Zeno++. ρ and varies.

Figure 9: Number of global epochs to reach training loss value 0.2, with sign-flipping attacks and q = 6 Byzantine workers. = 0 for Zeno++. ρ and k varies.

Figure 10: Number of global epochs to reach training loss value 0.7, with sign-flipping attacks and q ∈ {4, 8} Byzantine workers. ρ = 0.001, = 0, k = 15 for Zeno++. The batch size of Zeno++, n s , varies.

Notation Notation Description m, [m], q Number of workers, set of integers {1, . . . , m}, number of Byzantine workers Di, S Di is the training dataset on the ith worker, S is the validation dataset on Zeno++ server

Table content: <table/>

Peer review (iclr2020):
This paper proposes an approach to Byzantine fault tolerance in asynchronous distributed SGD. The approach appears to be novel. Theoretical convergence guarantees are provided, and an empirical evaluation illustrates very promising results. Overall, the paper is well-written and the results appear to be novel and interesting. Although I have a few questions, listed below, I generally lean towards accepting this paper. The assumption of a lower bound on validation gradients is somewhat troubling, especially for over-parameterized problems where so-called *interpolation* may be possible. I realize that validation samples are never used explicitly for stochastic gradient updates, but the algorithm does ensure that the stochastic gradients used are similar to gradients of validation samples. If one is converging to a (local) minimizer, one wants the gradient to vanish. How do we reconcile these points? Also, to properly set , for the theory to be valid, one needs to know this bound (or a lower bound on ). Is this practical? The paper claims that the computational overhead of Zeno+ is too great to evaluate for comparison with Zeno++. From my reading of the two methods, it isn*t immediately obvious to me why this is the case. Including experiments which at least compare the per-iteration runtime (even if not running Zeno+ for training to completion) would make the paper more compelling. After all, Zeno++ still involves periodically evaluating the gradient at a validation sample. The paper makes the reasonable point that it is not reasonable to assume a bounded number of adversaries in the asynchronous setting, and the theorem statements make no assumption about the number of adversaries or rate at which received gradients are from a Byzantine worker. However, there are also no guarantees about whether the algorithm will ever make progress (i.e., will line 8 ever be reached?). This should be stated more transparently in the paper. Also, I was wondering, given that a gradient has been computed on the parameter server*s validation set, which is assumed to be *clean*, why not take a step using this gradient when the test in line 7 fails? Finally, the paper titles includes SGD, but the description in Def 1 doesn*t appear to involve stochastic gradients. Typical parameter server implementations have workers compute mini-batch stochastic gradients, not full gradients on their shard of the training set. Does Zeno++ need to be modified to run in this setting? Does the theory still hold? Minor: - Is there a typo in line 5 of Zeno++? Should this be instead of ? Otherwise, what does it mean to take the inner product of and in line 7?