Oja's Algorithm for Streaming Sparse PCA

Oja's algorithm for Streaming Principal Component Analysis (PCA) for $n$ data-points in a $d$ dimensional space achieves the same sin-squared error $O(r_{\mathsf{eff}}/n)$ as the offline algorithm in $O(d)$ space and $O(nd)$ time and a single pass through the datapoints. Here $r_{\mathsf{eff}}$ is the effective rank (ratio of the trace and the principal eigenvalue of the population covariance matrix $\Sigma$). Under this computational budget, we consider the problem of sparse PCA, where the principal eigenvector of $\Sigma$ is $s$-sparse, and $r_{\mathsf{eff}}$ can be large. In this setting, to our knowledge, \textit{there are no known single-pass algorithms} that achieve the minimax error bound in $O(d)$ space and $O(nd)$ time without either requiring strong initialization conditions or assuming further structure (e.g., spiked) of the covariance matrix. We show that a simple single-pass procedure that thresholds the output of Oja's algorithm (the Oja vector) can achieve the minimax error bound under some regularity conditions in $O(d)$ space and $O(nd)$ time. We present a nontrivial and novel analysis of the entries of the unnormalized Oja vector, which involves the projection of a product of independent random matrices on a random initial vector. This is completely different from previous analyses of Oja's algorithm and matrix products, which have been done when the $r_{\mathsf{eff}}$ is bounded.

Paper

References (64)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer qSPb5/10 · confidence 2/52024-07-07

Summary

This paper studies the problem of finding the top eigenvector from samples. Given $n$ samples drawn from a distribution whose mean is $0$ and covariance matrix is $\Sigma\in\mathbb{R}^{d\times d}$, we would like to find a vector $\hat{v}$ based on these $n$ samples such that $\hat{v}$ and the top eigenvector of $\Sigma$, $v$, have a small $\sin^2$ error which is defined as $1-\langle\hat{v},v\rangle^2$. Furthermore, we assume that the sparsity of $v$ is $s$ and hence we expect the output $\hat{v}$ also has sparsity $s$. The goal in this paper is to design a single pass algorithm using $O(nd)$ time and $O(d)$ space such that the error is minimized. Oja's algorithm is a well known algorithm for finding the top eigenvector and works as follows. In the $t$-step, we iteratively update our current solution towards the $t$-th sample. The authors applied Oja's algorithm to achieve the goal and showed that the error is at most $O(\frac{\sigma_*^2 s\log d}{n})$ where $\sigma_*^2$ depends on the top two eigenvalues.

Strengths

- The problem seems to be a natural question and well-motivated. - The general presentation is good. The readers of all levels of expertise should be able to follow the main idea in this paper.

Weaknesses

- In terms of techniques, the main idea is to apply the known Oja' algorithm. I am not sure if there are any fundamental new ideas introduced in this paper.

Questions

Note: - Line 31: $r_{\textsf{eff}}$ is not defined yet in the main text.

Rating

5

Confidence

2

Soundness

3

Presentation

3

Contribution

3

Limitations

.

Authorsrebuttal2024-08-10

Dear Reviewer qSPb, Thank you for your response. As per your suggestion, we will define $r_\mathsf{eff}$ in an equation after the abstract to make it easy to spot. We would also like to take this opportunity to reiterate that the proof techniques in our paper are completely different from those in the previous papers on streaming PCA and matrix products which were done under bounded $r_\mathsf{eff}$. We hope that our response has conveyed the novelty of our work. If you have any further questions that we can answer, please let us know.

Reviewer jbhG7/10 · confidence 4/52024-07-12

Summary

The work proposes a one pass Ojas' algorithm which can achieve minimax error bound for high dimensional sparse PCA under standard technical conditions.

Strengths

The paper is extremely well written. The proposed one-pass Oja's algorithm is novel with detailed convergence analysis and convincing numerical experiments to support author's claims. I appreciate the thorough literature review highlighting how the current paper improves on over the previous works (in particular Table 1). The relaxation on effective rank assumption is particularly notable in the results. The mathematical ideas in the proofs are easy to follow and contain several new techniques.

Weaknesses

In general, I like the paper as it is quite clear and mathematically sound. In some minor places, the exposition can be slightly improved by defining terminologies before using them (for instance please define $\sin^2$ error before referring).

