Tight Analyses for Non-Smooth Stochastic Gradient Descent

Nicholas J. A. Harvey, Christopher Liaw, Yaniv Plan, Sikander Randhawa

Introduction

Stochastic gradient descent (SGD) is one of the oldest randomized algorithms, dating back to 1951 . It is a very simple and widely used iterative method for minimizing a function. In a nutshell, the method works by querying an oracle for a noisy estimate of a subgradient, then taking a small step in the opposite direction. The simplicity and effectiveness of this algorithm has established it both as an essential tool for applied machine learning , and as a versatile framework for theoretical algorithm design.

In theoretical algorithms, SGD often appears in the guise of coordinate descent, an important special case in which each gradient estimate has a single non-zero coordinate. Some of the fast algorithms for Laplacian linear systems are based on coordinate descent (and the related Kaczmarz method ). Multi-armed Bandits were discovered years ago to be a perfect setting for coordinate descent : the famous Exp3 algorithm combines coordinate descent and the multiplicative weight method. Recent work on the geometric median problem gave a sublinear time algorithm based on SGD, and very recently a new privacy amplification technique has been developed that injects noise to the subgradients while executing SGD. Surveys and monographs discussing gradient descent and aimed at a theoretical CS audience include Bansal and Gupta , Bubeck , Hazan , and Vishnoi .

The efficiency of SGD is usually measured by the rate of decrease of the error — the difference in value between the algorithm’s output and the true minimum. The optimal error rate is known under various assumptions on ff, the function to be minimized. In addition to convexity, common assumptions are that ff is smooth (gradient is Lipschitz) or strongly convex (locally lower-bounded by a quadratic). Strongly convex functions often arise due to regularization, whereas smooth functions can sometimes be obtained by smoothening approximations (e.g., convolution). Existing analyses show that, after TT steps of SGD, the expected error of the final iterate is O(1/T)O(1/\sqrt{T}) for smooth functions, and O(1/T)O(1/T) for functions that are both smooth and strongly convex; furthermore, both of these error rates are optimal without further assumptions.

The non-smooth setting is the focus of this paper. In theoretical algorithms and discrete optimization, the convex functions that arise are often non-smooth. For example, the objective for the geometric median problem is a (sum of) 2-norms , so Lipschitz but not smooth. Similarly, formulating the minimum ss-tt cut problem as convex minimization , the objective is a 1-norm, so Lipschitz but not smooth. In machine learning, the objective for regularized support vector machines is strongly convex but not smooth.

A trouble with the non-smooth setting is that the error of (even deterministic) gradient descent need not decrease monotonically with TT, so it is not obvious how to analyze the error of the final iterate. A workaround, known as early as , is to output the average of the iterates. Existing analyses of SGD show that the expected error of the average is Θ(1/T)\Theta(1/\sqrt{T}) for Lipschitz functions , which is optimal, whereas for functions that are also strongly convex the average has error Θ(log⁡(T)/T)\Theta(\log(T)/T) with high probability, which is not the optimal rate. An alternative algorithm, more complicated than SGD, was discovered by Hazan and Kale ; it achieves the optimal expected error rate of O(1/T)O(1/T). Suffix averaging, a simpler approach in which the last half of the SGD iterates are averaged, was also shown to achieve expected error O(1/T)O(1/T) , although implementations can be tricky or memory intensive if the number of iterations TT is unknown a priori. Non-uniform averaging schemes with optimal expected error rate and simple implementations are also known , although the solutions may be less interpretable.

Shamir asked the very natural question of whether the final iterate of SGD achieves the optimal rate in the non-smooth scenario, as it does in the smooth scenario. If true, this would yield a very simple, implementable and interpretable form of SGD. Substantial progress on this question was made by Shamir and Zhang , who showed that the final iterate has expected error O(log⁡(T)/T)O(\log(T)/\sqrt{T}) for Lipschitz ff, and O(log⁡(T)/T)O(\log(T)/T) for strongly convex ff. Both of these bounds are a log⁡(T)\log(T) factor worse than the optimal rate, so Shamir and Zhang write

An important open question is whether the O(log⁡(T)/T)O(\log(T)/T) [expected] rate we obtained on [the last iterate], for strongly-convex problems, is tight. This question is important, because running SGD for TT iterations, and returning the last iterate, is a very common heuristic. In fact, even for the simpler case of (non-stochastic) gradient descent, we do not know whether the behavior of the last iterate… is tight.

Our work shows that the log⁡(T)\log(T) factor is necessary, both for Lipschitz functions and for strongly convex functions, even for non-stochastic gradient descent. So both of the expected upper bounds due to Shamir and Zhang are actually tight. This resolves the first question of Shamir . In fact, we show a much stronger statement: any convex combination of the last kk iterates must incur a log⁡(T/k)\log(T/k) factor. Thus, suffix averaging must average a constant fraction of the iterates to achieve the optimal rate.

High probability bounds on SGD are somewhat scarce; most of the literature proves bounds in expectation, which is of course easier. A common misconception is that picking the best of several independent trials of SGD would yield high-probability bounds, but this approach is not as efficient as it might seem It is usually the case that selecting the best of many independent trials is very inefficient. Such a scenario, which is very common in uses of SGD, arises if ff is defined as ∑i=1mfi\sum_{i=1}^{m}f_{i} or E⁡ω[ fω ]\operatorname{E}_{\omega}\left[\,f_{\omega}\,\right]. In such scenarios, evaluating ff exactly could be inefficient, and even estimating it to within error 1/T1/T requires Θ(T2)\Theta(T^{2}) samples via a Hoeffding bound, whereas SGD uses only O(T)O(T) samples. . So it is both interesting and useful that high-probability bounds hold for a single execution of SGD. Some known high-probability bounds for the strongly convex setting include , for uniform averaging, and , which give a suboptimal bound of O(log⁡log⁡(T)/T)O(\log\log(T)/T) for suffix averaging (and a variant thereof). In this work, we give two high probability bounds on the error of SGD for strongly convex functions: O(1/T)O(1/T) for suffix averaging and O(log⁡(T)/T)O(\log(T)/T) for the final iterate. Both of these are tight. (Interestingly, the former is used as an ingredient for the latter.) The former answers a question of Rakhlin et al. [28, §6], and the latter resolves the second question of Shamir . For Lipschitz functions, we prove a high probability bound of O(log⁡(T)/T)O(\log(T)/\sqrt{T}) for the final iterate, which is also tight.

Our work can also be seen as extending a line of work on understanding the difference between an average of the iterates or the last iterate of an iterative process. For instance, one of the most important results in game theory is that the multiplicative weights update algorithm converges to an equilibrium , i.e. the set of players are required to play some sort of “coordinated average” of their past strategies. Recently, studied the convergence behaviour of players’ individual strategies and found that the strategies diverge and hence, coordination (i.e. averaging) is needed to obtain an equilibrium. In a similar spirit, our work shows that the iterates of gradient descent have a sub-optimal convergence rate, at least for non-smooth convex functions, and thus, some form of averaging is needed to achieve the optimal rate. It is an interesting direction to see whether or not this is necessary in other iterative methods as well. For instance, the multiplicative weights update algorithm can be used to give an iterative algorithm for maximum flow , or linear programming in general , but also requires some form of averaging. We hope that this paper contributes to a better understanding on when averaging is necessary in iterative processes.

Preliminaries

We say that ff is LL-Lipschitz if ∥g∥≤L\left\lVert g\right\rVert\leq L for all x∈Xx\in\mathcal{X} and g∈∂f(x)g\in\partial f(x). For the remainder of this paper, unless otherwise stated, we make the assumption that α=1\alpha=1 and L=1L=1; this is only a normalization assumption and is without loss of generality (see Appendix F). For the sake of simplicity, we also assume that ∥z^∥≤1\left\lVert\hat{z}\right\rVert\leq 1 a.s. although our arguments generalize to the setting when z^\hat{z} are sub-Gaussian (see Appendix F).

Let ΠX\Pi_{\mathcal{X}} denote the projection operator on X\mathcal{X}. The (projected) stochastic gradient algorithm is given in Algorithm 1. Notice that there the algorithm maintains a sequence of points and there are several strategies to output a single point. The simplest strategy is to simply output xT+1x_{T+1}. However, one can also consider averaging all the iterates or averaging only a fraction of the final iterates . Notice that the algorithm also requires the user to specify a sequence of step sizes. The optimal choice of step size is known to be ηt=Θ(1/t)\eta_{t}=\Theta(1/t) for strongly convex functions , and ηt=Θ(1/t)\eta_{t}=\Theta(1/\sqrt{t}) for Lipschitz functions. For our analyses, we will use a step size of ηt=1/t\eta_{t}=1/t for strongly convex functions and ηt=1/t\eta_{t}=1/\sqrt{t} for Lipschitz functions.

Our Contributions

Our main results are bounds on the error of the final iterate of stochastic gradient descent for non-smooth, convex functions.

We prove an Ω(log⁡(T)/T)\Omega(\log(T)/T) lower bound, even in the non-stochastic case, and an O(log⁡(T)log⁡(1/δ)/T)O(\log(T)\log(1/\delta)/T) upper bound with probability 1−δ1-\delta.

Lipschitz functions.

We prove an Ω(log⁡(T)/T)\Omega(\log(T)/\sqrt{T}) lower bound, even in the non-stochastic case, and an O(log⁡(T)log⁡(1/δ)/T)O(\log(T)\log(1/\delta)/\sqrt{T}) upper bound with probability 1−δ1-\delta.

1 High probability upper bounds

Suppose ff is 11-strongly convex and 11-Lipschitz. Suppose that z^t\hat{z}_{t} (i.e., E⁡[ gt^ ]−gt^\operatorname{E}\left[\,\hat{g_{t}}\,\right]-\hat{g_{t}}, the noise of the stochastic gradient oracle) has norm at most 11 almost surely. Consider running Algorithm 1 for TT iterations with step size ηt=1/t\eta_{t}=1/t. Let x∗=argmin⁡x∈Xf(x)x^{*}=\operatornamewithlimits{argmin}_{x\in\mathcal{X}}f(x). Then, with probability at least 1−δ1-\delta,

Suppose ff is and 11-Lipschitz and X\mathcal{X} has diameter 11. Suppose that z^t\hat{z}_{t} (i.e., E⁡[ gt^ ]−gt^\operatorname{E}\left[\,\hat{g_{t}}\,\right]-\hat{g_{t}}, the noise of the stochastic gradient oracle) has norm at most 11 almost surely. Consider running Algorithm 1 for TT iterations with step size ηt=1/t\eta_{t}=1/\sqrt{t}. Let x∗=argmin⁡x∈Xf(x)x^{*}=\operatornamewithlimits{argmin}_{x\in\mathcal{X}}f(x). Then, with probability at least 1−δ1-\delta,

The assumptions on the strong convexity parameter, Lipschitz parameter, and diameter are without loss of generality; see Appendix F. The bounded noise assumption for the stochastic gradient oracle is made only for simplicity; our analysis can be made to go through if one relaxes the a.s. bounded condition to a sub-Gaussian condition. We also remark that a linear dependence on log⁡(1/δ)\log(1/\delta) is necessary for strongly convex functions; see Appendix G.

Our main probabilistic tool to prove Theorem 3.1 and Theorem 3.2 is a new extension of the classic Freedman inequality to a setting in which the martingale exhibits a curious phenomenon. Ordinarily a martingale is roughly bounded by the square root of its total conditional variance (this is the content of Freedman’s inequality). We consider a setting in which the total conditional variance As stated, Theorem 3.3 assumes a conditional sub-Gaussian bound on the martingale difference sequence, whereas Freedman assumes both a conditional variance bound and an almost-sure bound. These assumptions are easily interchangeable in both our proof and Freedman’s proof. For example, Freedman’s inequality with the sub-Gaussian assumption appears in [9, Theorem 2.6]. is itself bounded by (a linear transformation of) the martingale. We refer to this as a “chicken and egg” phenomenon.

Let {di,Fi}i=1n\{d_{i},\mathcal{F}_{i}\}_{i=1}^{n} be a martingale difference sequence. Suppose vi−1v_{i-1}, i∈[n]i\in[n] are positive and Fi−1\mathcal{F}_{i-1}-measurable random variables such that E⁡[ exp⁡(λdi) ∣ Fi−1 ]≤exp⁡(λ22vi−1)\operatorname{E}\left[\,\exp(\lambda d_{i})\,\mid\,\mathcal{F}_{i-1}\,\right]\leq\exp\left(\frac{\lambda^{2}}{2}v_{i-1}\right) for all i∈[n], λ>0i\in[n],\,\lambda>0. Let St=∑i=1tdiS_{t}=\sum_{i=1}^{t}d_{i} and Vt=∑i=1tvi−1V_{t}=\sum_{i=1}^{t}v_{i-1}. Let αi≥0\alpha_{i}\geq 0 and set α=max⁡i∈[n]αi\alpha=\max_{i\in[n]}\alpha_{i}. Then

The proof of Theorem 3.3 appears in Appendix C. Freedman’s Inequality (as formulated in [9, Theorem 2.6], up to constants) simply omits the terms highlighted in yellow, i.e., it sets α=0\alpha=0.

2 Lower bounds

