Lagrange Coded Computing: Optimal Design for Resiliency, Security and Privacy
Qian Yu, Songze Li, Netanel Raviv, Seyed Mohammadreza Mousavi Kalan, Mahdi Soltanolkotabi, Salman Avestimehr
I Introduction
The massive size of modern datasets necessitates computational tasks to be performed in a distributed fashion, where the data is dispersed among many servers that operate in parallel . As we “scale out” computations across many servers, however, several fundamental challenges arise. Cheap commodity hardware tends to vary greatly in computation time, and it has been demonstrated that a small fraction of servers, referred to as stragglers, can be to times slower than the average, thus creating significant delays in computations. Also, as we distribute computations across many servers, massive amounts data must be moved between them to execute the computational tasks, often over many iterations of a running algorithm, and this creates a substantial bandwidth bottleneck . Distributed computing systems are also much more susceptible to adversarial servers, making security and privacy a major concern .
We consider a general scenario in which the computation is carried out distributively across several workers, and propose Lagrange Coded Computing (LCC), a new framework to simultaneously provide
resiliency against straggler workers that may prolong computations;
security against Byzantine (or malicious, adversarial) workers, with no computational restriction, that deliberately send erroneous data in order to affect the computation for their benefit; and
(information-theoretic) privacy of the dataset amidst possible collusion of workers.
LCC can be applied to any computation scenario in which the function of interest is an arbitrary multivariate polynomial of the input dataset. This covers many computations of interest in machine learning, such as various gradient and loss-function computations in learning algorithms and tensor algebraic operations (e.g., low-rank tensor approximation). The key idea of LCC is to encode the input dataset using the well-known Lagrange polynomial, in order to create computational redundancy in a novel coded form across the workers. This redundancy can then be exploited to provide resiliency to stragglers, security against malicious servers, and privacy of the dataset.
Our main result is that by carefully encoding the dataset the proposed LCC achieves if . The significance of this result is that by one additional worker (i.e., increasing by 1) LCC can increase the resiliency to stragglers by 1 or increase the robustness to malicious servers by , while maintaining the privacy constraint. Hence, this result essentially extends the well-known optimal scaling of error-correcting codes (i.e., adding one parity can provide robustness against one erasure or error in optimal maximum distance separable codes) to the distributed secure computing paradigm.
We prove the optimality of LCC by showing that it achieves the optimal tradeoff between resiliency, security, and privacy. In other words, any computing scheme (under certain complexity constrains on the encoding and decoding designs) can achieve if and only if .More accurately, when , we prove that the optimal tradeoff is instead given by , which can be achieved by a variation of the LCC scheme, as described in Appendix D. This result further extends the scaling law in coding theory to private computing, showing that any additional worker enables data privacy against additional colluding workers.
Finally, we specialize our general theoretical guarantees for LCC in the context of least-squares linear regression, which is one of the elemental learning tasks, and demonstrate its performance gain by optimally suppressing stragglers. Leveraging the algebraic structure of gradient computations, several strategies have been developed recently to exploit data and gradient coding for straggler mitigation in the training process (see, e.g., ). We implement LCC for regression on Amazon EC2 clusters, and empirically compare its performance with the conventional uncoded approaches, and two state-of-the-art straggler mitigation schemes: gradient coding (GC) and matrix-vector multiplication (MVM) based approaches . Our experiment results demonstrate that compared with the uncoded scheme, LCC improves the run-time by -. Compared with the GC scheme, LCC improves the run-time by -. Compared with the MVM scheme, LCC improves the run-time by -.
Related works. There has recently been a surge of interest on using coding theoretic approaches to alleviate key bottlenecks (e.g., stragglers, bandwidth, and security) in distributed machine learning applications (e.g., ). As we discuss in more detail in Section III-A, the proposed LCC scheme significantly advances prior works in this area by 1) generalizing coded computing to arbitrary multivariate polynomial computations, which are of particular importance in learning applications; 2) extending the application of coded computing to secure and private computing; 3) reducing the computation/communication load in distributed computing (and distributed learning) by factors that scale with the problem size, without compromising security and privacy guarantees; and 4) enabling - speedup over the state-of-the-art in distributed least-squares linear regression in cloud networks.
Secure multiparty computing (MPC) and secure/private Machine Learning (e.g., ) are also extensively studied topics that address a problem setting similar to LCC. As we elaborate in Section III-A, compared with conventional methods in this area (e.g., the celebrated BGW scheme for secure/private MPC ), LCC achieves substantial reduction in the amount of randomness, storage overhead, and computation complexity.
II Problem Formulation and Examples
Resiliency, i.e., robustness against stragglers. Formally, the master must be able to obtain the correct values of even if up to workers fail to respond (or respond after the master executes the decoding algorithm), where is the resiliency parameter of the system. A scheme that guarantees resiliency against stragglers is called -resilient.
Security, i.e., robustness against adversaries. That is, the master must be able to obtain correct values of even if up to workers return arbitrarily erroneous results, where is the security parameter of the system. A scheme that guarantees security against adversaries is called -secure.
This framework encapsulates many computation tasks of interest, which we highlight as follows.
III Main Results and Prior Works
We now state our main results and discuss their connections with prior works. Our first theorem characterizes the region for that LCC achieves (i.e., the set of all feasible -resilient, -secure, and -private schemes via LCC as defined in the previos section).
Given a number of workers and a dataset , LCC provides an -resilient, -secure, and -private scheme for computing for any polynomial , as long as
To prove Theorem 1, we formally present LCC in Section IV, which achieves the stated resiliency, security, and privacy. The key idea is to encode the input dataset using the well-known Lagrange polynomial. In particular, encoding functions (i.e., ’s) in LCC amount to evaluations of a Lagrange polynomial of degree at distinct points. Hence, computations at the workers amount to evaluations of a composition of that polynomial with the desired function . Therefore, inequality (1) may simply be seen as the number of evaluations that are necessary and sufficient in order to interpolate the composed polynomial, which is later evaluated at a certain point to finalize the computation. LCC also has a number of additional properties of interest. First, the proposed encoding is identical for all computations , which allows pre-encoding of the data without knowing the identity of the computing task (i.e., universality). Second, decoding and encoding rely on polynomial interpolation and evaluation, and hence efficient off-the-shelf subroutines can be used.A more detailed discussion on the coding complexities of LCC can be found in Appendix B.
Besides the coding approach presented to achieve Theorem 1, a variation of LCC can be used to achieve any as long as . This scheme (presented in Appendix D) achieves an improved region when and , where it recovers the uncoded repetition scheme. For brevity, we refer the better of these two scheme as LCC when presenting optimality results (i.e., Theorem 2).
Note that LHS of inequality (1) is independent of the number of workers , hence the key property of LCC is that adding worker can increase its resilience to stragglers by 1 or its security to malicious servers by , while keeping the privacy constraint the same. Note that using an uncoded replication based approach, to increase the resiliency to stragglers by 1, one needs to essentially repeat each computation once more (i.e., requiring more machines as opposed to machine in LCC). This result essentially extends the well-known optimal scaling of error-correcting codes (i.e., adding one parity can provide robustness against one erasure or error in optimal maximum distance separable codes) to the distributed computing paradigm.
Our next theorem demonstrates the optimality of LCC.
Theorem 2 is proved in Section V. The main proof idea is to show that any computing strategy that outperforms LCC would violate the decodability requirement, by finding two instances of the computation process where the same intermediate computing results correspond to different output values.
In addition to the result we show in Theorem 2, we can also prove that LCC achieves optimality in terms of the amount of randomness used in data encoding. Specifically, we show in Appendix I that LCC requires injecting the minimum amount of randomness, among all computing schemes that universally achieve the same resiliency-security-privacy tradeoff for all linear functions .
We conclude this section by discussing several lines of related work in the literature and contrasting them with LCC.
The study of coding theoretic techniques for accelerating large scale distributed tasks (a.k.a. coded computing) was initiated in . Following works focused largely on matrix-vector and matrix-matrix multiplication (e.g., ), gradient computation in gradient descent algorithms (e.g., ), communication reduction via coding (e.g., ), and secure and private computing (e.g., ).
More importantly, LCC improves and generalizes these works on coded computing in a few aspects: Generality–LCC significantly generalizes prior works to go beyond linear and bilinear computations that have so far been the main focus in this area, and can be applied to arbitrary multivariate polynomial computations that arise in machine learning applications. In fact, many specific computations considered in the past can be seen as special cases of polynomial computation. This includes matrix-vector multiplication, matrix-matrix multiplication, and gradient computation whenever the loss function at hand is a polynomial, or is approximated by one. Universality–once the data has been coded, any polynomial up to a certain degree can be computed distributedly via LCC. In other words, data encoding of LCC can be universally used for any polynomial computation. This is in stark contrast to previous task specific coding techniques in the literature. Furthermore, workers apply the same computation as if no coding took place; a feature that reduces computational costs, and prevents ordinary servers from carrying the burden of outliers. Security and Privacy–other than a handful of works discussed above, straggler mitigation (i.e., resiliency) has been the primary focus of the coded computing literature. This work extends the application of coded computing to secure and private computing for general polynomial computations.
Providing security and privacy for multiparty computing (MPC) and Machine Learning systems is an extensively studied topic which addresses a problem setting similar to LCC. To illustrate the significant role of LCC in secure and private computing, let us consider the celebrated BGW MPC scheme . Conventionally, the BGW scheme operates in a multi-round fashion, requiring significantly more communication overhead than one-shot approaches. For simplicity of comparison, we present a modified one-shot version of BGW.
Given inputs , BGW first uses Shamir’s scheme to encode the dataset in a privacy-preserving manner as for every , where ’s are i.i.d uniformly random variables and is the number of colluding workers that should be tolerated. The key distinction between the data encoding of BGW scheme and LCC is that we instead use Lagrange polynomials to encode the data. This results in significant reduction in the amount of randomness needed in data encoding (BGW needs ’s while as we describe in the next section, LCC only needs amount of randomness).
Hence, in overall comparison with the BGW scheme, LCC results in a factor of reduction in the amount of randomness, storage overhead, and computation complexity, while requiring more workers to guarantee the same level of privacy. This is summarized in Table I.A BGW scheme was also proposed in for secure MPC, however for a substantially different setting. Similarly, a comparison can be made by adapting it to our setting, leading to similar results, which we omit for brevity.
Recently, has also combined ideas from the BGW scheme and to form polynomial sharing, a private coded computation scheme for arbitrary matrix polynomials. However, polynomial sharing inherits the undesired BGW property of performing a communication round for every bilinear operation in the polynomial; a feature that drastically increases communication overhead, and is circumvented by the one-shot approach of LCC. DRACO is also recently proposed as a secure computation scheme for gradients. Yet, DRACO employs a blackbox approach, i.e., the resulting gradients are encoded rather than the data itself, and the inherent algebraic structure of the gradients is ignored. For this approach, shows that a multiplicative factor of redundant computations is necessary. In LCC however, the blackbox approach is disregarded in favor of an algebraic one, and consequently, a additive factor suffices.
LCC has also been recently applied to several applications in which security and privacy in computations are critical. For example, in , LCC has been applied to enable a scalable and secure approach to sharding in blockchain systems. Also, in , a privacy-preserving approach for machine learning has been developed that leverages LCC to provides substantial speedups over cyrptographic approaches that relay on MPC.
IV Lagrange Coded Computing
In this Section we prove Theorem 1 by presenting LCC and characterizing the region for that it achieves.For an algorithmic illustration, see Appendix A. We start with an example to illustrate the key components of LCC.
Consider the function , where input ’s are square matrices for some square integer . We demonstrate LCC in the scenario where the input data is partitioned into batches and , and the computing system has workers. In addition, the suggested scheme is -resilient, -secure, and -private (i.e., achieves ).
Normally, a polynomial of degree can be interpolated from evaluations at distinct points. However, the presence of adversary and straggler requires the master to employ a Reed-Solomon decoder, and have three additional evaluations at distinct points (in general, two additional evaluations for every adversary and one for every straggler). Finally, after decoding polynomial , the master can obtain and by evaluating it at and .
IV-B General Description
V Optimality of LCC
The proof rely on the following key lemma, which characterizes the recovery threshold of any encoding scheme, defined as the minimum number of workers that the master needs to wait to guarantee decodability.
Given any multilinear , the recovery threshold of any valid linear encoding scheme, denoted by , satisfies
Moreover, if the encoding scheme is private, we have .
The proof of Lemma 1 can be found in Appendix E, by constructing instances of the computation process for any assumed scheme that achieves smaller recovery threshold, and proving that such scheme fails to achieve decodability in these instances. Intuitively, note that the recovery threshold is exactly the difference between and the number of stragglers that can be tolerated, inequality (1) in fact proves that LCC (described in Section IV and Appendix G) achieves the optimum resiliency, as it exactly achieves the stated recovery threshold. Similarly, one can verify that Lemma 1 essentially states that LCC achieves the optimal tradeoff between resiliency and privacy.
Assuming the correctness of Lemma 1, the two parts of Theorem 2 can be proved as follows. To prove part (a) of the converses, we need to extend Lemma 1 to also take adversaries into account. This is achieved by using an extended concept of Hamming distance, defined in for coded computing. Part (b) requires generalizing Lemma 1 to arbitrary polynomial functions, which is proved by showing that for any that achieves any pair, there exists a multilinear function with the same degree for which a computation scheme can be found to achieves the same requirement. The detailed proofs can be found in Appendices F and G respectively.
VI Application to Linear Regression and Experiments on AWS EC2
In this section we demonstrate a practical application of LCC in accelerating distributed linear regression, whose gradient computation is a quadratic function of the input dataset, hence matching well the LCC framework. We also experimentally demonstrate its performance gain over state of the arts via experiments on AWS EC2 clusters.
To run GD distributedly over a system comprising a master node and worker nodes, we first partition into sub-matrices. Each worker stores coded sub-matrices generated from linearly combining s, for some parameter . Given the current weight , each worker performs computation using its local storage, and sends the result to the master. Master recovers using the results from a subset of fastest workers.Since the value of does not vary across iterations, it only needs to be computed once. We assume that it is available at the master for weight updates. To measure performance of any linear regression scheme, we consider the metric recovery threshold (denoted by ), defined as the minimum number of workers the master needs to wait for, to guarantee decodability (i.e., tolerating the remaining stragglers).
We cast this gradient computation to the computing model in Section II, by grouping the sub-matrices into blocks such that . Then computing reduces to computing the sum of a degree- polynomial , evaluated over . Now, we can use LCC to decide on the coded storage as in (2), and achieve a recovery threshold of (Theorem 1).This recovery threshold is also optimum within a factor of , as we proved in Appendix J.
Comparisons with state of the arts. The conventional uncoded scheme picks , and has each worker compute . Master needs result from each work, yielding a recovery threshold of . By redundantly storing/processing uncoded sub-matrices at each worker, the “gradient coding” (GC) methods code across partial gradients computed from uncoded data, and reduce the recovery threshold to . An alternative “matrix-vector multiplication based” (MVM) approach requires two rounds of computation. In the first round, an intermediate vector is computed distributedly, which is re-distributed to the workers in the second round for them to collaboratively compute . Each worker stores coded data generated using MDS codes from and respectively. MVM achieves a recovery threshold of in each round, when the storage is evenly split between rounds.
Compared with GC, LCC codes directly on data, and reduces the recovery threshold by about times. While the amount of computation and communication at each worker is the same for GC and LCC, LCC is expected to finish much faster due to its much smaller recovery threshold. Compared with MVM, LCC achieves a smaller recovery threshold than that in each round of MVM (assuming even storage split). While each MVM worker performs less computation in each iteration, it sends two vectors whose sizes are respectively proportional to and , whereas each LCC worker only sends one dimension- vector.
We run linear regression on AWS EC2 using Nesterov’s accelerated gradient descent, where all nodes are implemented on t2.micro instances. We generate synthetic datasets of data points, by 1) randomly sampling a true weight , 2) randomly sampling each input of features and computing its output . For each dataset, we run GD for iterations over workers. We consider different dimensions of input matrix as listed in the following scenarios.
We let the system run with naturally occurring stragglers in scenario 1. To mimic the effect of slow/failed workers, we artificially introduce stragglers in scenarios 2 and 3, by imposing a seconds delay on each worker with probability in each iteration.
To implement LCC, we set the parameters to , and the parameters to . To avoid numerical instability due to large entries of the decoding matrix, we can embed input data into a large finite field, and apply LCC in it with exact computations. However in all of our experiments the gradients are calculated correctly without carrying out this step.
Results. For GC and LCC, we optimize the total run-time over subject to local memory size. For MVM, we further optimize the run-time over the storage assigned between two rounds of matrix-vector multiplications. We plot the measured run-times in Figure 2, and list the detailed breakdowns of all scenarios in Appendix K.
We draw the following conclusions from experiments.
LCC achieves the least run-time in all scenarios. In particular, LCC speeds up the uncoded scheme by -, the GC scheme by -, and the MVM scheme by -.
In scenarios 1 & 2 where the number of inputs is close to the number of features , LCC achieves a similar performance as MVM. However, when we have much more data points in scenario 3, LCC finishes substantially faster than MVM by as much as . The main reason for this subpar performance is that MVM requires large amounts of data transfer from workers to the master in the first round and from master to workers in the second round (both are proportional to ). However, the amount of communication from each worker or master is proportional to for all other schemes, which is much smaller than in scenario 3.
Acknowledgement
This material is based upon work supported by Defense Advanced Research Projects Agency (DARPA) under Contract No. HR001117C0053, ARO award W911NF1810400, NSF grants CCF-1703575, ONR Award No. N00014-16-1-2189, and CCF-1763673. The views, opinions, and/or findings expressed are those of the author(s) and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government. M. Soltanolkotabi is supported by the Packard Fellowship in Science and Engineering, a Sloan Research Fellowship in Mathematics, an NSF-CAREER under award #1846369, the Air Force Office of Scientific Research Young Investigator Program (AFOSR-YIP) under award #FA9550-18-1-0078, an NSF-CIF award #1813877, and a Google faculty research award. Qian Yu is supported by the Google PhD Fellowship.
References
Supplementary Material
(this requirement is alleviated if ).
B Coding Complexities of LCC
Finally, note that the adversaries can only affect a fixed subset of workers’ results for all entries. This decoding time can be further reduced by computing the final outputs entry-wise: for each iteration, ignore computing results from adversaries identified in earlier steps, and proceed decoding with the rest of the results.
The matrix is an MDS matrix.
To show that is an MDS matrix, it is shown that can be obtained from by multiplying rows and columns by nonzero scalars. Let , and notice that for , entry of can be written as
where is a matrix such that
Since , and since all the ’s are distinct, it follows from (C) that can be obtained from by multiplying each row and each column by a nonzero element, and hence is an MDS matrix as well. ∎
D The Uncoded Version of LCC
In Section IV-B, we have described the LCC scheme, which provides an -resilient, -secure, and -private scheme as long as . Instead of explicitly following the same construction, a variation of LCC can be made by instead selecting the values of ’s from the set (not necessarily distinctly).
We refer to this approach as the uncoded version of LCC, which essentially recovers the uncoded repetition scheme, which simply replicates each onto multiple workers. By replicating every between and times, it can tolerate at most stragglers and adversaries, whenever
which achieves the optimum resiliency and security when the number of workers is small and no data privacy is required (specifically, and , see Section V).
When privacy is taken into account (i.e., ), an alternative approach in place of repetition is to instead store each input variable using Shamir’s secret sharing scheme over to machines. This approach achieves any tuple whenever . However, it does not improve LCC.
E Proof of Lemma 1
Without loss of generality, we assume both the encoding and decoding functions are deterministic in this proof, as the randomness does not help with decodability.Note that this argument requires the assumption that the decoder does not have access to the random keys, as assumed in Section II. Similar to , we define the minimum recovery threshold, denoted by , as the minimum number of workers that the master has to wait to guarantee decodability, among all linear encoding schemes. Then we essentially need to prove that , i.e., when , and when .
Obviously is a non-decreasing function with respect to . Hence, it suffices to prove that when . We prove this converse bound by induction.
(a) If , then is a linear function, and we aim to prove for . This essentially means that no valid computing schemes can be found when . Assuming the opposite, suppose we can find a valid computation design using at most workers, then there is a decoding function that computes all ’s given the results from these workers.
(b) Suppose we have a matching converse for any multilinear function with . We now prove the lower bound for any multilinear function of degree . Similar to part (a), it is easy to prove that for . Hence, we focus on .
The proof idea is to construct a multilinear function with degree based on function , and to lower bound the minimum recovery threshold of using that of . More specifically, this is done by showing that given any computation design for function , a computation design can also be developed for the corresponding , which achieves a recovery threshold that is related to that of the scheme for .
In particular, for any non-zero function , we let be a function which takes inputs and returns a linear map, such that given any , we have . One can verify that is a multilinear function with degree , Given parameters and , we now develop a computation strategy for for a dataset of inputs and a cluster of workers, which achieves a recovery threshold of . We construct this computation strategy based on an encoding strategy of that achieves the recovery threshold . For brevity, we refer to these two schemes as the -scheme and -scheme respectively.
To summarize, we have essentially proved that . We can verify that the converse bound under the condition can be derived given the above result and the induction assumption, for any function with degree .
Now we proceed to prove the rest of Lemma 1, explicitly, we aim to prove that the recovery threshold of any -private encoding scheme is at least . Inequality (1) essentially covers the case for . Hence, we focus on . To simplify the proof, we prove a stronger version of this statement: when , any valid -private encoding scheme uses at least workers. Equivalently, we aim to show that for any such scheme.
We prove this fact using an inductive approach. To enable an inductive structure, we prove a even stronger converse by considering a more general class of computing tasks and a larger class of encoding schemes, formally stated in the following lemma.
Lemma 3 is proved by induction with respect to the tuple . Specifically, we prove that (a) Lemma 3 holds when ; (b) If Lemma 3 holds for any , then it holds when ; (c) If Lemma 3 holds for any , then it holds when for any ; (d) If Lemma 3 holds for any and arbitrary values of and , then it holds if . Assuming the correctness of these statements, Lemma 3 directly follows by induction’s principle. Now we provide the proof of these statements as follows.
(a). When , we need to show that at least worker is needed. This directly follows from the decodability requirement, because the master aims to recover a variable, and at least one variable is needed to provide the information.
For case (i), similar to the ideas we used to prove inequality (1), it suffices to show that if the given computing scheme uses workers, we can construct another computation scheme achieving the same , for a different computing task with parameters and , using at most workers.
Now for any , we can restrict the value of to a subspace with dimension , such that is zero for any . After applying this operation, from the computation results of workers in , the master can recover a computing function with , where sub-functions has non-zero ’s. By applying the induction assumption on this provided computing scheme, we have . By taking the summation of the this inequality over , we have
Note that , which implies that at least two ’s are not identical up to a constant factor. Hence, , and (8) is equivalently
Since and are both positive, we have . Consequently, , and we have
(c). Assuming that for any , any valid computing scheme requires workers, we need to prove that for , . Equivalently, we aim to show that for any , in order to provide -privacy to the th entry, extra worker is needed. Similar to the earlier steps, we consider an arbitrary valid computing scheme for that uses workers. We aim to construct a new scheme for , for the same computation task and the same , which uses at most workers.
(d). Assuming that for any and arbitrary values of and , any valid computing scheme requires workers, we need to prove that for , . Observing that for any computing task with , by fixing an non-zero , it essentially computes functions where each multiplies variables. Moreover, for each function, by viewing the first entries as a vector and by viewing the last entry as a scalar , it essentially recovers the case where the parameter is reduced by , remain unchanged, and equals . By adapting any computing scheme in the same way, we have remain unchanged, and becomes . Then by induction assumption, any computing scheme for requires at least workers. ∎
Using exactly the same arguments, Lemma 3 can be extended to the case where the entries of are encoded under different privacy requirements. Specifically, if the th entry is -privately encoded, then at least worker is needed. Lemma 3 and this extended version are both tight, in the sense for any parameter values of , and , there are computing tasks where a computing scheme that uses the matching number of workers can be found, using constructions similar to the Lagrange coded computing.
Now using Lemma 3, we complete the proof of Lemma 1 for . Similar to the proof ideas for inequality (1) part (a), we consider any multilinear function with degree , and we find constant vectors , such that is non-zero. Then by restricting the input variables to be constant multiples of , this computing task reduces to multiplying scalars, given inputs. As stated in Lemma 3 and discussed in part (d) of its induction proof, such computation requires workers. This completes the proof of Lemma 1.
F Optimality on the Resiliency-Security-Privacy Tradeoff for Multilinear Functions
In this appendix, we prove the first part of Theorem 2 using Lemma 1. Specifically, we aim to prove that LCC achieves the optimal trade-off between resiliency, security, and privacy for any multilinear function . By comparing Lemma 1 and the achievability result presented in Theorem 1 and Appendix D, we essentially need to show that for any linear encoding scheme that can tolerates adversaries and stragglers, it can also tolerate stragglers.
This converse can be proved by connecting the straggler mitigation problem and the adversary tolerance problem using the extended concept of Hamming distance for coded computing, which is defined in . Specifically, given any (possibly random) encoding scheme, its hamming distance is defined as the minimum integer, denoted by , such that for any two instances of input whose outputs are different, and for any two possible realizations of the encoding functions, the computing results given the encoded version of these two inputs, using the two lists of encoding functions respectively, differs for at least workers.
It was shown in that this hamming distance behaves similar to its classical counter part: an encoding scheme is -resilient and -secure whenever . Hence, for any encoding scheme that is -secure and -reselient, it has a hamming distance of at least . Consequently it can tolerate stragglers. Combining the above and Lemma 1, we have completed the proof.
G Optimality on the Resiliency-Privacy Tradeoff for General Multivariate Polynomials
In this appendix, we prove the second part of Theorem 2 using Lemma 1. Specifically, we aim to prove that LCC achieves the optimal trade-off between resiliency and privacy, for general multivariate polynomial . The proof is carried out by showing that for any function that allows -resilient -private designs, there exists a multilinear function with the same degree for which a computation scheme can be found that achieves the same requirement.
Specifically, given any function with degree , we aim to provide an explicit construction of an multilinear function, denoted by , which achieves the same requirements. The construction satisfies certain properties to ensure this fact. Both the construction and the properties are formally stated in the following lemma (which is proved in Appendix H):
Assuming the correctness of Lemma 4, it suffices to prove that enables computation designs that tolerates at least the same number of stragglers, and provides at least the same level of data privacy, compared to that of . We prove this fact by constructing such computing schemes for given any design for .
Note that is defined as a linear combination of functions , each of which is a composition of a linear map and . Given the linearity of the encoding design, any computation scheme of can be directly applied to any of these functions, achieving the same resiliency and privacy requirements. Since the decoding functions are linear, the same scheme also applies to linear combinations of them, which includes . Hence, the resiliency-privacy tradeoff achievable for can also be achieved by . This concludes the proof.
H Proof of Lemma 4
We first prove that is multilinear with respect to the inputs. Recall that by definition, is a linear combination of monomials, and is constructed based on through a linear operation. By exploiting the commutativity of these these two linear relations, we only need to show individually that each monomial in is transformed into a multilinear function.
Then by viewing each subset of as a map from to , we haveHere we define .
Recall that is a linear combination of ’s. Consequently, it is a multilinear function.
I Optimality in randomness
In this appendix, we prove the optimality of LCC in terms of the amount of randomness needed in data encoding, which is formally stated in the following theorem.
(Optimal randomness) Any linear encoding scheme that universally achieves a same tradeoff point specified in Theorem 1 for all linear functions (i.e., such that ) must use an amount of randomness no less than that of LCC.
J Optimality of LCC for Linear Regression
In this section, we prove that the proposed LCC scheme achieves the minimum possible recovery threshold to within a factor of 2, for the linear regression problem discussed in Section 6.
As the first step, we prove a lower bound on for linear regression. More specifically, we show that for any coded computation scheme, the master always needs to wait for at least workers to be able to decode the final result, i.e., . Before starting the proof, we first note that since here we consider a more general scenario where workers can compute any function on locally stored coded sub-matrices (not necessarily matrix-matrix multiplication), the converse result in Theorem 2 no longer holds.
To prove the lower bound, it is equivalent to show that, for any coded computation scheme and any subset of workers, if the master can recover given the results from workers in , then we must have . Suppose the condition in the above statement holds, then we can find encoding, computation, and decoding functions such that for any possible values of and , the composition of these functions returns the correct output.
Note that within a GD iteration, each worker performs its local computation only based on its locally stored coded sub-matrices and the weight vector . Hence, if the master can decode the final output from the results of the workers in a subset , then the composition of the decoding function and the computation functions of these workers essentially computes , using only the coded sub-matrices stored at these workers and the vector . Hence, if any class of input values gives the same coded sub-matrices for each worker in , then the product must also be the same given any .
Now we consider the class of input matrices such that all coded sub-matrices stored at workers in equal the values of the corresponding coded sub-matrices when is zero. Since is zero for any , must also be zero for all matrices in this class and any . However, for real matrices is the only solution to that condition. Thus, zero matrix must be the only input matrix that belongs to this class.
Recall that all the encoding functions are assumed to be linear. We consider the collection of all encoding functions that are used by workers in , which is also a linear map. As we have just proved, the kernel of this linear map is . Hence, its rank must be at least the dimension of the input matrix, which is . On the other hand, its rank is upper bounded by the dimension of the output, where each encoding function from a worker contributes at most . Consequently, the number of workers in must be at least to provide sufficient rank to support the computation.
Having proved that , the factor of two characterization of LCC directly follows since .
Note that the converse bound proved above applies to the most general computation model, i.e., there are no assumptions made on the encoding functions or the functions that each worker computes. If additional requirements are taken into account, we can show that LCC achieves the exact optimum recovery threshold (e.g., see ).
K Complete Experimental Results
In this section, we present the complete experimental results using the LCC scheme proposed in the paper, the gradient coding (GC) scheme (the cyclic repetition scheme), the matrix-vector multiplication based (MVM) scheme , and the uncoded scheme for which there is no data redundancy across workers, measured from running linear regression on Amazon EC2 clusters.
In particular, experiments are performed for the following 3 scenarios.
Scenario 1 & 2: # of input data point , # of features .
Scenario 3: # of input data point , # of features .
In scenarios 2 and 3, we artificially introduce stragglers by imposing a seconds delay on each worker with probability in each iteration.
We list the detailed breakdowns of the run-times in 3 experiment scenarios in Tables II, III, and IV respectively. In particular, the computation (comp.) time is measured as the summation of the maximum local processing time among all non-straggling workers, over 100 iterations. The communication (comm.) time is computed as the difference between the total run-time and the computation time.