New Convergence Aspects of Stochastic Gradient Algorithms

Lam M. Nguyen, Phuong Ha Nguyen, Peter Richtárik, Katya Scheinberg, Martin Takáč, Marten van Dijk

Introduction

We are interested in solving the following stochastic optimization problem

where ξ\xi is a random variable obeying some distribution.

In the case of empirical risk minimization with a training set {(xi,yi)}i=1n\{(x_{i},y_{i})\}_{i=1}^{n}, ξi\xi_{i} is a random variable that is defined by a single random sample (x,y)(x,y) pulled uniformly from the training set. Then, by defining fi(w):=f(w;ξi)f_{i}(w):=f(w;\xi_{i}), empirical risk minimization reduces to

To apply SGD to the general form (1) one needs to assume existence of unbiased gradient estimators. This is usually defined as follows:

for any fixed ww. Here we make an important observation: if we view (1) not as a general stochastic problem but as the expected risk minimization problem, where ξ\xi corresponds to a random data sample pulled from a distribution, then (1) has an additional key property: for each realization of the random variable ξ\xi, f(w;ξ)f(w;\xi) is a convex function with Lipschitz continuous gradients. Notice that traditional analysis of SGD for general stochastic problem of the form (1) does not make any assumptions on individual function realizations. In this paper we derive convergence properties for SGD applied to (1) with these additional assumptions on f(w;ξ)f(w;\xi) and also extend to the case when f(w;ξ)f(w;\xi) are not necessarily convex.

Regardless of the properties of f(w;ξ)f(w;\xi) we assume that FF in (1) is strongly convex. We define the (unique) optimal solution of FF as w∗w_{*}.

It is well-known in literature Nesterov (2004); Bottou et al. (2018) that Assumption 1 implies

The classical theoretical analysis of SGD assumes that the stochastic gradients are uniformly bounded, i.e. there exists a finite (fixed) constant σ<∞\sigma<\infty, such that

On the other hand strong convexity and ∇F(w∗)=0\nabla F(w_{*})=0 imply

The last two inequalities are clearly in contradiction with each other for sufficiently large ∥w−w∗∥2\|w-w_{*}\|^{2}.

In Recht et al. (2011), an asynchronous stochastic optimization method called Hogwild! was proposed. Hogwild! algorithm is a parallel version of SGD, where each processor applies SGD steps independently of the other processors to the solution ww which is shared by all processors. Thus, each processor computes a stochastic gradient and updates ww without "locking" the memory containing ww, meaning that multiple processors are able to update ww at the same time. This approach leads to much better scaling of parallel SGD algorithm than a synchoronous version, but the analysis of this method is more complex. In Recht et al. (2011); Mania et al. (2017); De Sa et al. (2015) various variants of Hogwild! with a fixed step size are analyzed under the assumption that the gradients are bounded as in (5). In this paper, we extend our analysis of SGD to provide analysis of Hogwild! with diminishing step sizes and without the assumption on bounded gradients.

In a recent technical report Leblond et al. (2018) Hogwild! with fixed step size is analyzed without the bounded gradient assumption. We note that SGD with fixed step size only converges to a neighborhood of the optimal solution, while by analyzing the diminishing step size variant we are able to show convergence to the optimal solution with probability one. Both in Leblond et al. (2018) and in this paper, the version of Hogwild! with inconsistent reads and writes is considered.

It is well-known that SGD will converge if a sequence of learning rates {ηt}\{\eta_{t}\} satisfies the following conditions (1) ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty and (2) ∑t=0∞ηt2<∞\sum_{t=0}^{\infty}\eta^{2}_{t}<\infty. As an important contribution of this paper, we show the convergence of SGD for strongly convex objective function without using bounded gradient assumption when {ηt}\{\eta_{t}\} is a diminishing sequence and ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty. In Moulines and Bach (2011), the authors also proved the convergence of SGD for {ηt=O⁡(1/tq)},0<q≤1,\{\eta_{t}=\operatorname{\mathcal{O}}(1/t^{q})\},0<q\leq 1, without using bounded gradient assumption and the second condition. Compared to Moulines and Bach (2011), we prove the convergence of SGD for {ηt=O⁡(1/tq)}\{\eta_{t}=\operatorname{\mathcal{O}}(1/t^{q})\} which is 1/μ1/\mu times larger and our proposed class of learning rates satisfying the convergence of SGD is larger. Our proposed class of learning rates satisfying the convergence of SGD is larger than the current state-of-the art one.

We would like to highlight that this paper is originally from Nguyen et al. (2018) (Proceedings of the 35th International Conference on Machine Learning, 2018) but it presents a substantial extension by providing many new results for SGD and Hogwild!.

We provide a new framework for the analysis of stochastic gradient algorithms in the strongly convex case under the condition of Lipschitz continuity of the individual function realizations, but without requiring any bounds on the stochastic gradients. Within this framework we have the following contributions:

We prove the almost sure (w.p.1) convergence of SGD with diminishing step size. Our analysis provides a larger bound on the possible initial step size when compared to any previous analysis of convergence in expectation for SGD.

We introduce a general recurrence for vector updates which has as its special cases (a) the Hogwild! algorithm with diminishing step sizes, where each update involves all non-zero entries of the computed gradient, and (b) a position-based updating algorithm where each update corresponds to only one uniformly selected non-zero entry of the computed gradient.

We analyze this general recurrence under inconsistent vector reads from and vector writes to shared memory (where individual vector entry reads and writes are atomic in that they cannot be interrupted by writes to the same entry) assuming that there exists a delay τ\tau such that during the (t+1)(t+1)-th iteration a gradient of a read vector ww is computed which includes the aggregate of all the updates up to and including those made during the (t−τ)(t-\tau)-th iteration. In other words, τ\tau controls to what extent past updates influence the shared memory.

Our upper bound for the expected convergence rate is O(1/t)O(1/t), and its precise expression allows comparison of algorithms (a) and (b) described above.

For SGD we can improve this upper bound by a factor of 2 and also show that its initial step size can be larger.

We show that τ\tau can be a function of tt as large as (t/lnt)(1−1/lnt)\sqrt{(t/lnt)(1-1/lnt)} without affecting the asymptotic behavior of the upper bound; we also determine a constant T0T_{0} with the property that, for t≥T0t\geq T_{0}, higher order terms containing parameter τ\tau are smaller than the leading O(1/t)O(1/t) term. We give intuition explaining why the expected convergence rate is not more affected by τ\tau. Our experiments confirm our analysis.

We determine a constant T1T_{1} with the property that, for t≥T1t\geq T_{1}, the higher order term containing parameter ∥w0−w∗∥2\|w_{0}-w_{*}\|^{2} is smaller than the leading O(1/t)O(1/t) term.

All the above contributions generalize to the setting where we do not need to assume that the component functions f(w;ξ)f(w;\xi) are convex in ww.

Compared to Nguyen et al. (2018), we have following new results:

We prove the almost sure (w.p.1) convergence of Hogwild! with a diminishing sequence of learning rates {ηt}\{\eta_{t}\}.

We prove the convergence of SGD for diminishing sequences of learning rates {ηt}\{\eta_{t}\} with condition ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty. In other words, we extend the current state-of-the-art class of learning rates satisfying the convergence of SGD.

We prove the convergence of SGD for our extended class of learning rates in batch model.

2 Organization

We analyse the convergence rate of SGD in Section 2 and introduce the general recursion and its analysis in Section 3. Section 4 studies the convergence of SGD for our extended class of learning rates. Experiments are reported in Section 5.

New Framework for Convergence Analysis of SGD

We introduce SGD algorithm in Algorithm 1.

The sequence of random variables {ξt}t≥0\{\xi_{t}\}_{t\geq 0} is assumed to be i.i.d.Independent and identically distributed. Let us introduce our key assumption that each realization ∇f(w;ξ)\nabla f(w;\xi) is an LL-smooth function.

The following additional convexity assumption can be made, as it holds for many problems arising in machine learning.

We first derive our analysis under Assumptions 2, and 3 and then we derive weaker results under only Assumption 2.

Using Lemma 1 and Super Martingale Convergence Theorem Bertsekas (2011) (Lemma 5 in Appendix A), we can provide the sufficient condition for almost sure convergence of Algorithm 1 in the strongly convex case without assuming any bounded gradients.

