Making Gradient Descent Optimal for Strongly Convex Stochastic Optimization

Alexander Rakhlin, Ohad Shamir, Karthik Sridharan

Introduction

Stochastic gradient descent (SGD) is one of the simplest and most popular first-order methods to solve convex learning problems. Given a convex loss function and a training set of TT examples, SGD can be used to obtain a sequence of TT predictors, whose average has a generalization error which converges (with TT) to the optimal one in the class of predictors we consider. The common framework to analyze such first-order algorithms is via stochastic optimization, where our goal is to optimize an unknown convex function FF, given only unbiased estimates of FF’s subgradients (see Sec. 2 for a more precise definition).

An important special case is when FF is strongly convex (intuitively, can be lower bounded by a quadratic function). Such functions arise, for instance, in Support Vector Machines and other regularized learning algorithms. For such problems, there is a well-known O(log⁡(T)/T)\mathcal{O}(\log(T)/T) convergence guarantee for SGD with averaging. This rate is obtained using the analysis of the algorithm in the harder setting of online learning Hazan et al. 2007, combined with an online-to-batch conversion (see Hazan & Kale 2011 for more details).

Surprisingly, a recent paper by Hazan and Kale Hazan & Kale 2011 showed that in fact, an O(log⁡(T)/T)\mathcal{O}(\log(T)/T) is not the best that one can achieve for strongly convex stochastic problems. In particular, an optimal O(1/T)\mathcal{O}(1/T) rate can be obtained using a different algorithm, which is somewhat similar to SGD but is more complex (although with comparable computational complexity) Roughly speaking, the algorithm divides the TT iterations into exponentially increasing epochs, and runs stochastic gradient descent with averaging on each one. The resulting point of each epoch is used as the starting point of the next epoch. The algorithm returns the resulting point of the last epoch.. A very similar algorithm was also presented recently by Juditsky and Nesterov Juditsky & Nesterov 2010.

These results left an important gap: Namely, whether the true convergence rate of SGD, possibly with some sort of averaging, might also be O(1/T)\mathcal{O}(1/T), and the known O(log⁡(T)/T)\mathcal{O}(\log(T)/T) result is just an artifact of the analysis. Indeed, the whole motivation of Hazan & Kale 2011 was that the standard online analysis is too loose to analyze the stochastic setting properly. Perhaps a similar looseness applies to the analysis of SGD as well? This question has immediate practical relevance: if the new algorithms enjoy a better rate than SGD, it might indicate they will work better in practice, and that practitioners should abandon SGD in favor of them.

In this paper, we study the convergence rate of SGD for stochastic strongly convex problems, with the following contributions:

First, we extend known results to show that if FF is not only strongly convex, but also smooth (with respect to the optimum), then SGD with and without averaging achieves the optimal O(1/T)\mathcal{O}(1/T) convergence rate.

We then show that for non-smooth FF, there are cases where the convergence rate of SGD with averaging is Ω(log⁡(T)/T)\Omega(\log(T)/T). In other words, the O(log⁡(T)/T)\mathcal{O}(\log(T)/T) bound for general strongly convex problems is real, and not just an artifact of the currently-known analysis.

However, we show that one can recover the optimal O(1/T)\mathcal{O}(1/T) convergence rate by a simple modification of the averaging step: Instead of averaging of TT points, we only average the last αT\alpha T points, where α∈(0,1)\alpha\in(0,1) is arbitrary. Thus, to obtain an optimal rate, one does not need to use an algorithm significantly different than SGD, such as those discussed earlier.

We perform an empirical study on both artificial and real-world data, which supports our findings.

Following the paradigm of Hazan & Kale 2011, we analyze the algorithm directly in the stochastic setting, and avoid an online analysis with an online-to-batch conversion. Our rate upper bounds are shown to hold in expectation, but we also sketch how we can obtain high-probability bounds (up to a log⁡(log⁡(T))\log(\log(T)) factor). While the focus here is on getting the optimal rate in terms of TT, we note that our upper bounds are also optimal in terms of other standard problem parameters, such as the strong convexity parameter and the variance of the stochastic gradients.

In terms of related work, we note that the performance of SGD in a stochastic setting has been extensively researched in stochastic approximation theory (see for instance Kushner & Yin 2003). However, these results are usually obtained under smoothness assumptions, and are often asymptotic, so we do not get an explicit bound in terms of TT which applies to our setting. We also note that a finite-sample analysis of SGD in the stochastic setting was recently presented in Bach & Moulines 2011. However, the focus there was different than ours, and also obtained bounds which hold only in expectation rather than in high probability. More importantly, the analysis was carried out under stronger smoothness assumptions than our analysis, and to the best of our understanding, does not apply to general, possibly non-smooth, strongly convex stochastic optimization problems. For example, smoothness assumptions may not cover the application of SGD to support vector machines (as in Shalev-Shwartz et al. 2011), since it uses a non-smooth loss function, and thus the underlying function FF we are trying to stochastically optimize may not be smooth.

