Communication Efficient Distributed Optimization using an Approximate Newton-type Method

Ohad Shamir, Nathan Srebro, Tong Zhang

Introduction

We are particularly interested in a stochastic optimization (learning) setting, where the ultimate goal is to minimize some stochastic (population) objective (e.g. expected loss or generalization error)

and each of the mm machines has access to nn i.i.d. samples zi1,,zinz_{i}^{1},\ldots,z_{i}^{n} from the source distribution D\mathcal{D}, for a total of N=nmN=nm independent samples evenly and randomly distributed among the machines. Each machine ii can construct a local empirical (sample) estimate of F(w)F(w):

and the overall empirical objective is then:

We can then use the empirical risk minimizer (ERM)

as an approximate minimizer of F(w)F(w). Since our interest lies mostly with this stochastic optimization setting, we will denote w^=argminϕ(w)\hat{w}=\arg\min\phi(w) even when the optimization objective ϕ(w)\phi(w) is not an empirical approximation to a stochastic objective.

A straight-forward single-iteration approach is for each machine to optimize its own local objective, obtaining

This approach, which we refer to as “one-shot parameter averaging”, was recently considered in Zinkevich et al. (2010) and further analyzed by Zhang et al. (2013). The latter also proposed a bias-corrected improvement which perturbs each w^i\hat{w}_{i} using the optimum on a bootstrap sample. This approach gives only an approximate minimizer of ϕ(w)\phi(w) with some finite suboptimality, rather then allowing us converge to w^\hat{w} (i.e. to obtain solutions with any desired suboptimality ϵ\epsilon). Although approximate solutions are often sufficient for stochastic optimization, we prove in Section 2 that the one-shot solution wˉ\bar{w} can be much worse in terms of minimizing the population objective F(w)F(w), compared to the actual empirical minimizer w^\hat{w}. It does not seem possible to address this suboptimality by more clever averaging, and instead additional rounds of communications appear necessary.

Gradient Descent

One possible multi-round approach to distributed optimization is a distributed implementation of gradient descent: at each iteration each machine calculates ϕi(w(t))\nabla\phi_{i}(w^{(t)}) at the current iterate w(t)w^{(t)}, and then these are averaged to obtain the overall gradient ϕ(w(t))\nabla\phi(w^{(t)}), and a gradient step is taken. As the iterates are then standard gradient descent iterates, the number of iterations, and so also number of communication rounds, is linear in the conditioning of the problem – or, if accelerated gradient descent is used, proportional to the square root of the condition number: If ϕ(w)\phi(w) is LL-smooth and λ\lambda-strongly convex, then

iterations are needed to attain an ϵ\epsilon-suboptimal solution. The polynomial dependence on the condition number may be disappointing, as in many problems the parameter of strong convexity λ\lambda might be very small. E.g., when strong convexity arises from regularization, as in many stochastic optimization problems, λ\lambda decreases with the overall sample size N=nmN=nm, and is typically at most 1/nm1/\sqrt{nm} (Sridharan et al. 2008; Shalev-Shwartz et al. 2009; and see also Section 4.3 below). The number of iterations / communication rounds needed for distributed accelerated gradient descent then scales as nm\sqrt{nm}, i.e. increases polynomially with the sample size.

Instead of gradient descent, one may also consider more sophisticated methods which utilize gradient information, such as quasi-Newton methods. For example, a distributed implementation using L-BFGS has been proposed in Agarwal et al. (2011). However, no guarantee better then (8) can be ensured for gradient-based methods Nemirovsky and Yudin (1983), and we thus may still get a polynomial dependence on the sample size.

ADMM and other approaches

Another popular approach is distributed alternating direction method of multipliers (ADMM, e.g. Boyd et al. 2011), where the machines alternate between computing shared dual variables in a distributed manner, and solving augmented Lagrangian problems with respect to their local data. However, the convergence of ADMM can be slow. Although recent works proved a linear convergence rate under favorable assumptions Deng and Yin (2012); Hong and Luo (2012), we are not aware of any analysis where the number of iterations / communication rounds doesn’t scale strongly with the condition number, and hence the sample size, for learning applications. A similar dependence occurs with other recently-proposed algorithms for distributed optimization (e.g. Yang, 2013; Mahajan et al., 2013; Dekel et al., 2012; Cotter et al., 2011; Duchi et al., 2012). We also mention that our framework is orthogonal to much recent work on distributed coordinate descent methods (e.g. Recht et al., 2011; Richtárik and Takác, 2013), which assume the data is split feature-wise rather than instance-wise.

Our Method

The method we propose can be viewed as an approximate Newton-like method, where at each iteration, instead of a gradient step, we take a step appropriate for the geometry of the problem, as estimated on each machine separately. In particular, for quadratic objectives, the method can be seen as taking approximate Newton steps, where each machine ii implicitly uses its local Hessian 2ϕi(w)\nabla^{2}\phi_{i}(w) (although no Hessians are explicitly computed!). Unlike ADMM, our method can take advantage of the fact that for machine learning applications, the sub-problems are usually similar: ϕiϕ\phi_{i}\approx\phi. We refer to our method as DANE—Distributed Approximate NEwton.

Notation and Definitions

For vectors, v\|v\| is always the Euclidean norm, and for matrices A2\|A\|_{2} is the spectral norm. We use λAL\lambda\preccurlyeq A\preccurlyeq L to indicate that the eigenvalues of AA are bounded between λ\lambda and LL. We say that a twice differentiableAll our results hold also for weaker definitions of smoothness and strong convexity which do not require twice differentiability. function f(w)f(w) is λ\lambda-strongly convex or LL-smooth, iff for all ww, its Hessian is bounded from below by λ\lambda (i.e. λ2f(w)\lambda\preccurlyeq\nabla^{2}f(w)), or above by LL (i.e. 2f(w)L\nabla^{2}f(w)\preccurlyeq L) respectively.

Stochastic Optimization and One-shot Parameter Averaging

In a stochastic optimization setting, where the true objective is the population objective F(w)F(w), there is a limit to the accuracy with which we can minimize F(w)F(w) given only N=nmN=nm samples, even using the exact empirical minimizer w^\hat{w}. It is thus reasonable to compare the suboptimality of F(w)F(w) when using the exact w^\hat{w} to what can be attained using distributed optimization with limited communication.

where w=argminF(w)w^{*}=\arg\min F(w) is the population minimizer and the expectation is with respect to the random sample of size N=nmN=nm. One might then ask whether a suboptimality of ϵ=O(G2λnm)\epsilon=\mathcal{O}\left(\frac{G^{2}}{\lambda nm}\right) can be also be achieved using a few, perhaps only one, round of communication. This is different from seeking a distributed optimization method that achieves any arbitrarily small empirical suboptimality, and thus converges to w^\hat{w}, but might be sufficient in terms of stochastic optimization.

For one-shot parameter averaging, Zhang et al. (2013, Corollary 2) recently showed that for λ\lambda-strongly convex objectives, and when moments of the first, second and third derivatives of f(w,z)f(w,z) are bounded by GG, LL, and MM respectivelyThe exact conditions in Zhang et al. (2013) refer to various high order moments, but are in any case satisfied when wf(w,z)G\|\nabla_{w}f(w,z)\|\leq G, w2f(w,z)2L\|\nabla^{2}_{w}f(w,z)\|_{2}\leq L and 2f(w,z)\nabla^{2}f(w,z) is MM-Lipschitz in the spectral norm. For learning problems, all derivatives of the objective can be bounded in terms of a bound on the data and bounds on the derivative of a scalar loss function, and are less of a concern to us., then

Zhang et al. (2013) argued that the dependence on the sample size mnmn above is essentially optimal: the dominant term (as nn\rightarrow\infty, and in particular when nmn\gg m) scales as 1/(nm)1/(nm), which is the same as for the empirical minimizer w^\hat{w} (as in eq. 10), and so one-shot parameter averaging achieves the same population suboptimality rate, using only a single round of communication, as the best rate we can hope for using unlimited communication, or if all N=nmN=nm samples were on the same machine. Moreover, the O(n2)\mathcal{O}(n^{-2}) terms can be replaced by a O(n3)\mathcal{O}(n^{-3}) term using an appropriate bias-correction procedure.

However, this view ignores the dependence on the other parameters, and in particular the strong convexity parameter λ\lambda, which is much worse in (12) relative to (10). The strong convexity parameter often arises from an explicit regularization, and decays as the sample size increases. E.g., in regularized loss minimization and SVM-type problems (Sridharan et al., 2008), as well as more generally for stochastic convex optimization (Shalev-Shwartz et al., 2009), the regularization parameter, and hence the strong convexity parameter, decreases as 1N=1nm\frac{1}{\sqrt{N}}=\frac{1}{\sqrt{nm}}. In practice, λ\lambda is often chosen even smaller, possibly as small as 1N\frac{1}{N}. Unfortunately, substituting λ=O(1/nm)\lambda=\mathcal{O}(1/\sqrt{nm}) in (12) results in a useless bound, where even the first term does not decrease with the sample size.