Let Assumptions 1, 2 and 3 hold. Consider Algorithm 1 with a stepsize sequence such that

Then, the following holds w.p.1 (almost surely)

Note that the classical SGD proposed in Robbins and Monro (1951) has learning rate satisfying conditions

However, the original analysis is performed under the bounded gradient assumption, as in (5). In Theorem 1, on the other hand, we do not use this assumption, but instead assume Lipschitz smoothness and convexity of the function realizations, which does not contradict the strong convexity of F(w)F(w).

The following result establishes a sublinear convergence rate of SGD.

Let Assumptions 1, 2 and 3 hold. Let E=2αLμE=\frac{2\alpha L}{\mu} with α=2\alpha=2. Consider Algorithm 1 with a stepsize sequence such that ηt=αμ(t+E)≤η0=12L\eta_{t}=\frac{\alpha}{\mu(t+E)}\leq\eta_{0}=\frac{1}{2L}. Then,

2 Convergence Analysis without Convexity

In this section, we provide the analysis of Algorithm 1 without using Assumption 3, that is, f(w;ξ)f(w;\xi) is not necessarily convex. We still do not need to impose the bounded stochastic gradient assumption, since we can derive an analogue of Lemma 1, albeit with worse constant in the bound.

Based on the proofs of Theorems 1 and 2, we can easily have the following two results (Theorems 3 and 4).

Let Assumptions 1 and 2 hold. Then, we can conclude the statement of Theorem 1 with the definition of the step size replaced by 0<ηt≤12Lκ0<\eta_{t}\leq\frac{1}{2L\kappa} with κ=Lμ\kappa=\frac{L}{\mu}.

Let Assumptions 1 and 2 hold. Then, we can conclude the statement of Theorem 2 with the definition of the step size replaced by ηt=αμ(t+E)≤η0=12Lκ\eta_{t}=\frac{\alpha}{\mu(t+E)}\leq\eta_{0}=\frac{1}{2L\kappa} with κ=Lμ\kappa=\frac{L}{\mu} and α=2\alpha=2, and all other occurrences of LL in EE and TT replaced by LκL\kappa.

By introducing Assumption 2, which holds for many ML problems, we are able to provide the values of MM and NN. Recall that under Assumption 3, our initial learning rate is η0=12L\eta_{0}=\frac{1}{2L} (in Theorem 2). Thus Assumption 3 provides an improvement of the conditions on the learning rate.

Asynchronous Stochastic Optimization aka Hogwild!

Hogwild! Recht et al. (2011) is an asynchronous stochastic optimization method where writes to and reads from vector positions in shared memory can be inconsistent (this corresponds to (13) as we shall see). However, as mentioned in Mania et al. (2017), for the purpose of analysis the method in Recht et al. (2011) performs single vector entry updates that are randomly selected from the non-zero entries of the computed gradient as in (12) (explained later) and requires the assumption of consistent vector reads together with the bounded gradient assumption to prove convergence. Both Mania et al. (2017) and De Sa et al. (2015) prove the same result for fixed step size based on the assumption of bounded stochastic gradients in the strongly convex case but now without assuming consistent vector reads and writes. In these works the fixed step size η\eta must depend on σ\sigma from the bounded gradient assumption, however, one does not usually know σ\sigma and thus, we cannot compute a suitable η\eta a-priori.

As claimed by the authors in Mania et al. (2017), they can eliminate the bounded gradient assumption in their analysis of Hogwild!, which however was only mentioned as a remark without proof. On the other hand, the authors of recent unpublished work Leblond et al. (2018) formulate and prove, without the bounded gradient assumption, a precise theorem about the convergence rate of Hogwild! of the form

where ρ\rho is a function of several parameters but independent of the fixed chosen step size η\eta and where bb is a function of several parameters and has a linear dependency with respect to the fixed step size, i.e., b=O(η)b=O(\eta).

We first formulate a general recursion for wtw_{t} to which our analysis applies, next we will explain how the different variables in the recursion interact and describe two special cases, and finally we present pseudo code of the algorithm using the recursion.

The recursion explains which positions in wtw_{t} should be updated in order to compute wt+1w_{t+1}. Since wtw_{t} is stored in shared memory and is being updated in a possibly non-consistent way by multiple cores who each perform recursions, the shared memory will contain a vector ww whose entries represent a mix of updates. That is, before performing the computation of a recursion, a core will first read ww from shared memory, however, while reading ww from shared memory, the entries in ww are being updated out of order. The final vector w^t\hat{w}_{t} read by the core represents an aggregate of a mix of updates in previous iterations.

The general recursion is defined as follows: For t≥0t\geq 0,

w^t\hat{w}_{t} represents the vector used in computing the gradient ∇f(w^t;ξt)\nabla f(\hat{w}_{t};\xi_{t}) and whose entries have been read (one by one) from an aggregate of a mix of previous updates that led to wjw_{j}, j≤tj\leq t, and

the SutξtS^{\xi_{t}}_{u_{t}} are diagonal 0/1-matrices with the property that there exist real numbers dξd_{\xi} satisfying

where the expectation is taken over uu and DξD_{\xi} is the diagonal 0/1 matrix whose 11-entries correspond to the non-zero positions in ∇f(w;ξ)\nabla f(w;\xi) in the following sense: The ii-th entry of DξD_{\xi}’s diagonal is equal to 1 if and only if there exists a ww such that the ii-th position of ∇f(w;ξ)\nabla f(w;\xi) is non-zero.

The role of matrix SutξtS^{\xi_{t}}_{u_{t}} is that it filters which positions of gradient ∇f(w^t;ξt)\nabla f(\hat{w}_{t};\xi_{t}) play a role in (10) and need to be computed. Notice that DξD_{\xi} represents the support of ∇f(w;ξ)\nabla f(w;\xi); by ∣Dξ∣|D_{\xi}| we denote the number of 1s in DξD_{\xi}, i.e., ∣Dξ∣|D_{\xi}| equals the size of the support of ∇f(w;ξ)\nabla f(w;\xi).

We will restrict ourselves to choosing (i.e., fixing a-priori) non-empty matrices SuξS^{\xi}_{u} that “partition” DξD_{\xi} in DD approximately “equally sized” SuξS^{\xi}_{u}:

where each matrix SuξS^{\xi}_{u} has either ⌊∣Dξ∣/D⌋\lfloor|D_{\xi}|/D\rfloor or ⌈∣Dξ∣/D⌉\lceil|D_{\xi}|/D\rceil ones on its diagonal. We uniformly choose one of the matrices SutξtS^{\xi_{t}}_{u_{t}} in (10), hence, dξd_{\xi} equals the number of matrices SuξS^{\xi}_{u}, see (11).

In other to explain recursion (10) we first consider two special cases. For D=ΔˉD=\bar{\Delta}, where

where [∇f(w^t;ξt)]ut[\nabla f(\hat{w}_{t};\xi_{t})]_{u_{t}} denotes the utu_{t}-th position of ∇f(w^t;ξt)\nabla f(\hat{w}_{t};\xi_{t}) and where utu_{t} is a uniformly selected position that corresponds to a non-zero entry in ∇f(w^t;ξt)\nabla f(\hat{w}_{t};\xi_{t}).

At the other extreme, for D=1D=1, we have exactly one matrix S1ξ=DξS^{\xi}_{1}=D_{\xi} for each ξ\xi, and we have dξ=1d_{\xi}=1. This gives the recursion

Recursion (13) represents Hogwild!. In a single-core setting where updates are done in a consistent way and w^t=wt\hat{w}_{t}=w_{t} yields SGD.

Algorithm 2 gives the pseudo code corresponding to recursion (10) with our choice of sets SuξS^{\xi}_{u} (for parameter DD).

2 Analysis

Besides Assumptions 1, 2, and for now 3, we assume the following assumption regarding a parameter τ\tau, called the delay, which indicates which updates in previous iterations have certainly made their way into shared memory ww.

We say that shared memory is consistent with delay τ\tau with respect to recursion (10) if, for all tt, vector w^t\hat{w}_{t} includes the aggregate of the updates up to and including those made during the (t−τ)(t-\tau)-th iteration (where (10) defines the (t+1)(t+1)-st iteration). Each position read from shared memory is atomic and each position update to shared memory is atomic (in that these cannot be interrupted by another update to the same position).