Preliminaries

We use bold-face letters to denote vectors. Given some vector w\mathbf{w}, we use wiw_{i} to denote its ii-th coordinate. Similarly, given some indexed vector wt\mathbf{w}_{t}, we let wt,iw_{t,i} denote its ii-th coordinate. We let 1A\mathbf{1}_{A} denote the indicator function for some event AA.

We will focus on an important special case of the problem, characterized by FF being a strongly convex function. Formally, we say that a function FF is λ\lambda-strongly convex, if for all w,w′∈W\mathbf{w},\mathbf{w}^{\prime}\in\mathcal{W} and any subgradient g\mathbf{g} of FF at w\mathbf{w},

Another possible property of FF we will consider is smoothness, at least with respect to the optimum w∗\mathbf{w}^{*}. Formally, a function FF is μ\mu-smooth with respect to w∗\mathbf{w}^{*} if for all w∈W\mathbf{w}\in\mathcal{W},

Such functions arise, for instance, in logistic and least-squares regression, and in general for learning linear predictors where the loss function has a Lipschitz-continuous gradient.

The algorithm we focus on is stochastic gradient descent (SGD). The SGD algorithm is parameterized by step sizes η1,…,ηT\eta_{1},\ldots,\eta_{T}, and is defined as follows (below, we assume for simplicity that the algorithm is initialized at 0∈W\mathbf{0}\in\mathcal{W}, following common practice).

Let wt+1=ΠW(wt−ηtg^t)\mathbf{w}_{t+1}=\Pi_{\mathcal{W}}(\mathbf{w}_{t}-\eta_{t}\hat{\mathbf{g}}_{t}), where ΠW\Pi_{\mathcal{W}} is the projection operator on W\mathcal{W}.

This algorithm returns a sequence of points w1,…,wT\mathbf{w}_{1},\ldots,\mathbf{w}_{T}. To obtain a single point, one can use several strategies. Perhaps the simplest one is to return the last point, wT+1\mathbf{w}_{T+1}. Another procedure, for which the standard online analysis of SGD applies Hazan et al. 2007, is to return the average point

In terms of the step size, we note that the appropriate regime to consider is ηt=Θ(1/t)\eta_{t}=\Theta(1/t) (see Appendix A for a fuller discussion of this). In particular, we will assume for the sake of our upper bounds that ηt=1/λt\eta_{t}=1/\lambda t. This assumption simplifies the analysis substantially, while not losing much in terms of generality. To see why, suppose the step sizes are actually c/λtc/\lambda t for some If the step size is too small and cc is much smaller than 11, the SGD analysis is known to fail (Nemirovski et al. 2009). c≥1c\geq 1, and let λ′=λ/c\lambda^{\prime}=\lambda/c. Then this step size is equivalent to 1/(λ′t)1/(\lambda^{\prime}t). Since any λ\lambda-strongly convex function is also λ′\lambda^{\prime}-strongly convex (as λ≥λ′\lambda\geq\lambda^{\prime}), then we can just analyze the algorithm’s behavior as if we run it on a λ′\lambda^{\prime}-strongly convex function, using the default step size 1/λ′t1/\lambda^{\prime}t. If so desired, one can then substitute λ/c\lambda/c instead of λ′\lambda^{\prime} in the final bound, to see the upper bound in terms of λ\lambda and cc.

Full proofs of our results are provided in Appendix B.

Smooth Functions

We begin by considering the case where the expected function F(⋅)F(\cdot) is both strongly convex and smooth with respect to w∗\mathbf{w}^{*}. Our starting point is to show a O(1/T)\mathcal{O}(1/T) for the last point obtained by SGD. This result is well known in the literature (see for instance Nemirovski et al. 2009) and we include a proof for completeness. Later on, we will show how to extend it to a high-probability bound.

The theorem is an immediate corollary of the following key lemma, and the definition of μ\mu-smoothness with respect to w∗\mathbf{w}^{*}.

We now turn to discuss the behavior of the average point wˉT=(w1+…+wT)/T\bar{\mathbf{w}}_{T}=(\mathbf{w}_{1}+\ldots+\mathbf{w}_{T})/T, and show that for smooth FF, it also enjoys an optimal O(1/T)\mathcal{O}(1/T) convergence rate.

A rough proof intuition is the following: Lemma 1 implies that the Euclidean distance of wt\mathbf{w}_{t} from w∗\mathbf{w}^{*} is on the order of 1/t1/\sqrt{t}, so the squared distance of wˉT\bar{\mathbf{w}}_{T} from w∗\mathbf{w}^{*} is on the order of ((1/T)∑t=1T1/t)2≈1/T((1/T)\sum_{t=1}^{T}1/\sqrt{t})^{2}\approx 1/T, and the rest follows from smoothness.

