Bootstrapping the Error of Oja's Algorithm

Robert Lunde, Purnamrita Sarkar, Rachel WardNeurIPS 2021

Introduction

Principal Component Analysis (PCA) is a foundational technique for dimensionality reduction. However, in the era of massive datasets, traditional batch PCA—which requires loading the entire dataset into memory—is often computationally infeasible. Oja’s algorithm has emerged as the gold standard for "streaming" PCA, updating its estimate of the leading eigenvector sequentially as new data points arrive.

While it is well-established that Oja’s algorithm converges to the true eigenvector at an optimal $O(1/n)$ rate, quantifying the uncertainty of this estimate has remained an open challenge. If a streaming algorithm outputs a vector, how can practitioners determine its confidence interval on the fly? This paper addresses this critical gap by providing the first distributional characterization of the error in Oja’s algorithm, introducing a mathematical framework to estimate the distribution of the $\sin^2$ error in real-time.

Theoretical Framework: Central Limit Theorem for Matrix Products

The authors' primary theoretical contribution is establishing a Central Limit Theorem (CLT) for the estimation error. Oja’s update rule can be mathematically framed as a product of random matrices. Because matrices do not commute, analyzing this product is notoriously difficult.

To overcome this, the authors utilize a Hoeffding decomposition—a technique from the U-statistics literature used to break down complex functions of random variables into simpler, orthogonal components. By demonstrating that the "first-order" terms dominate the error, they prove that the normalized $\sin^2$ error between the estimated and true leading eigenvector converges to a weighted $\chi^2$ distribution (a quadratic form of Gaussians). Crucially, this high-dimensional robustness holds even when the number of features ($d$) grows at a sub-exponential rate relative to the number of samples ($n$), making the theory applicable to modern, high-dimensional data such as images or genomics.

The Online Multiplier Bootstrap

While the CLT provides a theoretical error distribution, this distribution depends on unknown population parameters, such as the gap between eigenvalues. To make uncertainty quantification practical, the authors propose an efficient "online multiplier bootstrap."

Instead of storing the full covariance matrix or re-running the algorithm on resampled data—which would defeat the purpose of a streaming setup—the method maintains $m$ "perturbed" versions of the eigenvector estimate simultaneously. Each version is updated using a random Gaussian noise multiplier. This approach allows researchers to approximate the error distribution dynamically, increasing computation and storage by only a factor of $m$. For a typical $m=500$, this remains vastly more efficient than traditional batch methods. The authors rigorously prove that this online bootstrap distribution is consistent, remaining "close" to the true sampling distribution with high probability.

Experimental Validation

Although the paper is fundamentally theoretical, the authors validate their framework using synthetic datasets. They generated data from a multivariate distribution with a specific positive semi-definite (PSD) covariance structure featuring exponential decay.

By testing different rates of variance decay ($\beta = 0.2$ and $\beta = 1.0$), they evaluated the algorithm's performance across scenarios where principal components are more or less distinct. In experiments scaling up to $n = 10,000$ samples and $d = 500$ dimensions, the Bootstrapped Cumulative Distribution Function (CDF) closely tracked the True Sampling CDF. As the sample size $n$ increased, the approximation improved significantly, even in challenging cases with slow variance decay.

Limitations and Future Directions

The paper lays a strong foundation for uncertainty quantification in streaming PCA, but several avenues for future work remain:

  • Principal Subspaces: The current analysis is restricted to the single leading eigenvector. Extending this framework to the top $k$ eigenvectors (the principal subspace) will require novel mathematical tools.
  • Non-IID Data: The theoretical proofs rely on the assumption that data points are independent and identically distributed (IID). Adapting these results for auto-correlated data—common in finance or sensor networks—is a vital next step.
  • Adaptive Learning Rates: The analysis assumes a fixed learning rate ($\eta$). Since adaptive learning rates are frequently used in practice to accelerate convergence, analyzing the distributional properties of an adaptive Oja's algorithm remains an open research question.

Summary updated

BibTeX
@inproceedings{lunde2021bootstrapping,
  author = {Robert Lunde and Purnamrita Sarkar and Rachel Ward},
  title = {{Bootstrapping the Error of Oja's Algorithm}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=GPwmbxtG9Ow},
}
Figure