More generally, any weighted average xˉ\bar{x} of the last kk iterates has

Thus, suffix averaging must average a constant fraction of iterates to achieve the optimal O(1/T)O(1/T) error.

More generally, any weighted average xˉ\bar{x} of the last kk iterates has

Furthermore, the value of ff strictly monotonically increases for the first TT iterations:

In order to incur a log⁡T\log T factor in the error of the TthT{{}^{\textrm{th}}} iterate, Theorem 3.4 and Theorem 3.5 constructs a function fTf_{T} parameterized by TT. It is also possible to create a single function ff, independent of TT, which incurs the log⁡T\log T factor for infinitely many TT. This is described in Remark B.5.

3 High probability upper bound for suffix averaging

Interestingly, our proof of Theorem 3.1 requires understanding the suffix average. (In fact this connection is implicit in ). Hence, en route, we prove the following high probability bound on the error of the average of the last half of the iterates of SGD.

Suppose ff is 11-strongly convex and 11-Lipschitz. Consider running Algorithm 1 for TT iterations with step size ηt=1/t\eta_{t}=1/t. Let x∗=argmin⁡x∈Xf(x)x^{*}=\operatornamewithlimits{argmin}_{x\in\mathcal{X}}f(x). Then, with probability at least 1−δ1-\delta,

This upper bound is optimal. Indeed, Appendix G shows that the error is Ω(log⁡(1/δ)/T)\Omega(\log(1/\delta)/T) even for the one-dimensional function f(x)=x2/2f(x)=x^{2}/2.

Theorem 3.7 is an improvement over the O\big{(}\log(\log(T)/\delta)/T\big{)} bounds independently proven by Rakhlin et al. (for suffix averaging) and Hazan and Kale (for EpochGD). Once again, we defer the statement of the theorem for general strongly-convex and Lipschitz parameters to Appendix F.

Techniques

Final iterate. When analyzing gradient descent, it simplifies matters greatly to consider the expected error. This is because the effect of a gradient step is usually bounded by the subgradient inequality; so by linearity of expectation, one can plug in the expected subgradient, thus eliminating the noise [6, §6.1].

High probability bounds are more difficult. (Indeed, it is not a priori obvious that the error of the final iterate is tightly concentrated.) A high probability analysis must somehow control the total noise that accumulates from each noisy subgradient step. Fortunately, the accumulated noise forms a zero-mean martingale but unfortunately, the martingale depends on previous iterates in a highly nontrivial manner. Indeed, suppose (Xt)(X_{t}) is the martingale of the accumulated noise and let Vt−1=E⁡[ (Xt−Xt−1)2 ∣ X1,...,Xt−1 ]V_{t-1}=\operatorname{E}\left[\,(X_{t}-X_{t-1})^{2}\,\mid\,X_{1},...,X_{t-1}\,\right] be the conditional variance at time tt. A significant technical step of our analysis (Lemma 7.4) shows that the total conditional variance (TCV) of the accumulated noise exhibits the “chicken and egg” phenomenon alluded to in the discussion of Theorem 3.3. Roughly speaking, we have ∑t=1TVt−1≤αXT−1+β\sum_{t=1}^{T}V_{t-1}\leq\alpha X_{T-1}+\beta where α,β>0\alpha,\beta>0 are scalars. Since Freedman’s inequality shows that XT≲∑t=1TVTX_{T}\lesssim\sqrt{\sum_{t=1}^{T}V_{T}}, an inductive argument gives that XT≲αXT−1+β≲ααXT−2+β+β≲⋅⋅⋅X_{T}\lesssim\sqrt{\alpha X_{T-1}+\beta}\lesssim\sqrt{\alpha\sqrt{\alpha X_{T-2}+\beta}+\beta}\lesssim\cdot\cdot\cdot. This naive analysis involves invoking Freedman’s inequality TT times, so a union bound incurs an extra factor log⁡T\log T in the bound on XTX_{T}. This can be improved via a trick : by upper-bounding the TCV by a power-of-two (and by TT), it suffices to invoke Freedman’s inequality log⁡T\log T times, which only incurs an extra factor log⁡log⁡T\log\log T in the bound on XTX_{T}.

Notice that this analysis actually shows that Xt≲∑i=1tViX_{t}\lesssim\sqrt{\sum_{i=1}^{t}V_{i}} for all t≤Tt\leq T, whereas the original goal was only to control XTX_{T}. Any analysis that simultaneously controls all XtX_{t}, t≤Tt\leq T, must necessarily incur an extra factor log⁡log⁡T\log\log T. This is a consequence of the Law of the Iterated LogarithmLet Xt∈{−1,+1}X_{t}\in\{-1,+1\} be uniform and i.i.d. and ST=∑t=1TXtS_{T}=\sum_{t=1}^{T}X_{t}. The Law of the Iterated Logarithm states that lim sup⁡TST2Tlog⁡log⁡T=1\limsup_{T}\frac{S_{T}}{\sqrt{2T\log\log T}}=1 a.s.. Previous work employs exactly such an analysis and incurs the log⁡log⁡T\log\log T factor. Rakhlin et al. explicitly raise the question of whether this log⁡log⁡T\log\log T factor is necessary.

Our work circumvents this issue by developing a generalization of Freedman’s Inequality (Theorem 3.3) to handle martingales of the above form, which ultimately yields optimal high-probability bounds. We are no longer hindered by the Law of the Iterated Logarithm because our variant of Freedman’s Inequality does not require us to have fine grained control over the martingale over all times.

Another important tool that we employ is a new bound on the Euclidean distance between the iterates computed by SGD (Lemma 7.3). This is useful because, by the subgradient inequality, the change in the error at different iterations can be bounded using the distance between iterates. Various naive approaches yield a bound of the form ∥xa−xb∥2≤(b−a)2min⁡{a2,b2}\left\lVert x_{a}-x_{b}\right\rVert^{2}\leq\frac{(b-a)^{2}}{\min\left\{a^{2},b^{2}\right\}} ∥xa−xb∥2≤(b−a)2min⁡{a2,b2}\left\lVert x_{a}-x_{b}\right\rVert^{2}\leq\frac{(b-a)^{2}}{\min\left\{a^{2},b^{2}\right\}} (in the strongly convex case). We derive a much stronger bound, comparable to ∥xa−xb∥2≤∣b−a∣min⁡{a2,b2}\left\lVert x_{a}-x_{b}\right\rVert^{2}\leq\frac{\lvert b-a\rvert}{\min\left\{a^{2},b^{2}\right\}}. Naturally, in the stochastic case, there are additional noise terms that contribute to the technical challenge of our analysis. Nevertheless, this new distance bound could be useful in further understanding non-smooth gradient descent (even in the non-stochastic setting).

As in previous work on the strongly convex case , the error of the suffix average plays a critical role in bounding the error of the final iterate. Therefore, we also need a tight high probability bound on the error of the suffix average.

To complete the optimal high probability analysis on the final iterate, we need a high probability bound on the suffix average that avoids the log⁡log⁡T\log\log T factor. As in the final iterate setting, the accumulated noise for the suffix average forms a zero-mean martingale, (Xt)T/2T(X_{t})_{T/2}^{T}, but now the conditional variance at step tt satisfies Vt≤αtVt−1+βtw^tVt−1+γtV_{t}\leq\alpha_{t}V_{t-1}+\beta_{t}\hat{w}_{t}\sqrt{V_{t-1}}+\gamma_{t}, where w^t\hat{w}_{t} is a mean-zero random variable and αt,βt\alpha_{t},\beta_{t} and γt\gamma_{t} are constants. In , using Freedman’s Inequality combined with the trick from , they obtain a bound on a similar martingale but do so over all time steps and incur a log⁡log⁡T\log\log T factor. However, our goal is only to bound XTX_{T} and according to Freedman’s Inequality XT≲∑t=T/2TVtX_{T}\lesssim\sqrt{\sum_{t=T/2}^{T}V_{t}}. So, our goal becomes to bound ∑t=T/2TVt\sum_{t=T/2}^{T}V_{t}. To do so, we develop a probabilistic tool to bound the ttht{{}^{\textrm{th}}} iterate of a stochastic process that satisfies a recursive dependence on the (t−1)th(t-1){{}^{\textrm{th}}} iterate similar to the one exhibited by VtV_{t}.

Let (Xt)t=1T(X_{t})_{t=1}^{T} be a stochastic process and let (Ft)t=1T(\mathcal{F}_{t})_{t=1}^{T} be a filtration such that XtX_{t} is Ft\mathcal{F}_{t} measurable and XtX_{t} is non-negative almost surely. Let αt∈[0,1)\alpha_{t}\in[0,1) and βt,γt≥0\beta_{t},\gamma_{t}\geq 0 for every tt. Let w^t\hat{w}_{t} be a mean-zero random variable conditioned on Ft\mathcal{F}_{t} such that ∣w^t∣≤1\left\lvert\hat{w}_{t}\right\rvert\leq 1 almost surely for every tt. Suppose that Xt+1≤αtXt+βtw^tXt+γtX_{t+1}\leq\alpha_{t}X_{t}+\beta_{t}\hat{w}_{t}\sqrt{X_{t}}+\gamma_{t} for every tt. Then, the following hold.

where K=max⁡1≤t≤T(2γt1−αt,2βt21−αt)K=\max_{1\leq t\leq T}\left(\frac{2\gamma_{t}}{1-\alpha_{t}},\frac{2\beta_{t}^{2}}{1-\alpha_{t}}\right).

The recursion Xt+1≤αt+βtw^tXt+γtX_{t+1}\leq\alpha_{t}+\beta_{t}\hat{w}_{t}\sqrt{X_{t}}+\gamma_{t} presents two challenges that make it difficult to analyze. Firstly, the fact that it is a non-linear recurrence makes it unclear how one should unwind Xt+1X_{t+1}. Furthermore, unraveling the recurrence introduces many w^t\hat{w}_{t} terms in a non-trivial way. Interestingly, if we instead consider the moment generating function (MGF) of Xt+1X_{t+1}, then we can derive an analogous recursive MGF relationship which removes this non-linear dependence and removes the w^t\hat{w}_{t} term. This greatly simplifies the recursion and leads to a surprisingly clean analysis. The proof of Theorem 4.1 can be found in Appendix D. (The recursive MGF bound which removes the non-linear dependence is by Claim D.1.)

Deterministic lower bound.

As mentioned above, a challenge with non-smooth gradient is that the error of the TthT{{}^{\textrm{th}}} iterate may not monotonically decrease with TT, even in the deterministic setting. The full extent of this non-decreasing behavior seems not to have been previously understood. We develop a technique that forces the error to be monotonically increasing for Ω(T)\Omega(T) consecutive iterations. The idea is as follows. If GD takes a step in a certain direction, a non-differentiable point can allow the function to suddenly increase in that direction. If the function were one-dimensional, the next iteration of GD would then be guaranteed to step in the opposite direction, thereby decreasing the function. However, in higher dimensions, the second gradient step could be nearly orthogonal to the first step, and the function could have yet another non-differentiable point in this second direction. In sufficiently high dimensions, this behavior can be repeated for many iterations. The tricky aspect is designing the function to have this behavior while also being convex. We show that this is possible, leading to the unexpectedly large error in the TthT{{}^{\textrm{th}}} iteration. We believe that this example illuminates some non-obvious behavior of gradient descent.

Lower bound on error of final iterate, strongly convex case

It is easy to see that ff is 11-strongly convex due to the 12∥x∥2\frac{1}{2}\left\lVert x\right\rVert^{2} term. Furthermore ff is 33-Lipschitz over X\mathcal{X} because ∥∇Hi(x)∥≤∥hi∥+1\left\lVert\nabla H_{i}(x)\right\rVert\leq\left\lVert h_{i}\right\rVert+1 and ∥hi∥2≤1+14∑j=1T1(T−j)2<1+12\left\lVert h_{i}\right\rVert^{2}\leq 1+\frac{1}{4}\sum_{j=1}^{T}\frac{1}{(T-j)^{2}}<1+\frac{1}{2}. Finally, the minimum value of ff over X\mathcal{X} is non-positive because f(0)=0f(0)=0.

In order to execute Algorithm 1 on ff we must specify a subgradient oracle. First, we require the following claim, which follows from standard facts in convex analysis [16, Theorem 4.4.2].

∂f(x)\partial f(x) is the convex hull of {  hi+x : i∈I(x)  }\left\{\;h_{i}+x\,:\,i\in\mathcal{I}(x)\;\right\}, where I(x)={  i : Hi(x)=f(x)  }\mathcal{I}(x)=\left\{\;i\,:\,H_{i}(x)=f(x)\;\right\}.

Our subgradient oracle is non-stochastic: given xx, it simply returns hi′+xh_{i^{\prime}}+x where i′=min⁡I(x)i^{\prime}=\min\mathcal{I}(x).

Explicit description of iterates.

We will show inductively that these are precisely the first TT iterates produced by Algorithm 1 when using the subgradient oracle defined above. The following claim is easy to verify from the definition of ztz_{t}.

For t∈[T+1]t\in[T+1], ztz_{t} is non-negative. In particular, zt,j≥12(t−1)z_{t,j}\geq\frac{1}{2(t-1)} for j<tj<t and zt,j=0z_{t,j}=0 for j≥tj\geq t.