Non-Smooth Functions

We now turn to the discuss the more general case where the function FF may not be smooth (i.e. there is no constant μ\mu which satisfies Eq. (2) uniformly for all w∈W\mathbf{w}\in\mathcal{W}). In the context of learning, this may happen when we try to learn a predictor with respect to a non-smooth loss function, such as the hinge loss.

As discussed earlier, SGD with averaging is known to have a rate of at most O(log⁡(T)/T)\mathcal{O}(\log(T)/T). In the previous section, we saw that for smooth FF, the rate is actually O(1/T)\mathcal{O}(1/T). Moreover, Hazan & Kale 2011 showed that for using a different algorithm than SGD, one can obtain a rate of O(1/T)\mathcal{O}(1/T) even in the non-smooth case. This might lead us to believe that an O(1/T)\mathcal{O}(1/T) rate for SGD is possible in the non-smooth case, and that the O(log⁡(T)/T)\mathcal{O}(\log(T)/T) analysis is simply not tight.

However, this intuition turns out to be wrong. Below, we show that there are strongly convex stochastic optimization problems in Euclidean space, in which the convergence rate of SGD with averaging is lower bounded by Ω(log⁡(T)/T)\Omega(\log(T)/T). Thus, the logarithm in the bound is not merely a shortcoming in the standard online analysis of SGD, but is really a property of the algorithm.

We begin with the following relatively simple example, which shows the essence of the idea. Let FF be the 11-strongly convex function

The following theorem implies in this case, the convergence rate of SGD with averaging has a Ω(log⁡(T)/T)\Omega(\log(T)/T) lower bound. The intuition for this is that the global optimum lies at a corner of W\mathcal{W}, so SGD “approaches” it only from one direction. As a result, averaging the points returned by SGD actually hurts us.

Consider the strongly convex stochastic optimization problem presented above. If SGD is initialized at any point in W\mathcal{W}, and ran with ηt=c/t\eta_{t}=c/t, then for any T≥T0+1T\geq T_{0}+1, where T0=max⁡{2,c/2}T_{0}=\max\{2,c/2\}, we have

When cc is considered a constant, this lower bound is Ω(log⁡(T)/T)\Omega(\log(T)/T).

While the lower bound scales with cc, we remind the reader that one must pick ηt=c/t\eta_{t}=c/t with constant cc for an optimal convergence rate in general (see discussion in Sec. 2).

This example is relatively straightforward but not fully satisfying, since it crucially relies on the fact that w∗\mathbf{w}^{*} is on the border of W\mathcal{W}. In strongly convex problems, w∗\mathbf{w}^{*} usually lies in the interior of W\mathcal{W}, so perhaps the Ω(log⁡(T)/T)\Omega(\log(T)/T) lower bound does not hold in such cases. Our main result, presented below, shows that this is not the case, and that even if w∗\mathbf{w}^{*} is well inside the interior of W\mathcal{W}, an Ω(log⁡(T)/T)\Omega(\log(T)/T) rate for SGD with averaging can be unavoidable. The intuition is that we construct a non-smooth FF, which forces wt\mathbf{w}_{t} to approach the optimum from just one direction, creating the same effect as in the previous example.

In particular, let FF be the 11-strongly convex function

over the domain W=d\mathcal{W}=^{d}, which has a global minimum at 0\mathbf{0}. Suppose the stochastic gradient oracle, given a point wt\mathbf{w}_{t}, returns the gradient estimate

Consider the strongly convex stochastic optimization problem presented above. If SGD is initialized at any point w1\mathbf{w}_{1} with w1,1≥0w_{1,1}\geq 0, and ran with ηt=c/t\eta_{t}=c/t, then for any T≥T0+2T\geq T_{0}+2, where T0=max⁡{2,6c+1}T_{0}=\max\{2,6c+1\}, we have

When cc is considered a constant, this lower bound is Ω(log⁡(T)/T)\Omega(\log(T)/T).

We note that the requirement of w1,1≥0w_{1,1}\geq 0 is just for convenience, and the analysis also carries through, with some second-order factors, if we let w1,1<0w_{1,1}<0.

Recovering an 𝒪⁡(1/T)\mathcal{O}(1/T) Rate for SGD with α\alpha-Suffix Averaging

In the previous section, we showed that SGD with averaging may have a rate of Ω(log⁡(T)/T)\Omega(\log(T)/T) for non-smooth FF. To get the optimal O(1/T)\mathcal{O}(1/T) rate for any FF, we might turn to the algorithms of Hazan & Kale 2011 and Juditsky & Nesterov 2010. However, these algorithms constitute a significant departure from standard SGD. In this section, we show that it is actually possible to get an O(1/T)\mathcal{O}(1/T) rate using a much simpler modification of the algorithm: given the sequence of points w1,…,wT\mathbf{w}_{1},\ldots,\mathbf{w}_{T} provided by SGD, instead of returning the average wˉT=(w1+…+wT)/T\bar{\mathbf{w}}_{T}=(\mathbf{w}_{1}+\ldots+\mathbf{w}_{T})/T, we average and return just a suffix, namely

for some constant α∈(0,1)\alpha\in(0,1) (assuming αT\alpha T and (1−α)T(1-\alpha)T are integers). We call this procedure α\alpha-suffix averaging.

Note that for any constant α∈(0,1)\alpha\in(0,1), the bound above is O(G2/λT)\mathcal{O}(G^{2}/\lambda T). This matches the optimal guarantees in Hazan & Kale 2011 up to constant factors. However, this is shown for standard SGD, as opposed to the more specialized algorithm of Hazan & Kale 2011. Also, it is interesting to note that this bound is comparable to the bound of Thm. 1 for the last iterate, when FF is also smooth, as long as μ/λ=O(1)\mu/\lambda=\mathcal{O}(1). However, Thm. 1 degrades as the function becomes less smooth. In contrast, Thm. 5 implies that with an averaging scheme, we get an optimal rate even if the function is not smooth. Finally, we note that it might be tempting to use Thm. 5 as a guide to choose the averaging window, by optimizing the bound for α\alpha (which turns out to be α≈0.65\alpha\approx 0.65). However, we note that the optimal value of α\alpha is dependent on the constants in the bound, which may not be the tightest or most “correct” ones.

The proof combines the analysis of online gradient descent Hazan et al. 2007 and Lemma 1. In particular, starting as in the proof of Lemma 1, and extracting the inner products, we get

One potential disadvantage of suffix averaging is that if we cannot store all the iterates wt\mathbf{w}_{t} in memory, then we need to know from which iterate αT\alpha T to start computing the suffix average (in contrast, standard averaging can be computed “on-the-fly” without knowing the stopping time TT in advance). However, even if TT is not known, this can be addressed in several ways. For example, since our results are robust to the value of α\alpha, it is really enough to guess when we passed some “constant” portion of all iterates. Alternatively, one can divide the rounds into exponentially increasing epochs, and maintain the average just of the current epoch. Such an average would always correspond to a constant-portion suffix of all iterates.

High-Probability Bounds

Let δ∈(0,1/e)\delta\in(0,1/e) and assume T≥4T\geq 4. Suppose FF is λ\lambda-strongly convex over a convex set W\mathcal{W}, and that ∥g^t∥2≤G2\|\hat{\mathbf{g}}_{t}\|^{2}\leq G^{2} with probability 11. Then if we pick ηt=1/λt\eta_{t}=1/\lambda t, it holds with probability at least 1−δ1-\delta that for any t≤Tt\leq T,

To obtain high probability versions of Thm. 1, Thm. 2, and Thm. 5, one needs to use this lemma in lieu of Lemma 1 in their proofs. This leads overall to rates of the form O(log⁡(log⁡(T)/δ)/T)\mathcal{O}(\log(\log(T)/\delta)/T) which hold with probability 1−δ1-\delta.

Experiments

We now turn to empirically study how the algorithms behave, and compare it to our theoretical findings.

We studied the following four algorithms:

Sgd-A: Performing SGD and then returning the average point over all TT rounds.

Sgd-α\alpha: Performing SGD with α\alpha-suffix averaging. We chose α=1/2\alpha=1/2 - namely, we return the average point over the last T/2T/2 rounds.

Sgd-L: Performing SGD and returning the point obtained in the last round.

Epoch-Gd: The optimal algorithm of Hazan & Kale 2011 for strongly convex stochastic optimization.

First, as a simple sanity check, we measured the performance of these algorithms on a simple, strongly convex stochastic optimization problem, which is also smooth. We define W=5\mathcal{W}=^{5}, and F(w)=∥w∥2F(\mathbf{w})=\|\mathbf{w}\|^{2}. The stochastic gradient oracle, given a point w\mathbf{w}, returns the stochastic gradient w+z\mathbf{w}+\mathbf{z} where z\mathbf{z} is uniformly distributed in 5^{5}. Clearly, this is an unbiased estimate of the gradient of FF at w\mathbf{w}. The initial point w1\mathbf{w}_{1} of all 4 algorithms was chosen uniformly at random from W\mathcal{W}. The results are presented in Fig. 1, and it is clear that all 4 algorithms indeed achieve a Θ(1/T)\Theta(1/T) rate, matching our theoretical analysis (Thm. 1, Thm. 2 and Thm. 5). The results also seem to indicate that Sgd-A has a somewhat worse performance in terms of leading constants.