Of course, this strong dependence on λ\lambda might be an artifact of the analysis of Zhang et al.. However, in Theorem 1 below, we show that even in a simple one-dimensional example, when λO(1/n)\lambda\leq\mathcal{O}(1/\sqrt{n}), the population sub-optimality of the one-shot estimator (using mm machines and a total of nmnm samples), can be no better then the population sub-optimality using just nn samples, and much worse than what can be attained using nmnm samples. In other words, one-shot averaging does not give any benefit over using only the data on a single machine, and ignoring all other (m1)n(m-1)n data points.

For any number of machines mm, if we run one-shot parameter averaging to compute wˉ\bar{w}, it holds for some universal constants C1,C2,C3,C4C_{1},C_{2},C_{3},C_{4} that

The intuition behind the construction of Theorem 1 is that when λ\lambda is small, the deviation of each machine output w^i\hat{w}_{i} from ww^{*} is large, and its expectation is biased away from ww^{*}. The exact bias amount is highly problem-dependent, and cannot be eliminated by any fixed averaging scheme. Since bias is not reduced by averaging, the optimization error does not scale down with the number of machines mm. The full construction and proof appear in appendix A. In the appendix we also show that the bias correction proposed by Zhang et al. to reduce the lower-order terms in equation (11) does not remedy this problem.

Distributed Approximate Newton-type Method

We now describe a new iterative method for distributed optimization. The method performs two distributed averaging computations per iteration, and outputs a predictor w(t)w^{(t)} which, under suitable parameter choices, converges to the optimum w^\hat{w}. The method, which we refer to as DANE (Distributed Approximate NEwton-type Method) is described in Figure 1.

DANE maintains an agreed-upon iterate w(t)w^{(t)}, which is synchronized among all machines at the end of each iteration. In each iteration, we first compute the gradient ϕ(w(t1))\nabla\phi(w^{(t-1)}) at the current iterate, by averaging the local gradients ϕi(w(t1))\nabla\phi_{i}(w^{(t-1)}). Each machine then performs a separate local optimization, based on its own local objective ϕi(w)\phi_{i}(w) and the computed global gradient ϕ(w(t))\nabla\phi(w^{(t)}), to obtain a local iterate wi(t)w_{i}^{(t)}. These local iterates are averaged to obtain the centralized iterate w(t)w^{(t)}.

The crux of the method is the local optimization performed on each machine at each iteration:

To understand this local optimization, recall the definition of the Bregman divergence corresponding to a strongly convex function ψ\psi:

Now, for each local objective ϕi\phi_{i}, consider the regularized local objective, defined as

and its corresponding Bregman divergence:

It is not difficult to check that the local optimization problem (13) can be written as

where we also added the terms ϕ(w(t1))+ϕ(w(t1)),w(t1)\phi(w^{(t-1)})+\langle\nabla\phi(w^{(t-1)}),w^{(t-1)}\rangle which do not depend on ww and do not affect the optimization. The first two terms in (14) are thus a linear approximation of the overall objective ϕ(w)\phi(w) about the current iterate w(t1)w^{(t-1)}, and do not depend on the machine ii. What varies from machine to machine is the potential function used to localize the linear approximation. The update (14) is in-fact a mirror descent update (Nemirovski and Yudin, 1978; Beck and Teboulle, 2003) using the potential function hih_{i}, and step size η\eta.

At the other extreme, consider the case where μ=0\mu=0 and all local objectives are equal, i.e. hi(w)=ϕi(w)=ϕ(w)h_{i}(w)=\phi_{i}(w)=\phi(w). Substituting the definition of the Bregman divergence into (14), or simply investigating (13), we can see that wi(t)=argminϕi(w)=argminϕ(w)=w^w_{i}^{(t)}=\arg\min\phi_{i}(w)=\arg\min\phi(w)=\hat{w}. That is, DANE converges in a single iteration to the overall empirical optimum. This is an ideal Newton-type iteration, where the potential function is perfectly aligned with the objective.

Of course, if ϕi(w)=ϕ(w)\phi_{i}(w)=\phi(w) for all machines ii, we would not need to perform distributed optimization in the first place. Nevertheless, as nn\rightarrow\infty, we can hope that ϕi(w)\phi_{i}(w) are similar enough to each other, such that (14) approximates such an ideal Newton-type iteration, gets us very close to the optimum, and very few such iterations are sufficient.

In particular, consider the case where ϕi(w)\phi_{i}(w), and hence also ϕ(w)\phi(w) are quadratic. In this case, the Bregman divergence Di(w;w(t1))D_{i}(w;w^{(t-1)}) takes the form:

and the update (14) can be solved in closed form:

Contrast this with the true Newton update:

The difference here is that in (16) we approximate the inverse of the average of the local Hessians with the average of the inverse of the Hessians (plus a possible regularizer). Again we see that the DANE update (16) approximates the true Newton update (17), which can be performed in a distributed fashion without communicating the Hessians.

For a quadratic objective, a single Newton update is enough to find the exact optimum. In Section 4 we rigorously analyze the effects of the distributed approximation, and quantify the number of DANE iterations (and thus rounds of communication) required.

For a general convex, but non-quadratic, objective, the standard Newton approach is to use a quadratic approximation to the ideal Bregman divergence DϕD_{\phi}. This leads to the familiar quadratic Newton update in terms of the Hessian. DANE uses a different sort of approximation to DϕD_{\phi}: we use a non-quadratic approximation, based on the entire objective and not just a local quadratic approximation, but approximate the potential on each node separately. In the stochastic setting, this approximation becomes better and better, and thus the required number of iterations decrease, as nn\rightarrow\infty.

Since it is notoriously difficult to provide good global analysis for Newton-type methods, we will investigate the global convergence behavior of DANE carefully in the next Section but only for quadratic objective functions. This analysis can also be viewed as indicative for non-quadratic objectives, as locally they can be approximated by quadratics and so should enjoy the same behavior, at least asymptotically. For non-quadratics, we provide a rigorous convergence guarantee when the stepsize η\eta is sufficiently small or the regularization parameter μ\mu is sufficiently large (in Section 5). However, this analysis does not show a benefit over distributed gradient descent for non-quadratics. We partially bridge this gap by showing that even in the non-quadratic case, the convergence rate improves as the local problems ϕi\phi_{i} become more similar.

DANE for Quadratic Objectives

In this Section, we analyze the performance of DANE on quadratic objectives. We begin in Section 4.1 with an analysis of DANE for arbitrary quadratic objectives ϕi(w)\phi_{i}(w), without stochastic assumptions, deriving a guarantee in terms of the approximation error of the true Hessian. Then in Section 4.2 we consider the stochastic setting where the instantaneous objective f(w,z)f(w,z) is quadratic in ww, utilizing a bound on the approximation error of the Hessian to obtain a performance guarantee for DANE in terms of the smoothness and strong convexity of f(w,z)f(w,z) . In Section 4.3 we also consider the behavior for stochastic optimization problems, where λ\lambda is set as a function of the sample size N=nmN=nm.

We begin by considering the case where each local objective ϕi(w)\phi_{i}(w) is quadratic, i.e. has a fixed Hessian. The overall objective ϕ(w)\phi(w) is then of course also quadratic.

After tt iterations of DANE on quadratic objectives with Hessians Hi=2ϕi(w)H_{i}=\nabla^{2}\phi_{i}(w), we have:

If 0<λHL0<\lambda\preccurlyeq H\preccurlyeq L and for all ii, HiH2β\|H_{i}-H\|_{2}\leq\beta, then setting η=1\eta=1 and μ=max{0,8β2λλ}\mu=\max\{0,\frac{8\beta^{2}}{\lambda}-\lambda\}, we have:

In the next Section, we consider the stochastic setting, where we can obtain bounds for HiH2\|H_{i}-H\|_{2} that improve with the sample size, and plug these into Lemma 1 and Theorem 2 to obtain a performance guarantee for DANE.

2 Stochastic Quadratic Problems

We now turn to a stochastic quadratic setting, where ϕi(w)=F^i(w)\phi_{i}(w)=\hat{F}_{i}(w) as in (3), and the instantaneous losses are smooth and strongly convex quadratics. That is, for all zz, f(w,z)f(w,z) is quadratic in ww and λw2f(w,z)L\lambda\preccurlyeq\nabla^{2}_{w}f(w,z)\preccurlyeq L.

We first use a matrix concentration bound to establish that all Hessians Hi=2F^i(w)H_{i}=\nabla^{2}\hat{F}_{i}(w) are close to each other, and hence also to their average:

If 0w2f(w,z)L0\preccurlyeq\nabla^{2}_{w}f(w,z)\preccurlyeq L for all zz, then with probability at least 1δ1-\delta over the samples, maxiHiH232L2log(dm/δ)n\max_{i}\|H_{i}-H\|_{2}\leq\sqrt{\frac{32L^{2}\log(dm/\delta)}{n}}, where Hi=2F^i(w)H_{i}=\nabla^{2}\hat{F}_{i}(w) and H=2F^(w)H=\nabla^{2}\hat{F}(w).

The proof appears in appendix D. Combining Lemma 2, Lemma 1 and Theorem 2, we can conclude:

In the stochastic setting, and when the instantaneous losses are quadratic with λf(w,z)L\lambda\preccurlyeq\nabla f(w,z)\preccurlyeq L, then after

iterations of DANE, we have, with probability at least 1δ1-\delta, that F^(w(t))F^(w^)+ϵ\hat{F}(w^{(t)})\leq\hat{F}(\hat{w})+\epsilon.

The proof appears in Appendix E. From the theorem, we see that if the condition number L/λL/\lambda is fixed, then as nn\rightarrow\infty the number of required iterations decreases. In fact, for any target sub-optimality ϵ\epsilon, as long as the sample size is at least logarithmically large, namely n=Ω((L/λ)2log(dm)log(1ϵ))n=\Omega\left((L/\lambda)^{2}\log(dm)\log(\frac{1}{\epsilon})\right), we can obtain the desired accuracy after a constant or even a single DANE iteration! This is a mild requirement on the sample size, since NN generally increases at least linearly with 1/ϵ1/\epsilon.

We next turn to discuss the more challenging case where the condition number decays with the sample size.

3 Analysis for Regularized Objectives

Confronted with such non-strongly-convex objectives, a standard approach is to perform empirical minimization on a regularized objective (Shalev-Shwartz et al., 2009). That is, to define the regularized instantaneous objective

and minimize the corresponding empirical objective F^λ\hat{F}_{\lambda}. The instantaneous objective fλ(w,z)f_{\lambda}(w,z) of the modified stochastic optimization problem is now λ\lambda-strongly convex. If f(w,z)f(w,z) are GG-Lipschitz in ww, then we have (Shalev-Shwartz et al., 2009):

where w^λ=argminF^λ(w)\hat{w}_{\lambda}=\arg\min\hat{F}_{\lambda}(w) and wλ=argminFλ(w)w_{\lambda}^{*}=\arg\min F_{\lambda}(w). The optimal choice of λ\lambda in the above is λ=G2B2N\lambda=\sqrt{\frac{G^{2}}{B^{2}N}}, where BB is a bound on the predictors we would like to compete with, and with this λ\lambda we get the optimal rate:

It is thus instructive to consider the behavior of DANE when λ=Θ(G2B2N)=Θ(G2B2nm)\lambda=\Theta\left(\sqrt{\frac{G^{2}}{B^{2}N}}\right)=\Theta\left(\sqrt{\frac{G^{2}}{B^{2}nm}}\right). Plugging this choice of λ\lambda into Theorem 3, we get that the number of DANE iterations behaves as:

That is, unlike distributed gradient descent, or any other relevant method we are aware of, the number of required iterations / communication rounds does not increase with the sample size, and only scales linearly with the number of machines.

Convergence Analysis for Non-Quadratic Objectives

As discussed above, it is notoriously difficult to obtain generic global analysis of Newton-type methods. Our main theoretical result in this paper is the analysis for quadratic objectives, which we believe is also instructive for non-quadratics. Nevertheless, we complement this with a convergence analysis for generic objectives.

We therefore return to considering generic convex objectives ϕi(w)\phi_{i}(w). We also do not make any stochastic assumptions. We only assume that each ϕi(w)\phi_{i}(w) is LiL_{i}-smooth and λi\lambda_{i} strongly convex, and that the combined objective ϕ(w)\phi(w) is LL-smooth and λ\lambda-strongly convex.

Assume that for all i,w,zi,w,z, λi2ϕi(w)Li\lambda_{i}\preccurlyeq\nabla^{2}\phi_{i}(w)\preccurlyeq L_{i} and λ2ϕ(w)L\lambda\preccurlyeq\nabla^{2}\phi(w)\preccurlyeq L. Let

If ρ>0\rho>0, then the DANE iterates satisfy ϕ(w(t))ϕ(w^)(1ρ)t[ϕ(w(0))ϕ(w^)].\phi(w^{(t)})-\phi(\hat{w})\leq(1-\rho)^{t}[\phi(w^{(0)})-\phi(\hat{w})].

The proof appears in Appendix F. The theorem establishes that with any μ>0\mu>0 and small enough step-size η\eta, DANE converges to w^\hat{w}. If each ϕi(w)\phi_{i}(w) is strongly convex, we can also take μ=0\mu=0 and sufficiently small η\eta and ensure convergence to w^\hat{w}. However, the optimal setting of η\eta and μ\mu above is to take μ\mu\rightarrow\infty and set η=μ/L\eta=\mu/L, in which case ρλ/L\rho\rightarrow\lambda/L, and we recover distributed gradient descent, with the familiar gradient descent guarantee.

We again emphasize that the analysis above is weak and does not take into account the relationship between the local objectives ϕi(w)\phi_{i}(w). We believe that the quadratic analysis of Section 4 better captures the true behavior of DANE. Moreover, we can partially bridge this gap by the following result, which shows that a variant of DANE enjoys a linear convergence rate which improves as the local objectives ϕi\phi_{i} become more similar to ϕ\phi (the proof is in Appendix G):

Assume that in the DANE procedure, we replace step ()(*) by w(t)=w1(t)w^{(t)}=w_{1}^{(t)}, and define h()=h1()h(\cdot)=h_{1}(\cdot). If there exists γ>0\gamma>0 such that w,w\forall w,w^{\prime}, we have γDh(w;w)Dϕ(w;w)η1Dh(w;w)\gamma D_{h}(w;w^{\prime})\leq D_{\phi}(w;w^{\prime})\leq\eta^{-1}D_{h}(w;w^{\prime}), then

If μ\mu is small and ϕiϕ\phi_{i}\approx\phi, then we expect γ1\gamma\approx 1 and η1\eta\approx 1. In this case, ηγ1\eta\gamma\approx 1, leading to fast convergence.

Experiments

In this section, we present preliminary experimental results on our proposed method. In terms of tuning η,μ\eta,\mu, we discovered that simply picking η=1,μ=0\eta=1,\mu=0 (which makes DANE closest to a Newton-type iteration, as discussed in Section 3) often results in the fastest convergence. However, in unfavorable situations (such as when the data size per machine is very small), this can also lead to non-convergence. In those cases, convergence can be recovered by slightly increasing μ\mu to a small positive number. In the experiments, we considered μ=0,3λ\mu=0,3\lambda. These are considerably smaller than what our theory indicates, and we leave the question of the best parameter choice to future research.

Finally, we examine the convergence on these datasets in terms of the average loss on the test set. In figure 4, we present the results for m=64m=64 machines on the three datasets, using DANE (with μ=3λ\mu=3\lambda) and ADMM. We also present for comparison the objective value obtained using one-shot parameter averaging (OSA), using bias correction as proposed in Zhang et al. (2013). The figure highlights the practical importance of multi-round communication algorithms: while DANE and ADMM converge to the value achieved by the regularized loss minimizer, the single-round OSA algorithm may return a significantly suboptimal result.

Ohad Shamir and Nathan Srebro are supported by the Intel ICRI-CI Institute. Ohad Shamir is further supported by an Israel Science Foundation grant 425/13 and an FP7 Marie Curie CIG grant.

References

Appendix A Lower Bounds for One-shot Parameter Averaging

Before providing the proof details, let us first describe the high-level intuition of our construction. Roughly speaking, one-shot averaging works well when the bias of the predictor returned by each machine (as a random vector in Euclidean space, based on the sampled training data) is much smaller than the variance. Since each such predictor is based on independent data, averaging mm such predictors reduces the variance by a factor of mm, leading to good guarantees. However, averaging has no effect on the bias, so this method is ineffectual when the bias dominates the variance. The construction below shows that when the strong convexity parameter is small, this can indeed happen.

More specifically, when the strong convexity parameter is smaller than O(1/n)\mathcal{O}(1/\sqrt{n}), the magnitude of the deviations of the (random) predictor returned by each machine does not decay with the sample size nn. Moreover, its distribution is highly dependent on the data distribution and the shape of ff, and is biased in general. Below we use one such construction, which we found to be convenient for precise analytic calculations, but the intuition applies much more broadly.

Specifically, let W=[2/λ,log(1/λ)]\mathcal{W}=[-2/\lambda,\log(1/\lambda)], and define the loss function f(w;z)f(w;z) as

Taking the derivative, equating to zero and slightly manipulating the result, we get that

We now turn to analyze w(x)+w(x)w(x)+w(-x). First, we have by definition

Therefore, we have w(x)+w(x)0w(x)+w(-x)\leq 0 for all xx. More precisely, considering (23) and the fact that its left hand size is monotonic in w(x)w(x), it’s easy to verify that for any x0x\geq 0, we have w(x)log(xλnlog(xλn))w(x)\geq\log\left(\frac{x}{\lambda\sqrt{n}}-\log\left(\frac{x}{\lambda\sqrt{n}}\right)\right), and w(x)xλnw(-x)\leq-\frac{x}{\lambda\sqrt{n}}, so using (24),

Since log(a)<a/2\log(a)<a/2 for all a0a\geq 0, this expression is at most x2λn-\frac{x}{2\lambda\sqrt{n}}. Plugging this back into (22), and using the assumption n9n\geq 9, we get that

Since p(x)p(x) is the standard Gaussian distribution, it can be numerically checked that this is at most

Now, we show that this expected value of w^1\hat{w}_{1} is far away from ww^{*}. ww^{*} is not hard to calculate: It satisfies

and it can be calculated numerically that w=0.5671..>3/5w^{*}=-0.5671..>-3/5. Moreover, we assume λ1/(9n)\lambda\leq 1/(9\sqrt{n}), so λn1/9\lambda\sqrt{n}\leq 1/9 and thus it can be verified that

Note that this is always a positive quantity. As a result, using Jensen’s inequality, we get

Moreover, by λ\lambda-strong convexity of ff, we have that

(see Equation (10)). Combining the four inequalities above gives us the theorem statement.

A.2 Bias Correction Also Fails

In Zhang et al. (2013), which analyzes one-shot parameter averaging, the authors noticed that the analysis fails for small values of λ\lambda, and proposed a modification of the simple averaging scheme, designed to reduce bias issues. Specifically, given a parameter rr\in, each machine subsamples rnrn examples without replacement from its dataset, and computes the optimum w^2,k\hat{w}_{2,k} with respect to this subsample. Then, it computes the optimum w^k,1\hat{w}_{k,1} over the entire dataset, and returns the weighted combination w^k=(w^k,1rw^k,2)/(1r)\hat{w}_{k}=(\hat{w}_{k,1}-r\hat{w}_{k,2})/(1-r). Unfortunately, the analysis still results in lower-order terms with bad dependence on λ\lambda, and it’s not difficult to extend our construction from Theorem 1 to show that this bias-corrected version of the algorithm still fails (at least, if rr is chosen in a fixed manner).

Appendix B Proof of Theorem 2

For any w(t1)w^{(t-1)}, the optimal solution is always given by:

where for the last equality we rearranged (25) to calculate ϕ(w(t1))=H(w(t1)w^)\nabla\phi(w^{(t-1)})=H(w^{(t-1)}-\hat{w}). Bounding AvA2v\|Av\|\leq\|A\|_{2}\|v\| and iterating (26) leads to the desired result.

Appendix C Proof of Lemma 1

where λ\lambda is the smallest eigenvalue of HH.

This equals one minus the smallest element on the diagonal of the diagonal matrix (S+μI)1S(S+\mu I)^{-1}S, which is λ/(λ+μ)\lambda/(\lambda+\mu). ∎

Let AA be a positive definite matrix with minimal eigenvalue γ\gamma which is larger than some μ>0\mu>0, and {Δi}i=1m\{\Delta_{i}\}_{i=1}^{m} matrices of the same size, such that maxiΔiβ\max_{i}\|\Delta_{i}\|\leq\beta and β<γ\beta<\gamma. Then

Note that A1ΔiA1Δi1γβ<1\|A^{-1}\Delta_{i}\|\leq\|A^{-1}\|\|\Delta_{i}\|\leq\frac{1}{\gamma}\beta<1. Therefore, we can use the identity

which holds for any CC such that C<1\|C\|<1. Using this with C=A1ΔiC=A^{-1}\Delta_{i} and plugging back, we get

Averaging over i=1mi=1\ldots m and using the assumption i=1mΔi=0\sum_{i=1}^{m}\Delta_{i}=0, we get

Multiplying both sides by (AμI)(A-\mu I), we get

By the triangle inequality and convexity of the norm, this implies

Now, we use Lemma 4 with A=H+μIA=H+\mu I and Δi=HiH\Delta_{i}=H_{i}-H (noting that Δiβ\|\Delta_{i}\|\leq\beta), and get the bound

Now, let us assume the even stronger condition that β<12(λ+μ)\beta<\frac{1}{2}(\lambda+\mu) (which we shall justify at the end of the proof), then we can upper bound the right hand side in the equation above by

Differentiating with respect to μ\mu, we get an optimal point at

If this is non-positive, it means that λ2>8β2\lambda^{2}>8\beta^{2}, and moreover, that μ=0\mu=0, so (27) equals 4β2/λ24\beta^{2}/\lambda^{2}. Otherwise, we pick μ=8β2λλ\mu=\frac{8\beta^{2}}{\lambda}-\lambda, and (27) becomes

