Gain with no Pain: Efficient Kernel-PCA by Nyström Sampling

Nicholas Sterge, Bharath Sriperumbudur, Lorenzo Rosasco, Alessandro RudiarXiv 2019

TL;DR

This paper proves that you can perform Kernel Principal Component Analysis (KPCA) on massive datasets significantly faster without losing any statistical accuracy. By using Nyström sampling to create a low-rank approximation of the kernel matrix, the authors demonstrate that a small subset of data points is sufficient to match the performance of the full, computationally expensive algorithm.

What Problem Does This Paper Address?

Principal Component Analysis (PCA) is a staple for dimensionality reduction, and its nonlinear cousin, Kernel PCA (KPCA), allows us to find complex patterns in data by mapping it into a high-dimensional feature space. However, KPCA has a massive "scalability wall."

Standard KPCA requires computing and decomposing an $n \times n$ Gram matrix (where $n$ is the number of samples). This results in a computational complexity of $O(n^3)$ time and $O(n^2)$ space. For modern datasets with millions of points, this is simply impossible. While approximation methods like Nyström sampling have been used to speed up supervised learning (like Ridge Regression), there hasn't been a rigorous theoretical guarantee that these approximations work just as well for the unsupervised task of PCA—until now.

Methods

The authors propose NY-KPCA, which applies the Nyström method to approximate the empirical covariance operator. Instead of using all $n$ points to define the feature space, they select a subset of $m$ points ($m \ll n$).

The paper explores two primary sampling strategies:

  1. Plain Nyström Subsampling: Points are selected uniformly at random without replacement.
  2. Approximate Leverage Score (ALS) Subsampling: Points are selected based on "leverage scores," which identify the most influential or unique data points in the set. This is more computationally intensive to set up but theoretically allows for an even smaller subset $m$.

By solving the problem in a lower-dimensional subspace, the complexity drops to $O(nm^2 + m^3)$ time and $O(m^2)$ space.

Datasets

The authors validated their theoretical findings using the MNIST handwritten digit dataset. Specifically, they focused on:

  • Digit 2: $n = 5958$ samples.
  • Digit 5: $n = 5421$ samples.
  • Each sample is a vector in $\mathbb{R}^{784}$.

They used a standard Gaussian kernel for the experiments, comparing the full Empirical KPCA (EKPCA) against NY-KPCA with varying subset sizes ($m = 100, 500, 1000$).

Key Insights and Ideas

  • "Gain with no Pain": The central insight is that there is a regime where you get a computational speedup for free. As long as the number of Nyström samples $m$ is large enough relative to the statistical "noise" in the data, the approximation error is smaller than the inherent statistical error of using a finite sample size $n$.
  • Implicit Regularization: The authors suggest that the approximation itself acts as a form of regularization. By limiting the complexity of the model (via $m$), you don't just save time; you might actually avoid overfitting to the specific $n$ samples.
  • Eigenvalue Decay Matters: The effectiveness of the approximation depends on how fast the eigenvalues of the covariance operator decay. If they decay quickly (e.g., exponentially), you need very few samples ($m \approx (\log n)^2$) to achieve full accuracy.
  • Leverage Scores vs. Uniform: While uniform sampling is easier to implement, leverage score sampling is theoretically superior for complex datasets, requiring fewer points to represent the same amount of variance.

Key Results

  • Statistical Equivalence: Theoretical bounds (Theorem 4.1) show that NY-KPCA achieves the same reconstruction error as full KPCA, provided $m$ is chosen correctly.
  • Massive Speedups: In the MNIST experiments, full EKPCA took 337–478 seconds. In contrast, NY-KPCA with $m=100$ took only 3–4 seconds while producing nearly identical reconstruction error curves.
  • Empirical Validation: The plots in the paper show that the error bars for NY-KPCA (based on 100 repetitions) consistently overlap with the EKPCA error curve, confirming that the approximation is stable and accurate.

Limitations and Future Work

  • Metric Choice: The authors note that their analysis uses the RKHS (Reproducing Kernel Hilbert Space) norm for reconstruction error. While mathematically rigorous, some other works use weaker norms (like $L^2$) which might be easier to satisfy but harder to compare directly to classical PCA.
  • Iterative Solvers: The current work focuses on direct decomposition. The authors suggest that combining Nyström sampling with iterative eigensolvers (like the power method or Oja’s rule) could lead to even greater efficiencies.
  • Broader Spectral Methods: The paper opens the door to applying similar "no pain" proofs to other spectral algorithms, such as those used in manifold learning or graph-based clustering.

Overall, the paper provides the necessary mathematical "permission" for researchers to use Nyström-approximated KPCA on large datasets without worrying about losing the statistical integrity of their results.

Summary updated

BibTeX
@misc{sterge2019gain,
  author = {Nicholas Sterge and Bharath Sriperumbudur and Lorenzo Rosasco and Alessandro Rudi},
  title = {{Gain with no Pain: Efficient Kernel-PCA by Nyström Sampling}},
  year = {2019},
  eprint = {1907.05226},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.05226},
}
Figure