Second, as another simple experiment, we measured the performance of the algorithms on the non-smooth, strongly convex problem described in the proof of Thm. 4. In particular, we simulated this problem with d=5d=5, and picked w1\mathbf{w}_{1} uniformly at random from W\mathcal{W}. The results are presented in Fig. 2. As our theory indicates, Sgd-A seems to have an Θ(log⁡(T)/T)\Theta(\log(T)/T) convergence rate, whereas the other 3 algorithms all seem to have the optimal Θ(1/T)\Theta(1/T) convergence rate. Among these algorithms, the SGD variants Sgd-L and Sgd-α\alpha seem to perform somewhat better than Epoch-Gd. Also, while the average performance of Sgd-L and Sgd-α\alpha are similar, Sgd-α\alpha has less variance. This is reasonable, considering the fact that Sgd-α\alpha returns an average of many points, whereas Sgd-L return only the very last point.

Finally, we performed a set of experiments on real-world data. We used the same 3 binary classification datasets (ccat,cov1 and astro-ph) used by Shalev-Shwartz et al. 2011 and Joachims 2006, to test the performance of optimization algorithms for Support Vector Machines using linear kernels. Each of these datasets is composed of a training set and a test set. Given a training set of instance-label pairs, {xi,yi}i=1m\{\mathbf{x}_{i},y_{i}\}_{i=1}^{m}, we defined FF to be the standard (non-smooth) objective function of Support Vector Machines, namely

Following Shalev-Shwartz et al. 2011 and Joachims 2006, we took λ=10−4\lambda=10^{-4} for ccat, λ=10−6\lambda=10^{-6} for cov1, and λ=5×10−5\lambda=5\times 10^{-5} for astro-ph. The stochastic gradient given wt\mathbf{w}_{t} was computed by taking a single randomly drawn training example (xi,yi)(\mathbf{x}_{i},y_{i}), and computing the gradient with respect to that example, namely

The results of the experiments are presented in Fig. 3,Fig. 4 and Fig. 5. In all experiments, Sgd-A performed the worst. The other 3 algorithms performed rather similarly, with Sgd-α\alpha being slightly better on the Cov1 dataset, and Sgd-L being slightly better on the other 2 datasets.

In summary, our experiments indicate the following:

Sgd-A, which averages over all TT predictors, is worse than the other approaches. This accords with our theory, as well as the results reported in Shalev-Shwartz et al. 2011.

The Epoch-Gd algorithm does have better performance than Sgd-A, but a similar or better performance was obtained using the simpler approaches of α\alpha-suffix averaging (Sgd-α\alpha) or even just returning the last predictor (Sgd-L). The good performance of Sgd-α\alpha is supported by our theoretical results, and so does the performance of Sgd-L in the strongly convex and smooth case.

Sgd-L also performed rather well (with what seems like a Θ(1/T)\Theta(1/T) rate) on the non-smooth problem reported in Fig. 2, although with a larger variance than Sgd-α\alpha. Our current theory does not cover the convergence of the last predictor in non-smooth problems - see the discussion below.

Discussion

In this paper, we analyzed the behavior of SGD for strongly convex stochastic optimization problems. We demonstrated that this simple and well-known algorithm performs optimally whenever the underlying function is smooth, but the standard averaging step can make it suboptimal for non-smooth problems. However, a simple modification of the averaging step suffices to recover the optimal rate, and a more sophisticated algorithm is not necessary. Our experiments seem to support this conclusion.

There are several open issues remaining. In particular, the O(1/T)\mathcal{O}(1/T) rate in the non-smooth case still requires some sort of averaging. However, in our experiments and other studies (e.g. Shalev-Shwartz et al. 2011), returning the last iterate wT\mathbf{w}_{T} also seems to perform quite well. Our current theory does not cover this - at best, one can use Lemma 1 and Jensen’s inequality to argue that the last iterate has a O(1/T)\mathcal{O}(1/\sqrt{T}) rate, but the behavior in practice is clearly much better. Does SGD, without averaging, obtain an O(1/T)\mathcal{O}(1/T) rate for general strongly convex problems? Also, a fuller empirical study is warranted of whether and which averaging scheme is best in practice.

Acknowledgements: We thank Elad Hazan and Satyen Kale for helpful comments, and to Simon Lacoste-Julien for pointing out a bug in Lemma 1 in a previous version of this paper.

References

Appendix A Justifying ηt=Θ⁡(1/t)\eta_{t}=\Theta(1/t) Step-Sizes

In this appendix, we justify our focus on the step-size regime ηt=Θ(1/t)\eta_{t}=\Theta(1/t), by showing that for other step sizes, one cannot hope for an optimal convergence rate in general.