Combining the two cases, we get the result stated in the Lemma. Finally, it remains to justify why β<12(λ+μ)\beta<\frac{1}{2}(\lambda+\mu). By the way we picked μ\mu, it’s enough to prove that

This is true since max{x,8/x}>2\max\{x,8/x\}>2 for all positive xx.

Appendix D Proof of Lemma 2

HH is the average of the Hessians of mnmn i.i.d. quadratic functions, all with eigenvalues at most LL, and each HiH_{i} is the average of the Hessians of nn i.i.d. quadratic functions, all with eigenvalues at most LL. By a matrix Hoeffding’s inequality (Tropp, 2012), we have that for each ii, with probability 1δ1-\delta over the samples received by machine ii,

By a union bound, we get that with probability 1δ1-\delta,

Combining these, we get that with probability 1δ1-\delta,

Appendix E Proof of Theorem 3

Plugging 2 into Lemma 1, and noting that the strong convexity of the instantaneous losses implies F^(w)\hat{F}(w) is λ\lambda strongly convexIn fact, it is enough to require that F^(w)\hat{F}(w) is λ\lambda-strongly convex, and it is not necessary to require strong convexity of f(w,z)f(w,z) for each individual zz. However, requiring that the population objective F(w)F(w) is λ\lambda-strongly convex might not be sufficient if λ<L/n\lambda<L/\sqrt{n}, e.g. when λ1/nm\lambda\propto 1/\sqrt{nm}., we obtain

By smoothness of F^\hat{F}, we have F^(w(t))F^(w^)L2w(t)w^2\hat{F}(w^{(t)})-\hat{F}(\hat{w})\leq\frac{L}{2}\|w^{(t)}-\hat{w}\|^{2}, and therefore Theorem 2 implies that

This means that to get optimization error ϵ\leq\epsilon, the number of iterations required is

Considering (28), if the first case holds, then the denominator in (29) is at least 2log(2)2\log(2) and we get that the number of iterations required is O(log(Lw(0)w^ϵ))\mathcal{O}\left(\log\left(\frac{L\|w^{(0)}-\hat{w}\|}{\epsilon}\right)\right). If the second case in (28) holds, we have

which implies that the iteration bound (29) is at most

Appendix F Proof of Theorem 4

Under the conditions of Theorem 4, the following inequalities hold:

The smoothness of hih_{i} implies that its conjugate hih_{i}^{*} is 1/(Li+μ)1/(L_{i}+\mu) strongly convex. Let u=hi(w)u^{\prime}=\nabla h_{i}(w^{\prime}) and u=hi(w)u=\nabla h_{i}(w), then w=hi(u)w^{\prime}=\nabla h_{i}^{*}(u^{\prime}) and w=hi(u)w=\nabla h_{i}^{*}(u). We have

Since ϕ(w^)=0\nabla\phi(\hat{w})=0, ϕ(w)22=ϕ(w)ϕ(w^)22\|\nabla\phi(w)\|_{2}^{2}=\|\nabla\phi(w)-\nabla\phi(\hat{w})\|_{2}^{2}. From ϕ(w)ϕ(w^)2λww^2\|\nabla\phi(w)-\nabla\phi(\hat{w})\|_{2}\geq\lambda\|w-\hat{w}\|_{2}, we obtain

We are now ready to prove the Theorem. At iteration tt, we have the following first order equation:

where ρi=[1μ+LiηL2(μ+λi)2]ηλ\rho_{i}=\left[\frac{1}{\mu+L_{i}}-\frac{\eta L}{2(\mu+\lambda_{i})^{2}}\right]\eta\lambda. In the above derivations, the first inequality uses the smoothness of ϕ\phi; the second inequality uses the strong convexity of hih_{i}; the third inequality uses (30); the second and the last equalities use (32).

where the first inequality is Jensen’s and the third inequality is due to (31). As a result, we get

The desired bound follows by recursively applying the above inequality.

Appendix G Proof of Theorem 5

where in the last inequality, we have used the assumption that Dϕ(w(t);w(t1))η1Dh(w(t);w(t1))D_{\phi}(w^{(t)};w^{(t-1)})\leq\eta^{-1}D_{h}(w^{(t)};w^{(t-1)}). This implies that

where the first inequality is due to (33), the second inequality comes from the inequality ϕ(w^)ϕ(w(t))\phi(\hat{w})\leq\phi(w^{(t)}), and the third inequality uses the assumption that Dϕ(w^;w(t1))γDh(w^;w(t1))D_{\phi}(\hat{w};w^{(t-1)})\geq\gamma D_{h}(\hat{w};w^{(t-1)}). We thus obtain