In other words in the (t+1)(t+1)-th iteration, w^t\hat{w}_{t} equals wt−τw_{t-\tau} plus some subset of position updates made during iterations t−τ,t−τ+1,…,t−1t-\tau,t-\tau+1,\ldots,t-1. We assume that there exists a constant delay τ\tau satisfying Assumption 4.

3 Convergence With Probability One

Appendix D.5 proves the following theorem

Let Assumptions 1, 2, 3 and 4 hold. Consider Hogwild! method described in Algorithm 2 with a stepsize sequence such that

Then, the following holds w.p.1 (almost surely)

4 Convergence in Expectation

Appendix D.2 proves the following theorem where

Suppose Assumptions 1, 2, 3 and 4 and consider Algorithm 2 for sets SuξS^{\xi}_{u} with parameter DD. Let ηt=αtμ(t+E)\eta_{t}=\frac{\alpha_{t}}{\mu(t+E)} with 4≤αt≤α4\leq\alpha_{t}\leq\alpha and E=max⁡{2τ,4LαDμ}E=\max\{2\tau,\frac{4L\alpha D}{\mu}\}. Then, the expected number of single vector entry updates after tt iterations is equal to

with αSGD=2\alpha_{SGD}=2 as opposed to α≥4\alpha\geq 4.

With respect to parallelism, SGD assumes a single core, while (13) and (12) allow multiple cores. Notice that recursion (12) allows us to partition the position of the shared memory among the different processor cores in such a way that each partition can only be updated by its assigned core and where partitions can be read by all cores. This allows optimal resource sharing and could make up for the difference between ΔˉD\bar{\Delta}_{D} for (12) and (13). We hypothesize that, for a parallel implementation, DD equal to a fraction of Δˉ\bar{\Delta} will lead to best performance.

Surprisingly, the leading term of the upper bound on the convergence rate is independent of delay τ\tau. On one hand, one would expect that a more recent read which contains more of the updates done during the last τ\tau iterations will lead to better convergence. When inspecting the second order term in the proof in Appendix D.2, we do see that a smaller τ\tau (and/or smaller sparsity) makes the convergence rate smaller. That is, asymptotically tt should be large enough as a function of τ\tau (and other parameters) in order for the leading term to dominate.

Nevertheless, in asymptotic terms (for larger tt) the dependence on τ\tau is not noticeable. In fact, Appendix D.4 shows that we may allow τ\tau to be a monotonic increasing function of tt with

where L(t)=1ln⁡t−1(ln⁡t)2L(t)=\frac{1}{\ln t}-\frac{1}{(\ln t)^{2}} (this will make E=max⁡{2τ(t),4LαDμ}E=\max\{2\tau(t),\frac{4L\alpha D}{\mu}\} also a function of tt). The leading term of the convergence rate does not change while the second order terms increase to O(1tln⁡t)O(\frac{1}{t\ln t}). We show that, for

Our intuition behind this phenomenon is that for large τ\tau, all the last τ\tau iterations before the tt-th iteration use vectors w^j\hat{w}_{j} with entries that are dominated by the aggregate of updates that happened till iteration t−τt-\tau. Since the average sum of the updates during the last τ\tau iterations is equal to

and all w^j\hat{w}_{j} look alike in that they mainly represent learned information before the (t−τ)(t-\tau)-th iteration, (14) becomes an estimate of the expectation of (14), i.e.,

This looks like GD which in the strong convex case has convergence rate ≤c−t\leq c^{-t} for some constant c>1c>1. This already shows that larger τ\tau could help convergence as well. However, estimate (14) has estimation noise with respect to (15) which explains why in this thought experiment we cannot attain c−tc^{-t} but can only reach a much smaller convergence rate of e.g. O(1/t)O(1/t) as in Theorem 6.

Experiments in Section 5 confirm our analysis.

The higher order terms in the proof in Appendix D.2 show that, as in Theorem 2, the expected convergence rate in Theorem 6 depends on ∥w0−w∗∥2\|w_{0}-w_{*}\|^{2}. The proof shows that, for

the higher order term that contains ∥w0−w∗∥2\|w_{0}-w_{*}\|^{2} is at most the leading term. This is comparable to TT in Theorem 2 for SGD.

Step size ηt=αtμ(t+E)\eta_{t}=\frac{\alpha_{t}}{\mu(t+E)} with 4≤αt≤α4\leq\alpha_{t}\leq\alpha can be chosen to be fixed during periods whose ranges exponentially increase. For t+E∈[2h,2h+1)t+E\in[2^{h},2^{h+1}) we define αt=4(t+E)2h\alpha_{t}=\frac{4(t+E)}{2^{h}}. Notice that 4≤αt<84\leq\alpha_{t}<8 which satisfies the conditions of Theorem 6 for α=8\alpha=8. This means that we can choose

as step size for t+E∈[2h,2h+1)t+E\in[2^{h},2^{h+1}). This choice for ηt\eta_{t} allows changes in ηt\eta_{t} to be easily synchronized between cores since these changes only happen when t+E=2ht+E=2^{h} for some integer hh. That is, if each core is processing iterations at the same speed, then each core on its own may reliably assume that after having processed (2h−E)/P(2^{h}-E)/P iterations the aggregate of all PP cores has approximately processed 2h−E2^{h}-E iterations. So, after (2h−E)/P(2^{h}-E)/P iterations a core will increment its version of hh to h+1h+1. This will introduce some noise as the different cores will not increment their hh versions at exactly the same time, but this only happens during a small interval around every t+E=2ht+E=2^{h}. This will occur rarely for larger hh.

5 Convergence Analysis without Convexity

In Appendix D.3, we also show that the proof of Theorem 6 can easily be modified such that Theorem 6 with E≥4LκαDμE\geq\frac{4L\kappa\alpha D}{\mu} also holds in the non-convex case of the component functions, i.e., we do not need Assumption 3. Note that this case is not analyzed in Leblond et al. (2018).

Let Assumptions 1 and 2 hold. Then, we can conclude the statement of Theorem 6 with E≥4LκαDμE\geq\frac{4L\kappa\alpha D}{\mu} for κ=Lμ\kappa=\frac{L}{\mu}.

Let Assumptions 1 and 2 hold. Then, we can conclude the statement of Theorem 5 with the definition of the step size replaced by 0<ηt=1LDκ(2+β)(k+t)0<\eta_{t}=\frac{1}{LD\kappa(2+\beta)(k+t)} with κ=Lμ\kappa=\frac{L}{\mu}.

Convergence of Large Stepsizes

In Robbins and Monro (1951), the authors proved the convergence of SGD for step size sequences {ηt}\{\eta_{t}\} satisfying conditions

In Moulines and Bach (2011), the authors studied the expected convergence rates for another class of step sizes of O(1/tp)\mathcal{O}(1/t^{p}) where 0<p≤10<p\leq 1. This class has many large step sizes in comparison with Robbins and Monro (1951). For example ηt=O(1/tp)\eta_{t}=\mathcal{O}(1/t^{p}) does not satisfy the second condition (i.e., ∑t=0∞ηt2→∞\sum_{t=0}^{\infty}\eta^{2}_{t}\rightarrow\infty) where 0<p<1/20<p<1/2. In this section, we prove that SGD will converge without using bounded gradient assumption if {ηt}\{\eta_{t}\} is a diminishing sequence and ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty. Compared to Moulines and Bach (2011), we prove the convergence of SGD for step sizes ηt=O⁡(1/tq)\eta_{t}=\operatorname{\mathcal{O}}(1/t^{q}) which is 1/μ1/\mu times larger. Our proposed class is much larger than the classes in Robbins and Monro (1951) and Moulines and Bach (2011).

The proofs of all theorems and lemmas in this subsection are provided in Appendix D.6.

Let Assumptions 1, 2, and 3 hold. Consider Algorithm 1 with a step size sequence such that: ηt≤12L\eta_{t}\leq\frac{1}{2L}, ηt→0\eta_{t}\rightarrow 0, ddtηt≤0\frac{d}{dt}\eta_{t}\leq 0 and ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty. Then,

Theorem 9 only discusses about the convergence of SGD for the given step size sequence {ηt}\{\eta_{t}\} above. The expected convergence rate of SGD with the setup in Theorem 9 is analysed in Theorem 10.