Let us begin by considering the scalar, strongly convex function F(w)=12w2F(w)=\frac{1}{2}w^{2}, in the deterministic case where g^t=gt=∇F(wt)=wt\hat{g}_{t}=g_{t}=\nabla F(w_{t})=w_{t} with probability 11, and show that ηt\eta_{t} cannot be smaller than Ω(1/t)\Omega(1/t). Intuitively, such small step sizes do not allow the iterates wtw_{t} to move towards the optimum sufficiently fast. More formally, starting from (say) w1=1w_{1}=1 and using the recursive equality wt+1=wt−ηtg^tw_{t+1}=w_{t}-\eta_{t}\hat{g}_{t}, we immediately get wT=∏t=1T−1(1−ηt)w_{T}=\prod_{t=1}^{T-1}(1-\eta_{t}). Thus, if we want to obtain a O(1/T)\mathcal{O}(1/T) convergence rate using the iterates returned by the algorithm, we must at least require that

For large enough tt and small enough ηt\eta_{t}, log⁡(1−ηt)≈−ηt\log(1-\eta_{t})\approx-\eta_{t}, and we get that ∑t=1Tηt\sum_{t=1}^{T}\eta_{t} must scale at least logarithmically with TT. This requires ηt≥Ω(1/t)\eta_{t}\geq\Omega(1/t).

Appendix B Proofs

In this subsection we collect some technical Results we will need for the other proofs.

Intuitively, the lemma holds because the strong convexity of FF implies that the expected value of ∥g^1∥2\|\hat{\mathbf{g}}_{1}\|^{2} must strictly increase as we get farther from w∗\mathbf{w}^{*}. More precisely, strong convexity implies that for any w1\mathbf{w}_{1},

Combining this and Eq. (5), we get that for all tt,

The following version of Freedman’s inequality appears in De La Peña 1999 (Theorem 1.2A):

Let d1,…,dTd_{1},\dots,d_{T} be a martingale difference sequence with a uniform upper bound bb on the steps did_{i}. Let VV denote the sum of conditional variances,

The proof of the following lemma is taken almost verbatim from Bartlett et al. 2008, with the only modification being the use of Theorem 6 to avoid an unnecessary union bound.

Let d1,…,dTd_{1},\ldots,d_{T} be a martingale difference sequence with a uniform bound ∣di∣≤b|d_{i}|\leq b for all ii. Let Vs=∑t=1sVart−1(dt)V_{s}=\sum_{t=1}^{s}\text{Var}_{t-1}(d_{t}) be the sum of conditional variances of dtd_{t}’s. Further, let σs=Vs\sigma_{s}=\sqrt{V_{s}}. Then we have, for any δ<1/e\delta<1/e and T≥4T\geq 4,

Note that a crude upper bound on Vartdt\text{Var}_{t}d_{t} is b2b^{2}. Thus, σs≤bT\sigma_{s}\leq b\sqrt{T}. We choose a discretization 0=α−1<α0<…<αl0=\alpha_{-1}<\alpha_{0}<\ldots<\alpha_{l} such that αi+1=2αi\alpha_{i+1}=2\alpha_{i} for i≥0i\geq 0 and αl≥bT\alpha_{l}\geq b\sqrt{T}. We will specify the choice of α0\alpha_{0} shortly. We then have,

where the last inequality follows from Theorem 6. If we now choose α0=blog⁡(1/δ)\alpha_{0}=b\sqrt{\log(1/\delta)}, then αj≥blog⁡(1/δ)\alpha_{j}\geq b\sqrt{\log(1/\delta)} for all jj. Hence every term in the above summation is bounded by exp⁡(−2log⁡(1/δ)1+2/3)<δ\exp\left(\frac{-2\log(1/\delta)}{1+2/3}\right)<\delta. Choosing l=log⁡(T)l=\log(\sqrt{T}) ensures that αl≥bT\alpha_{l}\geq b\sqrt{T}. Thus we have

B.2 Proof of Lemma 1

By the strong convexity of FF and the fact that w∗\mathbf{w}^{*} minimizes FF in W\mathcal{W}, we have

Also, by convexity of W\mathcal{W}, for any point v\mathbf{v} and any w∈W\mathbf{w}\in\mathcal{W} we have ∥ΠW(v)−w∥≤∥v−w∥\|\Pi_{\mathcal{W}}(\mathbf{v})-\mathbf{w}\|\leq\|\mathbf{v}-\mathbf{w}\|. Using these inequalities, we have the following:

Plugging in ηt=1/λt\eta_{t}=1/\lambda t, we get

B.3 Proof of Thm. 2

For any tt, define wˉt=(w1+…+wt)/t\bar{\mathbf{w}}_{t}=(\mathbf{w}_{1}+\ldots+\mathbf{w}_{t})/t. Then we have

By an induction argument (using Lemma 2 for the base case), it is easy to verify that

By the assumed smoothness of FF with respect to w∗\mathbf{w}^{*}, we have F(wˉT)−F(w∗)≤μ2∥wˉT−w∗∥2F(\bar{\mathbf{w}}_{T})-F(\mathbf{w}^{*})\leq\frac{\mu}{2}\|\bar{\mathbf{w}}_{T}-\mathbf{w}^{*}\|^{2}. Combining it with the inequality above, the result follows.

