Global Convergence of Gradient Descent for Asymmetric Low-Rank Matrix Factorization
Tian Ye, Simon S. Du
Introduction
This paper studies the asymmetric low-rank matrix factorization problem:
where is the learning rate and are randomly initialized according to some distribution. Empirically, gradient descent with a constant learning rate can efficiently solve this problem (see, e.g., Figure 1 in Du et al. (2018)). Somehow surprisingly, there is no global convergence proof of this generic algorithm, let alone convergence rate analysis. The main difficulties are 1) the problem is non-convex and 2) this problem is not smooth with respect to because the magnitudes of them can be highly unbalanced.
To motivate the study of gradient descent for this optimization problem, we note that this is a prototypical optimization problem that illustrates the gap between practice and theory. In particular, the prediction function is homogeneous: if we multiply a factor by a scalar and divide another factor by , the prediction function remains the same. This homogeneity also exists in deep learning models. Therefore, progress made in understand (1) can further help us gain understanding on other non-convex problems, such as asymmetric matrix sensing, asymmetric matrix completion, and deep learning optimization. We refer readers to Du et al. (2018) for more discussions.
For Problem (1), Du et al. (2018) showed gradient flow (gradient descent with the step size ),
However, to prove a polynomial convergence rate, the approach that solely relies on the geometry will fail because there exists a counter example (Du et al., 2017). Furthermore, for gradient descent with , the key invariance no longer holds. While the invariance can still hold approximately in some way, characterizing the approximation error is highly non-trivial, and this is one of our key technical contributions.
Du et al. (2018) also studied gradient descent with decreasing step sizes , and obtained an “approximate global optimality result": if the magnitude of the initialization is , then gradient descent converges to a -optimal solution, i.e., this result does not establish that gradient descent converges to a global minimum. And again, there was no convergence rate. Furthermore, their result crucially relies on is of order to ensure the second order term does not diverge and thus does not apply to gradient descent with a constant learning rate.
Some previous works, e.g., Ge et al. (2015); Jin et al. (2017), modified the gradient descent algorithm to the perturbed gradient descent algorithm by adding an isotropic noise at each iteration, which can help escape strict saddle points and bypass the exponential lower bound in Du et al. (2017). To deal with the non-smooth problem, they also added a balancing regularization term (Park et al., 2017; Tu et al., 2016; Ge et al., 2017a; Li et al., 2019b), to the objective function to ensure balancedness between and throughout the optimization process. With these two modifications, one can prove a polynomial convergence rate. However, experiments suggest that the isotropic noise and the balancing regularizer may be proof artifacts, because vanilla gradient descent applies to the original objective function (1) without any regularizer finds a global minimum efficiently. From a practical point of view, one does not want to add noise or additional regularization because it may require more hyper-parameter tuning.
The only global quantitative analysis for randomly initialized gradient is by Du et al. (2018) who proved the global convergence rate for the case where has rank , and and are two vectors. In this case, one can reduce the problem to the dynamics of variables, which can be easily analyzed. Unfortunately, it is very difficult to generalize their analysis to the general rank setting.
In this paper, we develop new techniques to overcome the technical difficulties and obtain the first polynomial convergence of randomly initialized gradient descent for solving the asymmetric low-rank matrix factorization problem. Most importantly, our analysis is completely different from existing ones: we give a thorough characterization of the entire trajectory of gradient descent.
Before presenting our main results, we emphasize that the goal of this paper is not to provide new provably efficient algorithms to solve Problem (1), but to provide a rigorous analysis of an intriguing and practically relevant phenomenon on gradient descent. This is of the same flavor as the recent breakthrough on understanding Burer-Moneiro method for solving semidefinite programs (Cifuentes and Moitra, 2019).
Here, and are the largest and the smallest singular values of , respectively. Notably, in sharp contrast to the result in Du et al. (2018), which requires the initialization depends on , our initialization does not depend on the target accuracy. To our knowledge, this is the first global convergence result for gradient descent in solving Problem (1). Furthermore, we give a polynomial rate. The first term in represents a warm-up phase and the second term represents the local linear convergence phase, which will be clear in the analysis sections. On the other hand, while we believe is nearly tight, our requirement for is loose. An interesting future direction is further relax this requirement.
Now by taking , we have the following corollary for gradient flow.
Given , there exists , such that with high probability over the initialization, for all , we have In gradient flow, is a continuous time index.
This is also the first convergence rate result of randomly initialized gradient flow for asymmetric matrix factorization. We note that our analysis on gradient flow is nearly tight. To see this, consider the ordinary differential equation with initial point , then has analytical solution . Hence, to achieve a optimal solution, i.e. , we need . Hence is necessary.
2 Additional Related Work
Here we discuss additional related work. First, in the symmetric setting, e.g., , global convergence of randomly initialized gradient has been established in various settings (Jain et al., 2017; Li et al., 2018; Chen et al., 2019).In Appendix B, we show the dynamics of gradient flow actually admits a closed form, and thus can be easily analyzed. However, as has been highlighted in Li et al. (2019a, b); Park et al. (2017); Tu et al. (2016), generalization to the asymmetric case is highly non-trivial. The major technical difficulty is to deal with the unbalancedness between and . To prevent this, additional balancing regularization is often added (Li et al., 2019b; Park et al., 2017; Tu et al., 2016; Sun and Luo, 2016), though empirically this has been shown to be unnecessary.
Another line of work showed one can first uses spectral initialization to find a near-optimal solution, then starting from there, gradient descent converges to an optimum with a linear rate (Tu et al., 2016; Zheng and Lafferty, 2016; Zhao et al., 2015; Bhojanapalli et al., 2016), though in practice random initialization often suffices. Recently, Ma et al. (2021) proved that if 1) the initialization is close to a global minimum and 2) and are balanced, then without adding additional balancing regularizer, gradient descent converges to a global minimum. Our stage two’s analysis is similar to theirs. However, their result cannot be directly applied to our analysis because they require a more stringent initialization than our stage two’s initial point.
Main Difficulties and Technique Overview
The starting point is the Polyak-Łojasiewicz condition: if we can establish that is lower bounded by a considerable constant , then we have , which implies a linear convergence. However, the singular values of and are not monotonic with , and they can even decrease to an extremely small value.
Hence, without loss of generality, we can assume is a diagonal matrix with , , and otherwise.
To proceed, we will analyse the principle space and the complement space separately. We denote the upper matrix of as and denote the lower matrix of as . Similarly, we define the upper matrix of as and the lower matrix as . Define . We can write out the dynamics of these matrices:
Besides and , there are some other special capital letters used to represent specific matrices throughout this paper. Here is a list.
We define such is because in symmetric case (), although it is hard to find analytical solution for in continuous time case, we do find analytical form for , which contains all information about the singular values of .
and are just the symmetric and skew-symmetric part of matrix . Hence the linear convergence of gradient descent is equivalent the linearly diminishing of and by Pythagorean theorem. We will mention their definitions every time we use them.
2 Symmetrization
Our key observation is that although the singular values of and may not have monotonic property, the symmetrized matrix has this property. Formally, we define
Here, represents the magnitude in the principle space and represents the magnitude of asymmetry. Empirically, we can observe that by choosing a sufficiently small learning rate , we have two desired properties:
The smallest singular value of is almost monotonically increasing;
The norms of are almost monotonically decreasing.
The first property ensures we are learning the “signal", , and the second property ensures the “noise" is disappearing. Therefore, if we can establish these two properties, we can prove the global convergence.
3 Two Stage Analysis
The analysis for asymmetric low rank case is divided into two stages. In the first stage we mainly focus on the increasing rate of . We will prove that in gradient descent method increases exponentially fast to and then drops exponentially fast to , while preserving and small. In the second stage, we will use the large to lower bound the convergence speed of . We will prove that, once gradient descent starts at a point with small , , and , it will converge to global optimal point exponentially fast.
Proof Sketch of Theorem 1.1
We first use a Gaussian distribution to generate matrices element-wisely and independentlyStrictly speaking, we cannot make any assumption on since they need information of singular value decomposition of . However, a random generation of and implies a random generation of because we use unitary transformations.. By standard random matrix theory (Corollary 2.3.5 and Theorem 2.7.5 of Tao (2012)), we know that , such that with high probability, the smallest singular value of is larger than , the largest singular value of is smaller than , the Frobenius norm of is less than and the operator norms of and are less than and , respectively, where .
The initializations are then scaled by where specified in Theorem 1.1.
2 Stage One: Warm-Up Phase
In this stage, we would like to prove the following theorem.
;
;
;
, .
We first give some intuitions about the five conditions in Theorem 3.1. The first condition represents the “signal" is properly bounded from below and above throughout stage one. The second condition shows the magnitude of asymmetry is small throughout stage one. We note that it is crucial to study the Frobenius norm of instead of operator norm, because Frobenius norm admits a nice expansion for analysis. The third condition is an important one, which guarantees after iterations, we have enough “signal" strength in the principal space. The fourth condition is a technical one, which represents the symmetric error is small after iterations. The fifth condition represents the magnitude of the complement space remains small.
The proof of Theorem 3.1 is quite challenging and require new technical ideas and careful calculations, which we explain below.
If we only consider a differential equation , a well-known theorem (Theorem 12 in Lax (2007)) shows that if the singular values of are different from each other, and is the singular vector that , then the derivative of is exactly , which is lower bounded by . To adapt it to discrete case, we prove the following lemma.
This lemma shows if we ignore perturbations from and , then for small (when is of smaller order than the first term), the least eigenvalue of increases at a geometric rate.
However, there are also some small perturbation terms about and while doing analysis. and are easy to give an upper bound, since by (8) and (9), we know that by choosing small enough , they are monotonically decreasing. However, the dynamic of is highly non-trivial. After some careful calculations (cf. (3.2.5)), we find that the increasing rate of is related to the smallest eigenvalue of : if is small, then increases slowly.
Now we would like to give a lower bound on . Inspired by gradient flow case, and are almost complementary of each other, and their dynamic behaves similarly. Hence we have with some small perturbation terms about and . Hence we can use lemma 3.3 to give a lower bound in discrete case.
Notice that we use while analyzing and use while analyzing . Hence, during the whole process, we need to bound both of them inductively.
Finally, once increases to a relatively large amount, we can use it to prove that will decrease exponentially fast to . One cannot simply prove that converges to zero in this stage, since the perturbation term will never converge to zero.
2.1 Assumptions
We make some assumptions on and in iterations , where will be defined at the end of subsubsection 3.2.4, and we will verify the assumptions in the end.
.
The Frobenius norm of is bounded by for some , where will be determined laterWe will show later that it is appropriate to choose .. Hence its operator norm is also bounded by .
2.2 Dynamics on A, B and P
The dynamics on and is trivial, since by equations (8) and (9), i.e.
we know that if we choose , one can inductively proved that and by using the first two assumptions in subsection 3.2.1. And then it follows that the operator norms of and are monotonically decreasing in this stage.
However, it is non-trivial to prove that keeps small. We will analyze the dynamics of and together inductively.
First of all, from equations (6) and (7), we can write down the dynamics of and as following.
2.3 Dynamics on A
Given (13), we can give a lower bound for the minimal singular value of .
For the first part, we could define , and . Then according to lemma 3.2, by choosing and , we havePlease see (23) for the full steps for this inequality.
For simplicity, we denote by , and define .
After some routine computationsPlease see section D for details., we can prove that it takes at most iterations to make to at least , and additional computations show that, if is always bounded by , then once becomes larger than , it is always larger than .
2.4 Dynamics on P
To bound by equation (15), we need to first bound the norms of and by (16) and (17).
By simple triangle inequalities we havePlease see (24) for full steps for this inequality.
where the last inequality holds when choosing . Then we can conclude that
where is a matrix with operator norm less than . By choosing and , we have . Further more, by choosing and in lemma 3.3, we have
Because is initially positive, we know that
This lower bound verifies the assumption that , since by choosing .
On the other hand, we can also analyze the operator norm of by using formula (19), since for . This implies that
Inequality (21) shows that we only need at most iterations after to make . Because , we have the total number of iteration .
2.5 Dynamics on B
To verify the assumption about made in subsection 3.2.1, we cannot simply use the equation (14), since the error term is approximately , which will perturb the analysis seriously. Inspired by the continuous case that , where if we assume . In this inequality, we hide the term in and wipe it completely in our analysis.
Hence, for discrete case, we have the following inequalityPlease see (25) for full steps for this inequality.,
where the last equation is because we have chosen and .
3 Stage Two: Local Convergence Phase
We have proved in theorem 3.1 that the gradient descent achieved a pretty good point at , i.e. and . In this subsection, we will prove that start from this point, the gradient descent will converge linearly to the global optimal point. Then theorem 1.1 follows.
We will prove inductively on the following conditions:
;
;
.
Intuitively, the (1) guarantees the magnitude of asymmetry remains small; (2) guarantees that in the principal space, the error converges to with a geometric rate; and (3) guarantees the “signal" in the principal space remains lower bounded.
First of all, it is easy to prove linear convergence of and by using assumption (3). Now we can verify the assumptions inductively.
: We can prove . Because is small, (3) follows by triangle inequality.
: Consider continuous-time case, if we assume , the time derivative of is . Hence the convergence rate is lower bounded by and . Because the perturbation term and decreases exponentially, assumption (2) follows naturally. We transform this intuition to the discrete-time case.
: Again, we use (3.2.5) to show that the increasing rate of is bounded by . Because decreases exponentially, cannot diverge to infinity, but increase by a factor. Then by taking sufficiently small can we verify the assumption (1).
To sum up, we have , which can be further bounded by
for some universal constant . Hence one only needs iterations after to achieve an -optimal point.
Conclusion
This paper proved that randomly initialized gradient descent converges to a global minimum of the asymmetric low-rank matrix factorization problem with a polynomial convergence rate. This result explains the empirical phenomena observed in prior work, and confirms that gradient descent with a constant learning rate still enjoys the auto-balancing property as argued in Du et al. (2018).
We believe our requirement of the step size is loose and a tighter analysis may improve the running time of gradient descent. Another interesting direction is to apply our techniques to other related problems such as asymmetric matrix sensing, asymmetric matrix completion and linear neural networks.
References
Appendix A Omitted Derivations of Formulas
We have omitted a number of complicated formulas in the main text to provide clear intuition and concise proof sketch. We will list all mentioned formulas here for readers’ reference.
Appendix B Dynamics in the Symmetric and Full-Rank Case
We consider the case where and is symmetric and full-rank, and we use gradient flow. We can derive the dynamics of as , which is a quadratic ordinary differential equation and it is hard to solve directly.
However, if we define , we have . Taking the derivative implies . Hence, . Substitute in it, we have
which is a linear ordinary differential equation.
For simplicity, define . Then
Similarly, because ’s dynamic is , we have
And it is interesting to verify that by using the following lemma.
Appendix C Proof of Lemmas
Since is invertible, we only need to verify the equation after right multiplying both side by . We have
where (31) is because commutes with , (32) is because and finally (C) is because . ∎
First of all, we can expand the expression of and split it in the following terms.
For the first term , its eigenvalues are since is commutable with itself, where is the largest singular value of . By the assumptions and , we see the smallest eigenvalue of is exactly .
For the second term, it can be rewritten as
Hence, the minimal singular value can be bounded by .
Finally, the last term can be lower bounded by . Summing up all three terms and we get
If , it suggests that is positive semi-definite, and is positive semi-definite, too. Hence if .
If , we can expand the expression of and split it in the following terms.
For the first term , its eigenvalues are since is commutable with itself, where is the largest eigenvalue of . By the assumptions and , we see the smallest eigenvalue of is exactly .
For the second term, it can be rewritten as
Hence, the minimal eigenvalue can be bounded by if .
Finally, the last term can be lower bounded by . Summing up all three terms and we get that when ,
Appendix D Solving the Iteration Formula of a
In this section we analyze the iteration formula (18).
We first consider the case when . Notice that , we have
where we choose so small that .
By taking and , we have , hence,
Subtracting by (36), we have
Hence, . So, it takes at most iterations to bring to at least .
Appendix E Solving the Iteration Formula on B
The iteration formula can be summarized as
where and . Moreover, we have
Appendix F Proof of Stage Two
Here is the full version of the proof. Initially, where . Hence . Then for we have . Hence . We can do the same thing on .
First of all, by equations (8) and (9), we have
Expanding by brute forcePlease see (26) for the result of the expanding., we get
Thus we can now verify that . Together with the linear convergence of and , we know the gradient descent converge linearly. Notice that by using the operator norm of , we can easily prove that and in the next iteration is at least once given is small.
To give an upper bound on , we still use equation (3.2.5).
First of all, we have , since , and . Hence, and .
To solve this iteration formula, we first notice that the product of the main coefficient is bounded by a universal constant,
we can then write it into an iteration formula about ,
By taking and , induction on holds.