∥z1∥=0\left\lVert z_{1}\right\rVert=0 and ∥zt∥2≤1t−1\left\lVert z_{t}\right\rVert^{2}\leq\frac{1}{t-1} for t>1t>1. Thus zt∈Xz_{t}\in\mathcal{X} for all t∈[T+1]t\in[T+1].

The “triangular shape” of the hih_{i} vectors allows us to determine the value and subdifferential at ztz_{t}.

f(zt)=Ht(zt)f(z_{t})=H_{t}(z_{t}) for all t∈[T+1]t\in[T+1]. The subgradient oracle for ff at ztz_{t} returns the vector ht+zth_{t}+z_{t}.

We claim that htTzt=hiTzth_{t}^{\textsf{T}}z_{t}=h_{i}^{\textsf{T}}z_{t} for all i>ti>t. By definition, ztz_{t} is supported on its first t−1t-1 coordinates. However, hth_{t} and hih_{i} agree on the first t−1t-1 coordinates (for i>ti>t). This proves the first part of the claim.

Next we claim that ztTht>ztThiz_{t}^{\textsf{T}}h_{t}>z_{t}^{\textsf{T}}h_{i} for all 1≤i<t1\leq i<t. This also follows from the definition of ztz_{t} and hih_{i}:

These two claims imply that Ht(zt)≥Hi(zt)H_{t}(z_{t})\geq H_{i}(z_{t}) for all i∈[T+1]i\in[T+1], and therefore f(zt)=Ht(zt)f(z_{t})=H_{t}(z_{t}). Moreover I(zt)={  i : Hi(zt)=f(zt)  }={t,...,T+1}\mathcal{I}(z_{t})=\left\{\;i\,:\,H_{i}(z_{t})=f(z_{t})\;\right\}=\left\{t,...,T+1\right\}. Thus, when evaluating the subgradient oracle at the vector ztz_{t}, it returns the vector ht+zth_{t}+z_{t}. ∎

Since the subgradient returned at ztz_{t} is determined by Claim 5.3, and the next iterate of SGD arises from a step in the opposite direction, a straightforward induction proof allows us to show the following lemma. A detailed proof is in Appendix B.1.

For the function ff constructed in this section, the vector xtx_{t} in Algorithm 1 equals ztz_{t}, for every t∈[T+1]t\in[T+1].

The value of the final iterate is easy to determine from Lemma 5.4 and Claim 5.3:

(Here the second inequality uses Claim 5.2.) This proves (3.1). A small modification of the last calculation proves (3.2); details may be found in Claim B.1. This completes the proof of Theorem 3.4.

Lower bound on error of final iterate, Lipschitz case

In this section we prove a lower bound result for Lipschitz functions analogous to those in Section 5. Specifically, we define a function f=fTf=f_{T}, depending on TT, for which the final iterate produced by Algorithm 1 has f(xT)=Ω(log⁡(T)/T)f(x_{T})=\Omega(\log(T)/\sqrt{T}), thereby proving (3.3). Throughout this section we will assume that ηt=ct\eta_{t}=\frac{c}{\sqrt{t}} for c≥1c\geq 1.

Note that ff is 11-Lipschitz over X\mathcal{X} because

Also, the minimum value of ff over X\mathcal{X} is non-positive because f(0)=0f(0)=0.

In order to execute Algorithm 1 on ff we must specify a subgradient oracle. Similar to Claim 6.1, [16, Theorem 4.4.2] implies

∂f(x)\partial f(x) is the convex hull of {  hi : i∈I(x)  }\left\{\;h_{i}\,:\,i\in\mathcal{I}(x)\;\right\}, where I(x)={  i : hiTx=f(x)  }\mathcal{I}(x)=\left\{\;i\,:\,h_{i}^{\textsf{T}}x=f(x)\;\right\}.

Our subgradient oracle is as follows: given xx, it simply returns hi′+xh_{i^{\prime}}+x where i′=min⁡I(x)i^{\prime}=\min\mathcal{I}(x).

Explicit description of iterates.

We will show inductively that these are precisely the first TT iterates produced by Algorithm 1 when using the subgradient oracle defined above.

For t∈[T+1]t\in[T+1], ztz_{t} is non-negative. In particular, zt,j≥14Tz_{t,j}\geq\frac{1}{4\sqrt{T}} for j<tj<t and zt,j=0z_{t,j}=0 for j≥tj\geq t.

By definition, zt,j=0z_{t,j}=0 for all j≥tj\geq t. For j<tj<t,

We have zt,j=0z_{t,j}=0 for all j≥tj\geq t, and for j<tj<t, we have

Since Claim 6.2 shows that zt≥0z_{t}\geq 0, we have ∥zt∥≤1\left\lVert z_{t}\right\rVert\leq 1, and therefore zt∈Xz_{t}\in\mathcal{X}. ∎

The “triangular shape” of the hih_{i} vectors allows us to determine the value and subdifferential at ztz_{t}.

f(zt)=htTztf(z_{t})=h_{t}^{\textsf{T}}z_{t} for all t∈[T+1]t\in[T+1]. The subgradient oracle for ff at ztz_{t} returns the vector hth_{t}.

We claim that htTzt=hiTzth_{t}^{\textsf{T}}z_{t}=h_{i}^{\textsf{T}}z_{t} for all i>ti>t. By definition, ztz_{t} is supported on its first t−1t-1 coordinates. However, hth_{t} and hih_{i} agree on the first t−1t-1 coordinates (for i>ti>t). This proves the first part of the claim.

Next we claim that ztTht>ztThiz_{t}^{\textsf{T}}h_{t}>z_{t}^{\textsf{T}}h_{i} for all 1≤i<t1\leq i<t. This also follows from the definition of ztz_{t} and hih_{i}:

These two claims imply that htTzt≥hiTzth_{t}^{\textsf{T}}z_{t}\geq h_{i}^{\textsf{T}}z_{t} for all i∈[T+1]i\in[T+1], and therefore f(zt)=htTztf(z_{t})=h_{t}^{\textsf{T}}z_{t}. Moreover I(zt)={  i : hiTzt=f(zt)  }={t,...,T+1}\mathcal{I}(z_{t})=\left\{\;i\,:\,h_{i}^{\textsf{T}}z_{t}=f(z_{t})\;\right\}=\left\{t,...,T+1\right\}. Thus, when evaluating the subgradient oracle at the vector ztz_{t}, it returns the vector hth_{t}. ∎

Since the subgradient returned at ztz_{t} is determined by Claim 6.4, and the next iterate of SGD arises from a step in the opposite direction, a straightforward induction proof allows us to show the following lemma.

For the function ff constructed in this section, the vector xtx_{t} in Algorithm 1 equals ztz_{t}, for every t∈[T+1]t\in[T+1].

The proof is by induction. By definition x1=0x_{1}=0 and z1=0z_{1}=0, establishing the base case.

So assume zt=xtz_{t}=x_{t} for t≤Tt\leq T; we will prove that zt+1=xt+1z_{t+1}=x_{t+1}. Recall that Algorithm 1 sets yt+1=xt−ηtgty_{t+1}=x_{t}-\eta_{t}g_{t}, and that ηt=ct\eta_{t}=\frac{c}{\sqrt{t}}. By the inductive hypothesis, xt=ztx_{t}=z_{t}. By Claim 6.4, the algorithm uses the subgradient gt=htg_{t}=h_{t}. Thus,

So yt+1=zt+1y_{t+1}=z_{t+1}. Since xt+1=ΠBT(yt+1)x_{t+1}=\Pi_{\mathcal{B}_{T}}(y_{t+1}) by definition, and yt+1∈Xy_{t+1}\in\mathcal{X} by Claim 6.3, we have xt+1=yt+1=zt+1x_{t+1}=y_{t+1}=z_{t+1}. ∎

The value of the final iterate is easy to determine from Lemma 5.4 and Claim 5.3:

(Here the second inequality uses Claim 6.2.) This proves (3.3). A small modification of the last calculation proves (3.4); details may be found in Claim B.2. The proof of (3.5) may be found in Subsection B.3. This completes the proof of Theorem 3.5.

Upper bound on error of final iterate, strongly convex case

We now turn to the proof of the upper bound on the error of the final iterate of SGD, in the case where ff is 1-strongly convex and 1-Lipschitz (Theorem 3.1). Recall that the step size used by Algorithm 1 in this case is ηt=1/t\eta_{t}=1/t. We will write g^t=gt−z^t\hat{g}_{t}=g_{t}-\hat{z}_{t}, where g^t\hat{g}_{t} is the vector returned by the oracle at the point xtx_{t}, gt∈∂f(xt)g_{t}\in\partial f(x_{t}), and z^t\hat{z}_{t} is the noise. Let Ft=σ(z^1,...,z^t)\mathcal{F}_{t}=\sigma(\hat{z}_{1},...,\hat{z}_{t}) be the σ\sigma-algebra generated by the first tt steps of SGD. Finally, recall that ∥z^t∥≤1\left\lVert\hat{z}_{t}\right\rVert\leq 1 and E⁡[ z^t ∣ Ft−1 ]=0\operatorname{E}\left[\,\hat{z}_{t}\,\mid\,\mathcal{F}_{t-1}\,\right]=0.

We begin with the following lemma which can be inferred from the proof of Theorem 1 in Shamir and Zhang . For completeness, we provide a proof in Appendix E.

Let ff be 1-strongly convex and 1-Lipschitz. Suppose that we run SGD (Algorithm 1) with step sizes ηt=1/t\eta_{t}=1/t. Then

Lemma 7.1 asserts that the error of the last iterate is upper bounded by the sum of the error of the suffix average and some noise terms (up to the additive O(log⁡T/T)O(\log T/T) term). Thus, it remains to show that the error due to the suffix average is small with high probability (Theorem 3.7) and the noise terms are small. We defer the proof of Theorem 3.7 to Subsection 7.3. By changing the order of summation, we can write ZT=∑t=T/2T⟨ z^t, wt ⟩Z_{T}=\sum_{t=T/2}^{T}\langle\>\hat{z}_{t},\,w_{t}\>\rangle where

The main technical difficulty is to show that ZTZ_{T} is small with high probability. Formally, we prove the following lemma, whose proof is outlined in Subsection 7.1.

ZT≤O(log⁡(T)log⁡(1/δ)T)Z_{T}\leq O\left(\frac{\log(T)\log(1/\delta)}{T}\right) with probability at least 1−δ1-\delta.

Given Theorem 3.7 and Lemma 7.2, the proof of Theorem 3.1 is immediate.

The main technical difficulty in the proof is to understand the noise term, which we have denoted by ZTZ_{T}. Notice that ZTZ_{T} is a sum of a martingale difference sequence. The natural starting point is to better understand the TCV of ZTZ_{T} (i.e. ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2}). We we will see that ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2} is bounded by a linear transformation of ZTZ_{T}. This “chicken and egg” relationship inspires us to derive a new probabilistic tool (generalizing Freedman’s Inequality) to disentangle the total conditional variance from the martingale.

The main challenge in analyzing ∥wt∥\left\lVert w_{t}\right\rVert is precisely analyzing the distance ∥xt−xj∥\left\lVert x_{t}-x_{j}\right\rVert between SGD iterates. A loose bound of ∥xt−xj∥2≲(t−j)∑i=jt∥g^i∥2i2\left\lVert x_{t}-x_{j}\right\rVert^{2}\lesssim(t-j)\sum_{i=j}^{t}\frac{\left\lVert\hat{g}_{i}\right\rVert^{2}}{i^{2}} follows easily from Jensen’s Inequality. We prove the following tighter bound, which may be of independent interest. The proof is in Appendix E.

Suppose ff is 1-Lipschitz and 1-strongly convex. Suppose we run Algorithm 1 for TT iterations with step sizes ηt=1/t\eta_{t}=1/t. Let a<ba<b. Then,

Using Lemma 7.3 and some delicate calculations we obtain the following upper bound on ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2}, revealing the surprisingly intricate relationship between ZTZ_{T} (the martingale) and ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2} (its TCV). This is the main technical step that inspired our probabilistic tool (the generalized Freedman’s Inequality).

There exists positive values R1=O(log⁡2TT2)R_{1}=O\left(\frac{\log^{2}T}{T^{2}}\right), R2=O(log⁡TT)R_{2}=O\left(\frac{\log T}{T}\right), Ct=O(log⁡T)C_{t}=O(\log T), At=O(log⁡TT2)A_{t}=O\left(\frac{\log T}{T^{2}}\right) such that

This bound is mysterious in that the left-hand side is an upper bound on the total conditional variance of ZTZ_{T}, whereas the right-hand side essentially contains a scaled version of ZTZ_{T} itself. This is the “chicken and egg phenomenon” alluded to in Section 4, and it poses another one of the main challenges of bounding ZTZ_{T}. This bound inspires our main probabilistic tool, which we restate for convenience here.

