Online Stochastic Gradient Descent with Arbitrary Initialization Solves Non-smooth, Non-convex Phase Retrieval
Yan Shuo Tan, Roman Vershynin
Introduction
This problem is well motivated by practical concerns, having applications to Coherent Diffraction Imaging (CDI), Electron Microscopy, and X-ray Crystallography, and as such has been a topic of study from at least the early 1980s. We refer the reader to the survey papers for a comprehensive account of the contexts in which the problem arises, as well as the techniques that practitioners employ to solve it.
Over the last decade, the phase retrieval problem has also garnered substantial attention from the optimization and machine learning communities, the reason being that it can be formulated as a relatively benign non-convex optimization problem. In other words, it can be solved by minimizing the least squares objective:
Many papers have attempted to study how to optimize this objective given distributional assumptions on the sampling vectors . One popular approach is to use a two-step procedure: First, a spectral technique is used to obtain an initial estimate so that its distance from a global minimum, , is bounded above by a small constant. Next, the estimate is refined to arbitrary precision using an iterative method such as gradient descent or stochastic gradient descent (SGD). This procedure is well-supported by theoretical guarantees for both real and complex signals. Here we note that one can also construct loss functions for phase retrieval which are different from (1.2). Running variations of gradient descent or SGD on these functions also leads to provable guarantees (see for instance ).
Nonetheless, this state of affairs is not entirely satisfactory from an optimization theory perspective, since the use of a spectral initialization diminishes the novelty of being able to provably minimize a non-convex objective using first-order methods. The spectral initialization essentially allows the first-order method to begin within a “basin of convexity”, thus artificially escaping the difficulties of non-convexity. Such a deus ex machina may not be available when trying to optimize other non-convex functions.
More recently, the authors of showed that vanilla gradient descent converges in iterations, again given measurements. Up to log factors, this matches the running time guarantees for the original two-stage method. While an important step, their analysis still requires full gradient updates and does not apply to SGD. In the high-dimensional setting, SGD is particularly advantageous because it can be applied in an online, streaming fashion. This lowers the space complexity of the algorithm from to , and allows progress toward the solution to be made even before the analyst gains access to the full data sample.
Moreover, with respect to the non-smooth amplitude least squares objective
the question of even gradient descent convergence remains open. This objective is especially interesting because numerical simulations have shown gradient descent and SGD with respect to it to succeed with fewer measurements than are necessary for the alternative objective (1.1) (See and .)
In this paper, we prove that for a real signal vector and real sampling vectors, online stochastic gradient descent for the non-smooth objective (1.2) converges to a global minimum from arbitrary initializations given Gaussian measurements. We believe our work to be among the first in establishing convergence of SGD in the non-smooth, non-convex regime. Furthermore, it will be readily apparent that our analysis framework generalizes easily to other single index models, and we conjecture that similar techniques will also work low-rank matrix sensing models in general.
We perform SGD with respect to (1.2), using a single data point per iteration. More formally, we form a sequence of signal estimates with the update rule:
We typically choose . This is the same as in previous work that analyzed SGD as part of the two-step approach (see ), and allows for a clear geometric interpretation. At each step , we receive the datum ; the solution set to the corresponding equation is then the union of two parallel hyperplanes. Taking an SGD step projects the current iterate onto the closer of these hyperplanes. This iterative projection is strongly reminiscent of the randomized Kaczmarz algorithm for solving linear systems. For a more in-depth discussion of this connection, we again refer the reader to .
We make the following assumptions for the rest of the paper.
Assume the following for each positive integer :
(Fresh measurements) At step of the algorithm, we use a sampling vector that is fully independent of the previous measurements .
(No noise) We have .
The following is the main result of the paper.
where . Furthermore, there is some constant , such that if , we may choose .
This theorem tells us that in steps, SGD brings us to a point in the “basin of convexity” around a global minimum, within which we get linear convergence. As a consequence of this theorem, it is easy to see that we can get an -relative-error estimate using measurements (and the same number of steps). In fact, the analysis in tells us that within the “basin of convexity”, linear convergence still holds if we resample from amongst measurements. By doing this instead, our final sample complexity is .
The novelty of this result is not simply the convergence of the algorithm, but rather its convergence with near optimal sample and time complexity. Indeed, it is well known that as we let the step size decrease to zero, SGD under our assumptions approximates gradient flow for the population loss function. It is easy to show that gradient flow converges to a global minimum. With smaller steps, however, the algorithm takes a longer time to converge.
In addition, our chosen step size is the smoothness parameter for SGD if we were optimizing a least squares system objective under the same assumptions on . It is interesting that although our objective is no longer smooth, nonetheless remains the right scaling.
The proof of the result is somewhat complicated and makes use of several new ideas. The first idea is to think of the sequence of SGD iterates as a Markov chain on a two-dimensional summary state space . The two coordinates are the squared Euclidean norm of the iterate, , and the correlation with the signal, . Just as how in thermodynamics state variables such as temperature, pressure, and volume suffice to determine the evolution of a thermodynamic system, so too in our case do the state variables and suffice to determine the progress of the SGD algorithm.
The state space is obviously independent of the dimension . In fact, one can show that the distribution of the update in the state space is effectively independent of the dimension up to overall scaling (see Theorem 2.1). As such, as tends to infinity, the stochastic dynamics of the Markov chain when initialized at a fixed approximates the solution of an ODE system whose corresponding vector field is given by the rescaled drift of the process.
Unfortunately, we are hit with the curse of dimensionality: if we take a random initialization , then it is well-known that with high probability,
This implies that the initial correlation with the signal decays as the dimension increases, and in fact, at the corresponding point in the state space, the drift and the fluctuations have the same magnitude, and it is no longer appropriate to approximate the stochastic dynamics with a deterministic process.
Overcoming this is the most difficult part of the proof. To do so, we use a small-ball probability argument. In other words, we show that the distribution of is anti-concentrated away from 0 when is large enough. This involves comparing the process with a more well-understood process via stochastic dominance. The distribution of this new sequence can in turn be controlled via recursive inequalities bounding 4th moments from above and 2nd moments from below. We conclude by applying the Paley-Zygmund inequality.
2 Related Work
There is already a large body of work on phase retrieval, and it is impossible to give a full account of the literature. We have already mentioned survey papers for how phase retrieval arises in various engineering problems. On the theoretical side, we have already discussed the two-step non-convex optimization approach, and will further mention here the convex relaxation approaches pioneered in the papers .
2.2 SGD as a Markov chain
It has long be observed that constant step-size SGD can be thought of as a Markov chain, and there seems to be a resurgence of interest in this view of SGD. For instance, uses this approach to analyze the limiting distribution of SGD iterates for strongly convex functions. Furthermore, uses this interpretation to see how SGD can be used as a sampling algorithm. Both these works have drawn inspiration from the recent body of work on Langevin algorithms for sampling from log-concave distributions. The idea of analyzing SGD through diffusion approximation is also present in .
2.3 Non-convex optimization and first-order methods
The Kaczmarz method is a classical method in numerical analysis for solving large scale overdetermined linear systems. A randomized version of it was first analyzed by . In our earlier work , we proposed adapting the method to the setting of phase retrieval, where it coincides with SGD under the Gaussian measurement setting,
Stochastic first-order methods have emerged as the optimization method of choice for modern machine learning. In particular, deep neural networks are trained almost exclusively using SGD and variants like ADAM. The loss functions for these models, however, are non-convex functions, for which there has traditionally been little theory on how first-order methods behave.
Unsurprisingly, there has been a concerted push over the last few years to address this issue. One line of work studies how gradient descent or SGD can be made to escape saddle points quickly (see ). Another line of work has focused on identifying regimes for shallow and deep neural networks for which gradient descent or SGD can be shown to converge (see for instance ).
3 Notation
Outline of proof
We start by making some simplifying assumptions. First, note that the algorithm and our guarantee (1.4) are both invariant with respect to scaling and rotation. As such, we may assume without loss of generality that , the first coordinate basis vector. We also only analyze the case where is large enough so that and the step size is set to be . The extension to smaller will be obvious.
The reason we choose to use instead of is for the convenience of obtaining formulas for the stochastic update, as will be evident later. We further define . This is the smaller angle between x and .
Note that we can track the progress of SGD purely in terms of the state variables. Indeed, we have
so that the error of the -th step estimate is equal to . Note that and are mapped onto and , so that is uniquely minimized at these values. We hence wish to show that and coordinates of our iterates converge to and respectively.
The sequence is a Markov chain on whose transition kernel has the random mapping representation
This theorem tells us that the state space sequence suffices not just to track our progress, as discussed earlier in the section, but also to determine its own dynamics. We hence no longer need to concern ourselves with the original SGD sequence, and instead work with this object for the rest of the paper. Henceforth, we let denote the filtration defined by this sequence.
2 Doob decomposition and continuous time limit as d→∞→𝑑d\to\infty
Let us try to understand the random mappings (2.3) and (2.4) better. It is well-known that converges in distribution to a standard 2-dimensional Gaussian as the ambient dimension tends to infinity. Therefore, the only essential dependence of the update formula (2.2) on is through the overall scaling. If we think of the indices as a time variable, rescale time by a factor of , we can think of the sequence as being generated by an Euler discretization of a continuous-time process.
While we do not actually take this approach in our rigorous analysis, is it instructive to see what intuition this gives us. To do this, we do a Doob decomposition of the process , separating it into a drift term and a fluctuation term. Denote the drift terms using
Letting denote the random mapping used in the -th step of the Markov chain, we have
We now try to do a heuristic comparison of the relative magnitudes of the two terms. Suppose is small enough so that we have for . Then the drift can be approximated by
so that the fluctuation term has standard deviation approximately equal to
Therefore, for any fixed , we see that the drift dominates the fluctuations as tends to infinity. This means that the continuous time limit of the process trajectory should be an integral curve associated to the vector field on the state space defined by . While this picture is incomplete, it offers a good first approximation, and the next step we take is to analyze the solutions to this first order ODE system.
3 Drift in continuous time limit
Miraculously, it is actually possible to derive a closed form formula for the vector field. We state it in the following lemma.
Studying the vector field plot in Figure 1, it is obvious that and are the only attracting fixed points, with basins of attraction the sets and respectively. While this assures us that the system has the right qualitative long-term behavior, the visualization alone is not sufficient to give quantitative bounds on convergence rates. This analysis turns out to be somewhat tricky. Given an integral curve starting from an arbitrary initialization , we will analyze its convergence rate by breaking it into three separate phases, as depicted in the figure.
To demarcate the phases, we define two stopping times as follows. We let be the earliest time for which , and we let be the earliest time for which the Lyapunov function defined in (2.1) satisfies . Phase 1 is then the portion of the curve traversed between time and time , Phase 2 the portion traversed between time and time , with Phase 3 the remainder of the curve traversed after .
Let us compute the duration of Phase 1, which is the same as bounding . To do this, we solve (2.6) to get , so that . The second phase is trickier due to the unwieldiness of (2.7). As such, we compute more amenable lower and upper bounds for the expression as follows.
There is a constant such that we have
Furthermore, for any small enough, there is some and some constant such that
where .
One can show that , and therefore, we have the bound for . Solving this gives , and we have the estimate .
Finally, Phase 3 corresponds to portion of the integral curve that lies within the “basin of convexity” around . Indeed we compute:
Here, the inequality in the third line comes from a relative bound on the error term provided by the geometry of the basin region. As such, we also get linear convergence .
Putting everything together, we see that for any , if we would like , it suffices for
4 Discretizing the drift
We now examine what this means for the Markov chain , where for clarity, we have made the dependence on in (2.2) explicit as a component of the indexing. We have argued that the integral curve is the limit of the trajectories as tends to infinity. The number of iterations needed for convergence of to is thus the quantity (2.8) scaled by a factor of .
There may also some additional dependence on implicit in the definitions of and . The first has to do with the conditioning of the problem, and it is reasonable to assume that . On the other hand, if we take a random initialization, measure concentration inflicts us with the curse of dimensionality shown in (1.5), so that . The final time complexity estimate is therefore .
5 Accounting for fluctuations
Comparing the time complexity estimate for the drift process given in the last section with the guarantee given by Theorem 1.2 suggests to us that the fluctuations do not ultimately affect the rate of convergence for the random process . This is true, and indeed, we may make our heuristic arguments rigorous and show that the fluctuation “error term” is dominated by the drift over the discretized versions of Phase 1 and Phase 3.
The situation is more complicated for Phase 2. While the length of the phase for the random process remains the same, the underlying dynamics of the random process is very different from that of the deterministic drift process. This is because when , as would be the case under random initialization, the magnitude of the fluctuations are of the same order as the drift, thereby invalidating the approximation argument.
There is no hope of upper bounding the fluctuations of around iteration , so we change course and instead aim at bounding the cumulative variance of the fluctuations from below. We seek a small ball probability bound for the horizontal marginal for . More precisely, we would like
for some universal constants , and . Once is of a constant distance away from zero, we may return to using the approximation argument and treat the fluctuations as an error term.
6 Small ball probability bound through diffusion approximation
Here, is standard, two-dimensional Brownian motion, while for each y, is a positive semidefinite matrix reflecting the fluctuation covariance at state y.
It is not easy to compute a closed form solution to this SDE. To perform a heuristic analysis, we instead solve a simplified form of the equation for the -marginal:
7 Outline for rest of paper
In this section so far, we have sketched a heuristic proof for SGD convergence, where the main idea was to consider the continuous time limit of the state space Markov chain, and solve the resulting differential equation or stochastic differential equation. In our rigorous analysis, we will not adopt this approach, and instead solve finite difference equations coming from the Markov chain while obtaining non-asymptotic control over the fluctuation process.
For the rest of this paper, we work with a fixed initialization , and let be the sequence of iterates generated by repeated applying the Markov kernel (2.2). For each , we will use and to denote the coordinates of . We will continue to do a multi-phase analysis of convergence, and as such, define analogues of the stopping times and . We set
Here, and are constants to be determined later.
We shall set in Theorem 1.2. As such, we wish to prove that with high probability, , and that linear convergence in expectation occurs after . The second statement follows easily from the theory we established in , while the first is, as mentioned before, the main result of this paper. Our strategy is to bound by bounding , , and separately.
In Section 3, we bound , and also establish uniform control over , which is needed for the rest of the proof. In Sections 4 and 5, we bound . This is the most difficult part of the proof, and relies on developing a nuanced notion of stochastic dominance with which we compare the sequence with a carefully constructed sequence . We then apply a small ball probability argument to the latter. In Section 6, we bound by approximating the sequence with that obtained by removing the fluctuations. Finally, we will complete the proof of Theorem 1.2 in Section 7, before concluding and discussing the broader implications of the result in Section 8.
In this section, we will show that the sequence of squared norms, , quickly converges to a small interval of width around the value 1, and thereafter remains within this interval for at least iterations. In subsequent sections, we will show that this is sufficient time for the sequence also to converge. The reason why such uniform control is necessary is because the formula for the horizontal update (2.4) taken from a point y depends on . By showing that concentrates uniformly, we thereby also obtain control over the drift and fluctuations of , which enables us to do an essentially univariate analysis of this latter sequence.
There exists universal constants and such that with probability at least .
Next, we may obtain a recursive bound for the variance of the iterates using the law of total variance. We have
It easy to check that this quantity is bounded by whenever (3.2) holds. In this case, we may apply Chebyshev’s inequality to conclude that
with probability at least . We may also similarly bound from below. Choosing gives us the probability bound we want. ∎
After has contracted to a value close to 1, we need to show that it remains close to 1 throughout the time scale needed for the algorithm to converge. Although it is clear from the formula (2.3) that the increments are subexponential, a naive union bound is not tight enough for our purposes. To overcome this, we make use of a maximal Bernstein inequality.
Let be a martingale difference sequence that is adapted to a filtration . Suppose there is a constant such that the following pointwise inequality holds almost surely for any time and :
Denote , for . Then for all , we have the uniform tail bound
This result is an easy consequence of combining two classical arguments: the supermartingale inequality and an exponential martingale inequality. This argument also appears with more sophistication in the exponential line-crossing method recently developed by . The proof details are deferred to Appendix F. ∎
The tail bound on the right hand side of (3.4) is exactly the Bernstein tail at time . See .
Let be a real-valued stochastic process adapted to a filtration . Suppose that there is some such that for each time , we have
Furthermore, assume that there is a constant such that for any , the following pointwise inequality holds almost surely for any time and :
Then for all , we have the uniform tail bound
Since form a martingale difference sequence satisfying the assumptions of Lemma 3.2, its partial sums are bounded, and we may apply an easy combinatorial result (Lemma E.1) to bound the tails of . ∎
We are now ready to state the guarantee that the radius remains uniformly close to 1.
For any constant , , we have
with probability at least , where is a universal constant depending only on . Furthermore, for , there is a constant such that
For ease of notation, assume . Set for . Recall also that is the filtration generated by the stochastic updates. We want to show that these satisfy the assumptions of Lemma 3.4. By Lemma 2.2, we see that (3.5) is satisfied with , and we would like to use Lemma B.1 to verify (3.6). However, Lemma B.1 is only valid when y lies in a bounded subset of , and we don’t assume this a priori.
with probability at least . Meanwhile, on the same event, we have , so that the bound also holds for the original sequence, thereby giving us (3.8). The proof of (3.9) is similar and is hence omitted. ∎
Let us denote . The previous lemma tells us that with probability at least . In order to obtain the control over promised at the start of this section, we would ideally like to condition on this event, but doing so would destroy the Markov nature of the process and invalidate the update formula (2.4).
Phase 2a: Stochastic dominance argument
We have broken up the analysis of “Phase 2” of the SGD process into two sub-phases. The first sub-phase concerns the portion of the process in which , so that the drift and fluctuations are of comparable magnitudes. The goal of this section and the next is to bound the length of this phase by proving the following theorem.
There is some and success probability , such if we use this value of in (2.11), for large enough, with probability at least .
For ease of notation and making use of the strong Markov property, we may assume again that . Our strategy for proving the theorem is to show that for iterations satisfying , a subsequence of the horizontal marginals of the process, , stochastically dominate another process in magnitude. The second process will be constructed so that we will have precise control over its second and fourth moments, which will allow us to apply the Paley-Zygmund inequality to get a small ball probability argument. In this section, we will focus on constructing the comparison process and fleshing out the stochastic dominance argument.
In order to get control over moments, the process will be constructed to have approximately Gaussian increments. The comparison will thus be based on normal approximation using the Berry-Essen theory. It may be possible to obtain appropriate Berry-Essen bounds for martingale sequences, but the theory on this topic seems to be incomplete at the time of writing. We shall bypass this by showing that over epochs of an appropriate length , the update is well-approximated by the update we would get had we done a batch update, summing up independent steps taken from . Since this is a sum of i.i.d. random variables, the classical Berry-Eseen bound can then be applied to this latter update.
More precisely, Let denote the random mapping defined by (1.3). It will be helpful to use this notation in this section, as we will have to deal with a few different stochastic sequences. Fix the epoch length to be . We define a Markov kernel on the state space via the random mapping :
where and for are independent realizations of the random variables defined in (2.3) and (2.4). Denoting , we note here that the drift and variance of this batch update satisfy the formulas
Fix for . With probability at least , we have
For ease of notation, re-index so that . First, observe that we have the decomposition
Applying the maximal Bernstein bound for martingale sequences (Lemma 3.2) with and , we get
Plugging (4) into the above equation, and using the bound (4.3), we get
We can simplify this recursive bound using some combinatorics. Applying Lemma E.2 with , , and , we get
Plugging this back into (4), for any , we get
Fix for . For large enough, with probability at least , there is a coupling such that we have
For ease of notation, we again re-index so that . Couple the random mappings and by using the same draws for , . First condition on the probability event promised by Lemma 4.2. Now write
where for each , is the event that
We further condition on the probability events in which we have
By Lemma 4.2, we see that the first term is bounded as follows:
The second term may be bounded similarly. To bound the third term, we use Lemma F.1. Observe that is a sequence of Bernoulli variables. If we condition on the high probability event promised by Lemma 4.2, we also have
In Lemma F.1, set , , and to be the right hand side of (4.4). This gives
for large enough. On this event, the third term is therefore also bounded by .
By adjusting constants if necessary, we can make sure that the total error probability is bounded by . ∎
In order to compare with our (as yet undefined) reference sequence , we will use a more nuanced version of the usual notion of stochastic dominance.
Given two real-valued random variables and defined on the same probability space, we say that dominates in place up to error , denoted , if with probability at least . In addition, given any two real-valued random variables and , we say that stochastically dominates up to error , if there is a coupling of and for which . Denote this relation by . Note that the usual notion of stochastic dominance is equivalent to , which we will also denote using .
We first establish stochastic dominance for the conditional distribution of given over that obtained from an approximately Gaussian increment. Following this, we will argue that stochastic dominance of individual steps also implies stochastic dominance for the entire process.
and let y be any point in . Define the approximation error term
Then with , we have
Fix y, and set , where . The subexponential bound on implies bounds on the 3rd moments, so by Berry-Esseen, its distribution function satisfies
where is the distribution function of a standard normal random variable, and is an absolute constant.
Setting , we have have by Lemma D.5. Since
for . We may combine this with (4.8) using the transitivity of stochastic dominance (Lemma D.3), to get the bound we want in (4.7). ∎
and a small constant to be determined later, while as before. Again setting for notational convenience, we define
Let be the Markov process defined by the update rule (4.10). Then for any positive integer , we have
For convenience of notation, we define the auxiliary transitional kernel
Consider a fixed . In Lemma 4.5, we showed that . If we choose small enough in (4.9), then by the drift lower bound in Lemma 2.3, replacing the kernel with simply reduces the magnitude of the drift while preserving the variance of the Gaussian increment and the magnitude of the soft-thresholding. Using the first part of Lemma D.6 thus gives the bound . This implies through transitivity (Lemma D.3) that
Treating each epoch of updates as a single step, what we have showed is the stochastic dominance of a single step over a Gaussian increment, conditioned on a fixed starting value for y. It is not so easy, however, to conclude that stochastic dominance is preserved when composing multiple steps together. This is because we are working with transition kernels, and not sums of independent random variables. To overcome this, we need to use the second part of Lemma D.6, which tells us that
Let us now prove the claim by induction. The case is clear since . Now assume that the statement holds for some . Let be the -algebra generated by . Condition on as well as the probability event for which
If , then and , so that
on the same event. Otherwise, since , we have
Here, the first dominance bound follows from (4.12), while the second follows from (4.11). This means that we can construct a coupling of the update kernels such that with conditional probability at least .
If , then this immediately implies that (4.13) holds. On the other hand, if , we have and , so that
As such, the statement also holds for . ∎
Phase 2a: Small ball probability argument via Paley-Zygmund
Recall that our goal is to obtain a small ball probability bound for , for , thereby proving Theorem 4.1. By the stochastic dominance argument in the last section, it suffices to obtain such a bound for , with the appropriate time rescaling. This is the plan for this section, and we start by observing the following general recursive bounds for moments of adapted sequences.
Let be a process adapted to the filtration . Then we have
The first equation is standard. To prove the second, we expand and use martingale orthogonality to write
Furthermore, the third term can be bounded as follows:
Plugging these into the original equation, we get
In order to apply these bounds to our sequence , we will need estimates of the moments of each increment.
In this proof we shall, for convenience, denote and . Writing out the definition (4.10), we then have . Using the definition of and the fact that , we compute
We need to show that soft-thresholding does not decrease its variance by two much, and will consider two cases depending on the value of . We shall suppose WLOG that .
First, suppose . Then
Plugging our assumption on into (4.6), we get
By (5.6), the quantity on the right hand side is a lower bound for , giving us what we want.
Now assume instead that . Let be an independent copy of . Using a well-known formula for variance, we have
where and are independent standard normal random variables.
Next, to obtain (5.5), we simply apply Lemma F.2 to get
By our constraint that , we have , thereby giving the bound we want. ∎
The second inequality is easier to prove, so we shall start with this. We may use Lemma F.2 to get
Plugging this bound together with (5.5) into (5.2) gives us (5.9).
Next, denoting and as in the previous lemma, observe that
It remains to compare the relative magnitudes of the two terms. For convenience, we reproduce the definition of here:
We will divide the proof into three cases, depending on the magnitude of . WLOG, assume that .
When , then
for large enough, and when , one may check that
In either case, we may plug the bound for into (5) to get
Next, when , we have
Furthermore, we can bound the second term on the right hand side via
Combining this with (5.1) and (5.4) gives (5.8). ∎
For convenience, denote . We solve the recursion in (5.8) to get
Meanwhile, for any , we have
On the other hand, we may solve the second recursion (5.9) and apply a similar computation as before to get
Taking the ratio of (5.12) and (5.14), plugging in the time point , we get
Note that in the last equation, we used the definition of and (5.13).
where the inequality holds for large enough. On this event, we have as we wanted. ∎
Phase 2b: Approximation by drift process
In the previous two sections, we have bounded the duration of Phase 2a of the SGD process, that is, the time it takes for to increase to a constant value. The goal of this section is to bound the duration of Phase 2b in which the iterates converge to the “basin of convexity” around or . We will prove the following theorem.
We have with probability at least .
As mentioned in the overall proof outline, the idea is to understand the trajectory of the drift process, and then show that the fluctuations do not affect the trajectory by too much. For convenience, we condition on the event , and then use the strong Markov property to re-index, setting .
The drift process is defined via the deterministic update
with the initialization . For simplicity, we denote and .
Let for some small . Then for large enough, we have , where is a universal constant depending only on , , and .
First, choose in Lemma 2.3 to be equal to . Let be large enough so that , where is the required value in Lemma 2.3. By Lemma 2.2, we see that for all . This allows us to use Lemma 2.4 to observe that the recursive inequality applies whenever , where is a constant only depending on . By the definition of , we have
Recall that by the discussion at the end of Section 3, we have
Using Lemma 3.2, there is also a probability event over which we have
We will show that (6.1) holds when conditioned on both of these events. First, for any , we may write
and similarly we have (4), which we reproduce here:
Subtracting these two equations, and recalling that , we get
where the bound for the first term on the right hand side comes from (6.3)
We are now in a position to apply Lemma E.2 with , , and . Doing so, we get
Set . Combining the previous two lemmas, we have
where the last inequality holds for large enough. As such, we have . ∎
Linear convergence in Phase 3 and proof of Theorem 1.2
To summarize, we have showed that with probability at least (Lemma 3.1), with probability at least (Theorem 4.1), and with probability at least (Lemma 6.1). Putting all of these together gives
with probability at least , which is larger than for large enough. Unfortunately, this is not good enough for our purposes and we need to do a bit more work to bring down the error probability.
Let us condition on the probability event for which (3.9) holds so that we have uniform control over over an appropriate timescale (more precisely, we use the coupling argument explained in the discussion after Lemma 3.5). Define , where is the same constant used in (3.9). Then by the strong Markov property, for any , we have
If we set , we see that with probability at least ,
As mentioned earlier, we will take .
If we write , then the above bound allows us to compute
and we see that is a supermartingale with respect to the filtration .
By the supermartingale inequality, there is a probability event over which
On the intersection of this event, and that on which , we have that
for all as we wanted. If we total the measure of the excluded bad events, the final success probability is at least as promised. ∎
We now discuss some straightforward extensions of this result. First, the lack of a high probability guarantee is a little unfortunate, and results from having to apply the supermartingale inequality. We are unsure whether this can be overcome theoretically, but we can easily modify the algorithm so that convergence holds with high probability. To do this, we use the “majority vote” procedure described in . The price we have to pay is an additional factor on the number of iterations, where is the total error probability we can tolerate.
Second, in the algorithm we presented, we required fresh samples to be used in every update step. Once we are in the linear convergence regime, however, samples can actually be reused so long as we choose uniformly from of them (see ).
Conclusion and discussion
In this paper, we have analyzed the convergence of constant step-size stochastic gradient descent for the non-convex, non-smooth phase retrieval objective (1.1), for which we assume Gaussian sampling vectors, and use an arbitrary initialization. The main idea was to view the SGD sequence as a Markov chain on a summary state space, and then use the natural step size scaling to argue that as tends to infinity, the process trajectory converges to something we understand. We believe that our proof framework and techniques will have applications beyond the vanilla phase retrieval model, and indeed inform the theory of non-convex optimization in general.
We have analyzed phase retrieval in the noiseless setting, as is customary in the literature. It is easy to see that the arguments still go through for an additive noise model, except that we may now need to either use batch updates, or reduce the step size further, in order to get convergence. It will also be interesting to see whether the results we have can be extended to the setting of non-Gaussian sampling vectors. Our state space argument relies on the rotational symmetry of the sampling vectors, and this clearly will not hold in the non-Gaussian setting. However, it may be possible for this to be overcome using approximations.
2 Extensions to other single index models
Phase retrieval is an example of a single index model with the link function . One can easily check that the state space argument generalizes to models with other link functions. Less clear is how to generalize the other arguments in the paper. Nonetheless, we expect this to be not too difficult, so long as we assume some natural regularity conditions on the link function. Finally, we conjecture that similar ideas can work for analyzing SGD for low-rank matrix sensing, since heuristically what makes everything work is the underlying low-dimensional structure in the problem.
3 Nonconvex optimization
In the introduction to this paper, we have already talked about the growing interest in a theoretical understanding of first-order methods applied to non-convex problems. Here, we reiterate that the main contribution of our paper should be seen as not simply providing a convergence guarantee for SGD, but also one that has close to optimal sample and computational complexity. We are able to achieve this through a careful analysis of the “essential dynamics” of the SGD process, as represented by the summary state space.
Standard proofs of convergence for first order methods applied to convex problems proceed by tracking one of the following three quantities: , , or . Under our framework, this can be seen as implicitly using a one-dimensional state space. In non-convex optimization, however, it makes sense to use a multi-dimensional state space, whereby we measure “progress” in terms of multiple quantities. The number of such quantities one needs to track for a given problem can then perhaps be used to define a notion of “complexity” for that problem.
Acknowledgements
Y.T. was partially supported by NSF CCF-1740855, and completed part of this manuscript while visiting the Simons Institute for the Theory of Computing. R.V. was partially supported by U.S. Air Force Grant FA9550-18-1-0031. Y.T. would like to thank Xiang Cheng, Jelena Diakonikolas, Michael Jordan, and Yian Ma for helpful discussions.
References
Appendix A State space calculations
Recall that we let denote the sequence obtained by iteratively performing the SGD update (1.3) with constant step size .
The sequence is a Markov chain whose transition kernel has the random mapping representation
, and is the event that .
The fact that the sequence is a Markov chain is clear. After dropping indices, we may write the update step (1.3) as
Abusing notation slightly, let us define the state space updates
Our goal is to compute formulas for the distributions for and , in particular showing that they depend on x only through y. To this end, we simplify notation, denoting , , and . Furthermore, define .
We can decompose x into its components parallel and perpendicular to , writing
Let be the random vector used to generate . We also have the orthogonal decomposition
where , are the marginals of a along and respectively, and r is defined as the remainder in the decomposition above.
Combining these formulas, we immediately get
To compute the formula for , we first expand
Now use equations (A.2), (A.4) and (A.5) to write
For the second formula, we note that , and write
Here, the second equality follows from a combination of (A.4), (A.3) and (A.5). ∎
The distribution of the event depends only on the angle between x and . Furthermore, using the formula (A.4), we have the following identities.
Appendix B Properties of subexponential random variables
Subexponential random variables are defined in terms of tail bounds, and can also be equivalently defined as elements of an Orlicz space with Orlicz norm
One may easily check that this is a norm, which allows for easy tail bounds for random variables that are sums of subexponential random variables. We will only state the propreties of subexponential variables needed in our paper, and refer the interested reader to the textbook .
Let be a compact domain. Then the subexponential norms of and are uniformly bounded for .
Suppose we have for all . Then
The first inequality is an application of the triangle inequality, the third follows from the following basic property for subexponential random variables: . Finally, it is easy to check that . ∎
Appendix C Lemmas for drift
For each fixed , is an odd function with respect to , so it suffices to prove the statement for . Let us now compute its derivative with respect to . Differentiating (2.7) first with respect to , we get
Next, note that since , we have
Using the chain rule and then simplifying, we thereby get
From this expression, we can see that for any fixed , the function is concave downwards on , with , and . This implies that the graph of as a function of lies beneath the line passing through the origin with slope . When , we have
For the lower bound, first note that concavity also implies that for any . Now, one may easily check that , so that for small enough. By continuity, there is some for which
Indeed, since , one may even provide a precise formula if one wishes. Set . This is the universal constant we want. ∎
Fix in the previous lemma, and by making and smaller if necessary, assume that for all , where . Then is Lipschitz continuous on with Lipschitz constant bounded by a universal constant depending only on .
The first term is trivially bounded by . Next, observe that , which is jointly differentiable in and , and so is Lipschitz continuous with respect to these coordinates on a compact set bounded away from . By assumption, is such a compact set. ∎
Appendix D Facts about Kolmogorov distance and stochastic dominance
For any real-valued random variables and , we have
as we wanted. The second identity can be obtained similarly. ∎
Let and be real-valued random variables. Then for any , stochastically dominates up to error if and only if their CDFs satisfy .
Let be uniformly distributed on $U^{\prime}(\omega)=U(\omega)+\delta\mod 1U^{\prime}q_{X}(U^{\prime})\sim F_{X}q_{Y}(U)\sim F_{Y}1-\delta\delta\leq U^{\prime}=U+\delta\leq 1$. Conditioning on the event in which this occurs, we have
Let , , and be random variables, such that and . Then .
This follows from the characterization in the previous lemma. ∎
Let and be real-valued random variables such that their CDFs satisfy for some . Then stochastically dominates up to error .
Fix . For any , define the random variable . Then whenever , we have .
Fix , set . Let and be defined as in (4.6) and (4.9) respectively . Consider the collection of random variables for . For large enough, whenever , we have .
Throughout, we let denote a standard normal random variable. We start by proving the first statement. Let denote the CDFs of and respectively. For any given , we wish to show that , and it suffices to show that for . In order to do this, we write out in terms of the Gaussian CDF. We have
Since is even, and decreases away from , and for , the quantity on the right hand side is negative as we wanted.
The second statement is proved similarly. We let denote the CDF of and will show that . As before we compute
For , we have , and it is clear that this quantity is nonpositive. For , first observe that for any , we have . As such, we compute
For large enough, this ratio is greater than
which converges to as tends to infinity. This concludes the proof of the claim. ∎
Appendix E Combinatorial lemmas
Let be a sequence of real numbers. Denote the partial sums by . For any , define the sequence via the recursive formula
If there is some positive integer and some such that for all , then we also have for all .
We first prove by induction that the following representation for holds:
First assume that the formula holds for some . Then starting from the definition, we use the inductive hypothesis to write
Applying the triangle inequality to (E.1), we get
Let be a sequence of non-negative real numbers. Denote the partial sums by . Let and be such that we have the recursive inequality
Appendix F Concentration inequalities
This essentially follows from Theorem 1 in . For completeness and clarity, however, we give a direct proof of this here using the same technique.
First fix . Let , and for each positive integer , we write
so that the sequence forms a supermartingale, and remains so if we extend this to time 0 by setting . We may now apply the supermartingale inequality. We have
It remains to choose appropriately in order to get the tail bound we want. If , then we set , observing that for this choice of ,
and is indeed a supermartingale, and (F) holds. Plugging our choice of into the left hand and right hand sides, this yields the bound
On the other hand, if , then we pick . Once again plugging this into (F), we get
Putting these two bounds together gives the upper tail in (3.4), and considering the negative of the sequence gives the lower tail. ∎
Let be a sequence of Bernoulli random variables adapted to a filtration , and let be such that for , we have
Denote , observe that for any ,
The rest of the proof is exactly the same as that of the regular Chernoff’s inequality (see ). ∎
Let be an independent copy of . By Jensen’s inequality, followed by applying the contraction inequality pointwise, we have
Here, the inequality follows from Cauchy-Schwarz.
For the second claim, assume and write
The first equality follows from the oddness of and the symmetry of , while the second follows from contraction. If , the statement may be proved similarly. ∎