S ECURE B YZANTINE -R OBUST M ACHINE L EARNING
Anonymous authors
Paper under double-blind review
A BSTRACT
Increasingly machine learning systems are being deployed to edge servers and devices (e.g. mobile phones) and trained in a collaborative manner.
Such distributed/federated/decentralized training raises a number of concerns about the robustness, privacy, and security of the procedure.
While extensive work has been done in tackling with robustness, privacy, or security individually, their combination has rarely been studied.
In this paper, we propose a secure two-server protocol that offers both input privacy and Byzantine-robustness.
In addition, this protocol is communication-efﬁcient, fault-tolerant and enjoys local differential privacy.
I NTRODUCTION
Recent years have witnessed fast growth of successful machine learning applications based on data collected from decentralized user devices.
Unfortunately, however, currently most of the important machine learning models on a societal level do not have their utility, control, and privacy aligned with the data ownership of the participants.
This issue can be partially attributed to a fundamental conﬂict between the two leading paradigms of traditional centralized training of models on one hand, and decentralized/collaborative training schemes on the other hand.
While centralized training violates the privacy rights of participating users, existing alternative training schemes are typically not robust.
Malicious participants can sabotage the training system by feeding it wrong data intentionally, known as data poisoning .
In this paper, we tackle this problem and propose a novel distributed training framework which offers both privacy and robustness .
When applied to datasets containing personal data, the use of privacy-preserving techniques is currently required under regulations such as the General Data Protection Regulation (GDPR) or
Health Insurance Portability and Accountability Act (HIPAA).
The idea of training models on decentralized datasets and incrementally aggregating model updates via a central server motivates the federated learning paradigm (McMahan et al., 2016).
However, the averaging in federated learning, when viewed as a multi-party computation (MPC) , does not preserve the input privacy because the server observes the models directly.
The input privacy requires each party learns nothing more than the output of computation which in this paradigm means the aggregated model updates.
To solve this problem, secure aggregation rules as proposed in (Bonawitz et al., 2017) achieve guaranteed input privacy.
Such secure aggregation rules have found wider industry adoption recently e.g. by
Google on Android phones (Bonawitz et al., 2019; Ramage & Mazzocchi, 2020) where input privacy guarantees can offer e.g. efﬁciency and exactness beneﬁts compared to differential privacy (both can also be combined).
The concept of Byzantine robustness has received considerable attention in the past few years for practical applications, as a way to make the training process robust to malicious actors.
A Byzantine participant or worker can behave arbitrarily malicious, e.g. sending arbitrary updates to the server.
This poses great challenge to the most widely used aggregation rules, e.g. simple average, since a single Byzantine worker can compromise the results of aggregation.
A number of Byzantine-robust aggregation rules have been proposed recently (Blanchard et al., 2017; Muñoz-González et al., 2017;
Alistarh et al., 2018; Mhamdi et al., 2018; Yin et al., 2018; Muñoz-González et al., 2019) and can be used as a building block for our proposed technique.
Achieving both input privacy and Byzantine robustness however remained elusive so far, with
Bagdasaryan et al.
(2020) stating that robust rules “ ...are incompatible with secure aggregation ”.
We here prove that this is not the case. Closest to our approach is (Pillutla et al., 2019) which tolerates data poisoning but does not offer Byzantine robustness.
Prio (Corrigan-Gibbs & Boneh, 2017) is a private and robust aggregation system relying on secret-shared non-interactive proofs (SNIP).
While their setting is similar to ours, the robustness they offer is limited to check the range of the input.
Besides, the encoding for SNIP has to be afﬁne-aggregable and is expensive for clients to compute.
In this paper, we propose a secure aggregation framework with the help of two non-colluding honestbut-curious servers.
This framework also tolerates server-worker collusion.
In addition, we combine robustness and privacy at the cost of leaking only worker similarity information which is marginal for high-dimensional neural networks.
Note that our focus is not to develop new defenses against state-of-the-art attacks, e.g. (Baruch et al., 2019; Xie et al., 2019b).
Instead, we focus on making arbitary current and future distance-based robust aggregation rules (e.g. Krum by Mhamdi et al.
(2018), RFA by Pillutla et al.
compatible with secure aggregation.
Main contributions.
We propose a novel distributed training framework which is
• Privacy-preserving: our method keeps the input data of each user secure against any other user, and against our honest-but-curious servers.
• Byzantine robust: our method offers Byzantine robustness and allows to incorporate existing robust aggregation rules, e.g. (Blanchard et al., 2017; Alistarh et al., 2018).
The results are exact, i
e. identical to the non-private robust methods.
• Fault tolerant and easy to use: our method natively supports workers dropping out or newly joining the training process.
It is also easy to implement and to understand for users.
• Efﬁcient and scalable: the computation and communication overhead of our method is negligible (less than a factor of 2) compared to non-private methods.
Scalability in terms of cost including setup and communication is linear in the number of workers.
P ROBLEM SETUP , PRIVACY , AND ROBUSTNESS
We consider the distributed setup of n user devices, which we call workers, with the help of two additional servers.
Each worker i has its own private part of the training dataset.
The workers want to collaboratively train a public model beneﬁtting from the joint training data of all participants.
In every training step, each worker computes its own private model update (e.g. a gradient based on its own data) denoted by the vector x i .
The aggregation protocol aims to compute the sum
z = (cid:80) ni
=1 x i (or a robust version of this aggregation), which is then used to update a public model.
While the result z is public in all cases, the protocol must keep each x i private from any adversary or other workers.
Security model.
We consider honest-but-curious servers which do not collude with each other but may collude with malicious workers.
An honest-but-curious server follows the protocol but may try to inspect all messages.
We also assume that all communication channels are secure.
We guarantee the strong notion of input privacy , which means the servers and workers know nothing more about each other than what can be inferred from the public output of the aggregation z .
Byzantine robustness model.
We allow the standard Byzantine worker model which assumes that workers can send arbitrary adversarial messages trying to compromise the process.
We assume that a fraction of up to α ( < 0 . 5 ) of the workers is Byzantine, i.e. are malicious and not follow the protocol.
Additive secret sharing.
Secret sharing is a way to split any secret into multiple parts such that no part leaks the secret.
Formally, suppose a scalar a is a secret and the secret holder shares it with k parties through secret-shared values (cid:104) a (cid:105) .
In this paper, we only consider additive secret-sharing where (cid:104) a (cid:105) is a notation for the set { a i } ki =1 which satisfy a = (cid:80)
kp =1 a p , with a p held by party p .
Crucially, it must not be possible to reconstruct a from any a p .
For vectors like x , their secret-shared values (cid:104) x (cid:105) are simply component-wise scalar secret-shared values.
Two-server setting.
We assume there are two non-colluding servers: model server (S1) and worker server (S2).
S1 holds the output of each aggregation and thus also the machine learning model which is public to all workers.
S2 holds intermediate values to perform Byzantine aggregation.
Another key assumption is that the servers have no incentive to collude with workers, perhaps enforced via a potential huge penalty if exposed.
It is realistic to assume that the communication link between the two servers S1 and S2 is faster than the individual links to the workers.
To perform robust aggregation, the servers will need access to a sufﬁcient number of Beaver’s triples .
These are data-independent values required to implement secure multiplication in MPC on both servers, and can be precomputed beforehand.
For completeness, the classic algorithm for multiplication is given in in Appendix B.1.
[Figure]
Byzantine-robust aggregation oracles.
Most of existing robust aggregation algorithms rely on distance measures to identity potential adversarial behavior (Blanchard et al., 2017; Yin et al., 2018;
Mhamdi et al., 2018; Li et al., 2019; Ghosh et al., 2019).
All such distance-based aggregation rules can be directly incorporated into our proposed scheme, making them secure.
While many aforementioned papers assume that the workers have i.i.d datasets, our protocol is oblivious to the distribution of the data across the workers.
In particular, our protocol also works with schemes such as (Li et al., 2019; Ghosh et al., 2019;
He et al., 2020) designed for non-iid data.
S ECURE AGGREGATION PROTOCOL : TWO - SERVER MODEL
Each worker ﬁrst splits its private vector x
i into two additive secret shares, and transmits those to each corresponding server, ensuring that neither server can reconstruct the original vector on its own.
The two servers then execute our secure aggregation protocol.
On the level of servers, the protocol is a two-party computation (2PC).
In the case of non-robust aggregation, servers simply add all shares (we present this case in detail in Algorithm 1).
In the robust case which is of our main interest here, the two servers exactly emulate an existing Byzantine robust aggregation rule, at the cost of revealing only distances of worker gradients on the server (the robust algorithm is presented in Algorithm 2).
Finally, the resulting aggregated output vector z is sent back to all workers and applied as the update to the public machine learning model.
3. N ON - ROBUST SECURE AGGREGATION
In each round, Algorithm 1 consists of two stages:
• WorkerSecretSharing (Figure 1a): each worker i randomly splits its private input x i into two additive secret shares x i = x
(1) i + x (2) i .
This can be done e.g. by sampling a large noise value ξ i and then using ( x i ± ξ i ) / 2 as the shares.
Worker i sends x (1) i to S1 and x (2) i to S2 .
We write (cid:104) x
i (cid:105) for the two secret-shared values distributed over the two servers.
• AggregationAndUpdate (Figure 1c):
Given binary weights { p i } ni =1 , each server locally computes (cid:104) (cid:80) ni
=1 p
i x i (cid:105) .
Then S2 sends its share (cid:104) (cid:80) ni
=1 p
i x i (cid:105) (2) to S1 so that S1 can then compute z = (cid:80) ni
=1 p i x i .
S1 updates the public model with z .
Our secure aggregation protocol is extremely simple, and as we will discuss later, has very low communication overhead, does not require heavy cryptographic primitives, gives strong input privacy and is compatible with differential privacy, and is robust to worker dropouts and failures.
We believe this makes our protocol especially attractive for federated learning applications.
We now argue about correctness and privacy.
It is clear that the output z of the above protocol satisﬁes z = (cid:80) ni
=1 p i x i , ensuring that all workers compute the right update.
Now we argue about the privacy guarantees.
We track the values stored by each of the servers and workers:
• S1 : Its own secret shares { x (1) i } ni =1 and the sum of the other shares (cid:104) (cid:80) ni =1 p
i x i (cid:105) (2) .
• S2 : Its own secret shares { x (2) i } ni =1 .
• Worker i : x i and z = (cid:80) ni
=1 p i x i .
Clearly, the workers have no information other than the aggregate z and their own data.
S2 only has the secret share which on their own leak no information about any data.
Hence surprisingly, S2 does not learn anything in this process.
S1 has its own secret share and also the sum of the other shares.
If n = 1 , then z = x i and hence S1 is allowed to learn everything.
If n > 1 , then S1 cannot recover information about any individual secret share x (2) i from the sum.
Thus, S1 learns z and nothing else.
3. R OBUST SECURE AGGREGATION
We now describe how Algorithm 2 replaces the simple aggregation with any distance-based robust aggregation rule Aggr ,
e.g. Multi-Krum
(Blanchard et al., 2017).
The key idea is to use two-party
MPC to securely compute multiplication.
• WorkerSecretSharing (Figure 1a): As before, each worker i secret shares (cid:104) x i (cid:105) distributed over the two servers S1 and S2 .
• RobustWeightSelection
(Figure 1b):
After collecting all secret-shared values {(cid:104) x i (cid:105)} i , the servers compute pairwise difference {(cid:104) x
i − x j (cid:105)} i<
j locally.
S2 then reveals—to itself exclusively—in plain text all of the pairwise Euclidean distances between workers {(cid:107) x
i − x j (cid:107) 2 } i<j with the help of precomputed Beaver’s triples and Algorithm 3.
The distances are kept private from S1 and workers.
S2 then feeds these distances to the distance-based robust aggregation rule Aggr , returning (on S2 ) a binary weight vector p
= { p i } ni =1 ∈ { 0 , 1 } n , representing the indices of the robust subset selected by Aggr .
• AggregationAndUpdate (Figure 1c): Given weight vector p from previous step, we would like S1 to compute (cid:80) ni
=1 p i x i .
To do so, S2 secret shares with S1 the values of {(cid:104) p
i (cid:105)} instead of sending in plain-text since they may be private.
Then, S1 reveals to itself, but not to S2 , in plain text the value of z = (cid:80) ni
=1 p
i x i using secret-shared multiplication and updates the public model.
• WorkerPullModel (Figure 1d): Workers pull the latest public model on S1 and update it locally.
The key difference between the robust and the non-robust aggregation scheme is the weight selection phase where S2 computes all pairwise distances and uses this to run a robust-aggregation rule in a black-box manner.
S2 computes these distances i) without leaking any information to S1 , and ii) without itself learning anything other than the pair-wise distances (and in particular none of the actual values of x i ).
To perform such a computation, S1 and S2 use precomputed Beaver’s triplets (Algorithm 3 in the Appendix), which can be made available in a scalable way (Smart & Tanguy, 2019).
3. S ALIENT FEATURES
Overall, our protocols are very resource-light and straightforward from the perspective of the workers.
Further, since we use Byzantine-robust aggregation, our protocols are provably fault-tolerant even if a large fraction of workers misbehave.
This further lowers the requirements of a worker.
We eleborate the features as follows.
Communication overhead.
In applications, individual uplink speed from worker and servers is typically the main bottleneck, as it is typically much slower than downlink, and the bandwidth between servers can be very large.
For our protocols, the time spent on the uplink is within a factor of 2 of the non-secure variants.
Besides, our protocol only requires one round of communication, which is an advantage over interactive proofs.
Fault tolerance.
The workers in Algorithm 1 and Algorithm 2 are completely stateless across multiple rounds and there is no ofﬂine phase required.
This means that workers can start participating in the protocols simply by pulling the latest public model.
Further, our protocols are unaffected if some workers drop out in the middle of a round.
Unlike in (Bonawitz et al., 2017), there is no entanglement between workers and we don’t have unbounded recovery issues.
Compatibility with local differential privacy.
One byproduct of our protocol can be used to convert differentially private mechanisms, such as (Abadi et al., 2016) which only guarantees the privacy of the aggregated model, into the stronger locally differentially private mechanisms which guarantee user-level privacy.
∀ i , S1 collects gradient x (1) i and S2 collects x (2)
i
(a) For each pair ( x i , x j ) compute their Euclidean distance ( i < j ) :
• On S1 and S2 , compute (cid:104) x
i − x j (cid:105) =
(cid:104) x
i (cid:105) − (cid:104) x j (cid:105) locally • Use precomputed Beaver’s triples (see Algorithm 3) to compute the distance (cid:107) x
i − x j (cid:107)(b) S2 perform robust aggregation rule p =
Aggr ( {(cid:107) x
i − x j (cid:107) 2 } i<j ) (c) S2 secret-shares (cid:104) p (cid:105) with S 3.
( AggregationAndUpdate ): (a) On S1 and S2 , use MPC multiplication to compute (cid:104) (cid:80) ni
=1 p
i x i (cid:105) locally (b) S2 sends its share of (cid:104) (cid:80) ni
=1 p
i x i (cid:105) (2) to S (c) S1 reveals z = (cid:80) ni
=1 p
i x i to all workers.
Workers :
( WorkerPullModel ): Collect z and update model locally
Other Byzantine-robust oracles.
We can also use some robust-aggregation rules which are not based on pair-wise distances such as Byzantine SGD (Alistarh et al., 2018).
Since the basic structures are very similar to Algorithm 2, we put Algorithm 8 in the appendix.
Security.
The security of Algorithm 1 is straightforward as we previously discussed.
The security of
Algorithm 2 again relies on the separation of information between S1 and S2 with neither the workers nor S1 learning anything other than the aggregate z .
We will next formally prove that this is true even in the presence of malicious workers. Remark 1.
Our proposed scheme leverages classic 2-party secret-sharing for addition and multiplication.
These building blocks however are originally proposed for integers and quantized values, not real values.
For ﬂoating point operations as used in machine learning, one can use the secure counterparts (Aliasgari et al., 2013) of the two operations.
This is facilitated by deep learning training being robust to limited precision training (Gupta et al., 2015) and additional noise (Neelakantan et al., 2016), with current models routinely trained in 16 bit precision. In contrast to (Bonawitz et al., 2017) which relies on advanced cryptographic primitives such as Difﬁe-Hellman’s key agreement which must remain exact and discrete, our protocols only use much simpler secure arithmetic operations—only addition and multiplication—which are tolerant to rounding errors. For the privacy implications of secret sharing when using ﬂoating point, which go beyond the scope of our work, we refer the reader to the information theoretic analysis of Aliasgari et al.  T HEORETICAL GUARANTEES 4. E XACTNESS
In the following lemma we show that Algorithm 2 gives the exact same result as non-privacypreserving version.
Lemma 2 (Exactness of Algorithm 2) .
The resulting z in Algorithm 2 is identical to the output of the non-privacy-preserving version of the used robust aggregation rule.
Proof.
After secret-sharing x i to (cid:104) x i (cid:105) to two servers, Algorithm 2 performs local differences {(cid:104) x
i − x j (cid:105)} i<j .
Using shared-values multiplication via Beaver’s triple, S2 obtains the list of true Euclidean distances {(cid:107) x
i − x j (cid:107) 2 } i<j .
The result is fed to a distance-based robust aggregation rule oracle, all solely on S2 .
Therefore, the resulting indices { p i } i as used in z := Σ ni =1 p i x i are identical to the aggregation of non-privacy-preserving robust aggregation.
With the exactness of the protocol established, we next focus on the privacy guarantee.
4. P RIVACY
We prove probabilistic (information-theoretic) notion of privacy which gives the strongest guarantee possible.
Formally, we will show that the distribution of the secret does not change even after being conditioned on all observations made by all participants, i.e. each worker i , S1 and S2 .
This implies that the observations carry absolutely no information about the secret.
Our results rely on the existence of simple additive secret-sharing protocols as discussed in the Appendix.
Each worker i only receives the ﬁnal aggregated z at the end of the protocol and is not involved in any other manner.
Hence no information can be leaked to them.
We will now examine S1 .
The proofs below rely on Beaver’s triples which we summarize in the following lemma.
Lemma 3 (Beaver’s triples) .
Suppose we secret share (cid:104) x
(cid:105) and
(cid:104) y (cid:105) between S1 and S2 and want to compute xy on S2 .
There exists a protocol which enables such computation which uses precomputed shares
BV =
( (cid:104) a (cid:105) , (cid:104) b (cid:105) , (cid:104) c
(cid:105) )
such that S1 does not learn anything and S2 only learns xy .
Due to the page limit, we put the details about Beaver’s triples, multiplying secret shares, as well as the proofs for the next two theorems to the Appendix.
Theorem I (Privacy for S1 ) .
Let z = (cid:80) ni
=1 p
i x i where { p i } ni =1 is the output of byzantine oracle or a vector of 1s (non-private).
Let BV ij = (cid:104) a ij , b ij , c ij (cid:105) and BV p
i = (cid:104) a pi , b pi , c pi (cid:105) be the Beaver’s triple used in the multiplications.
Let (cid:104)·(cid:105) (1) be the share of the secret-shared values (cid:104)·(cid:105) on S1 .
Then for all workers
i
[Equation]
Note that the conditioned values are what S1 observes throughout the algorithm.
{ BV (1) ij , x i − x j − a ij , x i − x j − b ij } i<
j and { BV p (1) i , p i − a pi , p i − b pi } ni =1 are intermediate values during shared values multiplication.
For S2 , the theorem to prove is a bit different because in this case S2 doesn’t know the output of aggregation z .
In fact, this is more similar to an independent system which knows little about the underlying tasks, model weights, etc.
We show that while S2 has observed many intermediate values, it can only learn no more than what can be inferred from model distances.
Theorem II (Privacy for S2 ) .
Let { p i } ni
=1 is the output of byzantine oracle or a vector of 1s (nonprivate).
Let BV ij = (cid:104) a ij , b ij , c ij (cid:105) and BV p
i = (cid:104) a p i , b p i , c p i (cid:105) be the Beaver’s triple used in the multiplications.
Let (cid:104)·(cid:105) (2) be the share of the secret-shared values (cid:104)·(cid:105) on S2 .
Then for all workers
i
P ( x i = x i | {(cid:104) x i (cid:105) (2) , (cid:104) p i (cid:105) (2) , p i } ni =1 , { BV (2) i,j , x i − x j − a ij , x i − x j − b ij } i<j , {(cid:104)(cid:107) x i − x j (cid:107) 2 (cid:105) (2) , (cid:107) x
i − x j (cid:107) 2 } i<j , { BV p (2) i , p i − a pi , p i − b pi } ni =1 ) =
P ( x i = x i | {(cid:107) x
i − x j (cid:107) 2 } i<j ) (1)
Note that the conditioned values are what S2 observed throughout the algorithm.
{ BV (2) ij , x i − x j − a ij , x i − x j − b ij } i<
j and { BV p (2) i , p i − a pi , p i − b pi } ni =1 are intermediate values during shared values multiplication.
The model distances indeed only leaks similarity among the workers.
Such similarity, however, does not tell S2 information about the parameters; in (Mhamdi et al., 2018)
the leeway attack attacks distance based-rules because they don’t distinguish two gradients with evenly distributed noise and two different gradients very different in one parameter.
This means the leaked information has low impact to the privacy.
It is also worth noting that curious workers can only inspect others’ values by learning from the public model/update.
This is because in our scheme, workers don’t interact directly and there is only one round of communication between servers and workers.
So the only message a worker receives is the public model update.
4. C OMBINING WITH DIFFERENTIAL PRIVACY
While input privacy is our main goal, our approach is naturally compatible with other orthogonal notions of privacy.
Global differential privacy (DP) (Shokri & Shmatikov, 2015; Abadi et al., 2016;
Chase et al., 2017) is mainly concerned about the privacy of the aggregated model, and whether it leaks information about the training data.
On the other hand, local differential privacy (LDP) (Evﬁmievski et al., 2003; Kasiviswanathan et al., 2011) is stronger notions which is also concerned with the training process itself.
It requires that every communication transmitted by the worker does not leak information about their data.
In general, it is hard to learn deep learning models satisfying
LDP using iterate perturbation (which is the standard mechanism for DP) (Bonawitz et al., 2017).
Our non-robust protocol is naturally compatible with local differential privacy.
Consider the usual iterative optimization algorithm which in each round t performs
[Equation]
Here x t is the aggregate update, w t is the model parameters, and ν t is the noise added for DP (Abadi et al., 2016).
Theorem III (from DP to LDP) .
Suppose that the noise ν t in (2) is sufﬁcient to ensure that the set of model parameters { w t } t ∈ [ T ] satisfy ( ε, δ ) -DP for ε ≥ 1 .
Then, running (2) with using Alg. 1 to compute ( x t + η t ) by securely aggregating { x 1 ,t + nη t , x 2 ,t , . . .
, x n,t } satisﬁes ( ε, δ ) -LDP.
Unlike existing approaches, we do not face a tension between differential privacy which relies on real-valued vectors and cryptographic tools which operate solely on discrete/quantized objects.
This is because our protocols do not rely on cryptographic primitives like Difﬁe-Hellman key agreement, in contrast to e.g. (Bonawitz et al., 2017).
In particular, the vectors x i can be full-precision (real-valued) at the cost of adding marginal rounding error which can be tolerated by robust aggregation rule and stochastic gradient descent algorithms.
Thus, our secure aggregation protocol can be integrated with a mechanism which has global DP properties e.g. (Abadi et al., 2016), and prove local DP guarantees for the resulting mechanism.
E MPIRICAL ANALYSIS OF OVERHEAD
[Figure]
adjusted for network bandwidth.
We present an illustrative simulation on a local machine (i7-8565U) to demonstrate the overhead of our scheme.
We use PyTorch with MPI to train a neural network of 1.2 million parameters on the MNIST dataset.
We compare the following three settings: simple aggregation withserver, secure aggregation with 2 servers, robust secure aggregation with 2 servers (with
Krum (Blanchard et al., 2017)).
The number of workers is always 5.
Figure 2 shows the time spent on all parts of training for one aggregation step.
T grad is the time spent on batch gradient computation; T w 2 s refers to the time spend on uploading and downloading gradients; T s 2 s is the time spend on communication between servers.
Note that the server-to-server communication could be further reduced by employing more efﬁcient aggregationn rules.
Since the simulation is run on a local machine, time spent on communication is underestimated.
In the right hand side ﬁgure, we adjusts time by assuming the worker-to-server link has 100Mbps bandwidth and 1Gbps respectively for the server-to-server link.
Even in this scenario, we can see that the overhead from private aggregation is small.
Furthermore, the additional overhead by the robustness module is moderate comparing to the standard training, even for realistic deep-learning settings.
For comparison, a zero-knowledge-proof-based approach need to spend 0.03 seconds to encode a submission of 100 integers (Corrigan-Gibbs & Boneh, 2017).
L ITERATURE REVIEW
Secure Aggregation.
In the standard distributed setting with 1 server, Bonawitz et al.
(2017) proposes a secure aggregation rule which is also fault tolerant.
They generate a shared secret key for each pair of users.
The secret keys are used to construct masks to the input gradients so that masks cancel each other after aggregation.
To achieve fault tolerance, they employ Shamir’s secret sharing.
To deal with active adversaries, they use a public key infrastructure (PKI) as well as a second mask applied to the input.
A followup work (Mandal et al., 2018) minimizes the pairwise communication by outsourcing the key generation to two non-colluding cryptographic secret providers.
However, both protocols are still not scalable because each worker needs to compute a shared-secret key and a noise mask for every other client.
When recovering from failures, all live clients are notiﬁed and send their masks to the server, which introduces signiﬁcant communication overhead.
In contrast, workers in our scheme are freed from coordinating with other workers, which leads to a more scalable system.
Byzantine-Robust Aggregation/SGD.
Blanchard et al.
ﬁrst proposes Krum and Multi-Krum for training machine learning models in the presence of Byzantine workers.
Mhamdi et al.
(2018) proposes a general enhancement recipe termed Bulyan .
Alistarh et al.
(2018) proves a robust SGD training scheme with optimal sample complexity and the number of SGD computations.
MuñozGonzález et al.
(2019) uses HMM to detect and exclude Byzantine workers for federated learning.
Yin et al.
(2018) proposes median and trimmed-mean based robust algorithms which achieve optimal statistical performance.
For robust learning on non-i.i.d dataset only appear recently (Li et al., 2019;
Ghosh et al., 2019;
He et al., 2020).
Further, Xie et al.
(2018) generalizes the Byzantine attacks to manipulate data transfer between workers and server and Xie et al.
(2019a) extends it to tolerate an arbitrary number of Byzantine workers.
Pillutla et al.
(2019) proposes a robust aggregation rule RFA which is also privacy preserving.
However, it is only robust to data poisioning attack as it requires workers to compute aggregation weights according to the protocol.
Corrigan-Gibbs & Boneh (2017) proposes a private and robust aggregation system based on secret-shared non-interactive proof (SNIP).
Despite the similarities between our setups, the generation of a SNIP proof on client is expansive and grows with the dimensions.
Besides, this paper offers limited robustness as it only validates the range of the data.
Inference As A Service.
An orthogonal line of work is inference as a service or oblivious inference.
A user encrypts its own data and uploads it to the server for inference.
(Gilad-Bachrach et al., 2016;
Rouhani et al., 2017; Hesamifard et al., 2017; Liu et al., 2017; Mohassel & Zhang, 2017; Chou et al., 2018; Juvekar et al., 2018; Riazi et al., 2019) falls into a general category of 2-party computation (2PC).
A number of issues have to be taken into account: the non-linear activations should be replaced with MPC-friendly activations, represent the ﬂoating number as integers.
Ryffel et al.
(2019) uses functional encryption on polynomial networks.
Gilad-Bachrach et al.
(2016) also have to adapt activations to polynomial activations and max pooling to scaled mean pooling.
Server-Aided MPC.
One common setting for training machine learning model with MPC is the server-aided case (Mohassel & Zhang, 2017; Chen et al., 2019).
In previous works, both the model weights and the data are stored in shared values, which in turn makes the inference process computationally very costly.
Another issue is that only a limited number of operations (function evaluations) are supported by shared values.
Therefore, approximating non-linear activation functions again introduces signiﬁcant overhead.
In our paper, the computation of gradients are local to the workers, only output gradients are sent to the servers.
Thus no adaptations of the worker’s neural network architectures for MPC are required.
C ONCLUSION
In this paper we propose a novel secure and Byzantine-robust aggregation framework.
To our knowledge, this is the ﬁrst work to address these two key properties jointly.
Our algorithm is simple and fault tolerant and scales well with the number of workers.
In addition, our framework holds for any existing distance-based robust rule.
Besides, the communication overhead of our algorithm is roughly bounded by a factor of 2 and the computation overhead, as shown in Algorithm 3, is marginal and can even be computed prior to training
Appendix A P ROOFS
Theorem I (Privacy for S1 ) .
Let z = (cid:80) ni
=1 p
i x i where { p i } ni =1 is the output of byzantine oracle or a vector of 1s (non-private).
Let BV ij = (cid:104) a ij , b ij , c ij (cid:105) and BV p
i = (cid:104) a p i , b p i , c p i (cid:105) be the Beaver’s triple used in the multiplications.
Let (cid:104)·(cid:105) (1) be the share of the secret-shared values (cid:104)·(cid:105) on S1 .
Then for all workers
i
[Equation]
(1) } ni =1 , { BV (1) i,j , x i − x j − a ij , x i − x j − b ij } i<j , {(cid:104)(cid:107) x i − x j (cid:107) 2 (cid:105) (1) } i<j , { BV p (1) i , p i − a p i , p i − b p i } n i =1 , z ) =
P ( x i = x i | z )
Note that the conditioned values are what S1 observes throughout the algorithm.
{ BV (1) ij , x i − x j − a ij , x i − x j − b ij } i<
j and { BV p (1) i , p i − a pi , p i − b pi } ni =1 are intermediate values during shared values multiplication.
Proof.
First, we use the independence of Beaver’s triple to simplify the conditioned term.
• The Beaver’s triples are data-independent.
Since (cid:104) a pi (cid:105) (2) and (cid:104)
b pi (cid:105) (2) only exist in { p i − a pi , p i − b pi } i
and they are independent of all other variables, we can remove { p i − a pi , p i − b pi } i from conditioned terms.
• For the same reason { BV p (1) i } ni =1 are independent of all other variables and can be removed.
• The secret shares of aggregation weights (cid:104) p
i (cid:105) (1) :
= ( p i + η i ) / 2 and (cid:104) p
i (cid:105) (2) :
= ( p i − η i ) /where
η i is random noise.
Then {(cid:104) p
i (cid:105) (1) } i are independent of all other variables.
Thus it can be removed.
Now the left hand side (LHS) can be simpliﬁed as
[Equation]
There are other independence properties:
• The secret shares of the input (cid:104) x
i (cid:105) can be seen as generated by random noise ξ i .
Thus (cid:104) x i (cid:105) (1) :
= ( ξ i + x i ) / 2 and (cid:104) x i (cid:105) (2) :
= ( − ξ i + x i ) / 2 are independent of others like x i .
Besides, for all j (cid:54) = i , (cid:104) x
i (cid:105) ( · ) and (cid:104) x
j (cid:105) ( · ) are independent.
• Beaver’s triple { BV (1) i,j } i< j and { BV (2) i,j } i<j are clearly independent.
Since they are generated before the existance of data, they are always independent of { x ( · ) j } j .
Next, according to Beaver’s multiplication Algorithm 3,
[Equation]
we can remove this term from condition:
[Equation]
By the independence between (cid:104) x i (cid:105) ( · ) and BV ( · ) ij , we can further simplify the conditioned term
[Equation]
Since BV (1) ij and BV (2) ij are always independent of all other variables, we know that
[Equation]
x i |{(cid:104)
x i (cid:105) (1) } ni =1 , z ) (6)
For worker i , ∀ j (cid:54) =
i , (cid:104) x
i (cid:105) ( · ) and (cid:104) x
j (cid:105) (1) are independent
LHS = P ( x i = x i | z ) .
Theorem II (Privacy for S2 ) .
Let { p i } ni
=1 is the output of byzantine oracle or a vector of 1s (nonprivate).
Let BV ij = (cid:104) a ij , b ij , c ij (cid:105) and BV p
i = (cid:104) a pi , b pi , c pi (cid:105) be the Beaver’s triple used in the multiplications.
Let (cid:104)·(cid:105) (2) be the share of the secret-shared values (cid:104)·(cid:105) on S2 .
Then for all workers
i
P ( x i = x i | {(cid:104) x i (cid:105) (2) , (cid:104) p i (cid:105) (2) , p i } ni =1 , { BV (2) i,j , x i − x j − a ij , x i − x j − b ij } i<j , {(cid:104)(cid:107) x i − x j (cid:107) 2 (cid:105) (2) , (cid:107) x i − x j (cid:107) 2 } i<j , { BV p (2) i , p i − a pi , p i − b pi } n i =1 ) = P ( x i = x i | {(cid:107) x i − x j (cid:107) 2 } i<j ) (1)
Note that the conditioned values are what S2 observed throughout the algorithm.
{ BV (2) ij , x i − x j − a ij , x i − x j − b ij } i<
j and { BV p (2) i , p i − a pi , p i − b pi } ni =1 are intermediate values during shared values multiplication.
Proof.
Similar to the proof of Theorem I, we can ﬁrst conclude
• { p i − a pi , p i − b pi } i and { BV p (2) i } ni =1 could be dropped because these they are data independent and no other terms depend on them.
• {(cid:104) p
i (cid:105) (2) } ni =1 is independent of the others so it can be dropped.
• { p i } ni =1 can be inferred from {(cid:107) x
i − x j (cid:107) 2 } ij so it can also be dropped.
• By the deﬁnition of {(cid:104)(cid:107) x
i − x j (cid:107) 2 (cid:105) (2) } ij , it can be represented by { x i } (2) and { BV (2) ij , x i − x j − a ij , x i − x j − b ij } i<j .
Now the left hand side (LHS) can be simpliﬁed as
[Equation]
Because x i is independent of { [Equation] x i
[Equation] 2) } ni =1 as well as data independent terms like { BV (2) ij , a (1) ij , b (1) ij } i<
j , we have
[Equation]
Theorem III (from DP to LDP) .
Suppose that the noise ν t in (2) is sufﬁcient to ensure that the set of model parameters { w t } t ∈ [ T ] satisfy ( ε, δ ) -DP for ε ≥ 1 .
Then, running (2) with using Alg. 1 to compute ( x t + η t ) by securely aggregating { x 1 ,t + nη t , x 2 ,t , . . .
, x n,t } satisﬁes ( ε, δ ) -LDP.
Proof.
Suppose that worker i ∈ [ n ] copmutes it gradient x i based on data d i ∈ D .
For the sake of simplicity, let us assume that the arregate model satisﬁes ε -DP.
The proof is identical for the more relaxed notion of ( ε, δ ) -DP fo r ε ≥ 1 .
This implies that for any j ∈ [ n ] and d j , ˜ d j ∈ D ,
[Equation]
Now, we examine the communication received by each server and measure how much information is revealed about any given worker j ∈ [ n ] .
The values stored and seen are:
• S1 : The secret share ( x 1 + nν ) (1) , { x i ( d i ) (1) } ni =2 and the sum of other shares ( x 1 + nν ) (2) + (cid:80) ni
=2 x i ( d i ) (2) =
(( (cid:80) ni
=1 x i ( d i ))
+ nν ) (2) .
• S2 : The secret share ( x 1 + nν ) (2) , { x i ( d i ) (2) } ni =2 .
• Worker
i : z = ( (cid:80) ni
=1 x i ( d i )) + nν .
The equality above is because our secret shares are linear .
Now, the values seen by any worker satisfy ε -LDP directly by (8).
For the server, note that by the deﬁnition of our secret shares, we have for any worker j ,
[Equation]
j ( d j ) (1) is independent of x j ( d j ) ⇒ Pr[ x j ( d j
) (1) = y ] =
Pr [ x j ( d j ) (1) = ˜ y ] , ∀ y , ˜ y ⇒ Pr[ x j ( d j ) (1) =
y ] = Pr[ x j ( ˜ d j ) (1) = y ] , ∀ d j , ˜ d j ∈ D .
A similar statement holds for the second share.
This proves that the values computed/seen by the workers or servers satisfy ε -LDP.
B N OTES ON SECURITY B. B EAVER ’ S MPC P ROTOCOL
In this section, we brieﬂy introduce Beaver (1991)’s classic implementations of addition (cid:104) x
+ y (cid:105) and multplication (cid:104) xy (cid:105) given additive secret-shared values (cid:104) x (cid:105) and (cid:104) y (cid:105) where each party i holding x i and y i .
The algorithm for multiplication is given in Algorithm 3.
Algorithm input : (cid:104) x
(cid:105) ; (cid:104) y
(cid:105)
; Beaver’s triple ( (cid:104) a (cid:105) , (cid:104) b (cid:105) , (cid:104) c (cid:105) )
s.t.
c = ab output : (cid:104) z (cid:105) s.t.
z = xy for all party i do locally compute x
i − a i and y i −
b i and then broadcast them to all parties collect all shares and reveal x − a = Σ i ( x i − a i ) ,
y − b = Σ i
( y i − b i ) compute
z i :=
c i + ( x − a ) b i + ( y − b ) a i end for
The ﬁrst party 1 updates z 1 :=
z 1 + ( x − a )( y − b )
Addition.
The secret-shared values form of sum, (cid:104) x
+ y (cid:105) , is obtained by simply each party i locally compute x i
+ y i .
Multiplication.
Assume we already have three secret-shared values called a triple, (cid:104) a (cid:105) , (cid:104) b (cid:105) , and
(cid:104) c (cid:105) such that c = ab .
Then note that if each party broadcasts x i − a i and y i −
b i , then each party i can compute x − a
and y − b (so these values are publicly known), and hence compute z i :=
c i + ( x − a ) b i + ( y − b ) a i
Additionally, one party (chosen arbitrarily) adds on the public value ( x − a )( y − b ) to their share so that summing all the shares up, the parties get Σ i z i
= c + ( x − a ) b + ( y − b ) a + ( x − a )( y − b ) = xy
and so they have a secret sharing (cid:104) z (cid:105) of xy .
The generation of Beaver’s triples.
There are many different implementations of the ofﬂine phase of the MPC multiplication.
For example, semi-homomorphic encryption based implementations (Keller et al., 2018) or oblivious transfer-based implementations (Keller et al., 2016).
Since their security and performance have been demonstrated, we may assume the Beaver’s triples are ready for use at the initial step of our protocol.
B. N OTES ON OBTAINING A SECRET SHARE
Suppose that we want to secret share a bounded real vector x ∈ ( − B, B ] d for some B ≥ 0 .
Then, we sample a random vector ξ uniformly from ( − B, B ] d .
This is easily done by sampling each coordinate independently from ( − B, B ] .
Then the secret shares become ( ξ, x − ξ ) .
Since ξ is drawn from a uniform distribution from [ − B, B ] d , the distribution of x − ξ conditioned on x is still uniform over ( − B, B ] d and (importantly) independent of x .
All arithmetic operations are then carried out modulo [ − B, B ] i.e. B + 1 ≡ − B + 1 and − B − 1 ≡ B − 1 .
This simple scheme ensures information theoretic input-privacy for continuous vectors.
The scheme described above requires access to true randomness i.e. the ability to sample uniformly from ( − B, B ] .
We make this assumption to simplify the proofs and the presentation.
We note that differential privacy techniques such as (Abadi et al., 2016) also assume access to a similar source of true randomness.
In practice, however, this would be replaced with a pseudo-random-generator (PRG) (Blum & Micali, 1984; Yao, 1982).
B. C OMPUTATIONAL INDISTINGUISHABILITY
Let { X n } , { Y n } be sequences of distributions indexed by a security parameter n (like the length of the input).
{ X n } and { Y n } are computationally indistinguishable if for every polynomial-time A and polynomially-bounded ε , and sufﬁciently large n
[Equation]
If a pseudorandom generator, instead of true randomness, is used in Appendix B.2 , then the shares are indistinguishable from a uniform distribution over a ﬁeld of same length.
Thus in Theorem I and Theorem II, the secret shares can be replaced by an independent random variable of uniform distribution with negligible change in probability.
B. N OTES ON THE SECURITY OF S
Theorem II proves that S2 does not learn anything besides the pairwise distances between the various models.
While this does leak some information about the models, S2 cannot use this information to reconstruct any x i .
This is because the pair-wise distances are invariant to translations, rotations, and shufﬂing of the coordinates of { x i } .
This remains true even if S2 additionally learns the global model too.
C D ATA OWNERSHIP DIAGRAM
[Table]
k e
[Table]
SS
R obu s t W e i gh t S e l ec ti on
A gg
A nd
U pd a t e
P u ll
[Table]
[Figure]
In Figure 3, we show a diagram of data ownership to demonstrate of the data transmitted among workers and servers.
Note that the Beaver’s triples are already local to each server so that no extra communication is needed.
D T HREE SERVER MODEL
In this section, we introduce a robust algorithm with information-theoretical privacy guarantee at the cost of more communication between servers.
We avoid exposing pairwise distances to S2 by adding to the system an additional non-colluding server, the crypto provider (Wagh et al., 2019).
A crypto provider does not receive shares of gradients, but only assists other servers for the multiparty computation.
Now our pipeline for one aggregation becomes: 1) the workers secret share their gradients into 2 parts; 2) the workers send their shares to S1 and S2 respectively; 3) S1 , S2 and the crypto provider compute the robust aggregation rule using crypto primitives; 4) servers reveal the output of aggregation and send back to workers.
The (Wagh et al., 2019) use crypto provider to construct efﬁcient protocols for the training and inference of neural networks.
In their setup, workers secret share their samples to the servers and then servers secure compute a neural network.
In contrast, we consider the federated learning setup where workers compute the gradients and servers perform a multiparty computation of a (robust) aggregation function.
The aggregated neural network is public to all.
As the (robust) aggregation function is much simpler than a neural netwuork, our setup is more computationally efﬁcient.
Note that we can directly plug our secure robust aggregation rule into their pipeline and ensure both robustness and privacy-preserving in their setting.
The crypto provider enables servers to compute a variety of functions on secret shared values.
• M AT M UL :
Given (cid:104) x (cid:105) and (cid:104) y (cid:105) , return (cid:104) x (cid:62) y (cid:105) .
The crypto provider generates and distribute beaver’s triple for multiplication.
• P RIVATE C OMPARE :
Given (cid:104) x (cid:105) and a number r , reveal a bit ( x > r ) to S1 and S2 , see Algorithm 5.
This can be directly used to compare (cid:104) x (cid:105) and
(cid:104) y (cid:105) by comparing (cid:104) x − y (cid:105) and 0 .
• S ELECT S HARE :
Given (cid:104) x (cid:105) and (cid:104) y (cid:105) and α ∈ { 0 , 1 } , return (cid:104) (1 − α ) x + α y (cid:105) , see Algorithm 6.
This function can be easily extended to select one from more quantities.
The combination of P RIVATE C OMPARE and S ELECT S HARE enables sorting scalar numbers, like distances.
Thus we can use these primitives to compute Krum on secret-shared values.
For other aggregation rules like RFAPillutla et al.
(2019), we need other primitives like division.
We refer to
Wagh et al.
(2019) for more primitives like division, max pooling, ReLU.
We also leave the details of the three aforementioned primitives in Appendix D.1.
Three server MultiKrum.
In Algorithm 4 we present a three-server M ULTI K RUM algorithm.
First,
S1 , S2 , and S3 compute the pairwise distances {(cid:104)
d ij (cid:105)} ij , but do not reveal it like Algorithm 2.
For each i , we use P RIVATE C OMPARE and S ELECT S HARE to sort {(cid:104) d ij (cid:105)} j by their magnitude.
Then we compute (cid:104) score i (cid:105) using S ELECT S HARE .
Similarly we sort {(cid:104) score i (cid:105)} i and get a selection vector α for workers with lowest scores.
Finally, we open (cid:104) α
· X (cid:105) and reveal (cid:80) i ∈I α
i x i to everyone.
We remark that sorting the {(cid:104) d ij (cid:105)}
j does not leak anything about their absolute or relative magnitude.
This is because: 1) S3 picks i, j from π 1 , π 2 which is unknown to S1 and S2 ; 2) S3 encodes i, j into a selection vector α ij and secret shares it to S1 and S2 ; 3) For S1 and S2 , they only observe secretshared selection vectors which is computationally indistinguishable from a random string.
Thus S and S2 learn nothing more than the outcome of MultiKrum.
On the other hand, P RIVATE C OMPARE guarantees the crypto provider S3 does not know the results of comparison.
So S3 also knows nothing more than the output of MultiKrum.
Thus Algorithm 4 enjoys information-theoretical security.
D. T HREE SERVER MODEL IN S ECURE NN
Changes in the notations.
The Algorithm 6 and Algorithm 5 from SecureNN use different notations.
For example they use (cid:104) w (cid:105) pj to represent the share j of w in a ring of Z p .
Morever, the Algorithmsecret shares each bit of a number x of length (cid:96) which writes {(cid:104) x
[ i ] (cid:105) p } i ∈
[ (cid:96) ] .
The ⊕ means xor sum.
Input: S1 and S2 hold {(cid:104) x
i (cid:105) (0) } i and {(cid:104) x
i (cid:105) (1) } i resp.
f , m
Output: (cid:80) i ∈I α
i x i where I is the set selected by M ULTI K RUM
On S1 and S2 and S3 :
For i in 1 . . .
n do
For j (cid:54) = i in 1 . . .
n do
Compute (cid:104) x
i − x j (cid:105) locally on S1 and S
Call F MATMUL ( { S 1 , S 2 } , S 3) with ( (cid:104) x
i − x j (cid:105) , (cid:104) x
i − x j (cid:105) ) and get (cid:104)
d ij (cid:105) = (cid:104)(cid:107) x
i − x j (cid:107) 2 (cid:105)
End for End for
Denote d = [ d ij ] i<
j be a vector of the distances and X =
[ x 1 ; . .
; x n ]
On S3 :
Let π 1 and π 2 be 2 random permutation function.
For i in π 1 ( 1 . . .
n ) do
For j (cid:54) =
i in π 2 ( 1 . . .
n ) do
Let α ij be the selection vector of d whose entry for d ij is 1 and all others are 0.
Compute (cid:104) α ij (cid:105) and send (cid:104) α ij (cid:105) 0 to S1 and send (cid:104) α ij (cid:105) 1 to S2.
Call Algorithm 6 with input ( (cid:104)
α ij (cid:105) , {(cid:104) d ij (cid:105)} i<j ) and get (cid:104) d (cid:48) ij (cid:105) .
( d ij = (cid:104) d (cid:48) ij (cid:105) (0)
+ (cid:104) d (cid:48) ij (cid:105) (1) )
End for
Sort {(cid:104) d (cid:48) ij (cid:105)}
j using Algorithm 5 to compute (cid:104) score i (cid:105) =
(cid:80) i
→ j (cid:104) d (cid:48) ij (cid:105)
End for
Sort {(cid:104) score i (cid:105)}
i using Algorithm 5 and record the m indicies I with lowset scores.
Let α be a selection vector of length n so that for all entry i ∈ I are 1 and all others are 0.
Compute (cid:104) α (cid:105) and send (cid:104) α (cid:105) (0) to S1 and send (cid:104) α (cid:105) (1) to S2.
Compute (cid:104) α
· X (cid:105) using F MATMUL .
On S1 and S2 :
Let k = 0 for S1 and k = 1 for S
For ˜ i in 1 . . .
n do
For ˜ j in 1 . . .
( n − 1) do
Receive (cid:104)
α ∗∗ (cid:105) ( k ) from S
Call Algorithm 6 with input ( (cid:104)
α ∗∗ (cid:105) , {(cid:104) d ij (cid:105)} i<j ) and get (cid:104) d (cid:48)∗ ˜ j (cid:105) .
End for
Sort {(cid:104) d (cid:48)∗ ˜ j (cid:105)}
˜
j using Algorithm 5 to compute (cid:104) score ˜
i (cid:105) =
(cid:80) ˜
i
→ ˜ j (cid:104) d (cid:48)∗ ˜ j (cid:105)
End for
Sort {(cid:104) score ˜
i (cid:105)}
˜
i using Algorithm 5.
Receive (cid:104) α
(cid:105) k
Compute (cid:104) α
· X (cid:105) using F MATMUL .
α · X (cid:105) to reveal (cid:80) i ∈I α
i x i et al., 2019, Algo. 3)
Input: S 1 and S 2 hold {(cid:104) x
[ i ] (cid:105) p 0 } i ∈ [ (cid:96) ] and {(cid:104) x
[ i ] (cid:105) p 1 } i ∈
[ (cid:96) ] , respectively, a common input r (an l bit integer) and a common random bit β .
The superscript p is a small prime number like 67.
Output: S 3 gets a bit β ⊕ ( x > r )
Common Randomness: S 1 , S 2 hold (cid:96) common random value s i ∈
Z ∗ p for all i ∈
[ (cid:96) ] and a random permutation π for (cid:96) elements.
S 1 and S 2 additionally hold (cid:96) common random values u
i ∈
Z ∗ p .
On each j ∈ { 0 , 1 } server S j +
Let t = r + 1 mod 2 (cid:96) for i =
{ (cid:96), (cid:96) − 1 , . .
, 1 } do if β = 0 then
[Equation]
else if β = 1 AND r (cid:54) = 2 (cid:96) − 1 then
[Equation]
pj (cid:104) c
i (cid:105) pj = − jt
[ i ] + (cid:104) x
[ i ] (cid:105) pj + 1 − j
+ (cid:80) (cid:96)k = i +1 (cid:104) w k (cid:105)
pj else
If i (cid:54) = 1 , (cid:104) c i (cid:105) pj
=
(1 − j )( u i + 1) − ju
i , else (cid:104) c i (cid:105)
pj
=
( − 1) j · u i .
end if end for
Send {(cid:104)
d
i (cid:105) pj } i = π ( { s i (cid:104) c
i (cid:105) pj } i ) to S
On server S
For all i ∈ [ (cid:96) ] , S 3 computes d i =
Reconst p
(cid:104)
d i (cid:105) p 0 , (cid:104) d
i (cid:105) p 1 ) and sets β (cid:48)
=
iff ∃ i ∈ [ (cid:96) ] such that d i =
S 3 outputs β (cid:48)
Algorithm 6 S ELECT S HARE
Π SS ( { S 1 , S 2 } , S 3 ) (Wagh et al., 2019, Algo. 2)
Input: S 1 and S 2 hold ( (cid:104) α
(cid:105) L 0 , (cid:104) x
(cid:105) L 0 , (cid:104)
y
(cid:105) L 0 ) and ( (cid:104)
α
(cid:105) L 1 , (cid:104) x
(cid:105) L 1 , (cid:104)
y
(cid:105) L 1 ) , resp.
Output: S 1 and S 2 get (cid:104)
z
(cid:105) L 0 and (cid:104)
z (cid:105) L 1 resp., where z = (1 − α ) x
+ αy .
Common Randomness: S 1 , S 2 hold shares of 0 over Z L denoted by u 0 and u 1 .
For j ∈ { 0 , 1 } , S j +1 compute (cid:104) w (cid:105)
Lj =
(cid:104) y (cid:105)
Lj − (cid:104) x (cid:105)
Lj .
S 1 , S 2 , S 3 call F MATMUL ( { S 1 , S 2 } , S 3 ) with S j +1 , j ∈ { 0 , 1 } having input ( (cid:104) α
(cid:105)
Lj , (cid:104) w (
cid:105) Lj ) and S 1 ,
S 2 learn (cid:104) c
(cid:105) L 0 and (cid:104) c
(cid:105) L 1 , resp.
For j ∈ { 0 , 1 } , S j +1 outputs (cid:104) z (cid:105)
Lj = (cid:104) x
(cid:105)
Lj + (cid:104) c
(cid:105)
Lj + u j
E E XAMPLE : T WO - SERVER PROTOCOL WITH B YZANTINE SGD ORACLE
We can replace MultiKrum with ByzantineSGD in (Alistarh et al., 2018).
To ﬁt into our protocol, we make some minor modiﬁcations but still guarantee that output is same.
The core part of (Alistarh et al., 2018) is listed in Algorithm 7.
Algorithm 7 ByzantineSGD (Alistarh et al., 2018)
input : I is the set of good workers, { A i } i ∈ [ m ] , {(cid:107) B
i − B j (cid:107)} i<j {(cid:107)∇ k,i −∇ k,j (cid:107)} i<
j ( i, j ∈ [ m ] ), thresholds T A , T B >output :
Subset good workers S
A med := median { A 1 , . . .
, A m } ;
B med ← B i where i ∈ [ m ] is any machine s.t.
|{ j ∈ [ m ] : (cid:107) B j − B i (cid:107) ≤ T B }| > m/ 2 ;
∇ med ← ∇ k,i where i ∈ [ m ] is any machine s.t.
|{ j ∈ [ m ] : (cid:107)∇ k,j − ∇ k,i (cid:107) ≤ 2 ν }| > m/ 2 ;
S ← { i ∈
I :
| A
i − A med | ≤ T A ∧ (cid:107) B i − B med (cid:107) ≤ T B ∧ (cid:107)∇ k,j − ∇ k,i (cid:107) ≤ 4 ν } ;
The main algorithm can be summarized in Algorithm 8, the red lines highlights the changes.
Different from Multi-Krum
(Blanchard et al., 2017), Alistarh et al.
(2018) uses states in their algorithm.
As a result, the servers need to keep track of such states.
• n workers, at most α percent of which are Byzantine.
• Two non-colluding servers S1 and S • ByzantineSGD Oracle:
returns an indices set S .
– With thresholds T A and T B – Oracle state A old i , (cid:104) B old i (cid:105) for each worker
i
Workers :
( WorkerSecretSharing ): (a) randomly split private x i into additive secret shares (cid:104)
x
i (cid:105) =
{ x (1) i , x (2) i } (such that x i
= x (1) i + x (2) i ) (b) sends x (1) i to S1 and x (2) i to S
Servers :
∀ i , S1 collects gradient x (1) i and S2 collects x (2) i .
(a) Use Beaver’s triple to compute A i :
= (cid:104)(cid:104) x
i (cid:105) , (cid:104) w − w 0 (cid:105)(cid:105) inner + A old i (b) (cid:104) B i (cid:105) :
= (cid:104) x
i (cid:105) + (cid:104) B old i (cid:105) 2.
( RobustSubsetSelection ): (a) For each pair ( i, j ) of gradients computes their distance ( i < j ) : • On S1 and S2 , compute (cid:104) B
i − B j (cid:105) =
(cid:104) B
i (cid:105) − (cid:104) B j (cid:105) locally • Use precomputed Beaver’s triple and Algorithm 3 to compute the distance (cid:107) B
i − B j (cid:107)• On S1 and S2 , compute (cid:104) x
i − x j (cid:105) =
(cid:104) x
i (cid:105) − (cid:104) x j (cid:105) locally • Use precomputed Beaver’s triple and Algorithm 3 to compute the distance (cid:107) x i − x j (cid:107)(b) S2 perform Byzantine SGD S =
ByzantineSGD( { A i } i , {(cid:107) B
i − B j
} i<j , {(cid:107) x
i − x j (cid:107)} i<j , T A , T B ); if |S| < 2 , exit; Convert S to a weight vector p of length n (c) S2 secret-shares (cid:104) p (cid:105) with S 3.
( AggregationAndUpdate ): (a) On S1 and S2 , use MPC multiplication to compute (cid:104) (cid:80) ni
=1 p
i x i (cid:105) locally (b) S2 sends its share of (cid:104) (cid:80) ni
=1 p
i x i (cid:105) (2) to S (c) S1 reveals z = (cid:80) n i =1 p
i x i to all workers.
Workers :
( WorkerPullModel )
z
model w
locally