Theorem 3.3 (Generalized Freedman). Let {di,Fi}i=1n\{d_{i},\mathcal{F}_{i}\}_{i=1}^{n} be a martingale difference sequence. Suppose vi−1v_{i-1}, i∈[n]i\in[n] are positive and Fi−1\mathcal{F}_{i-1}-measurable random variables such that E⁡[ exp⁡(λdi) ∣ Fi−1 ]≤exp⁡(λ22vi−1)\operatorname{E}\left[\,\exp(\lambda d_{i})\,\mid\,\mathcal{F}_{i-1}\,\right]\leq\exp\left(\frac{\lambda^{2}}{2}v_{i-1}\right) for all i∈[n], λ>0i\in[n],\,\lambda>0. Let St=∑i=1tdiS_{t}=\sum_{i=1}^{t}d_{i} and Vt=∑i=1tvi−1V_{t}=\sum_{i=1}^{t}v_{i-1}. Let αi≥0\alpha_{i}\geq 0 and set α=max⁡i∈[n]αi\alpha=\max_{i\in[n]}\alpha_{i}. Then

In order to apply Theorem 3.3, we need to refine Lemma 7.4 to replace the terms ∥xT/2−x∗∥2\left\lVert x_{T/2}-x^{*}\right\rVert^{2} and ∑t=T/2T−1⟨ z^t, At(xt−x∗) ⟩\sum_{t=T/2}^{T-1}\langle\>\hat{z}_{t},\,A_{t}(x_{t}-x^{*})\>\rangle with sufficient high probability upper bounds. In , they showed that ∥xt−x∗∥2≤O(log⁡log⁡(T)/T)\left\lVert x_{t}-x^{*}\right\rVert^{2}\leq O(\log\log(T)/T) for all T2≤t≤T\frac{T}{2}\leq t\leq T simultaneously, with high probability, so using that would give a slightly suboptimal result. In contrast, our analysis only needs a high probability bound on ∥xT/2−x∗∥2\left\lVert x_{T/2}-x^{*}\right\rVert^{2} and ∑t=T/2TAt∥xt−x∗∥2\sum_{t=T/2}^{T}A_{t}\left\lVert x_{t}-x^{*}\right\rVert^{2}; this allows us to avoid a log⁡log⁡T\log\log T factor here. Indeed, we have

For all t≥2t\geq 2, ∥xt−x∗∥2≤O(log⁡(1/δ)/t)\left\lVert x_{t}-x^{*}\right\rVert^{2}\leq O\left(\log(1/\delta)/t\right) with probability 1−δ1-\delta, and

Let σt≥0\sigma_{t}\geq 0 for t=2,...,Tt=2,...,T. Then, ∑t=2Tσt∥xt−x∗∥=O(∑t=2Tσttlog⁡(1/δ))\sum_{t=2}^{T}\sigma_{t}\left\lVert x_{t}-x^{*}\right\rVert=O\left(\sum_{t=2}^{T}\frac{\sigma_{t}}{t}\log(1/\delta)\right) w.p. 1−δ1-\delta.

The proof of Theorem 7.5, in Subsection 7.2, uses our tool for bounding recursive stochastic processes (Theorem 4.1). Therefore, we need to expose a recursive relationship between ∥xt+1−x∗∥2\left\lVert x_{t+1}-x^{*}\right\rVert^{2} and ∥xt−x∗∥2\left\lVert x_{t}-x^{*}\right\rVert^{2} that satisfies the conditions of Theorem 4.1. Interestingly, Theorem 7.5 is also the main ingredient in the analysis of the error of the suffix average (see Subsection 7.3). We now have enough to give our refined version of Lemma 7.4, which is now in a format usable by Freedman’s Inequality.

For every δ>0\delta>0 there exists positive values R=O(log⁡2Tlog⁡(1/δ)T2)R=O\left(\frac{\log^{2}T\log(1/\delta)}{T^{2}}\right), Ct=O(log⁡T)C_{t}=O\left(\log T\right) such that ∑t=T/2T∥wt∥2≤R+∑t=T/2T−1Ctt⟨ z^t, wt ⟩,\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2}\leq R+\sum_{t=T/2}^{T-1}\frac{C_{t}}{t}\langle\>\hat{z}_{t},\,w_{t}\>\rangle, with probability at least 1−δ1-\delta.

The lemma essentially follows from combining our bounds in Theorem 7.5 with an easy corollary of Freedman’s Inequality (Corollary C.4) which states that a high probability bound of MM on the TCV of a martingale implies a high probability bound of M\sqrt{M} on the martingale.

Let R1R_{1}, R2R_{2}, CtC_{t}, and AtA_{t} be as in Lemma 7.4, and consider the resulting upper bound on ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2}. The first claim in Theorem 7.5 gives R2∥xT/2−x∗∥2=O(log⁡2Tlog⁡(1/δ)T2)R_{2}\left\lVert x_{T/2}-x^{*}\right\rVert^{2}=O\left(\frac{\log^{2}T\log(1/\delta)}{T^{2}}\right) because R2=O(log⁡T/T)R_{2}=O\left(\log T/T\right).

By the second claim in Theorem 7.5, we have ∑t=T/2T−1At2∥xt−x∗∥2=O(log⁡2TT4log⁡(1/δ))\sum_{t=T/2}^{T-1}A_{t}^{2}\left\lVert x_{t}-x^{*}\right\rVert^{2}=O\left(\frac{\log^{2}T}{T^{4}}\log(1/\delta)\right) with probability at least 1−δ1-\delta because each At=O(log⁡TT2)A_{t}=O\left(\frac{\log T}{T^{2}}\right). Hence, we have derived a high probability bound on the total conditional variance of ∑t=T/2T⟨ z^t, At(xt−x∗) ⟩\sum_{t=T/2}^{T}\langle\>\hat{z}_{t},\,A_{t}(x_{t}-x^{*})\>\rangle. Therefore, we turn this into a high probability bound on the martingale itself by applying Corollary C.4 and obtain ∑t=T/2T−1⟨ z^t, At(xt−x∗) ⟩=O(log⁡2Tlog⁡(1/δ)T2)\sum_{t=T/2}^{T-1}\langle\>\hat{z}_{t},\,A_{t}(x_{t}-x^{*})\>\rangle=O\left(\frac{\log^{2}T\log(1/\delta)}{T^{2}}\right) with probability at least 1−δ1-\delta. ∎

Now that we have derived an upper bound on the total conditional variance of ZTZ_{T} in the form required by our Generalized Freedman Inequality (Theorem 3.3), we are finally ready to prove Lemma 7.2 (our high probability upper bound on the noise, ZTZ_{T}).

We have demonstrated that ZTZ_{T} satisfies the “Chicken and Egg” phenomenon with high probability. Translating this into a high probability upper bound on the martingale ZTZ_{T} itself is a corollary of Theorem 3.3.

Indeed, consider a filtration {Ft}t=T/2T\{\mathcal{F}_{t}\}_{t=T/2}^{T}. Let dt=⟨ at, bt ⟩d_{t}=\langle\>a_{t},\,b_{t}\>\rangle define a martingale difference sequence where ∥at∥≤1\left\lVert a_{t}\right\rVert\leq 1 and E⁡[ at ∣ Ft−1 ]=0\operatorname{E}\left[\,a_{t}\,\mid\,\mathcal{F}_{t-1}\,\right]=0. Suppose there are positive values, RR, αt\alpha_{t}, such that max⁡t=T/2T{αt}=O(R)\max_{t=T/2}^{T}\{\alpha_{t}\}=O\left(\sqrt{R}\right) and ∑t=T/2T∥bt∥2≤∑t=T/2Tαtdt+Rlog⁡(1/δ)\sum_{t=T/2}^{T}\left\lVert b_{t}\right\rVert^{2}\leq\sum_{t=T/2}^{T}\alpha_{t}d_{t}+R\log(1/\delta) with probability at least 1−δ1-\delta. Then, Corollary C.5 bounds the martingale at time step TT by Rlog⁡(1/δ)\sqrt{R}\log(1/\delta) with high probability.

Observe that Lemma 7.6 allows us to apply Corollary C.5 with at=z^ta_{t}=\hat{z}_{t}, bt=wtb_{t}=w_{t}, αt=(Ct/t)\alpha_{t}=(C_{t}/t) for t=T/2,...,T−1t=T/2,...,T-1, αT=0\alpha_{T}=0, max⁡t=T/2T{αt}=O(log⁡T/T)\max_{t=T/2}^{T}\{\alpha_{t}\}=O\left(\log T/T\right), and R=O(log⁡2T/T2)R=O\left(\log^{2}T/T^{2}\right) to prove Lemma 7.2. ∎

In this section, we prove Theorem 7.5. We begin with the following claim which can be extracted from .

Suppose ff is 11-strongly-convex and 11-Lipschitz. Define Yt=t∥xt+1−x∗∥2Y_{t}=t\left\lVert x_{t+1}-x^{*}\right\rVert^{2} and Ut=⟨ z^t+1, xt+1−x∗ ⟩/∥xt+1−x∗∥2U_{t}=\langle\>\hat{z}_{t+1},\,x_{t+1}-x^{*}\>\rangle/\left\lVert x_{t+1}-x^{*}\right\rVert_{2}. Then

This claim exposes a recursive relationship between ∥xt+1−x∗∥2\left\lVert x_{t+1}-x^{*}\right\rVert^{2} and ∥xt−x∗∥2\left\lVert x_{t}-x^{*}\right\rVert^{2} and inspires our probabilistic tool for recursive stochastic processes (Theorem 4.1). We prove Theorem 7.5 using this tool:

Consider the stochastic process (Yt)t=1T−1(Y_{t})_{t=1}^{T-1} where YtY_{t} is as defined by Claim 7.7. Note that YtY_{t} satisfies the conditions of Theorem 4.1 with Xt=YtX_{t}=Y_{t}, w^t=Ut\hat{w}_{t}=U_{t}, αt=t−2t−1=1−1/(t−1)\alpha_{t}=\frac{t-2}{t-1}=1-1/(t-1), βt=2/t−1\beta_{t}=2/\sqrt{t-1}, and γt=4/t\gamma_{t}=4/t. Observe that UtU_{t} is a Ft+1\mathcal{F}_{t+1} measurable random variable which is mean zero conditioned on Ft\mathcal{F}_{t} Furthermore, note that ∣Ut∣≤1\left\lvert U_{t}\right\rvert\leq 1 with probability 1 because ∥z^t+1∥≤1\left\lVert\hat{z}_{t+1}\right\rVert\leq 1 with probability 1. Furthermore, it is easy to check that max⁡1≤t≤T(2γt1−αt,2β21−αt)=8\max_{1\leq t\leq T}\left(\frac{2\gamma_{t}}{1-\alpha_{t}},\frac{2\beta^{2}}{1-\alpha_{t}}\right)=8 with the above setup. So, we may apply Theorem 4.1 to obtain:

Recalling that Yt=t∥xt+1−x∗∥2Y_{t}=t\left\lVert x_{t+1}-x^{*}\right\rVert^{2} and setting σt′=σt/t\sigma_{t}^{\prime}=\sigma_{t}/t proves Theorem 7.5. ∎

3 Upper Bound on Error of Suffix Averaging

To complete the proof of the final iterate upper bound (Theorem 3.1), it still remains to prove the suffix averaging upper bound (Theorem 3.7). In this section, we prove this result as a corollary of the high probability bounds on ∥xt−x∗∥2\left\lVert x_{t}-x^{*}\right\rVert^{2} that we obtained in the previous subsection.

It suffices to bound the right hand side of (7.2) by O(log⁡(1/δ))O(\log(1/\delta)) with probability at least 1−δ1-\delta. Indeed, bounding ∥g^t∥2\left\lVert\hat{g}_{t}\right\rVert^{2} by 4, (a) in (7.2) is bounded by O(1)O(1). Term (b) is bounded by O(log⁡(1/δ))O(\log(1/\delta)) by Theorem 7.5.

It remains to bound (c). Theorem 7.5 implies ∑t=T/2T∥xt−x∗∥2=O(log⁡(1/δ))\sum_{t=T/2}^{T}\left\lVert x_{t}-x^{*}\right\rVert^{2}=O(\log(1/\delta)) with probability at least 1−δ1-\delta. Therefore, Corollary C.4 shows that (c) is at most O(log⁡(1/δ))O(\log(1/\delta)) with probability at least 1−δ1-\delta. ∎

Upper bound on error of final iterate, Lipschitz case: Proof Sketch

In this section we provide a proof sketch of the upper bound of the final iterate of SGD, in the case where ff is 1-Lipschitz but not necessarily strongly-convex (Theorem 3.2). The proof of Theorem 3.2 closely resembles the proof of Theorem 3.1 and we will highlight the main important differences. Perhaps the most notable difference is that the analysis in the Lipschitz case does not require a high probability bound on ∥xt−x∗∥2\left\lVert x_{t}-x^{*}\right\rVert^{2}.

Recall that the step size used by Algorithm 1 in this case is ηt=1/t\eta_{t}=1/\sqrt{t}. We will write g^t=gt−z^t\hat{g}_{t}=g_{t}-\hat{z}_{t}, where g^t\hat{g}_{t} is the vector returned by the oracle at the point xtx_{t}, gt∈∂f(xt)g_{t}\in\partial f(x_{t}), and z^t\hat{z}_{t} is the noise. Let Ft=σ(z^1,...,z^t)\mathcal{F}_{t}=\sigma(\hat{z}_{1},...,\hat{z}_{t}) be the σ\sigma-algebra generated by the first tt steps of SGD. Finally, recall that ∥z^t∥≤1\left\lVert\hat{z}_{t}\right\rVert\leq 1 and E⁡[ z^t ∣ Ft−1 ]=0\operatorname{E}\left[\,\hat{z}_{t}\,\mid\,\mathcal{F}_{t-1}\,\right]=0.