Let Assumptions 1, 2, and 3 hold. Consider Algorithm 1 with a step size sequence such that ηt≤12L\eta_{t}\leq\frac{1}{2L}, ηt→0\eta_{t}\rightarrow 0, ddtηt≤0\frac{d}{dt}\eta_{t}\leq 0, and ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty. Then,

where n(t)=μηtn(t)=\mu\eta_{t} and M(t)=∫x=0tn(x)dxM(t)=\int_{x=0}^{t}n(x)dx.

As shown in (53) (see also Appendix D.6), we have

where AA and BB are constants and C(t)C(t) is defined in (16) below. We show that an alternative proof for the convergence of SGD with the setup above based on the study of C(t)C(t) can be developed.

where ddxM(x)=n(x)\frac{d}{dx}M(x)=n(x) with function n(x)n(x) satisfying the following conditions:

Then, there is a moment TT such that for all t>Tt>T, C(t)>n(t)C(t)>n(t).

Proof We take the derivative of C(t)C(t), i.e.,

Initially C(0)=0C(0)=0 and n(0)>0n(0)>0, hence, C(t)C(t) starts increasing from t≥0t\geq 0. Since n(t)n(t) decreases for all t≥0t\geq 0, we know that there must exist a first cross over point xx:

There exists a value xx such that C(t)C(t) increases for 0≤t<x0\leq t<x, and

C(x)=n(x)C(x)=n(x) with derivative dC(t)/dt∣t=x=0dC(t)/dt|_{t=x}=0.

Since n(x)n(x) has a derivative <0<0, we know that C(t)>n(t)C(t)>n(t) immediately after xx. Suppose that C(y)=n(y)C(y)=n(y) for some y>xy>x with C(t)>n(t)C(t)>n(t) for x<t<yx<t<y. This implies that dC(t)/dt∣t=y=0dC(t)/dt|_{t=y}=0 and since dC(t)/dtdC(t)/dt is continuous

Since dn(t)/dt∣t=y<0dn(t)/dt|_{t=y}<0, we know that there exists an ϵ\epsilon small enough (close to 0) such that

This contradicts C(t)>n(t)C(t)>n(t) for x<t<yx<t<y. We conclude that there does not exist a y>xy>x such that C(y)=n(y)C(y)=n(y):

For t>xt>x, C(t)>n(t)C(t)>n(t) and C(t)C(t) is strictly decreasing.

We conclude that for any given n(t)n(t), there exists a time TT such that C(t)<n(t)C(t)<n(t) for all t∈[0,T)t\in[0,T), C(T)=n(T)C(T)=n(T) after which C(t)>n(t)C(t)>n(t) when t∈(T,∞]t\in(T,\infty]. Note that C(t)C(t) is always bigger then zero.

Among all stepsizes ηq,t=1/(K+t)q\eta_{q,t}=1/(K+t)^{q} where q>0q>0, KK is a constant such that ηq,t≤12L\eta_{q,t}\leq\frac{1}{2L}, SGD algorithm enjoys the fastest convergence with stepsize η1,t=1/(2L+t)\eta_{1,t}=1/(2L+t).

2 Convergence of Large Stepsizes in Batch Mode

We consider the following general algorithm with the following gradient updating rule:

where f(wt;ξt′)=1kt∑i=1ktf(wt;ξt,i)f(w_{t};\xi^{\prime}_{t})=\frac{1}{k_{t}}\sum_{i=1}^{k_{t}}f(w_{t};\xi_{t,i}).

Let Assumptions 1, 2 and 3 hold, {ηt}\{\eta_{t}\} is a diminishing sequence with conditions ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty and 0<ηt≤12LD0<\eta_{t}\leq\frac{1}{2LD} for all t≥0t\geq 0. Then, the sequence {wt}\{w_{t}\} converges to w∗w_{*} where

The proof of Theorem 12 is provided in Appendix D.7.

Numerical Experiments

where the penalty parameter λ\lambda is set to 1/n1/n, a widely-used value in literature Le Roux et al. (2012).

We conducted experiments on a single core for Algorithm 2 on two popular datasets ijcnn1 (n=91,701n=91,701 training data) and covtype (n=406,709n=406,709 training data) from the LIBSVMhttp://www.csie.ntu.edu.tw/∼\simcjlin/libsvmtools/datasets/ website. Since we are interested in the expected convergence rate with respect to the number of iterations, respectively number of single position vector updates, we do not need a parallelized multi-core simulation to confirm our analysis. The impact of efficient resource scheduling over multiple cores leads to a performance improvement complementary to our analysis of (10) (which, as discussed, lends itself for an efficient parallelized implementation). We experimented with 10 runs and reported the average results. We choose the step size based on Theorem 6, i.e, ηt=4μ(t+E)\eta_{t}=\frac{4}{\mu(t+E)} and E=max⁡{2τ,16LDμ}E=\max\{2\tau,\frac{16LD}{\mu}\}. For each fraction v∈{1,3/4,2/3,1/2,1/3,1/4}v\in\{1,3/4,2/3,1/2,1/3,1/4\} we performed the following experiment: In Algorithm 2 we choose each “filter” matrix SutξtS^{\xi_{t}}_{u_{t}} to correspond with a random subset of size v∣Dξt∣v|D_{\xi_{t}}| of the non-zero positions of DξtD_{\xi_{t}} (i.e., the support of the gradient corresponding to ξt\xi_{t}). In addition we use τ=10\tau=10. For the two datasets,

Figures 1 and 3 plot the training loss for each fraction with τ=10\tau=10. The top plots have t′t^{\prime}, the number of coordinate updates, for the horizontal axis. The bottom plots have the number of epochs, each epoch counting nn iterations, for the horizontal axis. The results show that each fraction shows a sublinear expected convergence rate of O(1/t′)O(1/t^{\prime}); the smaller fractions exhibit larger deviations but do seem to converge faster to the minimum solution.

In Figures 2 and 4, we show experiments with different values of τ∈{1,10,100}\tau\in\{1,10,100\} where we use the whole non-zero set of gradient positions (i.e., v=1v=1) for the update. Our analysis states that, for t=50t=50 epochs times nn iterations per epoch, τ\tau can be as large as t⋅L(t)=524\sqrt{t\cdot L(t)}=524 for ijcnn1 and 10581058 for covtype. The experiments indeed show that τ≤100\tau\leq 100 has little effect on the expected convergence rate.

Conclusion

We have provided the analysis of stochastic gradient algorithms with diminishing step size in the strongly convex case under the condition of Lipschitz continuity of the individual function realizations, but without requiring any bounds on the stochastic gradients. We showed almost sure convergence of SGD and provided sublinear upper bounds for the expected convergence rate of a general recursion which includes Hogwild! for inconsistent reads and writes as a special case. We also provided new intuition which will help understanding convergence as observed in practice.

Acknowledgement

Phuong Ha Nguyen and Marten van Dijk were supported in part by AFOSR MURI under award number FA9550-14-1-0351. Katya Scheinberg was partially supported by NSF Grants CCF 16-18717 and CCF 17-40796. Martin Takáč was partially supported by the NSF Grant CCF-1618717, CMMI-1663256 and CCF-1740796.

References

A Review of Useful Theorems

where ξ\xi is a random variable, and w∗=arg⁡min⁡wF(w)w_{*}=\arg\min_{w}F(w).

Let YkY_{k}, ZkZ_{k}, and WkW_{k}, k=0,1,…k=0,1,\dots, be three sequences of random variables and let {Fk}k≥0\{\mathcal{F}_{k}\}_{k\geq 0} be a filtration, that is, σ\sigma-algebras such that Fk⊂Fk+1\mathcal{F}_{k}\subset\mathcal{F}_{k+1} for all kk. Suppose that:

The random variables YkY_{k}, ZkZ_{k}, and WkW_{k} are nonnegative, and Fk\mathcal{F}_{k}-measurable.

B Proofs of Lemmas 1 and 2

B.2 Proof of Lemma 2

Proof Analogous to the proof of Lemma 1, we have

C Analysis for Algorithm 1

In this Section, we provide the analysis of Algorithm 1 under Assumptions 1, 2, and 3.