B.4 Proof of Thm. 3

The SGD iterate can be written separately for the first coordinate as

Fix some t≥T0t\geq T_{0}, and suppose first that Zt≤−1/2Z_{t}\leq-1/2. Conditioned on this event, we have

since t≥T0t\geq T_{0} implies ηt=c/t≤2\eta_{t}=c/t\leq 2. On the other hand, if Zt>−1/2Z_{t}>-1/2, we are still guaranteed that wt+1,1≥0w_{t+1,1}\geq 0 by the domain constraints. Using these results, we get

Substituting ηt=c/t\eta_{t}=c/t gives the required result.

B.5 Proof of Thm. 4

The SGD iterate for the first coordinate is

The intuition of the proof is that whenever wt,1w_{t,1} becomes negative, then the large gradient of FF causes wt+1,1w_{t+1,1} to always be significantly larger than 00. This means that in some sense, wt,1w_{t,1} is “constrained” to be larger than 00, mimicking the actual constraint in the example of Thm. 3 and forcing the same kind of behavior, with a resulting Ω(log⁡(T)/T)\Omega(\log(T)/T) rate.

To make this intuition rigorous, we begin with the following lemma, which shows that wt,1w_{t,1} can never be significantly smaller than 00, or “stay” below 00 for more than one iteration.

For any t≥T0=max⁡{2,6c+1}t\geq T_{0}=\max\{2,6c+1\}, it holds that

Suppose first that wt−1,1≥0w_{t-1,1}\geq 0. Then by Eq. (9) and the fact that Zt≥−1Z_{t}\geq-1, we get wt,1≥−c/(t−1)w_{t,1}\geq-c/(t-1). Moreover, in that case, if wt,1<0w_{t,1}<0, then by Eq. (9) and the previous observation,

Since t≥ct\geq c, we have 1−c/t∈(0,1)1-c/t\in(0,1), which implies that the above is lower bounded by

Moreover, since t≥6ct\geq 6c, we have −c/(t−1)+7c/t∈-c/(t-1)+7c/t\in, so the projection operator is unnecessary, and we get overall that

This result was shown to hold assuming that wt−1,1≥0w_{t-1,1}\geq 0. If wt−1,1<0w_{t-1,1}<0, then repeating the argument above for t−1t-1 instead of tt, we must have wt,1≥5c/(t−1)≥−c/(t−1)w_{t,1}\geq 5c/(t-1)\geq-c/(t-1), so the statement in the lemma holds also when wt−1,1<0w_{t-1,1}<0. ∎

We turn to the proof of Thm. 4 itself. By Lemma 4, if t≥T0t\geq T_{0}, then wt,1<0w_{t,1}<0 implies wt+1,1≥0w_{t+1,1}\geq 0, and moreover, wt,1+wt+1,1≥−c/(t−1)+5c/t≥3c/tw_{t,1}+w_{t+1,1}\geq-c/(t-1)+5c/t\geq 3c/t. Therefore, we have the following, where the sums below are only over tt’s which are between T0T_{0} and TT:

Now, we claim that the probabilities above can be lower bounded by a constant. To see this, consider each such probability for wt,1w_{t,1}, conditioned on the event wt−1,1≥0w_{t-1,1}\geq 0. Using the fact that c/t<1c/t<1, we have

This probability is at most 1/41/4, since it asks for ZtZ_{t} being constrained in an interval of size 11, whereas ZtZ_{t} is uniformly distributed over $,whichisanintervaloflength, which is an interval of length4$. As a result, we get

From this, we can lower bound Eq. (10) as follows:

Now, by Lemma 4, for any realization of wT0,1,…,wT,1w_{T_{0},1},\ldots,w_{T,1}, the indicators 1wt,1≥0\mathbf{1}_{w_{t,1}\geq 0} cannot equal 00 consecutively. Therefore, 1wt−1,1≥0+1wt,1≥0\mathbf{1}_{w_{t-1,1}\geq 0}+\mathbf{1}_{w_{t,1}\geq 0} must always be at least 11. Plugging it in the equation above, we get the lower bound (3c/16)∑t=T0+2T1t(3c/16)\sum_{t=T_{0}+2}^{T}\frac{1}{t}. Summing up, we have shown that

By the boundedness assumption on W\mathcal{W}, we have To analyze the case where W\mathcal{W} is unbounded, one can replace this by a coarse bound on how much wt,1w_{t,1} can change in the first T0T_{0} iterations, since the step sizes are bounded and T0T_{0} is essentially a constant anyway. wt,1≥−1w_{t,1}\geq-1, so

B.6 Proof of Thm. 5

Extracting the inner product and summing over t=(1−α)T+1,…,Tt=(1-\alpha)T+1,\ldots,T, we get