Questions

Q: Can something be said along the lines of these results for other top eigenvectors of $\Sigma$ (not just $v_1$)?

Rating

7

Confidence

4

Soundness

4

Presentation

4

Contribution

4

Limitations

NA

Reviewer zu7o7/10 · confidence 4/52024-07-15

Summary

The paper studies the problem of streaming sparse PCA under iid data. That is, we have $x_1,...,x_n \sim \mathcal D$ iid vectors in $\mathbb R^d$ which are revealed to us in an online fashion. We want to estimate the top eigenvector of $\Sigma = \mathbb E[xx^\intercal]$. We assume that this top eigenvector $v_1$ is $s$-sparse, for $s = O(\frac{n}{\log(n)})$. The error between the real and estimated top eigenvector is computed using the $\sin^2$ error metric $(1-\langle v_1, \tilde v_1\rangle^2)$. This paper shows that Oja's algorithm can be used to both find the support of $v_1$ and the values in $v_1$ (assuming we are given some value $k \geq s$ and correctly choose a step size parameter). This algorithm runs in $O(nd)$ time and $O(d)$ space. The key technical assumptions made are: - The data is iid subgaussian - The sparsity of $v_1$ is $s = O(\frac{n}{\log (n)})$ - The effective dimension (ratio of trace to spectral norm) of the covariance matrix is at most $O(\frac{n}{\log(n) \sigma^2})$ where $\sigma^2 = \frac{\lambda_1}{\lambda_1 - \lambda_2} \cdot \frac{\lambda_2}{\lambda_1 - \lambda_2}$ measures the (square) of the singular value gap between the top two eigvals of $\Sigma$. - The smallest nonzero entries of the (unit vector) top eigevnector $v_1$ is $\tilde\Omega(\frac{d^{1/8}}{n^{1/4}})$. In contrast to prior works, this work achieves better $\sin^2$ error that prior $O(nd)$ time algorithms and $O(d)$ space algorithms. It also makes no assumption about the quality of the starting vector (i.e. it's not a local convergence result, it's a global convergence result). The results are essentially all theoretical, with one experiments used to show that Oja works well here, and another used to elucidate which theoretical bounds are loose.

Strengths

The paper is a nice contribution to the literature, and it's well written. Sparse PCA is an important problem, and handling it in low space and time is important as well. The error metrics and assumptions are all reasonable. The paper is written clearly. It's just sorta all around solid. The result is original in that it has a clear goal: achieve the $\sin^2$ error of large-space or large-time algorithms (those that use $\omega(nd)$ time or $\omega(d)$ space), but only using $O(nd)$ time and $O(d)$ space. It's especially nice that a pretty naive application of Oja's algorithm can achieve this. There's also some nice novelty in the proof technique, which bounds the 2nd and 4th moments of the entries of the output of Oja's algorithm. In particular, the authors tighten a bound from the prior work by designing and solving a system of linear recurrences. A cool math setup that I do not often see. I'm not an expert in the sparse pca world, not the streaming pca world, and certainly not streaming sparse pca. That said, assuming the authors are not omitting any relevant prior works, this results on low error in very low space and time seems pretty cool. It seems like a particularly nice step in the sparse PCA literature.

Weaknesses

There's a few notation inconsistency issues, some minor gripes. Nothing I'm really worried about. I'll push it all to the "questions" section below. I accept this paper for publication.

Questions