As before, we begin with a lemma which can be obtained by modifying the proof of Lemma 7.1 to replace applications of strong convexity with the subgradient inequality.

Let ff be 1-Lipschitz. Suppose that we run SGD (Algorithm 1) with step sizes ηt=1t\eta_{t}=\frac{1}{\sqrt{t}}. Then,

Lemma 8.1 asserts that the error of the last iterate is bounded by the sum of the error of the average of the iterates and some noise terms (up to the additive O(log⁡T/T)O(\log T/\sqrt{T}) term). A standard analysis (similar to the proof of Lemma E.1) reveals ∑t=T/2T[f(xt)−f(x∗)]≤O(T)+∑t=T/2T⟨ z^t, xt−x∗ ⟩\sum_{t=T/2}^{T}\left[f(x_{t})-f(x^{*})\right]\leq O({\sqrt{T}})+\sum_{t=T/2}^{T}\langle\>\hat{z}_{t},\,x_{t}-x^{*}\>\rangle. Applying Azuma’s inequality on the summation (using the diameter bound to obtain ⟨ z^t, xt−x∗ ⟩2≤1\langle\>\hat{z}_{t},\,x_{t}-x^{*}\>\rangle^{2}\leq 1) shows

As a consequence of Lemma 8.2, it is enough to prove that the error due to the noise terms are small in order to complete the proof of Theorem 3.2. By changing the order of summation, we can write ZT=∑t=T/2T⟨ z^t, wt ⟩Z_{T}=\sum_{t=T/2}^{T}\langle\>\hat{z}_{t},\,w_{t}\>\rangle where

Just as in Section 7, the main technical difficulty is to show that ZTZ_{T} is small with high probability. Formally, we prove the following lemma, whose proof is outlined in Subsection 8.1.

For every δ∈(0,1)\delta\in(0,1), ZT≤O(log⁡(T)log⁡(1/δ)/T)Z_{T}\leq O\left({\log(T)\log(1/\delta)}/{\sqrt{T}}\right) with probability at least 1−δ1-\delta.

Given Lemma 8.2 and Lemma 8.3, the proof of Theorem 3.2 is straightforward. The next sub-section provides a proof sketch of Lemma 8.3.

The goal of this section is to prove Lemma 8.3. Just as in Section 7, the main technical difficulty is to understand the noise term, denoted ZTZ_{T}. Observe that ZTZ_{T} is a sum of a martingale difference sequence, and ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2} is the TCV of ZTZ_{T}. The TCV of ZTZ_{T} will be shown to exhibit the “chicken and egg” relationship which we have already seen explicitly exhibited by the TCV of the noise terms in the strongly convex case. That is, we will see that the ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2} is bounded by a linear transformation of ZTZ_{T}. We will again use our Generalized Freedman to disentangle the total conditional variance from the martingale.

The distance ∥xt−xj∥\left\lVert x_{t}-x_{j}\right\rVert between SGD iterates is again a crucial quantity to understand in order to bound ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2} (see Subsection 7.1 to see why). Therefore, we develop a distance estimate analogous to Lemma 7.3

Suppose ff is 1-Lipschitz. Suppose we run Algorithm 1 for TT iterations with step sizes ηt=1/t\eta_{t}=1/\sqrt{t}. Let a<ba<b. Then,

We then use Lemma 8.4 to prove Lemma 8.5, our main upper bound on ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2}. This follows from some delicate calculations similar to those in Appendix E.1, replacing the strongly-convex distance estimate (Lemma 7.3) with the Lipschitz distance estimate (Lemma 8.4), along with some other minor modifications. This upper bound reveals the surprisingly intricate relationship between ZTZ_{T} (the martingale) and ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2} (its TCV).

There exists positive values R1=O(log⁡2TT)R_{1}=O\left(\frac{\log^{2}T}{T}\right), R2=O(log⁡TT1.5)R_{2}=O\left(\frac{\log T}{T^{1.5}}\right), and Ct=O(log⁡T)C_{t}=O\left(\log T\right), such that

Just as in Lemma 7.4, the left-hand side is an upper bound on the total conditional variance of ZTZ_{T}, whereas the right-hand side essentially contains a scaled version of ZTZ_{T} itself. This is another instance of the “chicken and egg phenomenon” alluded to in Section 4, and it is the main challenge of bounding ZTZ_{T}. For convenience, we restate our main probabilistic tool which allows us to deal with the chicken and egg phenomenon.

Theorem 3.3 (Generalized Freedman). Let {di,Fi}i=1n\{d_{i},\mathcal{F}_{i}\}_{i=1}^{n} be a martingale difference sequence. Suppose vi−1v_{i-1}, i∈[n]i\in[n] are positive and Fi−1\mathcal{F}_{i-1}-measurable random variables such that E⁡[ exp⁡(λdi) ∣ Fi−1 ]≤exp⁡(λ22vi−1)\operatorname{E}\left[\,\exp(\lambda d_{i})\,\mid\,\mathcal{F}_{i-1}\,\right]\leq\exp\left(\frac{\lambda^{2}}{2}v_{i-1}\right) for all i∈[n], λ>0i\in[n],\,\lambda>0. Let St=∑i=1tdiS_{t}=\sum_{i=1}^{t}d_{i} and Vt=∑i=1tvi−1V_{t}=\sum_{i=1}^{t}v_{i-1}. Let αi≥0\alpha_{i}\geq 0 and set α=max⁡i∈[n]αi\alpha=\max_{i\in[n]}\alpha_{i}. Then

In order to apply Theorem 3.3, we need to refine Lemma 8.5 to replace R2∑t=T/2T⟨ z^t, xt−x∗ ⟩R_{2}\sum_{t=T/2}^{T}\langle\>\hat{z}_{t},\,x_{t}-x^{*}\>\rangle with a sufficient high probability upper bound. This is similar to the refinement of Lemma 7.4 from Subsection 7.1. However, unlike the refinement in Subsection 7.1 (which required a high probability bound on ∑t=T/2TAt∥xt−x∗∥2\sum_{t=T/2}^{T}A_{t}\left\lVert x_{t}-x^{*}\right\rVert^{2} without any diameter bound), the refinement here is quite easy. Using the diameter bound, the almost sure bound of ∥z^t∥≤1\left\lVert\hat{z}_{t}\right\rVert\leq 1, and Azuma’s inequality, we can bound ∑t=T/2T⟨ z^t, xt−x∗ ⟩\sum_{t=T/2}^{T}\langle\>\hat{z}_{t},\,x_{t}-x^{*}\>\rangle by Tlog⁡(1/δ)\sqrt{T\log(1/\delta)} with probability at least 1−δ1-\delta. This yields the following lemma.

For every δ∈(0,1)\delta\in(0,1), there exists positive values R=O(log⁡2Tlog⁡(1/δ)T)R=O\left(\frac{\log^{2}T\sqrt{\log(1/\delta)}}{T}\right), Ct=O(log⁡T)C_{t}=O\left(\log T\right), such that ∑t=T/2T∥wt∥2≤R+∑t=T/2T−1⟨ z^t, Cttwt ⟩,\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2}\leq R+\sum_{t=T/2}^{T-1}\langle\>\hat{z}_{t},\,\frac{C_{t}}{\sqrt{t}}w_{t}\>\rangle, with probability at least 1−δ1-\delta.

Now that we have derived an upper bound on the total conditional variance of ZTZ_{T} in the form required by Generalized Freedman Inequality (Theorem 3.3), we are now finally ready to prove Lemma 8.3 (the high probability upper bound on the noise, ZTZ_{T}).

We have demonstrated that ZTZ_{T} satisfies the “Chicken and Egg” phenomenon with high probability. Translating this into a high probability upper bound on the martingale ZTZ_{T} itself is a corollary of Theorem 3.3.

Indeed, consider a filtration {Ft}t=T/2T\{\mathcal{F}_{t}\}_{t=T/2}^{T}. Let dt=⟨ at, bt ⟩d_{t}=\langle\>a_{t},\,b_{t}\>\rangle define a martingale difference sequence where ∥at∥≤1\left\lVert a_{t}\right\rVert\leq 1 and E⁡[ at ∣ Ft−1 ]=0\operatorname{E}\left[\,a_{t}\,\mid\,\mathcal{F}_{t-1}\,\right]=0. Suppose there are positive values, RR, αt\alpha_{t}, such that max⁡t=T/2T{αt}=O(R)\max_{t=T/2}^{T}\{\alpha_{t}\}=O\left(\sqrt{R}\right) and ∑t=T/2T∥bt∥2≤∑t=T/2Tαtdt+Rlog⁡(1/δ)\sum_{t=T/2}^{T}\left\lVert b_{t}\right\rVert^{2}\leq\sum_{t=T/2}^{T}\alpha_{t}d_{t}+R\sqrt{\log(1/\delta)} with probability at least 1−δ1-\delta. Then, Corollary C.5 bounds the martingale at time step TT by Rlog⁡(1/δ)\sqrt{R}\log(1/\delta) with high probability.

Observe that Lemma 8.6 allows us to apply Corollary C.5 with at=z^ta_{t}=\hat{z}_{t}, bt=wtb_{t}=w_{t}, αt=(Ct/t)\alpha_{t}=(C_{t}/\sqrt{t}) for t=T/2,...,T−1t=T/2,...,T-1, αT=0\alpha_{T}=0, max⁡t=T/2T{αt}=O(log⁡T/T)\max_{t=T/2}^{T}\{\alpha_{t}\}=O\left(\log T/\sqrt{T}\right), and R=O(log⁡2T/T)R=O\left(\log^{2}T/T\right) to prove Lemma 8.3.

Appendix A Standard results

Let XX be a random variable and λ>0\lambda>0. Then Pr⁡[ X>t ]≤exp⁡(−λt)E⁡[ exp⁡(λX) ]\operatorname{Pr}\left[\,X>t\,\right]\leq\exp(-\lambda t)\operatorname{E}\left[\,\exp(\lambda X)\,\right].

Let XX and YY be random variables. Then ∣E⁡[ XY ]∣2≤E⁡[ X2 ]E⁡[ Y2 ]\lvert\operatorname{E}\left[\,XY\,\right]\rvert^{2}\leq\operatorname{E}\left[\,X^{2}\,\right]\operatorname{E}\left[\,Y^{2}\,\right].

Let X1,...,XnX_{1},...,X_{n} be random variables and p1,...,pn>0p_{1},...,p_{n}>0 be such that ∑i1/pi=1\sum_{i}1/p_{i}=1. Then E⁡[ ∏i=1n∣Xi∣ ]≤∏i=1n(E⁡[ ∣Xi∣p ])1/pi\operatorname{E}\left[\,\prod_{i=1}^{n}\lvert X_{i}\rvert\,\right]\leq\prod_{i=1}^{n}\left(\operatorname{E}\left[\,\lvert X_{i}\rvert^{p}\,\right]\right)^{1/p_{i}}

Let X1,...,XnX_{1},...,X_{n} be random variables and K1,...,Kn>0K_{1},...,K_{n}>0 be such that E⁡[ exp⁡(λXi) ]≤exp⁡(λKi)\operatorname{E}\left[\,\exp(\lambda X_{i})\,\right]\leq\exp(\lambda K_{i}) for all λ≤1/Ki\lambda\leq 1/K_{i}. Then E⁡[ exp⁡(λ∑i=1nXi) ]≤exp⁡(λ∑i=1nKi)\operatorname{E}\left[\,\exp(\lambda\sum_{i=1}^{n}X_{i})\,\right]\leq\exp(\lambda\sum_{i=1}^{n}K_{i}) for all λ≤1/∑i=1nKi\lambda\leq 1/\sum_{i=1}^{n}K_{i}.

Let pi=∑j=1nKj/Kip_{i}=\sum_{j=1}^{n}K_{j}/K_{i} and observe that piKi=∑j=1nKjp_{i}K_{i}=\sum_{j=1}^{n}K_{j}. By assumption, if λpi≤1/Ki\lambda p_{i}\leq 1/K_{i} (i.e. λ≤1/∑j=1nKj\lambda\leq 1/\sum_{j=1}^{n}K_{j}) then E⁡[ exp⁡(λpiXi) ]≤exp⁡(λpiKi)\operatorname{E}\left[\,\exp(\lambda p_{i}X_{i})\,\right]\leq\exp(\lambda p_{i}K_{i}). Applying Theorem A.3, we conclude that

Suppose there is c>0c>0 such that for all 0<λ≤1c0<\lambda\leq\frac{1}{c}, \operatorname{E}\left[\,\exp\big{(}\lambda^{2}X^{2}\big{)}\,\right]\leq\exp\big{(}\lambda^{2}c^{2}\big{)} for some constant cc. Then, if XX is mean zero it holds that