Theorem 1 (Sufficient condition for almost sure convergence). Let Assumptions 1, 2 and 3 hold. Consider Algorithm 1 with a stepsize sequence such that

Then, the following holds w.p.1 (almost surely)

The last inequality follows since 0<ηt≤12L0<\eta_{t}\leq\frac{1}{2L}. Therefore,

Since ∑t=0∞ηt2N<∞\sum_{t=0}^{\infty}\eta_{t}^{2}N<\infty, we could apply Lemma 5. Then, we have w.p.1,

We want to show that ∥wt−w∗∥2→0\|w_{t}-w_{*}\|^{2}\to 0, w.p.1. Proving by contradiction, we assume that there exist ϵ>0\epsilon>0 and t0t_{0}, s.t. ∥wt−w∗∥2≥ϵ\|w_{t}-w_{*}\|^{2}\geq\epsilon for ∀t≥t0\forall t\geq t_{0}. Hence,

This is a contradiction. Therefore, ∥wt−w∗∥2→0\|w_{t}-w_{*}\|^{2}\to 0 w.p.1.

Theorem 2. Let Assumptions 1, 2 and 3 hold. Let E=2αLμE=\frac{2\alpha L}{\mu} with α=2\alpha=2. Consider Algorithm 1 with a stepsize sequence such that ηt=αμ(t+E)≤η0=12L\eta_{t}=\frac{\alpha}{\mu(t+E)}\leq\eta_{0}=\frac{1}{2L}. Then,

Proof Using the beginning of the proof of Theorem 1, taking the expectation to (24), with 0<ηt≤12L0<\eta_{t}\leq\frac{1}{2L}, we have

We use mathematical induction to prove (25) (this trick is based on the idea from Bottou et al. (2018)). Let t=0t=0, we have

which is obviously true since G≥Eμ2N∥w0−w∗∥2.G\geq\frac{E\mu^{2}}{N}\|w_{0}-w_{*}\|^{2}.

Suppose it is true for tt, we need to show that it is also true for t+1t+1. We have

Since G≥α2α−1,G\geq\frac{\alpha^{2}}{\alpha-1},

Notice that the induction proof of (25) holds more generally for E≥2αLμE\geq\frac{2\alpha L}{\mu} with α>1\alpha>1 (this is sufficient for showing ηt≤12L\eta_{t}\leq\frac{1}{2L}. In this more general interpretation we can see that the convergence rate is minimized for II minimal, i.e., E=2αLμE=\frac{2\alpha L}{\mu} and for this reason we have fixed EE as such in the theorem statement.

We choose α=2\alpha=2 such that ηt\eta_{t} only depends on known parameters μ\mu and LL. For this α\alpha we obtain

Applying (25)with wTw_{T} as starting point rather than w0w_{0} gives, for t≥max⁡{T,0}t\geq\max\{T,0\},

which equals 44, see (26). For any given w0w_{0}, we prove the theorem.

D Analysis for Algorithm 2

We introduce the following notation: For each ξ\xi, we define Dξ⊆{1,…,d}D_{\xi}\subseteq\{1,\ldots,d\} as the set of possible non-zero positions in a vector of the form ∇f(w;ξ)\nabla f(w;\xi) for some ww. We consider a fixed mapping from u∈Uu\in U to subsets Suξ⊆DξS^{\xi}_{u}\subseteq D_{\xi} for each possible ξ\xi. In our notation we also let DξD_{\xi} represent the diagonal d×dd\times d matrix with ones exactly at the positions corresponding to DξD_{\xi} and with zeroes elsewhere. Similarly, SuξS^{\xi}_{u} also denotes a diagonal matrix with ones at the positions corresponding to DξD_{\xi}.

We will use a probability distribution pξ(u)p_{\xi}(u) to indicate how to randomly select a matrix SuξS^{\xi}_{u}. We choose the matrices SuξS^{\xi}_{u} and distribution pξ(u)p_{\xi}(u) so that there exist dξd_{\xi} such that

where the expectation is over pξ(u)p_{\xi}(u).

We will restrict ourselves to choosing non-empty sets SuξS^{\xi}_{u} that partition DξD_{\xi} in DD approximately equally sized sets together with uniform distributions pξ(u)p_{\xi}(u) for some fixed DD. So, if D≤∣Dξ∣D\leq|D_{\xi}|, then sets have sizes ⌊∣Dξ∣/D⌋\lfloor|D_{\xi}|/D\rfloor and ⌈∣Dξ∣/D⌉\lceil|D_{\xi}|/D\rceil. For the special case D>∣Dξ∣D>|D_{\xi}| we have exactly ∣Dξ∣|D_{\xi}| singleton sets of size 11 (in our definition we only use non-empty sets).

where the expectation is over ξ\xi. We use ΔˉD\bar{\Delta}_{D} in the leading asymptotic term for the convergence rate in our main theorem. We observe that

and ΔˉD≤Δˉ\bar{\Delta}_{D}\leq\bar{\Delta} with equality for D=ΔˉD=\bar{\Delta}.

Let us remark, that Δ∈(0,1]\Delta\in(0,1] measures the probability of collision. Small Δ\Delta means that there is a small chance that the support of two random realizations of ∇f(w;ξ)\nabla f(w;\xi) will have an intersection. On the other hand, Δ=1\Delta=1 means that almost surely, the support of two stochastic gradients will have non-empty intersection.

With this definition of Δ\Delta it is an easy exercise to show that for iid ξ1\xi_{1} and ξ2\xi_{2} in a finite-sum setting (i.e., ξi\xi_{i} and ξ2\xi_{2} can only take on a finite set of possible values) we have

(see Proposition 10 in Leblond et al. (2018)). We notice that in the non-finite sum setting we can use the property that for any two vectors aa and bb, ⟨a,b⟩≤(∥a∥2+∥b∥2)/2\langle a,b\rangle\leq(\|a\|^{2}+\|b\|^{2})/2 and this proves (28) with Δ\Delta set to Δ=1\Delta=1. In our asymptotic analysis of the convergence rate, we will show how Δ\Delta plays a role in non-leading terms – this, with respect to the leading term, it will not matter whether we use Δ=1\Delta=1 or Δ\Delta equal the probability of collision (in the finite sum case).

where w^t\hat{w}_{t} represents the vector used in computing the gradient ∇f(w^t;ξt)\nabla f(\hat{w}_{t};\xi_{t}) and whose entries have been read (one by one) from an aggregate of a mix of previous updates that led to wjw_{j}, j≤tj\leq t. Here, we assume that

updating/writing to vector positions is atomic, reading vector positions is atomic, and

there exists a “delay” τ\tau such that, for all tt, vector w^t\hat{w}_{t} includes all the updates up to and including those made during the (t−τ)(t-\tau)-th iteration (where (29) defines the (t+1)(t+1)-st iteration).

Notice that we do not assume consistent reads and writes of vector positions. We only assume that up to a “delay” τ\tau all writes/updates are included in the values of positions that are being read.

According to our definition of τ\tau, in (29) vector w^t\hat{w}_{t} represents an inconsistent read with entries that contain all of the updates made during the 11st to (t−τ)(t-\tau)-th iteration. Furthermore each entry in w^t\hat{w}_{t} includes some of the updates made during the (t−τ+1)(t-\tau+1)-th iteration up to tt-th iteration. Each entry includes its own subset of updates because writes are inconsistent. We model this by “masks” Σt,j\Sigma_{t,j} for t−τ≤j≤t−1t-\tau\leq j\leq t-1. A mask Σt,j\Sigma_{t,j} is a diagonal 0/1-matrix with the 1s expressing which of the entry updates made in the (j+1)(j+1)-th iteration are included in w^t\hat{w}_{t}. That is,

where II represents the identity matrix.

D.2 Main Analysis

We first derive a couple lemmas which will help us deriving our main bounds. In what follows let Assumptions 1, 2, 3 and 4 hold for all lemmas. We define

When we subtract τ\tau from, for example, tt and write t−τt-\tau, we will actually mean max⁡{t−τ,0}\max\{t-\tau,0\}.

Proof For the first bound, if we take the expectation of ∥dξtSutξt∇f(w^t;ξt)∥2\|d_{\xi_{t}}S^{\xi_{t}}_{u_{t}}\nabla f(\hat{w}_{t};\xi_{t})\|^{2} with respect to utu_{t}, then we have (for vectors xx we denote the value if its ii-th position by [x]i[x]_{i})

where the transition to the second line follows from (27).

For the second bound, if we take the expectation of dξtSutξt∇f(w^t;ξt)d_{\xi_{t}}S^{\xi_{t}}_{u_{t}}\nabla f(\hat{w}_{t};\xi_{t}) wrt utu_{t}, then we have:

As a consequence of this lemma we derive a bound on the expectation of ∥wt−w^t∥2\|w_{t}-\hat{w}_{t}\|^{2}.

The expectation of ∥wt−w^t∥2\|w_{t}-\hat{w}_{t}\|^{2} is at most

This can be used to derive an expression for the square of its norm: ∥wt−w^t∥2\|w_{t}-\hat{w}_{t}\|^{2}

Applying (28) to the inner products implies

Now, we can apply Lemma 15: We first take the expectation over uju_{j} and this shows

and by LL-smoothness, see Equation 7 with ∇F(w∗)=0\nabla F(w_{*})=0,

Combining the above inequalities proves the lemma.

Together with the next lemma we will be able to start deriving a recursive inequality from which we will be able to derive a bound on the convergence rate.

Let 0<ηt≤14LD0<\eta_{t}\leq\frac{1}{4LD} for all t≥0t\geq 0. Then,

Proof Since wt+1=wt−ηtdξtSutξt∇f(w^t;ξt)w_{t+1}=w_{t}-\eta_{t}d_{\xi_{t}}S^{\xi_{t}}_{u_{t}}\nabla f(\hat{w}_{t};\xi_{t}), we have

We now take expectations over utu_{t} and ξt\xi_{t} and use Lemma 15:

and together with (36) and (37) we obtain

Plugging this into the previous derivation yields

Since ηt≤14LD\eta_{t}\leq\frac{1}{4LD}, −2ηt(1−4LηtD)[F(wt)−F(w∗)]≤0-2\eta_{t}(1-4L\eta_{t}D)[F(w_{t})-F(w_{*})]\leq 0 (we can get a negative upper bound by applying strong convexity but this will not improve the asymptotic behavior of the convergence rate in our main result although it would improve the constant of the leading term making the final bound applied to SGD closer to the bound of Theorem 2 for SGD),

Assume 0<ηt≤14LD0<\eta_{t}\leq\frac{1}{4LD} for all t≥0t\geq 0. Then, after taking the full expectation of the inequality in Lemma 8, we can plug Lemma 7 into it which yields the recurrence

This can be solved by using the next lemma. For completeness, we follow the convention that an empty product is equal to 1 and an empty sum is equal to 0, i.e.,

Let Yt,βtY_{t},\beta_{t} and γt\gamma_{t} be sequences such that Yt+1≤βtYt+γtY_{t+1}\leq\beta_{t}Y_{t}+\gamma_{t}, for all t≥0t\geq 0. Then,

Proof We prove the lemma by using induction. It is obvious that (40) is true for t=0t=0 because Y1≤β1Y0+γ1Y_{1}\leq\beta_{1}Y_{0}+\gamma_{1}. Assume as induction hypothesis that (40) is true for t−1t-1. Since Yt+1≤βtYt+γtY_{t+1}\leq\beta_{t}Y_{t}+\gamma_{t},

Applying the above lemma to (38) will yield the following bound.

Let ηt=αtμ(t+E)\eta_{t}=\frac{\alpha_{t}}{\mu(t+E)} with 4≤αt≤α4\leq\alpha_{t}\leq\alpha and E=max⁡{2τ,4LαDμ}E=\max\{2\tau,\frac{4L\alpha D}{\mu}\}. Then,

where ai=(L+μ)ηi+2L2ηi2Da_{i}=(L+\mu)\eta_{i}+2L^{2}\eta_{i}^{2}D.

Since E≥2τE\geq 2\tau, 1t−τ+E≤2t+E\frac{1}{t-\tau+E}\leq\frac{2}{t+E}. Hence, together with ηt−τ=αt−τμ(t−τ+E)≤αμ(t−τ+E)\eta_{t-\tau}=\frac{\alpha_{t-\tau}}{\mu(t-\tau+E)}\leq\frac{\alpha}{\mu(t-\tau+E)} we have

In order to analyze this formula, since ηj=αjμ(j+E)\eta_{j}=\frac{\alpha_{j}}{\mu(j+E)} with αj≥4\alpha_{j}\geq 4, we have

Hence (we can also use 1−x≤e−x1-x\leq e^{-x} which leads to similar results and can be used to show that our choice for ηt\eta_{t} leads to the tightest convergence rates in our framework),

Now, we substitute ηi≤αμ(i+E)\eta_{i}\leq\frac{\alpha}{\mu(i+E)} in γi\gamma_{i} and compute

Substituting this in (42) proves the lemma.

where the last inequality follows from (41), and

Even if we assume a constant Z≥Z0≥Z1≥Z2≥…Z\geq Z_{0}\geq Z_{1}\geq Z_{2}\geq\ldots, we can get a first bound on the convergence rate of vectors w^t\hat{w}^{t}: Substituting ZZ gives

Since ai=(L+μ)ηi+2L2ηi2Da_{i}=(L+\mu)\eta_{i}+2L^{2}\eta_{i}^{2}D and ηi≤αμ(i+E)\eta_{i}\leq\frac{\alpha}{\mu(i+E)}, we have

where the last inequality is a property of the harmonic sequence ∑i=1t1i≤1+ln⁡t\sum_{i=1}^{t}\frac{1}{i}\leq 1+\ln t and ∑i=1t1i2≤∑i=1∞1i2=π26\sum_{i=1}^{t}\frac{1}{i^{2}}\leq\sum_{i=1}^{\infty}\frac{1}{i^{2}}=\frac{\pi^{2}}{6}.

Substituting (46) in (45) and collecting terms yields

Notice that the asymptotic behavior in tt is dominated by the term

If we define Zt+1Z_{t+1} to be the right hand side of (47) and observe that this Zt+1Z_{t+1} is decreasing and a constant ZZ exists (since the terms with ZZ decrease much faster in tt compared to the dominating term), then this Zt+1Z_{t+1} satisfies the derivations done above and a proof by induction can be completed.

Our derivations prove our main result: The expected convergence rate of read vectors is

We remind the reader, that in the (t+1)(t+1)-th iteration at most ≤⌈∣Dξt∣/D⌉\leq\lceil|D_{\xi_{t}}|/D\rceil vector positions are updated. Therefore the expected number of single vector entry updates is at most ΔˉD/D\bar{\Delta}_{D}/D.

Theorem 6. Suppose Assumptions 1, 2, 3 and 4 and consider Algorithm 2. Let ηt=αtμ(t+E)\eta_{t}=\frac{\alpha_{t}}{\mu(t+E)} with 4≤αt≤α4\leq\alpha_{t}\leq\alpha and E=max⁡{2τ,4LαDμ}E=\max\{2\tau,\frac{4L\alpha D}{\mu}\}. Then, t′=tΔˉD/Dt^{\prime}=t\bar{\Delta}_{D}/D is the expected number of single vector entry updates after tt iterations and

D.3 Convergence without Convexity of Component Functions

For the non-convex case of the component functions, LL in (33) must be replaced by LκL\kappa and as a result L2L^{2} in Lemma 7 must be replaced by L2κL^{2}\kappa. Also LL in (37) must be replaced by LκL\kappa. We now require that ηt≤14LκD\eta_{t}\leq\frac{1}{4L\kappa D} so that −2ηt(1−4LκηtD)[F(wt)−F(w∗)]≤0-2\eta_{t}(1-4L\kappa\eta_{t}D)[F(w_{t})-F(w_{*})]\leq 0. This leads to Lemma 8 where no changes are needed except requiring ηt≤14LκD\eta_{t}\leq\frac{1}{4L\kappa D}. The changes in Lemmas 7 and 8 lead to a Lemma 10 where we require E≥4LκαDμE\geq\frac{4L\kappa\alpha D}{\mu} and where in the bound of the expectation L2L^{2} must be replaced by L2κL^{2}\kappa. This perculates through to inequality (47) with a similar change finally leading to Theorem 7, i.e., Theorem 6 where we only need to strengthen the condition on EE to E≥4LκαDμE\geq\frac{4L\kappa\alpha D}{\mu} in order to remove Assumption 3.

D.4 Sensitivity to τ𝜏\tau

What about the upper bound’s sensitivity with respect to τ\tau? Suppose τ\tau is not a constant but an increasing function of tt, which also makes EE a function of tt:

In order to obtain a similar theorem we increase the lower bound on αt\alpha_{t} to

This allows us to modify the proof of Lemma 10 where we analyse the product

Since αj≥12\alpha_{j}\geq 12 and E(j)=2τ(j)≤2jE(j)=2\tau(j)\leq 2j,

The remaining part of the proof of Lemma 10 continues as before where constant EE in the proof is replaced by 11. This yields instead of (42)

We again substitute ηi≤αμ(i+E(i))\eta_{i}\leq\frac{\alpha}{\mu(i+E(i))} in γi\gamma_{i}, realize that (i+1)(i+E(i))≤1\frac{(i+1)}{(i+E(i))}\leq 1, and compute

Assume 2LαDμ≤τ(t)≤t\frac{2L\alpha D}{\mu}\leq\tau(t)\leq t with τ(t)\tau(t) monotonic increasing. Let ηt=αtμ(t+E(t))\eta_{t}=\frac{\alpha_{t}}{\mu(t+E(t))} with 12≤αt≤α12\leq\alpha_{t}\leq\alpha and E(t)=2τ(t)E(t)=2\tau(t). Then,

where ai=(L+μ)ηi+2L2ηi2Da_{i}=(L+\mu)\eta_{i}+2L^{2}\eta_{i}^{2}D.

Now we can continue the same analysis that led to Theorem 6 and conclude that there exists a constant ZZ such that, see (45),

which has the property that the derivative of t/(ln⁡t)t/(\ln t) is equal to L(t)L(t). Now we observe

Again we define Zt+1Z_{t+1} as the right hand side of this inequality. Notice that Zt=O(1/t)Z_{t}=O(1/t), since the above derivation proves

Summarizing we have the following main lemma:

Let Assumptions 1, 2, 3 and 4 hold and consider Algorithm 2. Assume 2LαDμ≤τ(t)≤t⋅L(t)\frac{2L\alpha D}{\mu}\leq\tau(t)\leq\sqrt{t\cdot L(t)} with τ(t)\tau(t) monotonic increasing. Let ηt=αtμ(t+2τ(t))\eta_{t}=\frac{\alpha_{t}}{\mu(t+2\tau(t))} with 12≤αt≤α12\leq\alpha_{t}\leq\alpha. Then, the expected convergence rate of read vectors is

Notice that we can plug Zt=O(1/t)Z_{t}=O(1/t) back into an equivalent of (44) where we may bound Zi−τ(i)=O(1/(i−τ(i))Z_{i-\tau(i)}=O(1/(i-\tau(i)) which replaces ZZ in the second line of (45). On careful examination this leads to a new upper bound (50) where the 2L2Z2L^{2}Z terms gets absorped in a higher order term. This can be used to show that, for

the higher order terms that contain τ(t)\tau(t) (as defined above) are at most the leading term as given in Lemma 12.

the higher order term that contains ∥w0−w∗∥2\|w_{0}-w_{*}\|^{2} is at most the leading term.

D.5 Convergence of Hogwild! with probability 1

Let us consider the sequence w0,w1,w2,…,wt,…,wnw_{0},w_{1},w_{2},\dotsc,w_{t},\dotsc,w_{n} generated by (29):

where dξt≤Dd_{\xi_{t}}\leq D for all ξt\xi_{t}.

for any i∈[n]i\in[n] and tt. Using the triangular inequality, we obtain

Moreover, the result above implies mt+1≤(1+LDηt)mtm_{t+1}\leq(1+LD\eta_{t})m_{t} and unrolling mtm_{t} yields

For all x≥0x\geq 0, it is always true that 1+x≤exp⁡(x)1+x\leq\exp(x). Hence, we have

Theorem 5 (Sufficient conditions for almost sure convergence for Hogwild!) Let Assumptions 1, 2, 3 and 4 hold. Consider Hogwild! method described in Algorithm 2 with a stepsize sequence such that

Then, the following holds w.p.1 (almost surely)

Proof As shown in Lemma 8, for 0<ηt≤14LD0<\eta_{t}\leq\frac{1}{4LD}, we have

If we can show that ∑t=0∞[(L+μ)ηt+2L2ηt2D]∥w^t−wt∥2\sum_{t=0}^{\infty}[(L+\mu)\eta_{t}+2L^{2}\eta_{t}^{2}D]\|\hat{w}_{t}-w_{t}\|^{2} is finite, then it is straight forward to apply the proof technique from Theorem 1 to show that ∥wt−w∗∥2→0\|w_{t}-w_{*}\|^{2}\rightarrow 0 w.p.1. From the proof of Lemma 7, we know ∥wt−w^t∥2\|w_{t}-\hat{w}_{t}\|^{2} is at most

Since ηt−τ=(1−τk+t−τ)ηt<12ηt\eta_{t-\tau}=(1-\frac{\tau}{k+t-\tau})\eta_{t}<\frac{1}{2}\eta_{t} when k≥3τk\geq 3\tau for all t≥0t\geq 0, it yields ∥wt−w^t∥2<(1+Δτ)D2τ14ηt2mt2\|w_{t}-\hat{w}_{t}\|^{2}<(1+\sqrt{\Delta}\tau)D^{2}\tau\frac{1}{4}\eta^{2}_{t}m^{2}_{t}. Hence ∑t=0∞[(L+μ)ηt+2L2ηt2D]∥w^t−wt∥2\sum_{t=0}^{\infty}[(L+\mu)\eta_{t}+2L^{2}\eta_{t}^{2}D]\|\hat{w}_{t}-w_{t}\|^{2} is at most

Combining mt≤m0exp⁡(LD∑i=0tηi)m_{t}\leq m_{0}\exp(LD\sum_{i=0}^{t}\eta_{i}) (see (51)) and ηi=1LD(2+β)(k+i)\eta_{i}=\frac{1}{LD(2+\beta)(k+i)} yields

The second inequality is a property of harmonic number Ht=∑i=1t1i≤1+ln⁡tH_{t}=\sum_{i=1}^{t}\frac{1}{i}\leq 1+\ln t. Hence,

where ρ=β2+β\rho=\frac{\beta}{2+\beta}. Due to the property of over-harmonic series, ∑t=1∞1t1+ρ\sum_{t=1}^{\infty}\frac{1}{t^{1+\rho}} converges for any ρ>0\rho>0. In other words, ∑t=0∞(ηtmt)2\sum_{t=0}^{\infty}(\eta_{t}m_{t})^{2} is finite or ∑t=0∞[(L+μ)ηt+2L2ηt2D]∥w^t−wt∥2\sum_{t=0}^{\infty}[(L+\mu)\eta_{t}+2L^{2}\eta_{t}^{2}D]\|\hat{w}_{t}-w_{t}\|^{2} is finite.

D.6 Convergence of Large Stepsizes

Theorem 9 Let Assumptions 1, 2, and 3 hold. Consider Algorithm 1 with a stepsize sequence such that ηt≤12L\eta_{t}\leq\frac{1}{2L}, ηt→0\eta_{t}\rightarrow 0, ddtηt≤0\frac{d}{dt}\eta_{t}\leq 0 and ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty. Then,

Since 1−x≤exp⁡(−x)1-x\leq\exp(-x) for all x≥0x\geq 0,

Furthermore, since n(j)n(j) is decreasing in jj, we have

These two inequalities can be used to derive

We know that exp⁡(M(x+1))\exp(M(x+1)) increases and n(x)2n(x)^{2} decreases, hence, in the most general case either their product first decreases and then starts to increase or their product keeps on increasing. We first discuss the decreasing and increasing case. Let a(x)=exp⁡(M(x+1))n(x)2a(x)=\exp(M(x+1))n(x)^{2} denote this product and let integer j≥0j\geq 0 be such that a(0)≥a(1)≥…≥a(j)a(0)\geq a(1)\geq\ldots\geq a(j) and a(j)≤a(j+1)≤a(j+2)≤…a(j)\leq a(j+1)\leq a(j+2)\leq\ldots (notice that j=0j=0 expresses the situation where a(i)a(i) only increases). Function a(x)a(x) for x≥0x\geq 0 is minimized for some value hh in [j,j+1)[j,j+1). For 1≤i≤j1\leq i\leq j, a(i)≤∫x=i−1ia(x)dxa(i)\leq\int_{x=i-1}^{i}a(x)dx, and for j+1≤ij+1\leq i, a(i)≤∫x=ii+1a(x)dxa(i)\leq\int_{x=i}^{i+1}a(x)dx. This yields the upper bound

The same upper bound holds for the other case as well, i.e., if a(i)a(i) is only decreasing. We conclude

For y≤ty\leq t, we derive (notice that n(x)n(x) is decreasing)

Let ϵ>0\epsilon>0. Since n(y)→0n(y)\rightarrow 0 as y→∞y\rightarrow\infty, there exists a yy such that n(y)≤ϵ/2n(y)\leq\epsilon/2. Since M(t)→∞M(t)\rightarrow\infty as t→∞t\rightarrow\infty, exp⁡(−M(t))→0\exp(-M(t))\rightarrow 0 as t→∞t\rightarrow\infty. Hence, there exists a TT such that for t≥Tt\geq T, exp⁡(−M(t))∫x=0yexp⁡(M(x))n(x)2dx≤ϵ/2\exp(-M(t))\int_{x=0}^{y}\exp(M(x))n(x)^{2}dx\leq\epsilon/2. This implies C(t)≤ϵC(t)\leq\epsilon for t≥Tt\geq T. This proves C(t)→0C(t)\rightarrow 0 as t→∞t\rightarrow\infty, and we conclude Yt→0Y_{t}\rightarrow 0 as t→∞t\rightarrow\infty.

Theorem 10 Let Assumptions 1, 2, and 3 hold. Consider Algorithm 1 with a stepsize sequence such that ηt≤12L\eta_{t}\leq\frac{1}{2L}, ηt→0\eta_{t}\rightarrow 0, ddtηt≤0\frac{d}{dt}\eta_{t}\leq 0, and ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty. Then,

where n(t)=μηtn(t)=\mu\eta_{t} and M(t)=∫x=0tn(x)dxM(t)=\int_{x=0}^{t}n(x)dx.

where M−1(t)M^{-1}(t) exists for t∈(0,n(0)]t\in(0,n(0)] (since M(y)M(y) strictly increases and maps into (0,n(0)](0,n(0)] for y≥0y\geq 0).

Theorem 11 Among all stepsizes ηq,t=1/(K+t)q\eta_{q,t}=1/(K+t)^{q} where q>0q>0, KK is a constant such that ηq,t≤12L\eta_{q,t}\leq\frac{1}{2L}, SGD algorithm enjoys the fastest convergence with stepsize η1,t=1/(2L+t)\eta_{1,t}=1/(2L+t).

Therefore, we always have exp⁡(−M(t))<1/t=n1(t)<nq(t)<Cq(t)\exp(-M(t))<1/t=n_{1}(t)<n_{q}(t)<C_{q}(t). Now, we consider the following case. We find n(t)n(t) such that n(t)=C(t)/2n(t)=C(t)/2. We rewrite this as

Taking derivatives of both sides, we have:

This is solved for 1/(at):−1/(a2t2)=−2/(at2)1/(at):-1/(a^{2}t^{2})=-2/(at^{2}) Hence, a=1/2a=1/2 and n(t)=2/tn(t)=2/t. It means, Cq(t)>C1(t)C_{q}(t)>C_{1}(t) and thus, the stepsize η1,t=1/(K+t)\eta_{1,t}=1/(K+t) enjoys the fastest convergence.

D.7 Convergence of Large Stepsizes in Batch Mode

We first derive a couple lemmas which will help us deriving our main bounds. In what follows let Assumptions 1, 2 and 3 hold for all lemmas.

Let us define f(w;(ξ1,…,ξk))=1k∑i=1kf(w;ξi)f(w;(\xi_{1},\dotsc,\xi_{k}))=\frac{1}{k}\sum_{i=1}^{k}f(w;\xi_{i}), then we have the following properties:

Proof The expectation of f(w;(ξ1,…,ξk))f(w;(\xi_{1},\dotsc,\xi_{k})) is equal to

By using a similar argument as in Lemma 1 we can derive

We consider the following general algorithm with the following gradient updating rule:

where f(wt;ξt′)=1kt∑i=1ktf(wt;ξt,i)f(w_{t};\xi^{\prime}_{t})=\frac{1}{k_{t}}\sum_{i=1}^{k_{t}}f(w_{t};\xi_{t,i}).

Proof For the first bound, if we take the expectation of ∥dξt′Sutξt′∇f(wt;ξt′)∥2\|d_{\xi^{\prime}_{t}}S^{\xi^{\prime}_{t}}_{u_{t}}\nabla f(w_{t};\xi^{\prime}_{t})\|^{2} with respect to utu_{t}, then we have (for vectors xx we denote the value of its ii-th position by [x]i[x]_{i})

where the transition to the second line follows from (27).

For the second bound, if we take the expectation of dξt′Sutξt′∇f(wt;ξt′)d_{\xi^{\prime}_{t}}S^{\xi^{\prime}_{t}}_{u_{t}}\nabla f(w_{t};\xi^{\prime}_{t}) wrt utu_{t}, then we have:

Let Assumptions 1, 2 and 3 hold, 0<ηt≤12LD0<\eta_{t}\leq\frac{1}{2LD} for all t≥0t\geq 0. Then,

Proof Since wt+1=wt−ηtdξt′Sutξt′∇f(wt;ξt′)w_{t+1}=w_{t}-\eta_{t}d_{\xi^{\prime}_{t}}S^{\xi^{\prime}_{t}}_{u_{t}}\nabla f(w_{t};\xi^{\prime}_{t}), we have

We now take expectations over utu_{t} and ξt\xi_{t} and use Lemmas 15 and 14:

Using the condition ηt≤12LD\eta_{t}\leq\frac{1}{2LD} yields the lemma.

Let us define n(j)=μnjn(j)=\mu n_{j} and M(y)=∫x=0yn(x)dxM(y)=\int_{x=0}^{y}n(x)dx as in Section 4.

Theorem 12 Let Assumptions 1, 2 and 3 hold, {ηt}\{\eta_{t}\} is a diminishing sequence with conditions ∑t=0∞ηt→∞\sum_{t=0}^{\infty}\eta_{t}\rightarrow\infty and 0<ηt≤12LD0<\eta_{t}\leq\frac{1}{2LD} for all t≥0t\geq 0. Then, the sequence {wt}\{w_{t}\} converges to w∗w_{*} where

Proof To prove the convergence of wtw_{t}, we only need to prove the convergence of

Let TT denote the total number of gradient computations and define K(t)=∫x=1tk(x)dx=TK(t)=\int_{x=1}^{t}k(x)dx=T; we have t=K−1(T)t=K^{-1}(T) and dK(x)dx=k(x)\frac{dK(x)}{dx}=k(x). We define y=K(x)y=K(x) or x=K−1(y)x=K^{-1}(y) with dy=k(x)dxdy=k(x)dx. We write

The last inequality is based on the fact that K(0)≥1K(0)\geq 1.

Let us define n′(x)=n(x)k(x)n^{\prime}(x)=\frac{n(x)}{k(x)} and using the fact that dy=k(x)dxdy=k(x)dx, we obtain

Since K−1(y)=xK^{-1}(y)=x, we have dK−1(y)dy=1k(x)\frac{dK^{-1}(y)}{dy}=\frac{1}{k(x)} where y=K(x)y=K(x). This implies dM(K−1(y))dy=n(K−1(y))k(K−1(y))=n′(K−1(y))\frac{dM(K^{-1}(y))}{dy}=\frac{n(K^{-1}(y))}{k(K^{-1}(y))}=n^{\prime}(K^{-1}(y)). Hence, by denoting

we can convert the general problem into the problem of Section D.6. This implies that the analysis of C(t)C(t) in Section D.6 can directly apply to analyze C(K−1(T))C(K^{-1}(T)). Since we already proved the convergence of C(t)C(t) in Section D.6, we obtain the theorem.