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 is a random variable obeying some distribution.
In the case of empirical risk minimization with a training set , is a random variable that is defined by a single random sample pulled uniformly from the training set. Then, by defining , 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 . Here we make an important observation: if we view (1) not as a general stochastic problem but as the expected risk minimization problem, where corresponds to a random data sample pulled from a distribution, then (1) has an additional key property: for each realization of the random variable , 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 and also extend to the case when are not necessarily convex.
Regardless of the properties of we assume that in (1) is strongly convex. We define the (unique) optimal solution of as .
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 , such that
On the other hand strong convexity and imply
The last two inequalities are clearly in contradiction with each other for sufficiently large .
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 which is shared by all processors. Thus, each processor computes a stochastic gradient and updates without "locking" the memory containing , meaning that multiple processors are able to update 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 satisfies the following conditions (1) and (2) . As an important contribution of this paper, we show the convergence of SGD for strongly convex objective function without using bounded gradient assumption when is a diminishing sequence and . In Moulines and Bach (2011), the authors also proved the convergence of SGD for without using bounded gradient assumption and the second condition. Compared to Moulines and Bach (2011), we prove the convergence of SGD for which is 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 such that during the -th iteration a gradient of a read vector is computed which includes the aggregate of all the updates up to and including those made during the -th iteration. In other words, controls to what extent past updates influence the shared memory.
Our upper bound for the expected convergence rate is , 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 can be a function of as large as without affecting the asymptotic behavior of the upper bound; we also determine a constant with the property that, for , higher order terms containing parameter are smaller than the leading term. We give intuition explaining why the expected convergence rate is not more affected by . Our experiments confirm our analysis.
We determine a constant with the property that, for , the higher order term containing parameter is smaller than the leading term.
All the above contributions generalize to the setting where we do not need to assume that the component functions are convex in .
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 .
We prove the convergence of SGD for diminishing sequences of learning rates with condition . 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 is assumed to be i.i.d.Independent and identically distributed. Let us introduce our key assumption that each realization is an -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 .
The following result establishes a sublinear convergence rate of SGD.
Let Assumptions 1, 2 and 3 hold. Let with . Consider Algorithm 1 with a stepsize sequence such that . Then,
2 Convergence Analysis without Convexity
In this section, we provide the analysis of Algorithm 1 without using Assumption 3, that is, 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 with .
Let Assumptions 1 and 2 hold. Then, we can conclude the statement of Theorem 2 with the definition of the step size replaced by with and , and all other occurrences of in and replaced by .
By introducing Assumption 2, which holds for many ML problems, we are able to provide the values of and . Recall that under Assumption 3, our initial learning rate is (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 must depend on from the bounded gradient assumption, however, one does not usually know and thus, we cannot compute a suitable 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 is a function of several parameters but independent of the fixed chosen step size and where is a function of several parameters and has a linear dependency with respect to the fixed step size, i.e., .
We first formulate a general recursion for 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 should be updated in order to compute . Since 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 whose entries represent a mix of updates. That is, before performing the computation of a recursion, a core will first read from shared memory, however, while reading from shared memory, the entries in are being updated out of order. The final vector read by the core represents an aggregate of a mix of updates in previous iterations.
The general recursion is defined as follows: For ,
represents the vector used in computing the gradient and whose entries have been read (one by one) from an aggregate of a mix of previous updates that led to , , and
the are diagonal 0/1-matrices with the property that there exist real numbers satisfying
where the expectation is taken over and is the diagonal 0/1 matrix whose -entries correspond to the non-zero positions in in the following sense: The -th entry of ’s diagonal is equal to 1 if and only if there exists a such that the -th position of is non-zero.
The role of matrix is that it filters which positions of gradient play a role in (10) and need to be computed. Notice that represents the support of ; by we denote the number of 1s in , i.e., equals the size of the support of .
We will restrict ourselves to choosing (i.e., fixing a-priori) non-empty matrices that “partition” in approximately “equally sized” :
where each matrix has either or ones on its diagonal. We uniformly choose one of the matrices in (10), hence, equals the number of matrices , see (11).
In other to explain recursion (10) we first consider two special cases. For , where
where denotes the -th position of and where is a uniformly selected position that corresponds to a non-zero entry in .
At the other extreme, for , we have exactly one matrix for each , and we have . This gives the recursion
Recursion (13) represents Hogwild!. In a single-core setting where updates are done in a consistent way and yields SGD.
Algorithm 2 gives the pseudo code corresponding to recursion (10) with our choice of sets (for parameter ).
2 Analysis
Besides Assumptions 1, 2, and for now 3, we assume the following assumption regarding a parameter , called the delay, which indicates which updates in previous iterations have certainly made their way into shared memory .
We say that shared memory is consistent with delay with respect to recursion (10) if, for all , vector includes the aggregate of the updates up to and including those made during the -th iteration (where (10) defines the -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 -th iteration, equals plus some subset of position updates made during iterations . We assume that there exists a constant delay 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 with parameter . Let with and . Then, the expected number of single vector entry updates after iterations is equal to
with as opposed to .
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 for (12) and (13). We hypothesize that, for a parallel implementation, equal to a fraction of will lead to best performance.
Surprisingly, the leading term of the upper bound on the convergence rate is independent of delay . On one hand, one would expect that a more recent read which contains more of the updates done during the last 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 (and/or smaller sparsity) makes the convergence rate smaller. That is, asymptotically should be large enough as a function of (and other parameters) in order for the leading term to dominate.
Nevertheless, in asymptotic terms (for larger ) the dependence on is not noticeable. In fact, Appendix D.4 shows that we may allow to be a monotonic increasing function of with
where (this will make also a function of ). The leading term of the convergence rate does not change while the second order terms increase to . We show that, for
Our intuition behind this phenomenon is that for large , all the last iterations before the -th iteration use vectors with entries that are dominated by the aggregate of updates that happened till iteration . Since the average sum of the updates during the last iterations is equal to
and all look alike in that they mainly represent learned information before the -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 for some constant . This already shows that larger 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 but can only reach a much smaller convergence rate of e.g. 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 . The proof shows that, for
the higher order term that contains is at most the leading term. This is comparable to in Theorem 2 for SGD.
Step size with can be chosen to be fixed during periods whose ranges exponentially increase. For we define . Notice that which satisfies the conditions of Theorem 6 for . This means that we can choose
as step size for . This choice for allows changes in to be easily synchronized between cores since these changes only happen when for some integer . 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 iterations the aggregate of all cores has approximately processed iterations. So, after iterations a core will increment its version of to . This will introduce some noise as the different cores will not increment their versions at exactly the same time, but this only happens during a small interval around every . This will occur rarely for larger .
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 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 for .
Let Assumptions 1 and 2 hold. Then, we can conclude the statement of Theorem 5 with the definition of the step size replaced by with .
Convergence of Large Stepsizes
In Robbins and Monro (1951), the authors proved the convergence of SGD for step size sequences satisfying conditions
In Moulines and Bach (2011), the authors studied the expected convergence rates for another class of step sizes of where . This class has many large step sizes in comparison with Robbins and Monro (1951). For example does not satisfy the second condition (i.e., ) where . In this section, we prove that SGD will converge without using bounded gradient assumption if is a diminishing sequence and . Compared to Moulines and Bach (2011), we prove the convergence of SGD for step sizes which is 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: , , and . Then,
Theorem 9 only discusses about the convergence of SGD for the given step size sequence 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 , , , and . Then,
where and .
As shown in (53) (see also Appendix D.6), we have
where and are constants and 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 can be developed.
where with function satisfying the following conditions:
Then, there is a moment such that for all , .
Proof We take the derivative of , i.e.,
Initially and , hence, starts increasing from . Since decreases for all , we know that there must exist a first cross over point :
There exists a value such that increases for , and
with derivative .
Since has a derivative , we know that immediately after . Suppose that for some with for . This implies that and since is continuous
Since , we know that there exists an small enough (close to 0) such that
This contradicts for . We conclude that there does not exist a such that :
For , and is strictly decreasing.
We conclude that for any given , there exists a time such that for all , after which when . Note that is always bigger then zero.
Among all stepsizes where , is a constant such that , SGD algorithm enjoys the fastest convergence with stepsize .
2 Convergence of Large Stepsizes in Batch Mode
We consider the following general algorithm with the following gradient updating rule:
where .
Let Assumptions 1, 2 and 3 hold, is a diminishing sequence with conditions and for all . Then, the sequence converges to where
The proof of Theorem 12 is provided in Appendix D.7.
Numerical Experiments
where the penalty parameter is set to , 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 ( training data) and covtype ( training data) from the LIBSVMhttp://www.csie.ntu.edu.tw/cjlin/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, and . For each fraction we performed the following experiment: In Algorithm 2 we choose each “filter” matrix to correspond with a random subset of size of the non-zero positions of (i.e., the support of the gradient corresponding to ). In addition we use . For the two datasets,
Figures 1 and 3 plot the training loss for each fraction with . The top plots have , the number of coordinate updates, for the horizontal axis. The bottom plots have the number of epochs, each epoch counting iterations, for the horizontal axis. The results show that each fraction shows a sublinear expected convergence rate of ; 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 where we use the whole non-zero set of gradient positions (i.e., ) for the update. Our analysis states that, for epochs times iterations per epoch, can be as large as for ijcnn1 and for covtype. The experiments indeed show that 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 is a random variable, and .
Let , , and , , be three sequences of random variables and let be a filtration, that is, -algebras such that for all . Suppose that:
The random variables , , and are nonnegative, and -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 . Therefore,
Since , we could apply Lemma 5. Then, we have w.p.1,
We want to show that , w.p.1. Proving by contradiction, we assume that there exist and , s.t. for . Hence,
This is a contradiction. Therefore, w.p.1.
Theorem 2. Let Assumptions 1, 2 and 3 hold. Let with . Consider Algorithm 1 with a stepsize sequence such that . Then,
Proof Using the beginning of the proof of Theorem 1, taking the expectation to (24), with , we have
We use mathematical induction to prove (25) (this trick is based on the idea from Bottou et al. (2018)). Let , we have
which is obviously true since
Suppose it is true for , we need to show that it is also true for . We have
Since
Notice that the induction proof of (25) holds more generally for with (this is sufficient for showing . In this more general interpretation we can see that the convergence rate is minimized for minimal, i.e., and for this reason we have fixed as such in the theorem statement.
We choose such that only depends on known parameters and . For this we obtain
Applying (25)with as starting point rather than gives, for ,
which equals , see (26). For any given , we prove the theorem.
D Analysis for Algorithm 2
We introduce the following notation: For each , we define as the set of possible non-zero positions in a vector of the form for some . We consider a fixed mapping from to subsets for each possible . In our notation we also let represent the diagonal matrix with ones exactly at the positions corresponding to and with zeroes elsewhere. Similarly, also denotes a diagonal matrix with ones at the positions corresponding to .
We will use a probability distribution to indicate how to randomly select a matrix . We choose the matrices and distribution so that there exist such that
where the expectation is over .
We will restrict ourselves to choosing non-empty sets that partition in approximately equally sized sets together with uniform distributions for some fixed . So, if , then sets have sizes and . For the special case we have exactly singleton sets of size (in our definition we only use non-empty sets).
where the expectation is over . We use in the leading asymptotic term for the convergence rate in our main theorem. We observe that
and with equality for .
Let us remark, that measures the probability of collision. Small means that there is a small chance that the support of two random realizations of will have an intersection. On the other hand, means that almost surely, the support of two stochastic gradients will have non-empty intersection.
With this definition of it is an easy exercise to show that for iid and in a finite-sum setting (i.e., and 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 and , and this proves (28) with set to . In our asymptotic analysis of the convergence rate, we will show how plays a role in non-leading terms – this, with respect to the leading term, it will not matter whether we use or equal the probability of collision (in the finite sum case).
where represents the vector used in computing the gradient and whose entries have been read (one by one) from an aggregate of a mix of previous updates that led to , . Here, we assume that
updating/writing to vector positions is atomic, reading vector positions is atomic, and
there exists a “delay” such that, for all , vector includes all the updates up to and including those made during the -th iteration (where (29) defines the -st iteration).
Notice that we do not assume consistent reads and writes of vector positions. We only assume that up to a “delay” all writes/updates are included in the values of positions that are being read.
According to our definition of , in (29) vector represents an inconsistent read with entries that contain all of the updates made during the st to -th iteration. Furthermore each entry in includes some of the updates made during the -th iteration up to -th iteration. Each entry includes its own subset of updates because writes are inconsistent. We model this by “masks” for . A mask is a diagonal 0/1-matrix with the 1s expressing which of the entry updates made in the -th iteration are included in . That is,
where 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 from, for example, and write , we will actually mean .
Proof For the first bound, if we take the expectation of with respect to , then we have (for vectors we denote the value if its -th position by )
where the transition to the second line follows from (27).
For the second bound, if we take the expectation of wrt , then we have:
As a consequence of this lemma we derive a bound on the expectation of .
The expectation of is at most
This can be used to derive an expression for the square of its norm:
Applying (28) to the inner products implies
Now, we can apply Lemma 15: We first take the expectation over and this shows
and by -smoothness, see Equation 7 with ,
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 for all . Then,
Proof Since , we have
We now take expectations over and and use Lemma 15:
and together with (36) and (37) we obtain
Plugging this into the previous derivation yields
Since , (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 for all . 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 and be sequences such that , for all . Then,
Proof We prove the lemma by using induction. It is obvious that (40) is true for because . Assume as induction hypothesis that (40) is true for . Since ,
Applying the above lemma to (38) will yield the following bound.
Let with and . Then,
where .
Since , . Hence, together with we have
In order to analyze this formula, since with , we have
Hence (we can also use which leads to similar results and can be used to show that our choice for leads to the tightest convergence rates in our framework),
Now, we substitute in and compute
Substituting this in (42) proves the lemma.
where the last inequality follows from (41), and
Even if we assume a constant , we can get a first bound on the convergence rate of vectors : Substituting gives
Since and , we have
where the last inequality is a property of the harmonic sequence and .
Substituting (46) in (45) and collecting terms yields
Notice that the asymptotic behavior in is dominated by the term
If we define to be the right hand side of (47) and observe that this is decreasing and a constant exists (since the terms with decrease much faster in compared to the dominating term), then this 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 -th iteration at most vector positions are updated. Therefore the expected number of single vector entry updates is at most .
Theorem 6. Suppose Assumptions 1, 2, 3 and 4 and consider Algorithm 2. Let with and . Then, is the expected number of single vector entry updates after iterations and
D.3 Convergence without Convexity of Component Functions
For the non-convex case of the component functions, in (33) must be replaced by and as a result in Lemma 7 must be replaced by . Also in (37) must be replaced by . We now require that so that . This leads to Lemma 8 where no changes are needed except requiring . The changes in Lemmas 7 and 8 lead to a Lemma 10 where we require and where in the bound of the expectation must be replaced by . 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 to in order to remove Assumption 3.
D.4 Sensitivity to τ𝜏\tau
What about the upper bound’s sensitivity with respect to ? Suppose is not a constant but an increasing function of , which also makes a function of :
In order to obtain a similar theorem we increase the lower bound on to
This allows us to modify the proof of Lemma 10 where we analyse the product
Since and ,
The remaining part of the proof of Lemma 10 continues as before where constant in the proof is replaced by . This yields instead of (42)
We again substitute in , realize that , and compute
Assume with monotonic increasing. Let with and . Then,
where .
Now we can continue the same analysis that led to Theorem 6 and conclude that there exists a constant such that, see (45),
which has the property that the derivative of is equal to . Now we observe
Again we define as the right hand side of this inequality. Notice that , 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 with monotonic increasing. Let with . Then, the expected convergence rate of read vectors is
Notice that we can plug back into an equivalent of (44) where we may bound which replaces in the second line of (45). On careful examination this leads to a new upper bound (50) where the terms gets absorped in a higher order term. This can be used to show that, for
the higher order terms that contain (as defined above) are at most the leading term as given in Lemma 12.
the higher order term that contains is at most the leading term.
D.5 Convergence of Hogwild! with probability 1
Let us consider the sequence generated by (29):
where for all .
for any and . Using the triangular inequality, we obtain
Moreover, the result above implies and unrolling yields
For all , it is always true that . 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 , we have
If we can show that is finite, then it is straight forward to apply the proof technique from Theorem 1 to show that w.p.1. From the proof of Lemma 7, we know is at most
Since when for all , it yields . Hence is at most
Combining (see (51)) and yields
The second inequality is a property of harmonic number . Hence,
where . Due to the property of over-harmonic series, converges for any . In other words, is finite or 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 , , and . Then,
Since for all ,
Furthermore, since is decreasing in , we have
These two inequalities can be used to derive
We know that increases and 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 denote this product and let integer be such that and (notice that expresses the situation where only increases). Function for is minimized for some value in . For , , and for , . This yields the upper bound
The same upper bound holds for the other case as well, i.e., if is only decreasing. We conclude
For , we derive (notice that is decreasing)
Let . Since as , there exists a such that . Since as , as . Hence, there exists a such that for , . This implies for . This proves as , and we conclude as .
Theorem 10 Let Assumptions 1, 2, and 3 hold. Consider Algorithm 1 with a stepsize sequence such that , , , and . Then,
where and .
where exists for (since strictly increases and maps into for ).
Theorem 11 Among all stepsizes where , is a constant such that , SGD algorithm enjoys the fastest convergence with stepsize .
Therefore, we always have . Now, we consider the following case. We find such that . We rewrite this as
Taking derivatives of both sides, we have:
This is solved for Hence, and . It means, and thus, the stepsize 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 , then we have the following properties:
Proof The expectation of 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 .
Proof For the first bound, if we take the expectation of with respect to , then we have (for vectors we denote the value of its -th position by )
where the transition to the second line follows from (27).
For the second bound, if we take the expectation of wrt , then we have:
Let Assumptions 1, 2 and 3 hold, for all . Then,
Proof Since , we have
We now take expectations over and and use Lemmas 15 and 14:
Using the condition yields the lemma.
Let us define and as in Section 4.
Theorem 12 Let Assumptions 1, 2 and 3 hold, is a diminishing sequence with conditions and for all . Then, the sequence converges to where
Proof To prove the convergence of , we only need to prove the convergence of
Let denote the total number of gradient computations and define ; we have and . We define or with . We write
The last inequality is based on the fact that .
Let us define and using the fact that , we obtain
Since , we have where . This implies . Hence, by denoting
we can convert the general problem into the problem of Section D.6. This implies that the analysis of in Section D.6 can directly apply to analyze . Since we already proved the convergence of in Section D.6, we obtain the theorem.