Apply Lemma A.1 to Pr⁡[ X≥t ]\operatorname{Pr}\left[\,X\geq t\,\right] to get Pr⁡[ X≥t ]≤cexp⁡(−λt+λC)\operatorname{Pr}\left[\,X\geq t\,\right]\leq c\exp\left(-\lambda t+\lambda C\right). Set λ=1/C\lambda=1/C and t=Clog⁡(1/δ)t=C\log(1/\delta) to complete the proof. ∎

For 1≤a≤b1\leq a\leq b, ∑k=ab1k≤2b−a+1b\sum_{k=a}^{b}\frac{1}{\sqrt{k}}\leq 2\frac{b-a+1}{\sqrt{b}}.

For any 1≤j≤t≤T1\leq j\leq t\leq T, we have t−j(T−j+1)t≤1T\frac{t-j}{(T-j+1)\sqrt{t}}\leq\frac{1}{\sqrt{T}}.

The function g(x)=x−jxg(x)=\frac{x-j}{\sqrt{x}} has derivative

This is positive for all x>0x>0 and j≥0j\geq 0, and so

for all 0<t≤T0<t\leq T. This implies the claim. ∎

The sum may be upper-bounded by an integral as follows:

Let αj=1(T−j)(T−j+1)\alpha_{j}=\frac{1}{(T-j)(T-j+1)}. Let a,ba,b be such that a<b≤Ta<b\leq T. Then,

Suppose a<ba<b. Then, log⁡(b/a)≤(b−a)/a\log(b/a)\leq(b-a)/a.

Let b≥a>1b\geq a>1. Then, \sum_{i=a}^{b}\frac{1}{i}\leq\log\big{(}b/(a-1)\big{)}.

Appendix B Omitted proofs for the lower bounds

By definition, z1=x1=0z_{1}=x_{1}=0. By Claim 5.3, the subgradient returned at x1x_{1} is h1+x1=h1h_{1}+x_{1}=h_{1}, so Algorithm 1 sets y2=x1−η1h1=e1y_{2}=x_{1}-\eta_{1}h_{1}=e_{1}, the first standard basis vector. Then Algorithm 1 projects onto the feasible region, obtaining x2=ΠX(y2)x_{2}=\Pi_{\mathcal{X}}(y_{2}), which equals e1e_{1} since y2∈Xy_{2}\in\mathcal{X}. Since z2z_{2} also equals e1e_{1}, the base case is proven.

So assume zt=xtz_{t}=x_{t} for 2≤t<T2\leq t<T; we will prove that zt+1=xt+1z_{t+1}=x_{t+1}. By Claim 5.3, the subgradient returned at xtx_{t} is g^t=ht+zt\hat{g}_{t}=h_{t}+z_{t}. Then Algorithm 1 sets yt+1=xt−ηtg^ty_{t+1}=x_{t}-\eta_{t}\hat{g}_{t}. Since xt=ztx_{t}=z_{t} and ηt=1/t\eta_{t}=1/t, we obtain

So yt+1=zt+1y_{t+1}=z_{t+1}. Since xt+1=ΠX(yt+1)x_{t+1}=\Pi_{\mathcal{X}}(y_{t+1}) is defined to be the projection onto X\mathcal{X}, and yt+1∈Xy_{t+1}\in\mathcal{X} by Claim 5.2, we have xt+1=yt+1=zt+1x_{t+1}=y_{t+1}=z_{t+1}. ∎

For any k∈[T]k\in[T], let xˉ=∑t=T−k+2T+1λtxt\bar{x}=\sum_{t=T-k+2}^{T+1}\lambda_{t}x_{t} be any convex combination of the last kk iterates. Then

By Lemma 5.4, xt=zt ∀t∈[T+1]x_{t}=z_{t}~{}\forall t\in[T+1]. By Claim 5.2, every zt≥0z_{t}\geq 0 so xˉ≥0\bar{x}\geq 0. Moreover, zt,j≥1/2Tz_{t,j}\geq 1/2T for all T−k+2≤t≤T+1T-k+2\leq t\leq T+1 and 1≤j≤T−k+11\leq j\leq T-k+1. Consequently, xˉj≥1/2T\bar{x}_{j}\geq 1/2T for all 1≤j≤T−k+11\leq j\leq T-k+1. Thus,

B.2 Lipschitz case

For any k∈[T]k\in[T], let xˉ=∑i=T−k+1Tλixi\bar{x}=\sum_{i=T-k+1}^{T}\lambda_{i}x_{i} be any convex combination of the last kk iterates. Then

By Lemma 6.5, xi=zix_{i}=z_{i} for all ii. By Claim 6.2, every zi≥0z_{i}\geq 0 so xˉ≥0\bar{x}\geq 0. Moreover, zi,j≥1/2Tz_{i,j}\geq 1/2\sqrt{T} for all T−k+1≤i≤TT-k+1\leq i\leq T and 1≤j≤T−k1\leq j\leq T-k, and zi,T=0z_{i,T}=0 for all i≤Ti\leq T. Consequently, xˉj≥1/2T\bar{x}_{j}\geq 1/2\sqrt{T} for all 1≤j≤T−k1\leq j\leq T-k and xˉT=0\bar{x}_{T}=0. Thus,

B.3 Monotonicity

The following claim completes the proof of (3.5), under the assumption that ηt=ct\eta_{t}=\frac{c}{\sqrt{t}}.

For any i≤Ti\leq T, we have f(xi+1)≥f(xi)+1/32cT(T−i+1)f(x_{i+1})\geq f(x_{i})+1/32c\sqrt{T}(T-i+1).

B.4 A function independent of T𝑇T

Appendix C Proof of Theorem 3.3 and Corollaries

In this section we prove Theorem 3.3 and derive some corollaries. We restate Theorem 3.3 here for convenience.

Theorem 3.3. Let {di,Fi}i=1n\{d_{i},\mathcal{F}_{i}\}_{i=1}^{n} be a martingale difference sequence. Suppose vi−1v_{i-1}, i∈[n]i\in[n] are positive and Fi−1\mathcal{F}_{i-1}-measurable random variables such that E⁡[ exp⁡(λdi) ∣ Fi−1 ]≤exp⁡(λ22vi−1)\operatorname{E}\left[\,\exp(\lambda d_{i})\,\mid\,\mathcal{F}_{i-1}\,\right]\leq\exp\left(\frac{\lambda^{2}}{2}v_{i-1}\right) for all i∈[n], λ>0i\in[n],\,\lambda>0. Let St=∑i=1tdiS_{t}=\sum_{i=1}^{t}d_{i} and Vt=∑i=1tvi−1V_{t}=\sum_{i=1}^{t}v_{i-1}. Let αi≥0\alpha_{i}\geq 0 and set α=max⁡i∈[n]αi\alpha=\max_{i\in[n]}\alpha_{i}. Then

Ut(λ)\mathcal{U}_{t}(\lambda) is a supermartingale w.r.t. Ft\mathcal{F}_{t}.

Define the stopping time T=min⁡{  t : St≥x and Vt≤∑i=1tαidi+β  }T=\min\left\{\;t\,:\,S_{t}\geq x\text{ and }V_{t}\leq\sum_{i=1}^{t}\alpha_{i}d_{i}+\beta\;\right\} with the convention that min⁡∅=∞\min\emptyset=\infty. Since Ut\mathcal{U}_{t} is a supermartingale w.r.t. Ft\mathcal{F}_{t}, UT∧t\mathcal{U}_{T\wedge t} is a supermartingale w.r.t. Ft\mathcal{F}_{t}. Hence,

Since λ<1/(2α)\lambda<1/(2\alpha) was arbitrary, we conclude that

where the inequality is because c≤2c\leq 2. Now, we can pick λ=12α+4β/x<12α\lambda=\frac{1}{2\alpha+4\beta/x}<\frac{1}{2\alpha} to conclude that

Let α≥0\alpha\geq 0 and λ∈[0,1/2α)\lambda\in[0,1/2\alpha). Then there exists c=c(λ,α)∈c=c(\lambda,\alpha)\in such that 2cλ2=(λ+cλ2α)22c\lambda^{2}=(\lambda+c\lambda^{2}\alpha)^{2}.

If λ=0\lambda=0 or α=0\alpha=0 then the claim is trivial (just take c=0c=0). So assume α,λ>0\alpha,\lambda>0.

The equality 2cλ2=(λ+cλ2α)22c\lambda^{2}=(\lambda+c\lambda^{2}\alpha)^{2} holds if and only if p(c)≔α2λ2c2+(2λα−2)c+1=0p(c)\coloneqq\alpha^{2}\lambda^{2}c^{2}+(2\lambda\alpha-2)c+1=0. The discriminant of pp is (2λα−2)2−4α2λ2=4−8λα(2\lambda\alpha-2)^{2}-4\alpha^{2}\lambda^{2}=4-8\lambda\alpha. Since λα≤1/2\lambda\alpha\leq 1/2, the discriminant of pp is non-negative so the roots of pp are real. The smallest root of pp is located at

Set γ=αλ\gamma=\alpha\lambda. Using the numeric inequality 1−x≥1−x/2−x2/2\sqrt{1-x}\geq 1-x/2-x^{2}/2 valid for all x≤1x\leq 1, we have

On the other hand, using the numeric inequality 1−x≤1−x/2−x2/8\sqrt{1-x}\leq 1-x/2-x^{2}/8 valid for all 0≤x≤10\leq x\leq 1, we have

In this paper, we often deal with martingales, MnM_{n}, where the total conditional variance of the martingale is bounded by a linear transformation of the martingale, with high probability (which is what we often refer to as the “chicken and egg” phenomenon — the bound on the total conditional variance of MnM_{n} involves MnM_{n} itself). Transforming these entangled high probability bounds on the total conditional variance into high probability bounds on the martingale itself are easy consequences of our Generalized Freedman inequality (Theorem 3.3).

Let {di,Fi}i=1n\{d_{i},\mathcal{F}_{i}\}_{i=1}^{n} be a martingale difference sequence. Let vi−1v_{i-1} be a Fi−1\mathcal{F}_{i-1} measurable random variable such that E⁡[ exp⁡(λdi) ∣ Fi−1 ]≤exp⁡(λ22vi−1)\operatorname{E}\left[\,\exp\left(\lambda d_{i}\right)\,\mid\,\mathcal{F}_{i-1}\,\right]\leq\exp\left(\frac{\lambda^{2}}{2}v_{i-1}\right) for all λ>0\lambda>0 and for all i∈[n]i\in[n]. Define Sn=∑i=1ndiS_{n}=\sum_{i=1}^{n}d_{i} and define Vn=∑i=1nvi−1V_{n}=\sum_{i=1}^{n}v_{i-1}. Let δ∈(0,1)\delta\in(0,1) and suppose there are positive values R(δ)R(\delta), {αi}i=1n\{\alpha_{i}\}_{i=1}^{n} such that Pr⁡[ Vn≤∑i=1nαidi+R(δ) ]≥1−δ\operatorname{Pr}\left[\,V_{n}\leq\sum_{i=1}^{n}\alpha_{i}d_{i}+R(\delta)\,\right]\geq 1-\delta. Then,

Fix δ∈(0,1)\delta\in(0,1). Define the following events: E(x)={Sn≥x}\mathcal{E}(x)=\{S_{n}\geq x\}, G={Vn≤∑i=1nαidi+R(δ)}\mathcal{G}=\{V_{n}\leq\sum_{i=1}^{n}\alpha_{i}d_{i}+R(\delta)\}.

where the final inequality is due to applying Theorem 3.3 to Pr⁡[ E(x)∧G ]\operatorname{Pr}\left[\,\mathcal{E}(x)\wedge\mathcal{G}\,\right]. ∎

In this paper, we use Lemma C.3 in the following ways:

Let {Ft}t=1T\{\mathcal{F}_{t}\}_{t=1}^{T} be a filtration and suppose that ata_{t} are Ft\mathcal{F}_{t}-measurable random variables and btb_{t} are Ft−1\mathcal{F}_{t-1}-measurable random variables. Further, suppose that

∥at∥≤1\left\lVert a_{t}\right\rVert\leq 1 almost surely and E⁡[ at ∣ Ft−1 ]=0\operatorname{E}\left[\,a_{t}\,\mid\,\mathcal{F}_{t-1}\,\right]=0; and

∑t=1T∥bt∥2≤Rlog⁡(1/δ)\sum_{t=1}^{T}\left\lVert b_{t}\right\rVert^{2}\leq R\log(1/\delta) with probability at least 1−O(δ)1-O(\delta).

Define dt=⟨ at, bt ⟩d_{t}=\langle\>a_{t},\,b_{t}\>\rangle. Then \sum_{t=1}^{T}d_{t}~{}\leq~{}O\big{(}\sqrt{R}\log(1/\delta)\big{)} with probability at least 1−O(δ)1-O(\delta).

Since ∥at∥≤1\left\lVert a_{t}\right\rVert\leq 1, by Cauchy-Schwarz we have that ∣dt∣≤∥bt∥\left\lvert d_{t}\right\rvert\leq\left\lVert b_{t}\right\rVert. Therefore, \operatorname{E}\left[\,\exp\big{(}\lambda d_{t}\big{)}\,\mid\,\mathcal{F}_{t-1}\,\right]\leq\exp\big{(}\frac{\lambda^{2}}{2}\left\lVert b_{t}\right\rVert^{2}\big{)} for all λ\lambda by Lemma A.5. Next, applying Lemma C.3 with dt=⟨ at, bt ⟩d_{t}=\langle\>a_{t},\,b_{t}\>\rangle and vt−1=∥bt∥2v_{t-1}=\left\lVert b_{t}\right\rVert^{2}, αi=0\alpha_{i}=0 for all ii, and R(δ)=Rlog⁡(1/δ)R(\delta)=R\log(1/\delta) yields

