Fast Exact Matrix Completion with Finite Samples
Prateek Jain, Praneeth Netrapalli
Introduction
where is defined as:
LRMC is by now a well studied problem with applications in several machine learning tasks such as collaborative filtering [BK07], link analysis [GL11], distance embedding [CR09] etc. Motivated by widespread applications, several practical algorithms have been proposed to solve the problem (heuristically) [RR13, HCD12].
On the theoretical front, the non-convex rank constraint implies NP-hardness in general [HMRW14]. However, under certain (by now) standard assumptions, a few algorithms have been shown to solve the problem efficiently. These approaches can be categorized into the following two broad groups:
a) The first approach relaxes the rank constraint in (1) to a trace norm constraint (sum of singular values of ) and then solves the resulting convex optimization problem [CR09]. [CT09, Rec09] showed that this approach has a near optimal sample complexity (i.e. the number of observed entries of ) of , where we abbreviate . However, current iterative algorithms used to solve the trace-norm constrained optimization problem require memory and time per iteration, which is prohibitive for large-scale applications.
b) The second approach is based on an empirically popular iterative technique called Alternating Minimization (AltMin) that factorizes where have columns, and the algorithm alternately optimizes over and holding the other fixed. Recently, [Kes12, JNS13, Har14, HW14] showed convergence of variants of this algorithm. The best known sample complexity results for AltMin are the incomparable bounds and due to [Kes12] and [HW14] respectively. Here, is the condition number of and is the desired accuracy. The computational cost of these methods is per iteration, making these methods very fast as long as the condition number is not too large.
Of the above two approaches AltMin is known to be the most practical and runs in near linear time. However, its sample complexity as well as computational complexity depend on the condition number of which can be arbitrarily large. Moreover, for “exact” recovery of , i.e., with error , the method requires infinitely many samples (or rather to observe the entire matrix). The dependence of sample complexity on the desired accuracy arises due to the use of independent samples in each iteration, which in turn is necessitated by the fact that using the same samples in each iteration leads to complex dependencies among iterates which are hard to analyze. Nevertheless, practitioners have been using AltMin with same samples in each iteration successfully in a wide range of applications.
Our results: In this paper, we address this issue by proposing a new algorithm called Stagewise-SVP (St-SVP) and showing that it solves the matrix completion problem exactly with a sample complexity , which is independent of both the condition number, and desired accuracy and time complexity per iteration , which is near linear in .
The basic block of our algorithm is a simple projected gradient descent step, first proposed by [JMD10] in the context of this problem. More precisely, given the iterate , [JMD10] proposed the following update rule, which they call singular value projection (SVP).
where is the projection onto the set of rank- matrices and can be efficiently computed using singular value decomposition (SVD). Note that the SVP step is just a projected gradient descent step where the projection is onto the (non-convex) set of low rank matrices. [JMD10] showed that despite involving projections onto a non-convex set, SVP solves the related problem of low-rank matrix sensing, where instead of observing elements of the unknown matrix, we observe dense linear measurements of this matrix. However, their result does not extend to the matrix completion problem and the correctness of SVP for matrix completion was left as an open question.
Our preliminary result resolves this question by showing the correctness of SVP for the matrix completion problem, albeit with a sample complexity that depends on the condition number and desired accuracy. We then develop a stage-wise variant of this algorithm, where in the stage, we try to recover , there by getting rid of the dependence on the condition number. Finally, in each stage, we use independent samples for iterations, but use same samples for the remaining iterations, there by eliminating the dependence of sample complexity on .
Paper Organization: We first present the problem setup, our main result and an overview of our techniques in the next section. We then present a “warm-up” result for the basic SVP method in Section 3. We then present our main algorithm (St-SVP) and its analysis in Section 4. We conclude the discussion in Section 5. The proofs of all the technical lemmas will follow thereafter in the appendix.
Our Results and Techniques
In this section, we will first describe the problem set up and then present our results as well as the main techniques we use.
Let be an matrix of rank-. Let be a subset of the indices. Recall that (as defined in (2)) is the projection of on to the indices in . Given and , the goal is to recover . The problem is in general ill posed, so we make the following standard assumptions on and [CR09].
is generated by sampling each element of independently with probability .
The incoherence assumption ensures that the mass of the matrix is well spread out and a small fraction of uniformly random observations give enough information about the matrix. Both of the above assumptions are standard and are used by most of the existing results, for instance [CR09, CT09, KMO10, Rec09, Kes12]. A few exceptions include the works of [MJD09, CBSW14, BJ14].
2 Main Result
The following theorem is the main result of this paper.
Suppose and satisfy Assumptions 1 and 2 respectively. Also, let
where , and is a global constant. Then, the output of Algorithm 2 satisfies: with probability greater than . Moreover, the run time of Algorithm 2 is .
Algorithm 2 is based on the projected gradient descent update (3) and proceeds in stages where in the -th stage, projections are performed onto the set of rank- matrices. See Section 4 for a detailed description and the underlying intuition behing our algorithm.
Table 1 compares our result to that for nuclear norm minimization, which is the only other polynomial time method with finite sample complexity guarantees (i.e. no dependence on the desired accuracy ). Note that St-SVP runs in time near linear in the ambient dimension of the matrix (), where as nuclear norm minimization runs in time cubic in the ambient dimension. However, the sample complexity of St-SVP is suboptimal in its dependence on the incoherence parameter and rank . We believe closing this gap between the sample complexity of St-SVP and that of nuclear norm minimization should be possible and leave it for future work.
3 Overview of Techniques
In this section, we briefly present the key ideas and lemmas we use to prove Theorem 1. Our proof revolves around analyzing the basic SVP step (3): where is the sampling probability, and is the error matrix. Hence, is given by a rank- projection of , which is a perturbation of the desired matrix .
In order to carry out this argument, we write the singular vectors of as solutions to eigenvector equations and then use these to write explicitly via Taylor series expansion. We use this technique to prove the following more general lemma.
with probability greater than .
Proceeding in stages: If we applied Lemma 1 with , we would require to be much smaller than . Now, can be thought of as . If we start with , we have , and so . To make , we would need the sampling probability to be quadratic in the condition number . In order to overcome this issue, we perform SVP in stages with the stage performing projections on to the set of rank- matrices while maintaining the invariant that at the end of stage, . This lets us choose a independent of while still ensuring . Lemma 1 tells us that at the end of the stage, the error is , there by establishing the invariant for the stage.
Using same samples: In order to reduce the error from to , the stage would require iterations. Since Lemma 1 requires the elements of to be independent, in order to apply it, we need to use fresh samples in each iteration. This means that the sample complexity increases with , or the desired accuracy if . This problem is faced by all the existing analysis for iterative algorithms for matrix completion [Kes12, JNS13, Har14, HW14]. We tackle this issue by observing that when is ill conditioned and is very small, we can show a decay in using the same samples for SVP iterations:
Let and be as in Theorem 1 with being a symmetric matrix. Further, let be ill conditioned in the sense that , where are the singular values of . Then, the following holds for all rank- s.t. (w.p. ):
The following lemma plays a crucial role in proving Lemma 2. It is a natural extension of the Davis-Kahan theorem for singular vector subspace perturbation.
Suppose is a matrix such that . Then, for any matrix such that , we have:
In contrast to the Davis-Kahan theorem, which establishes a bound on the perturbation of the space of singular vectors, Lemma 3 establishes a bound on the perturbation of the best rank- approximation of a matrix with good eigen gap, under small perturbations. This is a very natural quantity while considering perturbations of low rank approximations, and we believe it may find applications in other scenarios as well. A final remark regarding Lemma 3: we suspect it might be possible to tighten the right hand side of the result to , but have not been able to prove it.
Singular Value Projection
As is clear from the pseudocode in Algorithm 1, SVP is a simple projected gradient descent method for solving the matrix completion problem. Note that Algorithm 1 first splits the set into random subsets and updates iterate using . This step is critical for analysis as it ensures that is independent of , allowing for the use of standard tail bounds. The following theorem is our main result for Algorithm 1:
Suppose and satisfy Assumptions 1 and 2 respectively with
where with denoting the singular values of , and is a large enough global constant. Then, the output of Algorithm 1 satisfies (w.p. ):
Stagewise-SVP
Theorem 2 is suboptimal in its sample complexity dependence on the rank, condition number and desired accuracy. In this section, we will fix two of these issues – the dependence on condition number and desired accuracy – by designing a stagewise version of Algorithm 1 and proving Theorem 1.
Our algorithm, St-SVP (pseudocode presented in Algorithm 2) runs in stages, where in the stage, the projection is onto the set of rank- matrices. In each stage, the goal is to obtain an approximation of up to an error of . In order to do this, we use the basic SVP updates, but in a very specific way, so as to avoid the dependence on condition number and desired accuracy.
(Step II) Determine if : Note that we can determine this, by using the singular value of the matrix obtained after the gradient step, i.e., . If true, the error , and so the algorithm proceeds to the stage.
(Step III) If not (i.e., ), apply SVP update for iterations with same samples: If , we can use Lemma 2 to conclude that after iterations, the Frobenius norm of error is .
We will now present a proof of Theorem 1.
Just as in Theorem 2, it suffices to prove the result for when is symmetric.For every stage, we will establish the following invariant:
We will use induction. (4) clearly holds for the base case . Now, suppose (4) holds for the stage, we will prove that it holds for the stage. The analysis follows the four step outline in the previous section:
Step I: Here, we will show that for every iteration , we have:
(5) holds for by our induction hypothesis (4) for the -th stage. Supposing it true for iteration , we will show it for iteration . The iterate is given by:
This proves (5). Hence, after steps, we have:
Step II: Let be the gradient update with notation as above. A standard perturbation argument (Lemmas 7 and 8) tells us that:
So if , then we have . Since we move on to the next stage with , (7) tells us that:
showing the invariant for the stage.
Step III: On the other hand, if , then Lemmas 8 and 8 tell us that . So, using Lemma 2 with iterations, we obtain:
If , then we have:
On the other hand, if , then we have:
Step IV: Using (9) and “fresh samples” analysis as in Step I (in particular (5)), we have:
which establishes the invariant for the stage.
Combining the invariant (4) with the exit condition as in Step III, we have: where is the output of the algorithm. As there are stages, and in each stage, we need sets of samples of size . Hence, the total samplexity is . Similarly, total computation complexity is .∎
Discussion and Conclusions
In this paper, we proposed a fast projected gradient descent based algorithm for solving the matrix completion problem. The algorithm runs in time , with a sample complexity of . To the best our knowledge, this is the first near linear time algorithm for exact matrix completion with sample complexity independent of and condition number of .
Design an efficient algorithm with information-theoretic optimal sample complexity is still open; our result is suboptimal by a factor of and nuclear norm approach is suboptimal by a factor of . Another interesting direction in this area is to design optimal algorithms that can handle sampling distributions that are widely observed in practice, such as the power law distribution[MJD09].
References
Appendix A Preliminaries and Notations for Proofs
The following lemma shows that wlog we can assume to be a symmetric matrix. A similar result is given in Section D of [Har14].
Define the following symmetric matrix from using a dilation technique:
Note that the rank of is and the incoherence of is bounded by (assume ). Note that if , then we can split the columns of in blocks of size and apply the argument separately to each block.
Now, we can split to generate samples from and , and then augment redundant samples from the part above to obtain .
Moreover, if we run the SVP update (3) with input , and , an easy calculation shows that the iterates satisfy:
where is the output of (3) with input , , and . That is, a convergence result for would imply a convergence result for as well. ∎
Appendix B Proof of Lemma 1
is a symmetric matrix with each of its elements drawn independently, satisfying the following moment conditions:
for and .
That is, we wish to understand under perturbation . To this end, we first present a few lemmas that analyze how is obtained in the context of our St-SVP algorithm and also bounds certain key quantities related to . We then present a few technical lemmas that are helpful for our proof of Lemma 1. The detailed proof of the lemma is given in Section B.3. See Section B.4 for proofs of the technical lemmas.
Recall that the SVP update (3) is given by: where and . Our first lemma shows that matrices of the form , scaled appropriately, satisfy Definition 1, i.e., satisfies the assumption of Lemma 1.
Let be a symmetric matrix. Suppose is obtained by sampling each element with probability . Then the matrix
We now present a critical lemma for our proof which bounds for . Note that the entries of can be dependent on each other, hence we cannot directly apply standard tail bounds. Our proof follows along very similar lines to Lemma 6.5 of [EKYY13]; see Appendix D for a detailed proof.
Suppose satisfies Definition 1. Fix . Let denote the standard basis vector. Then, for any fixed vector , we have:
with probability greater than .
Next, we bound using matrix Bernstein inequality by [Tro12]; see Appendix B.4 for a proof.
Suppose satisfies Definition 1. Then, w.p. , we have:
B.2 Technical Lemmas useful for Proof of Lemma 1
In this section, we present the technical lemmas used by our proof of Lemma 1.
First, we present the well known Weyl’s perturbation inequality [Bha97]:
Suppose . Let and be the eigenvalues of and respectively. Then we have:
Next, we present a natural perturbation lemma that bounds the spectral norm distance of to where and is a perturbation to .
B.3 Detailed Proof of Lemma 1
We are now ready to present a proof of Lemma 1. Recall that , hence,
where is the top eigenvector-eigenvalue pair (in terms of magnitude).
Now, as satisfies conditions of Definition 1, we can apply Lemma 7 to obtain:
Using (10), we have: . Moreover, using (12), is invertible. Hence, using Taylor series expansion, we have:
Letting denote the eigenvalue decomposition (EVD) of , we obtain:
Using Lemma 9, we have the following bound for the first term above:
Let denote the EVD of . We now bound the terms in the summation in (13) for .
where follows from Lemma 6 and follows from (16).
where we used Lemma 10 to bound and Lemma 7 to bound . The last inequality follows from using as .
Plugging (17), (18) and (19) in (13) gives us:
B.4 Proofs of Technical Lemmas from Section B.1, Section B.2
The lemma now follows using matrix Bernstein inequality (Lemma 16). ∎
Let be the eigenvalue decomposition . We have:
where follows from the incoherence of . ∎
Let be the eigenvalue decomposition of . Since , we see that .
Since , we see that
Using the eigenvalue decomposition of , we have the following expansion:
Applying triangle inequality and using , we get:
Using the above inequality with (21), we obtain:
This proves the second claim of the lemma.
The last claim of the lemma follows by using triangle inequality and (21) in the above equation. ∎
Appendix C Proof of Lemma 2
We now present a proof of Lemma 2 that show decrease in the Frobenius norm of the error matrix, despite using same samples in each iteration. In order to state our proof, we will first introduce certain notations and provide a few perturbation results that might be of independent interest. Then, in next subsection, we will present a detailed proof of Lemma 2. Finally, in Section C.3, we present proofs of the technical lemmas given below.
In order to state our first supporting lemma, we will introduce the concept of tangent spaces of matrices [Bha97].
Let be a matrix with EVD (eigenvalue decomposition) . The following space of matrices is called the tangent space of :
That is, if is the EVD of , then any matrix can be decomposed into four mutually orthogonal terms as
where is a basis of the orthogonal space of . The first three terms above are in and the last term is in . We let and denote the projection operators onto and respectively.
Let and be two symmetric matrices. Suppose further that is rank-. Then, we have:
Next, we present a few technical lemmas related to norm of :
Let , be as given in Lemma 2 and let be the sampling probability. Then, For every matrix , we have :
Let , , be as given in Lemma 2. Then, for every , we have :
Let , , be as given in Lemma 2. Then, for every and , we have :
C.2 Detailed Proof of Lemma 2
Let , and . That is, .
For simplicity, in this section, we let denote the eigenvalue decomposition (EVD) of with , and also let . We also use the shorthand notation .
Representing in terms of its projection onto and its complement, we have:
where the last conclusion follows from Lemma 11 and the hypothesis that . Using , we have:
where we used the hypothesis that in the second inequality.
Since , using Lemma 3 with (25), (26), we have:
Now, using Claim 1, we have , which along with the above equation establishes the lemma. We now state and prove the claim bounding that we used above to finish the proof.
Assume notation defined in the section above. Then, we have:
We first bound . Recalling that is the EVD of , we have:
Step I: To bound the first term in (27), we use Lemma 12 to obtain:
Step II: To bound the second term, we let , and proceed as follows:
where follows from Lemma 13. This means that we can bound the second term as:
Step III: We now let and turn to bound the third term in (27). We have:
Step IV: To bound the last term in (27), we use Lemma 11 to conclude
Combining (28), (29), (30) and (31), we have:
Claim now follows by combining (32) and (33). ∎
C.3 Proofs of Technical Lemmas from Section C.1
Let be EVD of . Then, we have:
We will now prove Lemma 3, which is a natural extension of the Davis-Kahan theorem. In order to do so, we will first recall the Davis-Kahan theorem:
Let be the EVD of with . Similarly, let denote the EVD of with . Expanding into components along and orthogonal to it, we have:
Before going on to bound the terms in (34), let us make some observations. We first use Lemma 8 to conclude that
Applying Theorem 3 with and , with separation parameter , we see that
We are now ready to bound the last two terms in the right hand side of (34). Firstly, we have:
where the last step follows from (36) and the assumption on . For the other term, we have:
where we used (35). Combining the above two inequalities with (34) proves the lemma. ∎
Finally, we present proofs for Lemma 12, Lemma 13, Lemma 14.
Using Theorem 1 by [BJ14], the followings (w.p. ):
Lemma now follows by using the assumed value of in the above bound along with the fact that is a rank- matrix. ∎
Let , where . Then, using Lemma 5, satisfies the conditions of Definition 1. Lemma now follows by using Lemma 7 and using as given in the lemma statement. ∎
Let be a set of independent bounded random variables, then the following holds :
Appendix D Proof of Lemma 6
We will prove the statement for . The lemma can be proved by taking a union bound over all . In order to prove the lemma, we will calculate a high order moment of the random variable
and then use Markov inequality. We use the following notation which is mostly consistent with Lemma of [EKYY13]. We abbreviate as and denote by . We further let
We now split the matrix into two parts and which correspond to the upper triangular and lower triangular parts of . This means
The above summation has terms, of which we consider only
The resulting factor of does not change the result.
Abbreviating , and
where the summation runs only over those such that .
Calculating the moment expansion of for some even number , we obtain:
For each valid , we define the partition of the index set , where and are in the same equivalence class if . We first bound the contribution of all corresponding to a partition in the summation (39) and then bound the total number of partitions possible. Since each is centered, we can conclude that any partition that has a non-zero contribution to the summation in (39) satisfies:
each equivalence class of contains at least two elements.
We further bound the summation in (39) by taking absolute values of the summands
where the summation runs over that correspond to valid partitions . Fixing one such partition , we bound the contribution to (40) of all the terms such that .
We denote to be the graph constructed from as follows. The vertex set is given by the equivalence classes of . For every , we have an edge between the equivalence class of and the equivalence class of .
Each term in (40) can be bounded as follows:
where the last step follows from property above and Definition 1.
Using the above, we can bound (40) as follows:
where denotes the number of vertices in .
Factorizing the above summation over different components of , we obtain
where denotes the number of connected components of , denotes the component of , and denotes the number of vertices in . We will now bound terms corresponding to one connected component at a time. Pick a connected component . Since for every , we know that there exists a vertex such that . Pick one such vertex as a root vertex and create a spanning tree of . We use the bound for every . The remaining summation can be calculated bottom up from leaves to the root. Since
Noting that the number of partitions is at most , we obtain the bound
Choosing and applying moment Markov inequality, we obtain
Applying a union bound now gives us the result.
Appendix E Empirical Results
In this section, we compare the performance of St-SVP with SVP on synthetic examples. We do not however include comparison to other matrix completion methods like nuclear norm minimization or alternating minimization; see [JMD10] for a comparison of SVP with those methods.
We implemented both the methods in Matlab and all the results are averaged over 5 random trials. In each trial we generate a random low rank matrix and observe entries from it uniformly at random.
In the first experiment, we fix the matrix size () and generate random matrices with varying rank . We choose the first singular value to be and the remaining ones to be , giving us a condition number of . Figure 1 (a) & (b) show the error in recovery and the run time of the two methods, where we define the recovery error as . We see that St-SVP recovers the underlying matrix much more accurately as compared to SVP. Moreover, St-SVP is an order of magnitude faster than SVP.
In the next experiment, we vary the condition number of the generated matrices. Interestingly, for small , both SVP and St-SVP recover the underlying matrix in similar time. However, for larger , the running time of SVP increases significantly and is almost two orders of magnitude larger than that of St-SVP. Finally, we study the two methods with varying matrix sizes while keeping all the other parameters fixed (, ). Here again, St-SVP is much faster than SVP.