In particular, since we take ηt=1/λt\eta_{t}=1/\lambda t, we get

It can be shown that ∑t=(1−α)T+1T1t≤log⁡(1/(1−α))\sum_{t=(1-\alpha)T+1}^{T}\frac{1}{t}\leq\log(1/(1-\alpha)). Plugging it in and slightly simplifying, we get the desired bound. ∎

B.7 Proof of Proposition 1

To prove this proposition, we will first prove the two auxiliary results, which rewrite ∥wt+1−w∗∥2\|\mathbf{w}_{t+1}-\mathbf{w}^{*}\|^{2} in a more explicit form and provide a loose uniform upper bound. We will use the notation z^t\hat{\mathbf{z}}_{t} to denote gt−g^t\mathbf{g}_{t}-\hat{\mathbf{g}}_{t}.

For all tt, it holds with probability 11 that

The proof is analogous to that of Lemma 2, using the stronger condition that ∥gt∥≤G\|\mathbf{g}_{t}\|\leq G (which follows from the assumption ∥g^t∥≤G\|\hat{\mathbf{g}}_{t}\|\leq G with probability 11). Using strong convexity, we have

The lemma trivially holds for ∥wt−w∗∥=0\|\mathbf{w}_{t}-\mathbf{w}^{*}\|=0. Otherwise, divide both sides by λ∥wt−w∗∥/2\lambda\|\mathbf{w}_{t}-\mathbf{w}^{*}\|/2, and the result follows. ∎

Under the conditions of Proposition 1, it holds for any t≥2t\geq 2 that

By the strong convexity of FF and the fact that w∗\mathbf{w}^{*} minimizes FF in W\mathcal{W}, we have

Also, by convexity of W\mathcal{W}, for any point v\mathbf{v} and any w∈W\mathbf{w}\in\mathcal{W} we have ∥ΠW(v)−w∥≤∥v−w∥\|\Pi_{\mathcal{W}}(\mathbf{v})-\mathbf{w}\|\leq\|\mathbf{v}-\mathbf{w}\|. Using these inequalities, we have the following:

Unwinding this recursive inequality till t=2t=2, we get that for any t≥2t\geq 2,

Plugging this back, we get the desired bound. ∎

Considering the sum ∑i=2t(i−1)Zi\sum_{i=2}^{t}(i-1)Z_{i}, we have that the sum of conditional variances satisfies

where the last upper bound is by Lemma 5.

We now apply Lemma 3 to the sum of martingale differences ∑i=2t(i−1)Zi\sum_{i=2}^{t}(i-1)Z_{i}, and get that as long as T≥4T\geq 4 and δ∈(0,1/e)\delta\in(0,1/e), then with probability at least 1−δ1-\delta, for all t≤Tt\leq T,

Plugging this back into Eq. (12), we get that with probability at least 1−δ1-\delta, for all t≥2t\geq 2,

What is left to do now is an induction argument, to show that ∥wt−w∗∥2≤a/t\|\mathbf{w}_{t}-\mathbf{w}^{*}\|^{2}\leq a/t for a suitably chosen value of aa. By Lemma 5, this certainly holds for t=1,2t=1,2 if a≥8G2/λ2a\geq 8G^{2}/\lambda^{2}. To show the induction step, let us rewrite the displayed inequality above as

where b=16Glog⁡(log⁡(T)/δ)/λb=16G\sqrt{\log(\log(T)/\delta)}/\lambda and c=G2(16log⁡(log⁡(T)/δ)+1)/λ2c=G^{2}(16\log(\log(T)/\delta)+1)/\lambda^{2}. By the induction hypothesis, ∥wi−w∗∥2≤a/i\|\mathbf{w}_{i}-\mathbf{w}^{*}\|^{2}\leq a/i for all i=2,…,ti=2,\ldots,t. Therefore, to show that ∥wt+1−w∗∥2≤a/(t+1)\|\mathbf{w}_{t+1}-\mathbf{w}^{*}\|^{2}\leq a/(t+1), it suffices to find a sufficiently large value of aa so that

Multiplying both sides by t+1t+1, switching sides, and using the fact that (t+1)/2(t−1)t(t+1)/\sqrt{2(t-1)t} as well as (t+1)/t(t+1)/t is at most 3/23/2 for any t≥2t\geq 2, it follows that aa should satisfy

Solving the quadratic inequality, we get that aa should satisfy

Taking the square of both sides and using the fact that (x+y)2≤2(x2+y2)(x+y)^{2}\leq 2(x^{2}+y^{2}), it is again sufficient that

Substituting in the values of b,cb,c, we get

the induction hypothesis holds. Also, recall that for the base case to hold, we also need to assume a≥8G2/λ2a\geq 8G^{2}/\lambda^{2}, but this automatically holds for the value of aa above (since we assume δ<1/e\delta<1/e). This gives us the required result.