The last term is at most δ\delta by taking x=8Rlog⁡(1/δ)x=\sqrt{8R}\log(1/\delta). ∎

Let {Ft}t=1T\{\mathcal{F}_{t}\}_{t=1}^{T} be a filtration and suppose that ata_{t} are Ft\mathcal{F}_{t}-measurable random variables and btb_{t} are Ft−1\mathcal{F}_{t-1}-measurable random variables. Define dt=⟨ at, bt ⟩d_{t}=\langle\>a_{t},\,b_{t}\>\rangle. Assume that ∥at∥≤1\left\lVert a_{t}\right\rVert\leq 1 almost surely and E⁡[ at ∣ Ft−1 ]=0\operatorname{E}\left[\,a_{t}\,\mid\,\mathcal{F}_{t-1}\,\right]=0. Furthermore, suppose that there exists positive values RR and {αt}i=1T−1\{\alpha_{t}\}_{i=1}^{T-1} where max⁡{αt}t=1T−1=O(R)\max\{\alpha_{t}\}_{t=1}^{T-1}=O\left(\sqrt{R}\right), such that exactly one of the following holds for every δ∈(0,1)\delta\in(0,1)

∑t=1T∥bt∥2≤∑t=1T−1αtdt+Rlog⁡(1/δ)\sum_{t=1}^{T}\left\lVert b_{t}\right\rVert^{2}\leq\sum_{t=1}^{T-1}\alpha_{t}d_{t}+R\log(1/\delta) with probability at least 1−O(δ)1-O(\delta).

∑t=1T∥bt∥2≤∑t=1T−1αtdt+Rlog⁡(1/δ)\sum_{t=1}^{T}\left\lVert b_{t}\right\rVert^{2}\leq\sum_{t=1}^{T-1}\alpha_{t}d_{t}+R\sqrt{\log(1/\delta)} with probability at least 1−O(δ)1-O(\delta).

Then \sum_{t=1}^{T}d_{t}~{}\leq~{}O\big{(}\sqrt{R}\log(1/\delta)\big{)} with probability at least 1−δ1-\delta.

We prove only the first case, the second case can be proved by bounding log⁡(1/δ)\sqrt{\log(1/\delta)} by log⁡(1/δ)\log(1/\delta) and using the proof of the first case.

Since ∥at∥≤1\left\lVert a_{t}\right\rVert\leq 1, by Cauchy-Schwarz we have that ∣dt∣≤∥bt∥\left\lvert d_{t}\right\rvert\leq\left\lVert b_{t}\right\rVert. Therefore, \operatorname{E}\left[\,\exp\big{(}\lambda d_{t}\big{)}\,\mid\,\mathcal{F}_{t-1}\,\right]\leq\exp\big{(}\frac{\lambda^{2}}{2}\left\lVert b_{t}\right\rVert^{2}\big{)} for all λ\lambda by Lemma A.5. Next, applying Lemma C.3 with dt=⟨ at, bt ⟩d_{t}=\langle\>a_{t},\,b_{t}\>\rangle and vt−1=∥bt∥2v_{t-1}=\left\lVert b_{t}\right\rVert^{2}, with αT=0\alpha_{T}=0 , and R(δ)=Rlog⁡(1/δ)R(\delta)=R\log(1/\delta) yields

The last term is at most δ\delta by taking x=Θ(Rlog⁡(1/δ))x=\Theta\left(\sqrt{R}\log(1/\delta)\right) because max⁡t=1T−1{αt}=O(R)\max_{t=1}^{T-1}\{\alpha_{t}\}=O\left(\sqrt{R}\right).

Appendix D Proof of Theorem 4.1

Theorem 4.1. Let (Xt)t=1T(X_{t})_{t=1}^{T} be a stochastic process and let (Ft)t=1T(\mathcal{F}_{t})_{t=1}^{T} be a filtration such that XtX_{t} is Ft\mathcal{F}_{t} measurable and XtX_{t} is non-negative almost surely. Let αt∈[0,1)\alpha_{t}\in[0,1) and βt,γt≥0\beta_{t},\gamma_{t}\geq 0 for every tt. Let w^t\hat{w}_{t} be a mean-zero random variable conditioned on Ft\mathcal{F}_{t} such that ∣w^t∣≤1\left\lvert\hat{w}_{t}\right\rvert\leq 1 almost surely for every tt. Suppose that Xt+1≤αtXt+βtw^tXt+γtX_{t+1}\leq\alpha_{t}X_{t}+\beta_{t}\hat{w}_{t}\sqrt{X_{t}}+\gamma_{t} for every tt. Then, the following hold.

where K=max⁡1≤t≤T(2γt1−αt,2βt21−αt)K=\max_{1\leq t\leq T}\left(\frac{2\gamma_{t}}{1-\alpha_{t}},\frac{2\beta_{t}^{2}}{1-\alpha_{t}}\right).

We begin by deriving a recursive MGF bound on XtX_{t}.

Suppose 0≤λ≤min⁡1≤t≤T(1−αt2βt2)0\leq\lambda\leq\min_{1\leq t\leq T}\left(\frac{1-\alpha_{t}}{2\beta_{t}^{2}}\right). Then for every tt,

Observe that βt2w^t2Xt2≤βt2Xt\beta_{t}^{2}\hat{w}_{t}^{2}\sqrt{X_{t}}^{2}\leq\beta_{t}^{2}X_{t} because ∣w^t∣≤1\left\lvert\hat{w}_{t}\right\rvert\leq 1 almost surely. Since βt2Xt\beta_{t}^{2}X_{t} is Ft\mathcal{F}_{t}-measurable, we have E⁡[ exp⁡(λ2βt2w^t2Xt2) ∣ Ft ]≤exp⁡(λ2βt2Xt)\operatorname{E}\left[\,\exp\left(\lambda^{2}\beta_{t}^{2}\hat{w}_{t}^{2}\sqrt{X_{t}}^{2}\right)\,\mid\,\mathcal{F}_{t}\,\right]\leq\exp\left(\lambda^{2}\beta_{t}^{2}X_{t}\right) for all λ\lambda. Hence, we may apply Claim A.6 to obtain

For every tt and for all 0≤λ≤1/K0\leq\lambda\leq 1/K, E⁡[ exp⁡(λXt) ]≤exp⁡(λK)\operatorname{E}\left[\,\exp\left(\lambda X_{t}\right)\,\right]\leq\exp\left(\lambda K\right).

Let λ≤1/K\lambda\leq 1/K. We proceed by induction over tt. Assume that E⁡[ exp⁡(λXt) ]≤exp⁡(λK)\operatorname{E}\left[\,\exp\left(\lambda X_{t}\right)\,\right]\leq\exp\left(\lambda K\right). Now, consider the MGF of Xt+1X_{t+1}:

where the first inequality is valid because λ≤1/K≤min⁡1≤t≤T(1−αt2βt2)\lambda\leq 1/K\leq\min_{1\leq t\leq T}\left(\frac{1-\alpha_{t}}{2\beta_{t}^{2}}\right) and the second inequality follows because (1+αt)/2<1(1+\alpha_{t})/2<1 and so we can use the induction hypothesis since λ(1+αt)/2<λ≤1/K\lambda(1+\alpha_{t})/2<\lambda\leq 1/K. Furthermore, because K≥2γt/(1−αt)K\geq 2\gamma_{t}/\left(1-\alpha_{t}\right) we have

which shows that γt+K(1+αt2)≤K\gamma_{t}+K\left(\frac{1+\alpha_{t}}{2}\right)\leq K. Hence,

Now we are ready to complete the proof of both claims in Theorem 4.1.The first claim from Theorem 4.1 follows by observing our MGF bound on XtX_{t} and then applying the transition from MGF bounds to tail bounds given by Claim A.7.

Next, we prove the second claim from Theorem 4.1. Claim D.2 gives that for every tt and for all λ≤1/(σtK)\lambda\leq 1/(\sigma_{t}K), we have E⁡[ exp⁡(λσtXt) ]≤exp⁡(λσtK)\operatorname{E}\left[\,\exp\left(\lambda\sigma_{t}X_{t}\right)\,\right]\leq\exp\left(\lambda\sigma_{t}K\right). Hence, we can combine these MGF bounds using Lemma A.4 to obtain E⁡[ exp⁡(λ∑t=1TσtXt) ]≤exp⁡(λK∑t=1Tσt)\operatorname{E}\left[\,\exp\left(\lambda\sum_{t=1}^{T}\sigma_{t}X_{t}\right)\,\right]\leq\exp\left(\lambda K\sum_{t=1}^{T}\sigma_{t}\right) for all λ≤(K∑t=1Tσt)−1\lambda\leq\left(K\sum_{t=1}^{T}\sigma_{t}\right)^{-1}. With this MGF bound in hand, we may apply the transition from MGF bounds to tail bounds given by Claim A.7 to complete the proof of the second claim from Theorem 4.1. ∎

Appendix E Omitted proofs from Section 7

Let ff be an 1-strongly convex and 1-Lipschitz function. Consider running Algorithm 1 for TT iterations. Then, for every w∈Xw\in\mathcal{X} and every k∈[T]k\in[T],

Let k∈[T−1]k\in[T-1]. Apply Lemma E.1, replacing kk with T−kT-k and w=xT−kw=x_{T-k} to obtain:

Now, divide this by k+1k+1 and define Sk=1k+1∑t=T−kTf(xt)S_{k}=\frac{1}{k+1}\sum_{t=T-k}^{T}f(x_{t}) to obtain

Observe that kSk−1=(k+1)Sk−f(xT−k)kS_{k-1}=(k+1)S_{k}-f(x_{T-k}). Combining this with the previous inequality yields

Note that ∥g^t∥2≤4\left\lVert\hat{g}_{t}\right\rVert^{2}\leq 4 and ηt=1/t\eta_{t}=1/t. So we can bound the middle term as

We begin by stating two consequences of strong convexity:

⟨gt,xt−x∗⟩≥f(xt)−f(x∗)+12∥xt−x∗∥2\langle g_{t},x_{t}-x^{*}\rangle\geq f(x_{t})-f(x^{*})+\frac{1}{2}\left\lVert x_{t}-x^{*}\right\rVert^{2},

f(xt)−f(x∗)≥12∥xt−x∗∥2f(x_{t})-f(x^{*})\geq\frac{1}{2}\left\lVert x_{t}-x^{*}\right\rVert^{2} (since 0∈∂f(x∗)0\in\partial f(x^{*})).

Recall that ∥g^t∥2≤4\left\lVert\hat{g}_{t}\right\rVert^{2}\leq 4 because z^t≤1\hat{z}_{t}\leq 1 and ff is 1-Lipschitz. Multiplying through by tt and bounding ∥g^t∥2\left\lVert\hat{g}_{t}\right\rVert^{2} by 4 yields the desired result. ∎

Recall from Section 7 that αj=1(T−j)(T−j+1)\alpha_{j}=\frac{1}{(T-j)(T-j+1)} and wt=∑j=T/2t−1αj(xt−xj)w_{t}=\sum_{j=T/2}^{t-1}\alpha_{j}(x_{t}-x_{j}).

Define BT≔∑t=T/2T1T−t+1∑j=T/2t−1αj∥xt−xj∥2B_{T}\coloneqq\sum_{t=T/2}^{T}\frac{1}{T-t+1}\sum_{j=T/2}^{t-1}\alpha_{j}\left\lVert x_{t}-x_{j}\right\rVert^{2}.

∑t=T/2T∥wt∥2≤BT\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2}\leq B_{T}.

Let At=∑j=T/2t−1αjA_{t}=\sum_{j=T/2}^{t-1}\alpha_{j}. Then

where the first inequality is due to the convexity of ∥⋅∥2\left\lVert\cdot\right\rVert^{2} and the second inequality is Claim A.12. ∎

Lemma 7.3. Suppose ff is 1-Lipschitz and 1-strongly convex. Suppose we run Algorithm 1 for TT iterations with step sizes ηt=1/t\eta_{t}=1/t. Let a<ba<b. Then,

Repeating this argument iteratively on ∥xa−xb−1∥\left\lVert x_{a}-x_{b-1}\right\rVert, ∥xa−xb−2∥\left\lVert x_{a}-x_{b-2}\right\rVert, …, ∥xa−xa+1∥\left\lVert x_{a}-x_{a+1}\right\rVert, we obtain:

Applying the inequality ⟨ gi, xa−xi ⟩≤f(xa)−f(xi)\langle\>g_{i},\,x_{a}-x_{i}\>\rangle\leq f(x_{a})-f(x_{i}) to each term of the second summation gives the desired result. ∎

Using Lemma 7.3 and the bound ∥g^t∥2≤4\left\lVert\hat{g}_{t}\right\rVert^{2}\leq 4 for all tt, let us write BT≤Λ1+Λ2+Λ3B_{T}\leq\Lambda_{1}+\Lambda_{2}+\Lambda_{3} where

Let us bound each of the terms separately.

\Lambda_{1}\leq O\bigg{(}\frac{\log^{2}(T)}{T^{2}}\bigg{)}.

This follows from some straightforward calculations. Indeed,

We will prove Claim E.5 in the next section.

Rearranging the order of summation in Λ3\Lambda_{3} we get:

The previous three claims and the fact that BTB_{T} is an upper bound on ∑t=T/2T∥wt∥2\sum_{t=T/2}^{T}\left\lVert w_{t}\right\rVert^{2} (Claim E.3) complete the proof of Lemma 7.4. ∎

E.2 Proof of Claim E.5

and determine the coefficients γa\gamma_{a}.

For each a∈{⌊T/2⌋,...,T−1}a\in\{\left\lfloor T/2\right\rfloor,...,T-1\}, \gamma_{a}~{}=~{}O\bigg{(}\frac{\log(T)}{T^{2}}\bigg{)}.

In the definition of Λ2\Lambda_{2}, the indices providing a positive coefficient for FaF_{a} must satisfy j=aj=a, i≤ai\leq a, and a≤t−1a\leq t-1. Hence, the positive contribution to γa\gamma_{a} is:

The terms contributing to the negative portion of γa\gamma_{a} satisfy, i=ai=a, j≤aj\leq a, and a≤t−1a\leq t-1. The negative contribution can be written as

where on the last line we used T−1≤2⌊T/2⌋≤TT-1\leq 2\left\lfloor T/2\right\rfloor\leq T. Now, combining the positive and negative contribution we see:

Appendix F Generalizations

In this section, we discuss generalizations of our results. In Subsection F.1, we explain that the scaling of the function (e.g., Lipschitzness) can be normalized without loss of generality. In Subsection F.2, we explain how the assumption of almost surely bounded noise can be relaxed to sub-Gaussian noise in our upper bounds (Theorems 3.1, 3.2 and 3.7).

For most of this paper we consider only convex functions that have been appropriately normalized, due to the following facts.

Strongly convex case. The case of an α\alpha-strongly convex and LL-Lipschitz function can be reduced to the case of a 11-strongly convex and 11-Lipschitz function.

Lipschitz case. The case of an LL-Lipschitz function on a domain of diameter RR can be reduced to the case of a 11-Lipschitz function on a domain of diameter 11.

We will discuss only the first of these in detail. The second is proven with similar ideas.

The main results from this section are as follows.

Suppose ff is α\alpha-strongly convex and LL-Lipschitz, and that z^t\hat{z}_{t} has norm at most LL almost surely. Consider running Algorithm 1 for TT iterations with step size ηt=1αt\eta_{t}=\frac{1}{\alpha t}. Let x∗=argmin⁡x∈Xf(x)x^{*}=\operatornamewithlimits{argmin}_{x\in\mathcal{X}}f(x). Then, with probability at least 1−δ1-\delta,

Suppose ff is α\alpha-strongly convex and LL-Lipschitz, and that z^t\hat{z}_{t} has norm at most LL almost surely. Consider running Algorithm 1 for TT iterations with step size ηt=1αt\eta_{t}=\frac{1}{\alpha t}. Let x∗=argmin⁡x∈Xf(x)x^{*}=\operatornamewithlimits{argmin}_{x\in\mathcal{X}}f(x). Then, with probability at least 1−δ1-\delta,

We prove these theorems by reduction to Theorem 3.1 and Theorem 3.7, respectively. That is, suppose that ff is a function that has strong convexity parameter α\alpha and Lipschitz parameter LL. We construct a function gg that is 1-Lipschitz and 1-strongly convex (using Claim F.4) and a subgradient oracle such that running SGD on gg with this subgradient oracle is equivalent to running SGD on ff. Formally, we show the following:

the execution of Algorithm 1 on input ff with initial point x1x_{1}, step size ηt=1/(αt)\eta_{t}=1/(\alpha t) and convex set X\mathcal{X}

Now, suppose we are given an α\alpha-strongly convex and LL-Lipschitz function, ff, an initial point x1x_{1} and a convex set X\mathcal{X}. We obtain Theorem F.1 and Theorem F.2 by performing the above coupling and executing SGD on the 1-Lipschitz and 1-strongly convex function. We may apply our high probability upper bounds to this execution of SGD because it satisfies the assumptions of Theorem 3.1 and Theorem 3.7. Finally, because of Claim F.3, we can reinterpret the iterates of the execution of SGD on gg as a scaled version of the iterates of the execution of SGD on ff. This immediately proves Theorem F.1 and Theorem F.2. Now, let us prove Claim F.3.

The coupling is given by constraining the algorithms to run in parallel and enforcing the execution of SGD on gg to use a scaled version of the outputs of the subgradient oracle used by the execution of SGD on ff. That is, at step tt, if g^t\hat{g}_{t} is the output of the subgradient oracle of the execution of SGD on ff, then we set the output of the subgradient oracle of the execution of SGD on gg at step tt to be 1Lg^t\frac{1}{L}\hat{g}_{t}.

Let ff be an α\alpha-strongly convex and LL-Lipschitz function. Then, g(x)≔αL2f(Lαx)g(x)\coloneqq\frac{\alpha}{L^{2}}f(\frac{L}{\alpha}x) is 11-Lipschitz and 11-strongly convex.

The inequality holds since ff is LL-Lipschitz.

Now we show that gg is 11-strongly convex. A function hh is α\alpha strongly convex, if and only if the function x↦h(x)−α2∥x∥2x\mapsto h(x)-\frac{\alpha}{2}\left\lVert x\right\rVert^{2} is convex. Indeed, for gg:

The function on the right is convex because ff is α\alpha-strongly convex. This implies that x↦g(x)−12∥x∥2x\mapsto g(x)-\frac{1}{2}\left\lVert x\right\rVert^{2} is convex, meaning that gg is 1-strongly convex. ∎

F.2 Sub-Gaussian Noise

In this section, we relax the assumption that ∥z^t∥≤1\left\lVert\hat{z}_{t}\right\rVert\leq 1 with probability 1 and instead assume that for each tt, z^t\hat{z}_{t} is sub-Gaussian conditioned on Ft−1\mathcal{F}_{t-1}. The proof of the extensions are quite easy, given the current analyses. See the full version of our paper for statements and proofs of this extension.

Most of our analyses can remain unchanged. The main task at hand is identifying the places where we use the upper bound ∥z^t∥≤1\left\lVert\hat{z}_{t}\right\rVert\leq 1 outside of the MGF analyses (using this bound inside an MGF is morally the same using the fact that ∥z^t∥\left\lVert\hat{z}_{t}\right\rVert is sub-Gaussian). The main culprit is that we often bound ∥g^t∥2\left\lVert\hat{g}_{t}\right\rVert^{2} by 4. Instead we must carry these terms forward and handle them using MGFs. The consequences of this are two-fold. Firstly, this introduces new MGFs to bound, but intuitively these are easy to bound because the terms they were involved in in the original analysis were sufficiently bounded and therefore their MGFs should now also be sufficiently bounded. Furthermore, removing these constant bounds results in many of our MGF expressions to include more random terms which we previously ignored and pulled out of our MGF arguments because they were constant. But again, these terms can be dealt with by first isolating them by applying an MGF triangle inequality (using Hölder or Cauchy-Schwarz) and then bounding their MGF.

Appendix G Necessity of log⁡(1/δ)1𝛿\log(1/\delta)

In this section, we show that the error of the last iterate and suffix average of SGD is Ω(log⁡(1/δ)/T)\Omega(\log(1/\delta)/T) with probability at least δ\delta.

Let X1,...,XTX_{1},...,X_{T} be independent random variables taking value {−1,+1}\{-1,+1\} uniformly at random and X=1T∑t=1TXiX=\frac{1}{T}\sum_{t=1}^{T}X_{i}. Then for any 0<c<O(T)0<c<O(\sqrt{T}),

Consider the single-variable function f(x)=12x2f(x)=\frac{1}{2}x^{2} and suppose that the domain is X=\mathcal{X}=. Then ff is 1-strongly convex and 1-Lipschitz on X\mathcal{X}. Moreover, suppose that the subgradient oracle returns x−z^x-\hat{z} where z^\hat{z} is −1-1 or +1+1 with probability 1/21/2 (independently from all previous calls to the oracle). Finally, suppose we run Algorithm 1 with step sizes ηt=1/t\eta_{t}=1/t with an initial point x1=0x_{1}=0.

If T≥O(log⁡(1/δ))T\geq O(\log(1/\delta)) then f(xT+1)≥Ω(log⁡(1/δ)/T)f(x_{T+1})\geq\Omega(\log(1/\delta)/T) with probability at least δ\delta.

We claim that xt+1=1t∑i=1tz^ix_{t+1}=\frac{1}{t}\sum_{i=1}^{t}\hat{z}_{i} for all t∈[T]t\in[T] where z^i\hat{z}_{i} is the random sign returned by the subgradient oracle at iteration ii. Indeed, for t=1t=1, we have y2=x1−η1(x1−z^1)=z^1y_{2}=x_{1}-\eta_{1}(x_{1}-\hat{z}_{1})=\hat{z}_{1} since η1=1\eta_{1}=1. Moreover, x2=ΠX(y2)=y2x_{2}=\Pi_{\mathcal{X}}(y_{2})=y_{2} since ∣y2∣≤1\lvert y_{2}\rvert\leq 1. Now, suppose that xt=1t−1∑i=1t−1z^ix_{t}=\frac{1}{t-1}\sum_{i=1}^{t-1}\hat{z}_{i}. Then yt+1=xt−ηt(xt−z^t)=1t∑i=1tz^iy_{t+1}=x_{t}-\eta_{t}(x_{t}-\hat{z}_{t})=\frac{1}{t}\sum_{i=1}^{t}\hat{z}_{i}. Since ∣yt+1∣≤1\lvert y_{t+1}\rvert\leq 1, we have xt+1=yt+1x_{t+1}=y_{t+1}.

Hence, by Lemma G.1 with c=log⁡(1/δ)c=\sqrt{\log(1/\delta)}, we have xT+1≥log⁡(1/δ)/Tx_{T+1}\geq\sqrt{\log(1/\delta)}/\sqrt{T} with probability at least Ω(δ)\Omega(\delta) (provided T≥O(log⁡(1/δ))T\geq O(\log(1/\delta))). We conclude that f(xT+1)≥log⁡(1/δ)2Tf(x_{T+1})\geq\frac{\log(1/\delta)}{2T} with probability at least Ω(δ)\Omega(\delta). ∎

We can also show that Theorem 3.7 is tight. To make the calculations simpler, first assume TT is a multiple of 44. We further assume that the noise introduced by the stochastic subgradient oracle is generated as follows. For 1≤t<T/21\leq t<T/2 and t>3T/4t>3T/4, z^t=0\hat{z}_{t}=0. For T/2≤t≤3T/4T/2\leq t\leq 3T/4, first define At=∑i=tT1iA_{t}=\sum_{i=t}^{T}\frac{1}{i}. Then we set z^t\hat{z}_{t} to be ±14At\pm\frac{1}{4A_{t}} with probability 1/21/2. Note that At≥1/4A_{t}\geq 1/4 for T/2≤t≤3T/4T/2\leq t\leq 3T/4 so we still have ∣z^t∣≤1\lvert\hat{z}_{t}\rvert\leq 1 for all tt.

If T≥O(log⁡(1/δ))T\geq O(\log(1/\delta)) then f(1T/2+1∑t=T/2+1T+1xt)≥Ω(log⁡(1/δ)T)f\left(\frac{1}{T/2+1}\sum_{t=T/2+1}^{T+1}x_{t}\right)\geq\Omega\left(\frac{\log(1/\delta)}{T}\right) with probability at least δ\delta.

Proceeding as in the above claim, we have xt+1=1t∑i=1tz^ix_{t+1}=\frac{1}{t}\sum_{i=1}^{t}\hat{z}_{i}. We claim that

where the last equality uses the assumption that z^t≠0\hat{z}_{t}\neq 0 only if T/2≤t≤3T/4T/2\leq t\leq 3T/4 and changes the name of the index. Notice that Atz^tA_{t}\hat{z}_{t} is ±14\pm\frac{1}{4} with probability 1/21/2 so we can write Eq. (G.1) as

where XtX_{t} are random signs. Applying Lemma G.1 with c=log⁡(1/δ)c=\sqrt{\log(1/\delta)}, we conclude that Eq. (G.1) is at least Ω(log⁡(1/δ)/T)\Omega(\sqrt{\log(1/\delta)}/\sqrt{T}) with probability at least Ω(δ)\Omega(\delta) (provided T≥O(log⁡(1/δ))T\geq O(\log(1/\delta))). So we conclude that f(1T/2+1∑t=T/2+1T+1xt)≥Ω(log⁡(1/δ)T)f\left(\frac{1}{T/2+1}\sum_{t=T/2+1}^{T+1}x_{t}\right)\geq\Omega\left(\frac{\log(1/\delta)}{T}\right) with probability at least Ω(δ)\Omega(\delta). ∎

References