Randomized Block Krylov Methods for Stronger and Faster Approximate Singular Value Decomposition
Cameron Musco, Christopher Musco
Introduction
Among countless applications, the SVD is used for optimal low-rank approximation and principal component analysis (PCA)Typically after mean centering ’s columns or rows, depending on which principal components we want.. Specifically, for , a partial SVD can be used to construct a rank approximation such that both and are as small as possible. We simply set . That is, is projected onto the space spanned by its top singular vectors.
For principal component analysis, ’s top singular vector provides a top principal component, which describes the direction of greatest variance within . The singular vector provides the principal component, which is the direction of greatest variance orthogonal to all higher principal components. Formally, denoting ’s singular value as ,
Traditional SVD algorithms are expensive, typically running in timeThis is somewhat of an oversimplicifcation. By the Abel-Ruffini Theorem, an exact SVD is incomputable even with exact arithmetic . Accordingly, all SVD algorithm are inherently iteratively. Nevertheless, traditional methods including the ubiquitous QR algorithm obtain superlinear convergence rates for the low-rank approximation problem. In any reasonable computing environment, they can be taken to run in time.. Hence, there has been substantial research on randomized techniques that seek nearly optimal low-rank approximation and PCA . These methods are quickly becoming standard tools in practice and implementations are widely available , including in popular learning libraries like scikit-learn .
Recent work focuses on algorithms whose runtimes do not depend on properties of . In contrast, classical literature typically gives runtime bounds that depend on the gaps between ’s singular values and become useless when these gaps are small (which is often the case in practice – see Section 8). This limitation is due to a focus on how quickly approximate singular vectors converge to the actual singular vectors of . When two singular vectors have nearly identical values they are difficult to distinguish, so convergence inherently depends on singular value gaps.
Only recently has a shift in approximation goal, along with an improved understanding of randomization, allowed for algorithms that avoid gap dependence and thus run provably fast for any matrix. For low-rank approximation and PCA, we only need to find a subspace that captures nearly as much variance as ’s top singular vectors – distinguishing between two close singular values is overkill.
The fastest randomized SVD algorithms run in timeHere is the number of non-zero entries in and this runtime hides lower order terms., are based on non-iterative sketching methods, and return a rank matrix with orthonormal columns satisfying
Unfortunately, as emphasized in prior work , Frobenius norm error is often hopelessly insufficient, especially for data analysis and learning applications. When has a “heavy-tail” of singular values, which is common for noisy data, can be huge, potentially much larger than ’s top singular value. This renders (1) meaningless since does not need to align with any large singular vectors to obtain good multiplicative error.
To address this shortcoming, a number of papers suggest targeting spectral norm low-rank approximation error,
which is intuitively stronger. When looking for a rank approximation, ’s top singular vectors are often considered data and the remaining tail is considered noise. A spectral norm guarantee roughly ensures that recovers up to this noise threshold.
Our Results
Even though the algorithm has been discussed and tested for potential improvement over Simultaneous Iteration , theoretical bounds for Krylov subspace and Lanczos methods are much more limited. As highlighted in ,
“Despite decades of research on Lanczos methods, the theory for [randomized power iteration] is more complete and provides strong guarantees of excellent accuracy, whether or not there exist any gaps between the singular values.”
Our work addresses this issue, giving the first gap independent bound for a Krylov subspace method.
2 Stronger Guarantees
In addition to runtime improvements, we target a much stronger notion of approximate SVD that is needed for many applications, but for which no gap-independent analysis was known.
Specifically, as noted in , while intuitively stronger than Frobenius norm error, spectral norm low-rank approximation error does not guarantee any accuracy in for many matricesIn fact, it does not even imply Frobenius norm error.. Consider with its top squared singular values all equal to followed by a tail of smaller singular values (e.g. at ). but in fact for any rank , leaving the spectral norm bound useless. At the same time, is large, so Frobenius error is meaningless as well. For example, any obtains .
With this scenario in mind, it is unsurprising that low-rank approximation guarantees fail as an accuracy measure in practice. We ran a standard sketch-and-solve approximate SVD algorithm (see Section 3.1) on SNAP/amazon0302, an Amazon product co-purchasing dataset , and achieved very good low-rank approximation error in both norms for :
However, the approximate principal components given by are of significantly lower quality than ’s true singular vectors (see Figure 1). We saw a similar phenomenon for the popular 20 Newsgroups dataset and several others. Additionally, the potential failure of low rank approximation measures was recently raised in .
We address this issue by introducing a per vector guarantee that requires each approximate singular vector to capture nearly as much variance as the corresponding true singular vector:
The error bound (3) is very strong in that it depends on , meaning that it is better then relative error, i.e. , for ’s large singular vectors. While it is reminiscent of the bounds sought in classical numerical analysis , we stress that it does not require each to converge to in the presence of small singular value gaps. In fact, we show that both randomized Block Krylov Iteration and our slightly modified Simultaneous Iteration algorithmFor guarantee (3) it is important that Algorithm 1 includes post-processing steps 4 and 5 rather than just returning a basis for , which is sufficient for the low-rank approximation guarantees. achieve (3) in gap-independent runtimes.
3 Main Result
Our contributions are summarized in Theorem 1, whose proof appears in parts as Theorems 6 and 7 in Section 5 (runtime) and Theorems 10, 11, and 12 in Section 6 (accuracy).
With high probability, Algorithms 1 and 2 find approximate singular vectors satisfying guarantees (1) and (2) for low-rank approximation and (3) for PCA. For error , Algorithm 1 requires iterations while Algorithm 2 requires iterations. Excluding lower order terms, both algorithms run in time .
We note that, while Simultaneous Iteration was known to achieve (2) , surprisingly we are first to prove that it gives (1), a qualitatively weaker goal.
In Section 7 we use our results to give an alternative analysis of both algorithms that does depend on singular value gaps and can offer significantly faster convergence when has decaying singular values. It is possible to take further advantage of this result by running Algorithms 1 and 2 with a that has columns, a simple modification for accelerating either method.
Finally, Section 8 contains a number of experiments on large data problems. We justify the importance of gap independent bounds for predicting algorithm convergence and we show that Block Krylov Iteration in fact significantly outperforms the more popular Simultaneous Iteration.
4 Comparison to Classical Bounds
Decades of work has produced a variety of gap dependent bounds for power iteration and Krylov subspace methods. We refer the reader to Saad’s standard reference . Most relevant to our work are bounds for block Krylov methods with block size equal to . Roughly speaking, with randomized initialization, these results offer guarantees equivalent to our strong equation (3) for the top singular directions after:
This bound is recovered by our Section 7 results and, when the target accuracy is smaller than the relative singular value gap , it is tighter than our gap independent results. However, as discussed in Section 8, for high dimensional data problems where is set far above machine precision, gap independent bounds more accurately predict required iteration count.
Less comparable to our results are attempts to analyze algorithms with block size smaller than . While “small block” or single vector algorithms offer runtime advantages, it is well understood that with duplicate singular values, it is impossible to recover the top singular directions with a block of size . More generally, large singular value clusters slow convergence, so any small block algorithm must have runtime dependence on the gaps between each adjacent pair of top singular values . We believe that obtaining simpler theoretical bounds for small block methods is an interesting direction for future work.
Background and Intuition
We will start by 1) providing background on algorithms for approximate singular value decomposition and 2) giving intuition for Simultaneous Power Iteration and Block Krylov methods and justifying why they can give strong gap-independent error guarantees.
Progress on algorithms for Frobenius norm error low-rank approximation (1) has been considerable. Work in this direction dates back to the strong rank-revealing QR factorizations of Gu and Eisenstat . They give deterministic algorithms that run in approximately time, vs. for a full SVD, but only guarantee polynomial factor Frobenius norm error.
The sketch-and-solve method is very efficient – the computation of is easily parallelized and, regardless, pass-efficient in a single processor setting. Furthermore, once a small compression of is obtained, it can be manipulated in fast memory to find . This is not typically true of itself, making it difficult to directly process the original matrix at all.
2 Spectral Norm Error via Simultaneous Iteration
Unfortunately, as discussed, Frobenius norm error is often insufficient when has a heavy singular value tail. Moreover, it seems an inherent limitation of sketch-and-solve methods. The noise from ’s lower singular values corrupts , making it impossible to extract a good partial SVD if the sum of these singular values (equal to ) is too large. In other words, any error inherently depends on the size of this tail.
In order to achieve spectral norm error (2), Simultaneous Iteration must reduce this noise down to the scale of . It does this by working with the powered matrix .For nonsymmetric matrices we work with (, but present the symmetric case here for simplicity. By the spectral theorem, has exactly the same singular vectors as , but its singular values are equal to the singular values of raised to the power. Powering spreads the values apart and accordingly, ’s lower singular values are relatively much smaller than its top singular values (see Figure 2(a) for an example).
Computing directly is costly, so is computed iteratively. We start with a random and repeatedly multiply by on the left. Since even a rough Frobenius norm approximation for suffices, is often chosen to have just columns. Each iteration thus takes time. After is computed, can simply be set to a basis for its column span.
To the best of our knowledge, this approach to analyzing Simultaneous Iteration without dependence on singular value gaps began with . The technique was popularized in and its analysis improved in and . gives the first bound that directly achieves (2) with power iterations. All of these papers rely on an improved understanding of the benefits of starting with a randomized , which has developed from work on the sketch-and-solve paradigm.
3 Beating Simultaneous Iteration with Krylov Methods
As mentioned, numerous papers hint at the possibility of beating Simultaneous Iteration with block Krylov methods . In particular, , and suggest and experimentally confirm the potential of a randomized variant of the Block Lanczos algorithm, which we refer to as Block Krylov Iteration (Algorithm 2). However, none of these papers give theoretical bounds on the algorithm’s performance.
The intuition behind Block Krylov Iteration matches that of many accelerated iterative methods. Simply put, there are better polynomials than for denoising tail singular values. In particular, we can use a lower degree polynomial, allowing us to compute fewer powers of and thus leading to an algorithm with fewer iterations. For example, an appropriately shifted degree Chebyshev polynomial can push the tail of nearly as close to zero as , even if the long run growth of the polynomial is much lower (see Figure 2(b)).
Block Krylov Iteration takes advantage of such polynomials by working with the Krylov subspace,
from which we can construct for any polynomial of degree .Algorithm 2 in fact only constructs odd powered terms in , which is sufficient for our choice of . Since an effective polynomial for denoising must be scaled and shifted based on the value of , we cannot easily compute it directly. Instead, we argue that the very best rank approximation to lying in the span of at least matches the approximation achieved by projecting onto the span of . Finding this best approximation will therefore give a nearly optimal low-rank approximation to .
Unfortunately, there’s a catch. Perhaps surprisingly, it is not clear how to efficiently compute the best spectral norm error low-rank approximation to lying in a specific subspace (e.g. ’s span) . This challenge precludes an analysis of Krylov methods parallel to the recent work on Simultaneous Iteration. Nevertheless, we show that computing the best Frobenius error low-rank approximation in the span of , exactly the post-processing step taken by classic Block Lanczos and our method, will give a good enough spectral norm approximation for achieving error.
4 Stronger Per Vector Error Guarantees
Achieving the per vector guarantee of (3) requires a more nuanced understanding of how Simultaneous Iteration and Block Krylov Iteration denoise the spectrum of . The analysis for spectral norm low-rank approximation relies on the fact that (or for Block Krylov Iteration) blows up any singular value to much larger than any singular value . This ensures that the outputted by both algorithms aligns very well with the singular vectors corresponding to these large singular values.
If , then aligns well with all top singular vectors of and we get good Frobenius norm error and the per vector guarantee (3). Unfortunately, when there is a small gap between and , could miss intermediate singular vectors whose values lie between and . This is the case where gap dependent guarantees of classical analysis break down.
However, or, for Block Krylov Iteration, some -degree polynomial in our Krylov subspace, also significantly separates singular values from those . Thus, each column of at least aligns with nearly as well as . So, even if we miss singular values between and , they will be replaced with approximate singular values , enough for (3).
For Frobenius norm low-rank approximation, we prove that the degree to which falls outside of the span of ’s top singular vectors depends on the number of singular values between and . These are the values that could be ‘swapped in’ for the true top singular values. Since their weight counts towards ’s tail, our total loss compared to optimal is at worst .
Preliminaries
Before proceeding to the full technical analysis, we overview required results from linear algebra, polynomial approximation, and randomized low-rank approximation.
Let be with all but its largest singular values zeroed out. Let and be and with all but their first columns zeroed out. For any , is the closest rank approximation to for any unitarily invariant norm, including the Frobenius norm and spectral norm . The squared Frobenius norm is given by . The spectral norm is given by .
We often work with the remainder matrix and label it . Its singular value decomposition is given by where , , and have their first columns zeroed.
While the SVD gives a globally optimal rank approximation for , both Simultaneous Iteration and Block Krylov Iteration return the best rank approximation falling within some fixed subspace spanned by a basis (with rank ). For the Frobenius norm, this simply requires projecting to and taking the best rank approximation of the resulting matrix using an SVD.
This low-rank approximation can be obtained using an SVD (equivalently, eigendecomposition) of the matrix . Specifically, letting , then:
If the SVD of is given by then . So , giving the lower matrix equality. Note that has orthonormal columns since .
In general, this rank approximation does not give the best spectral norm approximation to falling within . A closed form solution can be obtained using the results of , which are related to Parrott’s theorem, but we do not know how to compute this solution without essentially performing an SVD of . It is at least simple to show that the optimal spectral norm approximation for spanned by a rank basis is obtained by projecting to the basis:
2 Other Linear Algebra Tools
Throughout this paper we use to denote the column span of the matrix . We say that a matrix is an orthonormal basis for the column span of if has orthonormal columns and . That is, projecting the columns of to fully recovers those columns. is the orthogonal projection matrix onto the span of . .
If and have the same dimension and then . This matrix Pythagorean theorem follows from writing . As an example, for any orthogonal projection , , so This implies that, since minimizes over all rank matrices, maximizes over all rank orthogonal projections.
3 Randomized Low-Rank Approximation
Our proofs build on well known sketch-based algorithms for low-rank approximation with Frobenius norm error. A short proof of the following Lemma is in Appendix A:
For analyzing block methods, results like Lemma 4 can effectively serve as a replacement for earlier random initialization analysis that applies to single vector power and Krylov methods .
4 Chebyshev Polynomials
As outlined in Section 3.3, our proof also requires polynomials to more effectively denoise the tail of . As is standard for Krylov subspace methods, we use a variation on the Chebyshev polynomials. The proof of the following Lemma is relegated to Appendix A.
Given a specified value , gap , and , there exists a degree polynomial such that:
for all
for all
Furthermore, when is odd, the polynomial only contains odd powered monomials.
Implementation and Runtimes
We first briefly discuss runtime and implementation considerations for Algorithms 1 and 2, our randomized implementations of Simultaneous Power Iteration and Block Krylov Iteration.
Algorithm 1 can be modified in a number of ways. can be replaced by a random sign matrix, or any matrix achieving the guarantee of Lemma 4. may also be chosen with columns. We will discuss in detail how this approach can give improved accuracy in Section 7.
In our implementation we set . This ensures that, for all , gives the best rank Frobenius norm approximation to within the span of (See Lemma 2). This is necessary for achieving per vector guarantees for approximate PCA. However, if we are only interested in computing a near optimal low-rank approximation, we can simply set . Projecting to is equivalent to projecting to as these two matrices have the same column spans.
Additionally, since powering spreads its singular values, could be poorly conditioned. As suggested in , to improve stability we can orthonormalize after every iteration (or every few iterations). This does not change ’s column span, so it gives an equivalent algorithm in exact arithmetic, but improves conditioning significantly.
Computing requires first multiplying by , which takes time. Computing given then takes time to first multiply our matrix by and then by . Reorthogonalizing after each iteration takes time via Gram-Schmidt or Householder reflections. This gives a total runtime of for computing .
Finding takes time. Computing by multiplying from left to right requires time. ’s SVD then requires time using classical techniques. Finally, multiplying by takes time . Setting gives the claimed runtime. ∎
2 Block Krylov Iteration
As with Simultaneous Iteration, we can replace with any matrix achieving the guarantee of Lemma 4 and can use columns to improve accuracy. can also be computed in a number of ways. In the traditional Block Lanczos algorithm, one starts by computing an orthonormal basis for , the first block in the Krylov subspace. Bases for subsequent blocks are computed from previous blocks using a three term recurrence that ensures is block tridiagonal, with sized blocks . This technique can be useful if is large, since it is faster to compute the top singular vectors of a block tridiagonal matrix. However, computing using a recurrence can introduce a number of stability issues, and additional steps may be required to ensure that the matrix remains orthogonal .
An alternative is to compute explicitly and then compute using a QR decomposition. This method is used in and . It does not guarantee that is block tridiagonal, but helps avoid a number of stability issues. Furthermore, if is small, taking the SVD of will still be fast and typically dominated by the cost of computing .
As with Simultaneous Iteration, we can also orthonormalize each block of after it is computed, avoiding poorly conditioned blocks and giving an equivalent algorithm in exact arithmetic.
Computing , including block reorthogonalization, requires time. The remaining steps are analogous to those in Simultaneous Iteration except somewhat more costly as we work an dimensional rather than dimensional subspace. Finding takes time. Computing take time and its SVD then requires time. Finally, multiplying by takes time . Setting gives the claimed runtime. ∎
Error Bounds
We next prove that both Algorithms 1 and 2 return a basis that gives relative error Frobenius (1) and spectral norm (2) low-rank approximation error as well as the per vector guarantees (3).
We start with a general approximation lemma, which gives three guarantees formalizing the intuition given in Section 3. All other proofs follow nearly immediately from this lemma.
For simplicity we assume that . However, if it can be seen that both algorithms still return a basis satisfying the proven guarantees. We start with a definition:
Recall that is the best rank approximation to . This error function measures how well approximates in comparison to the optimal.
Let be the number of singular values of with . Let be the number of singular values with . With probability Algorithms 1 and 2 return satisfying:
,
,
,
Property 1 captures the intuition given in Section 3.2. Both algorithms return with equal to the best Frobenius norm low-rank approximation in . Since and our polynomials separate any values above this threshold from anything below , must align very well with ’s top singular vectors. Thus is very small for all .
Property 2 captures the intuition of Section 3.4 – outside of the largest singular values, still performs well. We may fail to distinguish between vectors with values between and . However, aligning with the smaller vectors in this range rather than the larger vectors can incur a cost of at most . Since every column of outside of the first may incur such a cost, there is a linear accumulation as characterized by Property 2.
Finally, Property 3 captures the intuition that the total error in is bounded by the number of singular values falling in the range . This is the total number of singular vectors that aren’t necessarily separated from and can thus be ‘swapped in’ for any of the true top vectors with singular value . Property 3 is critical in achieving near optimal Frobenius norm low-rank approximation.
Assume . If then Property 1 trivially holds. We will prove the statement for Algorithm 2, since this is the more complex case, and then explain how the proof extends to Algorithm 1.
By Lemma 4 we have with probability :
Furthermore, one possible rank approximation of is . By the optimality of ,
The last inequalities follow from setting and from the fact that for all and thus by property 3 of Lemma 5, . Noting that , we can plug this bound into (4) to get
Applying the Pythagorean theorem and the invariance of the Frobenius norm under rotation gives
Letting be the row of , expanding out these norms gives
Since ’s columns are orthonormal, its rows all have norms upper bounded by . So for all . So for all , (6) gives us
Recall that is the number of singular values with . By Property 2 of Lemma 5, for all we have . This gives, for all :
Converting these sums back to norms yields and therefore and
Now is a rank approximation to falling within the column span of and hence within the column span of . By Lemma 2, the best rank Frobenius approximation to within is given by . So we have
For Algorithm 1, we instead choose . For , this polynomial satisfies the necessary properties: for all , and for all , . Further, up to a rescaling, so spans the same space as . Therefore since Algorithm 1 returns with equal to the best rank Frobenius norm approximation to within the span of , for all we have:
Proof of Property 2
Property 1 and the fact that is always positive immediately gives Property 2 for . So we need to show that it holds for . Note that if , the number of singular values with is equal to , then , so and we are done. So we assume henceforth. Again, we first prove the statement for Algorithm 2 and then explain how the proof extends to the simpler case of Algorithm 1.
Intuitively, Property 1 follows from the guarantee that there is a rank subspace of that aligns with nearly as well as the space spanned by ’s top singular vectors. To prove Property 2 we must show that there is also some rank subspace in whose components all align nearly as well with as , the singular vector of . The existence of such a subspace ensures that performs well, even on singular vectors in the intermediate range .
Let = . where contains only the singular values . These are the intermediate singular values of falling in the range . Let . contains all large singular values of with and all small singular values with .
We next apply the argument used to prove Property 1 to . The singular value of is equal to . So applying (7) we have for all ,
Plugging (9) and (6.1) into (8) yields that, for any in , i.e. ,
So, we have identified a rank subspace within our Krylov subspace such that every vector in its span aligns at least as well with as .
Now, for any , consider . We know that given , we can form a rank matrix in our Krylov subspace simply by appending a column orthogonal to the columns of but falling in the span of . Since has rank , finding such a column is always possible. Since is the optimal rank Frobenius norm approximation to falling within our Krylov subspace,
Again, a nearly identical proof applies for Algorithm 1. We just choose . For this polynomial satisfies the necessary properties: for all , and for all , .
Proof of Property 3
By Properties 1 and 2 we already have, for all , . So if then we immediately have Property 3.
For , then Properties 1 and 2 already give us . So consider . Given , to form a rank matrix in our Krylov subspace we need to append orthonormal columns. We can choose columns, , from the dimensional subspace within that is entirely contained in . If necessary (i.e. ), We can then choose the remaining columns from the span of .
Similar to our argument when considering a single vector in the span of , letting , we have by (10):
By applying (6.1) directly to each column of we also have:
Assume that . Similar calculations show the same result when . We can use the above two bounds to obtain:
2 Error Bounds for Simultaneous Iteration and Block Krylov Iteration
With Lemma 9 in place, we can easily prove that Simultaneous Iteration and Block Krylov Iteration both achieve the low-rank approximation and PCA guarantees (1), (2), and (3).
With probability , Algorithms 1 and 2 return satisfying (2):
Let be the number of singular values with . If then we are done since any will satisfy . Otherwise, by Property 1 of Lemma 9,
Additive error in Frobenius norm directly translates to additive spectral norm error. Specifically, applying Theorem 3.4 of , which we also prove as Lemma 15 in Appendix A,
Finally, and so by Lemma 3 we have , which combines with (13) to give the result. ∎
With probability , Algorithms 1 and 2 return satisfying (1):
is defined as the number of singular values with . So . Plugging into (6.2) we have:
Adjusting constants on the gives us the result. ∎
With probability , Algorithms 1 and 2 return satisfying (3):
First note that . This is because by our choice of . since applying a projection to will decrease each of its singular values (which follows for example from the Courant-Fischer min-max principle). Then by Property 2 of Lemma 9 we have, for all ,
, so simply adjusting constants on gives the result. ∎
Improved Convergence With Spectral Decay
In order to avoid inverse dependence on the potentially small singular value gap , the number of Block Krylov iterations inherently depends on . This ensures that our matrix polynomial sufficiently separates small singular values from larger ones. However, when we can actually use iterations, which is sufficient for separating the top singular values significantly from the lower values. Specifically, if we set and , we know that with , (5) still holds. We can then just follow the proof of Lemma 9 and show that Property 1 holds for all (not just for as originally proven). This gives Property 2 and Property 3 trivially.
Further, for , the exact same analysis shows that suffices. When ’s spectrum decays rapidly, so for some constant and some not much larger than , we can obtain significantly faster runtimes. Our dependence becomes logarithmic, rather than polynomial:
With probability , for any , Algorithm 1 or 2 initialized with returns satisfying guarantees (1), (2), and (3) as long as we set or , respectively.
This theorem may prove especially useful in practice because, on many architectures, multiplying a large by or even vectors is not much more expensive than multiplying by vectors. Additionally, it should still be possible to perform all steps for post-processing in memory, again limiting additional runtime costs due to its larger size.
Finally, we note that while Theorem 13 is more reminiscent of classical gap-dependent bounds, it still takes substantial advantage of the fact that we’re looking for nearly optimal low-rank approximations and principal components instead of attempting to converge precisely to ’s true singular vectors. This allows the result to avoid dependence on the gap between adjacent singular values, instead varying only with , which should be much larger.
Experiments
We close with several experimental results. A variety of empirical papers, not to mention widespread adoption, already justify the use of randomized SVD algorithms. Prior work focuses in particular on benchmarking Simultaneous Iteration and, due to its improved accuracy over sketch-and-solve approaches, this algorithm is popular in practice . As such, we focus on demonstrating that for many data problems Block Krylov Iteration can offer significantly better convergence.
We implement both algorithms in MATLAB using Gaussian random starting matrices with exactly columns. We explicitly compute for both algorithms, as described in Section 5, and use reorthonormalization at each iteration to improve stability . We test the algorithms with varying iteration count on three common datasets, SNAP/amazon0302 , SNAP/email-Enron , and 20 Newsgroups , computing column principal components in all cases. We plot error vs. iteration count for metrics (1), (2), and (3) in Figure 3. For per vector error (3), we plot the maximum deviation amongst all top approximate principal components (relative to ).
Unsurprisingly, both algorithms obtain very accurate Frobenius norm error, , with very few iterations. This is our intuitively weakest guarantee and, in the presence of a heavy singular value tail, both iterative algorithms will outperform the worst case analysis.
On the other hand, for spectral norm low-rank approximation and per vector error, we confirm that Block Krylov Iteration converges much more rapidly than Simultaneous Iteration, as predicted by our theoretical analysis. It it often possible to achieve nearly optimal error with iterations where as getting to within say error with Simultaneous Iteration can take much longer.
The final plot in Figure 3 shows error verses runtime for the dimensional 20 Newsgroups dataset. We averaged over 7 trials and ran the experiments on a commodity laptop with 16GB of memory. As predicted, because its additional memory overhead and post-processing costs are small compared to the cost of the large matrix multiplication required for each iteration, Block Krylov Iteration outperforms Simultaneous Iteration for small .
More generally, these results justify the importance of convergence bounds that are independent of singular value gaps. Our analysis in Section 7 predicts that, once is small in comparison to the gap , we should see much more rapid convergence since will depend on instead of . However, for Simultaneous Iteration, we do not see this behavior with SNAP/amazon0302 and it only just begins to emerge for 20 Newsgroups.
While all three datasets have rapid singular value decay, a careful look confirms that their singular value gaps are actually quite small! For example, is .004 for SNAP/amazon0302 and .011 for 20 Newsgroups, in comparison to .042 for SNAP/email-Enron. Accordingly, the frequent claim that singular value gaps can be taken as constant is insufficient, even for small .
We thank David Woodruff, Aaron Sidford, Richard Peng and Jon Kelner for several valuable conversations. Additionally, Michael Cohen was very helpful in discussing many details of this project, including the ultimate form of Lemma 9. This work was partially supported by NSF Graduate Research Fellowship Grant No. 1122374, AFOSR grant FA9550-13-1-0042, DARPA grant FA8650-11-C-7192, and the NSF Center for Science of Information.
References
Appendix A Appendix
We first give a deterministic Lemma, from which the main approximation result follows.
We follow . Apply Lemma 14 with . With probability , has full rank. So, to show the result we need to show that for some fixed . For any two matrices and , . This property is known as spectral submultiplicativity. Noting that and applying submultiplicativity,
By the rotational invariance of the Gaussian distribution, since the rows of are orthonormal, the entries of and are independent Gaussians. By standard Gaussian matrix concentration results (Fact 6 of , also in ), with probability at least , and for some fixed constants . So,
for some fixed , yielding the result. Note that we choose probability for simplicity – we can obtain a result with higher probability by simply allowing for a higher constant , which in our applications of Lemma 4 will only factor into logarithmic terms. ∎
Chebyshev Polynomials
Given a specified value , gap , and , there exists a degree polynomial such that:
for all
for all
Furthermore, when is odd, the polynomial only contains odd powered monomials.
The required polynomial can be constructed using a standard Chebyshev polynomial of degree , , which is defined by the three term recurrence:
Each Chebyshev polynomial satisfies the well known property that for all and, for , we can write the polynomials in closed form :
which is clearly of degree and well defined since, referring to (15), for all . Now,
so satisfies property 1. With property 1 in place, to prove that satisfies property 2, it suffices to show that for all . By chain rule,
Thus, it suffices to prove that, for all ,
We do this by showing that and then claim that for all , so (17) holds for as well. A standard form for the derivative of the Chebyshev polynomial is
(18) can be verified via induction once noting that the Chebyshev recurrence gives . Since when , we can conclude that . So proving (17) for reduces to proving that
Noting that, for , and , it follows from (15) that
So, to prove (19), it suffices to show that , which is true whenever . So (17) holds for all .
Finally, referring to (18), we know that must be some positive combination of lower degree Chebyshev polynomials. Again, since when , we conclude that for all . It follows that does not decrease above , so (17) also holds for all and we have proved property 2.
To prove property 3, we first note that, by the well known property that for , for . So, to prove , we just need to show that
Equation (15) gives . When , . Thus, . Dividing by 2 gives , which gives (20) and thus property 3.
Finally, we remark that it is well known that odd degree Chebyshev polynomials of the first kind only contain monomials of odd degree (and this is easy to verify inductively). Accordingly, since is simply a scaling of , if we choose to be odd, only contains odd degree terms. ∎
Additive Frobenius Norm Error Implies Additive Spectral Norm Error
Note that if , we can just work with and . Now, since is rank . Using the resulting inequality and recalling that , we see that:
is equal to the squared top singular value of (i.e. , so the lemma follows. ∎