None of these are game-breaking, and many of these are minor typos. Feel free to ignore whatever feels unfair to you. But, do at least make the notation for the initial vector consistent and make the figures easy to read. 1. Annoyingly, the authors __very often__ swap the symbols $y_0$, $u_0$, $w_0$, and $z_0$. Please fix this. 1. Figure 1 is too hard to read. The letters are too small. The axes have no labels. The error is negative somehow (if it's plotting $\pm1$ standard deviation, which is making the error bars negative, consider using 25th and 75th quantiles instead?). 1. It's not clear if Lemma 3.1 and Theorem 3.2 allow us to use over/underestimates of $\eta$, or if the theorems are very tied to that exact value of $eta$. Seems worth discussing. 1. It's not clear why Theorem 3.2 requires $k=s$ instead of $k\geq s$. Discussing this would be nice. Returning a vector whose support is $\log(1/\delta)$ times larger than $s$ seems fine to me, if that's the issue here. 1. Prop 3.4 is written a bit unclearly, namely around the "with sparsity parameter, $n=$" part, since $n$ is not a sparsity parameter. 1. Theorems 3.5 and 3.7 uses failure probability $d^{-10}$, which is fine I guess? But why not just use a $\delta$? 1. Remark 3.6 seems like it might make more sense to have back around assumption 2 1. Section 3.4 strikes me as a very standard analysis style. Not sure why you point to [KLL+23] specifically. You can say it's standard, and point to [KLL+23] as an example of this, maybe? If I'm missing something and it's not standard, lemme know. 1. Figure 2 is also too hard to read, especially in print. The letters are too small. The series look too much like each-other. The y-axis should be more specific in the error. It's not really clear what the dotted / population lines are showing -- is it $\log(E[e_i^\intercal B_n u_0])$, or is it $E[\log(e_i^\intercal B_n u_0)]$? Is it something else? What exactly does "error" mean here? 1. Line 221 can use $E[r_i | u_0]$ imo 1. Idk why equation (4) uses absolute values and $\pm$ on the non-top-eigenvalue terms. Isn't $E[B_n]$ PSD, and thus the second term guaranteed to be nonnegative? 1. Line 221 maybe mention that $E[B_n] = (1+\eta \Sigma)^t^? 1. Line 232 this line about [SSM11] taking $\lambda_1 = d^\alpha \rightarrow \infty$ is kinda confusing because it's not a scale-invariant claim. Is it like a condition number that's getting large? 1. Line 238 should mention that Section 4 explains the technique a bit more in detail 1. Line 247 should really point to Section 4 as well, explaining the technique in a bit more detail 1. [Line 256] If you have space, it'd be nice to understand why Theorem 3.5 needs a more general argument that $U = e_i$.

Rating

7

Confidence

4

Soundness

4

Presentation

4

Contribution

3

Limitations

N/A

Reviewer pD6C7/10 · confidence 2/52024-07-18

Summary

The paper studies Principal Component Analysis with O(d) space and O(nd) time, where n is the number of datapoints and d is their dimensionality. The authors provide the first single-pass algorithm that under a general \Sigma matrix whose top principal vector is s-sparse, manages to find a close enough vector in the sense of the sinus-squared error. Their main theorem is Th. 1.1. which states that under a structural assumption on the effective rank (ratio of the trace and the principal eigenvalue of the population covariance matrix Σ) not being too large (the function involves the spectral gap and the top eigenvalue). Their algorithm relies on Oja's algorithm and the authors show that w.h.p. the Oja vector when initialized by a random unit vector, will actually converge to an output whose top k entries in terms of magnitude will include the true support of the s-sparse v_0. Then, the authors can ue the recovered support and achieve minimiza optimal sparse PCA, thus improving upon several prior works.

Strengths

+very interesting and well-motivated problem +clean framework and clean algorithm +novel analysis and simple algorithm that improves upon several prior works

Weaknesses

-no serious weaknesses

Questions

Some typos: -matrix multiplication constant is not 2.732 as written.

Rating

7

Confidence

2

Soundness

3

Presentation

3

Contribution

3

Limitations

-

Area Chair tfpc2024-08-07

rebuttal

Dear authors (and reviewers), Many of the reviewers were positive, but reviewer qSPb thought there were not enough new ideas. At the end of the day, we don't just average reviewer scores, so this paper is not a guaranteed "accept". Authors, I'd suggest you write a rebuttal to reviewer qSPb. For all the reviewers, please take a look at each others' reviews and see if that changes your mind. As a reminder, the OpenReview framework allows us to have a dialogue, rather than requiring infrequent formal comments. So let's please use it! Just make sure to select the correct visibility for comments (either just reviewers, or reviewers and authors) as appropriate. Best regards, Area Chair

Reviewer jbhG2024-08-09

I thank the authors for their insightful explanations.

Reviewer qSPb2024-08-10

Thanks for the detailed response. I will take this into consideration during the AC-reviewer discussion. Definition of $r_{\text{eff}}$: It may be helpful to formally define it after the abstract.

Reviewer pD6C2024-08-11

post-rebuttal

The reviewer has read the author's response and keeps the score unchanged.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC