Minimizing Latency for Secure Distributed Computing
Rawad Bitar, Parimal Parag, Salim El Rouayheb
I Introduction
We consider the setting of distributed computing in which a server M, referred to as Master, possesses confidential data, such as personal information of online users, genomic and medical data etc., and wants to perform intensive computations on it. M wants to divide these computations into smaller computational tasks and distribute them to worker machines that can perform these smaller tasks in parallel. The workers then return their results to the master, who can process them to obtain the result of its original task. The well celebrated MapReduce framework falls under this model and is implemented in many computing clusters.
In this paper, we are interested in applications in which the worker machines do not belong to the same system or cluster as the master. Rather, the workers are online computing machines that can be hired or can volunteer to help the master in its computations. Existing applications that fall under this model include the SETI@home project for search for extraterrestrial intelligence , the folding@home project for disease research that simulates protein folding and Amazon mechanical turkAmazon mechanical turk hires humans to perform tasks. But, one can imagine a similar application where computing machines are hired. . The additional constraint that we worry about here, and which does not exist in the previous applications, is that the workers cannot be trusted with the sensitive data, which must remain hidden from them. Our privacy constraint is information theoretic, meaning that each worker must obtain zero information about the data irrespective of its computational power. We choose information theoretic privacy instead of homomorphic encryption, due to the high computation and memory overheads of the latter .
We focus on linear computations (matrix multiplication) since they form a basic building block of many iterative algorithms. The workers introduce random delays due to the difference of their workloads or network congestion. This causes the Master to wait for the slowest workers, referred to as stragglers in the distributed computing community . In addition, some workers may never respond. Our goal is to reduce the delay at the Master caused by the workers.
Privacy can be achieved by encoding the data using a linear secret sharing codes as illustrated in Example 1. However, these codes are not specifically designed to minimize latency as we will highlight later.
Let the matrix denote the data set owned by M and let be a given vector. M wants to compute . Suppose that M gets the help of workers out of which at most may be unresponsive. M generates a random matrix of same dimensions as and over the same field and encodes and into 3 shares , and using a secret sharing scheme . First, M sends share to worker (Figure 3) and then sends to all the workers. Each worker computes and sends it back to M (Figure 3). M can decode after receiving any responses. For instance, if the first two workers respond, M can obtain . No information about is revealed to the workers, because is one-time padded by .
The delay experienced by M in the previous example results from the fact it has to wait until workers finish their whole tasks in order to decode , even when the workers are all responsive. This is due to the fact that classical secret sharing codes are designed for the worst-case scenario of one worker being unresponsive. We overcome this limitation by using Staircase codes which were introduced in and are explained in the next example.
Consider the same setting as Example 1. Instead of using a classical secret sharing code, M now encodes and using the Staircase code given in Table I.
The Staircase code requires M to divide the matrices and into and . In this setting, M sends two subshares to each worker, hence each task consists of subtasks. The master sends to all the workers. Each worker multiplies the subshares by (going top to bottom) and sends each multiplication back to M independently. Now, M has two possibilities for decoding: 1) Mreceives the first subtask from all the workers, i.e., receives , and and decodes which is the concatenation of and . Note that M decodes only and does not need to decode . 2) Mreceives all the subtasks from any workers and decodes . Here M has to decode and . One can check that no information about is revealed to the workers.
Under an exponential delay model for each worker, we show that the Staircase code given in Example 2 can lead to a improvement in delay over the secret sharing code given in Example 1. Our goal is to give a general systematic study of the delay incurred by Staircase codes and compare it to classical secret sharing codes.
Related work: Straggler mitigation and privacy concerns are studied separately in the literature. In Liang et al. adaptively encoded the tasks depending on the workload at the workers’ end. Lee et al. used MDS codes to mitigate stragglers in linear distributed machine learning algorithms. Tandon et al. introduced new codes for straggler mitigation in distributed gradient descent algorithms. Li et al. studied the effect of the workers’ computation load on the communication complexity.
On the other hand, privacy concerns have been studied in the machine learning literature, see e.g., . The main model assumes that several parties owning private data sets want to train a model based on all the data sets without revealing them, e.g., . However, the techniques extensively rely on cryptographic assumptions and secure multi-party computation. Atallah and Frikken studied the problem of distributively multiplying two private matrices assuming that workers can collude (with ). The provided solution ensures information theoretic privacy, but does not account for straggler mitigation. Another related problem is federated learning . A large number of users own different amounts of data and a central server aims to train a high-quality model based on all the data with the smallest communication complexity. However, privacy is ensured by keeping the data local to the users.
Contributions: In this paper, we consider the model in which M owns the whole data set on which it wants to perform a distributed linear computation. We introduce a new approach for securely outsourcing the linear computations to workers which do not own any parts of the data. The data set is to be kept private in an information theoretic sense. We assume that at most , workers may be unresponsive, the remaining respond at random times. This is similar to the straggler problem. We study the master’s waiting time, i.e., the aggregate delays caused by the workers, under the exponential model when using Staircase codes. More specifically, we make the following contributions: (i) we derive an upper bound and a lower bound on the mean waiting time; (ii) we derive an integral expression leading to the CDF of the waiting time and use this expression to find the exact mean waiting time for the cases when and ; and (iii) we compare our approach to the approach using secret sharing and show that for high rates, , and small number of workers our approach saves about of the waiting time. Moreover, we ran simulations to check the tightness of the bounds and show that for low rates our approach saves at least of the waiting time for all values of .
II System Model
Workers model: The workers have the following properties: 1) At most workers may be unresponsive. The actual number of unresponsive workers is unknown a priori. 2) The responsive workers incur random delays while executing the task assigned to them by M resulting in what is known as the straggler problem . We model all the delays incurred by each worker by an independent and identical exponential random variable. 3) The workers do not collude, i.e., they do not share with each other the data they receive from M. This has implications on the privacy constraint described later.
General scheme: M encodes , using randomness, into shares sent to worker , . Any or more shares can decode . The workers obtain zero information about , i.e., for all .
At each iteration, the master sends to all the workers. Then, each worker computes and sends it back to the master. Since the scheme and the computations are linear, the master can decode after receiving enough responsesIn some cases the attribute vectors contain information about , and therefore need to be hidden from the workers. We describe in how our scheme can be generalized to such cases.. We refer to such scheme as an system.
Delay model: Let be the random variable representing the time spent to compute at one worker. We assume a mother runtime distribution that is exponentialOur analysis remains true for the shifted exponential model . with rate . Due to the encoding, each task given to a worker is times smaller than . Let denote the time spent by worker to execute its task, then we assume that is a scaled distribution of , i.e.,
For an system using Staircase codes, we assume that is evenly distributed between the subshares, i.e., the time spent by a worker on one subshare is equal to . Let be the order statistic of the ’s and be the time the master waits until it can decode . We can write
where . For an system using classical secret sharing codes, we can write
III Main Results
Our main results are summarized as follows. We provide an upper bound and a lower bound on the mean waiting time of M in Theorem 1.
where is the harmonic sum defined as , and . The mean waiting time is lower bounded by
Discussion: Our extensive simulations show that (1) is a good approximation of the mean waiting time. Moreover, by taking in (1), the upper bound on the mean waiting time of Staircase codes becomes the one of classical secret sharing, i.e.,
While finding the exact expression of the mean waiting time for any system remains open, we derive in Corollary 1 an expression for systems with and parities, i.e. and systems, using the result of Theorem 2. Using Corollary 1 one can compare the performance of Staircase codes an secret sharing codes. For instance, in a system Staircase codes reduce the mean waiting time by .
Let , the CDF of the waiting time of an system using Staircase codes is given by
where and .
To check the tightness of the bounds we plot in Figure 4 the upper bound in (1), lower bound in (1) and the exact mean waiting time in (17) for systems.
IV Proof of Theorem 1
We will need the following characterization of order statistics for iid exponential random variables.
The order statistic of iid exponential random variables , with distribution function , is equal to a random variable in the distribution, where
and are iid random variables with distribution .
Since is a convex function, we can use Jensen’s inequality to write
Equations (5) and (6) conclude the proof. We give an intuitive behavior of the upper bound. The harmonic number can be approximated by where is called the Euler-Mascheroni constant. Therefore, . Hence, we can write
IV-B Lower bound on the mean waiting time
where . For to be greater than , all the order statistic ’s must be greater than for . We show that if is satisfied, then the previous condition is satisfied. If , then for all , because . It follows that if for all , then . Therefore, . Furthermore,
Next we derive an expression of . Note that , using Theorem 3 we can write
where . From (9) we get
Since , we can write
On the other hand, is the probability that there are at most ’s less than , therefore
Recall that , therefore by using the binomial expansion we can write
Using (13) and the fact that , (12) becomes
Combining (11) and (14) and noting that , (10) becomes
Note that and that the integral of a sum is equal to the sum of the integrals. Therefore, integrating (IV-B) from to and maximizing it over all values of , concludes the proof.
V Proof of Theorem 2
We derive an integral expression leading to the probability distribution of the waiting time . Since the delays at the workers’ side ’s are independent and are absolutely continuous with respect to the Lebesgue measure (i.e. the probability density exists), we have
where denotes and . Therefore we can write the distribution of as
That is, we can re-write as
The result of Claim 1 is straightforward, it follows from integrating times the complementary CDF of an exponential random variable in respect to its derivative. This completes the proof. A more detailed proof of Claim 1 can be found in . We state the mean waiting time for the and systems in Corollary 1.
VI Simulations
We check the tightness of the bounds of Theorem 1 and measure the improvement, in terms of delays, of Staircase codes over classical secret sharing codes for systems with fixed rate . In Figure 7 (a) we plot the upper bound (1), lower bound (1) and the simulated mean waiting time for . Our extensive simulations show that the upper bound is a good approximation of the exact mean waiting time, whereas the lower bound might be loose.