Making Large-Scale Nyström Approximation Possible

Mu Li, James T. Kwok, Bao-Liang Lu

TL;DR

This paper introduces a scalable hybrid algorithm that makes kernel-based machine learning possible on datasets with millions of entries. By combining the Nyström method with randomized SVD, the authors break the computational bottleneck that previously forced researchers to choose between accuracy and speed, enabling tasks like spectral embedding of 3.3 million images in under an hour on a standard PC.

The Bottleneck in Kernel Methods

Many powerful machine learning techniques—like Spectral Clustering, Manifold Learning, and Kernel PCA—rely on the eigenvalue decomposition of a kernel matrix. If you have $n$ data points, this matrix is $n \times n$. Standard algorithms take $O(n^3)$ time to solve, which is feasible for 1,000 points but impossible for 1,000,000.

The Nyström method is the go-to solution for this. It works by sampling a small subset of $m$ columns from the matrix to approximate the whole thing. However, there’s a catch: to get an accurate approximation on a massive dataset, you need to sample a relatively large number of columns ($m$). As $m$ grows, the internal step of performing a Singular Value Decomposition (SVD) on the $m \times m$ submatrix becomes the new bottleneck, scaling at $O(m^3)$.

Previous attempts to fix this, like "Ensemble Nyström," used multiple small samples. Unfortunately, these methods struggle to produce accurate eigenvectors and rely on crude mathematical approximations that hurt performance.

A Hybrid Approach: Nyström Meets Randomized SVD

The authors propose a simple but brilliant "best of both worlds" approach:

  1. Large-Scale Sampling: First, they sample a large number of columns ($m$) to ensure high accuracy, just like the standard Nyström method.
  2. Randomized Inner SVD: Instead of performing a traditional, expensive SVD on the resulting $m \times m$ inner matrix ($W$), they use a Randomized SVD algorithm.
  3. This involves multiplying $W$ by a random Gaussian matrix to find a low-dimensional subspace that captures the "action" of the matrix.
  4. They then perform the SVD on this much smaller, restricted subspace.
  5. Complexity Shift: This move changes the computational complexity of the inner step from $O(m^3)$ to $O(m^2k)$, where $k$ is the desired rank. Since $k$ is usually much smaller than $m$, this provides a massive speedup without a significant loss in precision.

Datasets Evaluated

The researchers evaluated their method on several well-known benchmarks from the LIBSVM archive:

  • Satimage: 4,435 samples (36 dimensions)
  • RCV1: 23,149 samples (47,236 dimensions)
  • MNIST: 60,000 samples (784 dimensions)
  • Covtype: 581,012 samples (54 dimensions)
  • MNIST-8M: A massive dataset of 3.27 million samples used for the spectral embedding "stress test."

Key Insights

  • The "Aha" Moment: The authors realized that the error introduced by using a randomized SVD for the inner submatrix is actually smaller than the error already inherent in the Nyström sampling process itself. Therefore, you get the speed of randomization "for free" in terms of total approximation error.
  • Fixing the Ensemble Flaw: They pointed out that Ensemble Nyström is essentially a "block-diagonal" approximation of the matrix inverse. In the real world, matrices are rarely block-diagonal, which explains why the ensemble method often underperforms.
  • Eigenvector Accessibility: Unlike ensemble methods, this hybrid approach produces a single set of approximate eigenvectors, making it directly compatible with spectral clustering and manifold learning.

Key Results

Relative error and CPU time across multiple datasets
  • Accuracy vs. Speed: As shown in the performance graphs above, the proposed method ("our") achieved the same level of accuracy (low relative error) as the standard Nyström method ("nys") but was significantly faster. Compared to the Ensemble Nyström ("ens"), it was both vastly more accurate and computationally efficient.
  • Scalability: The experiments showed that while standard Nyström's time cost explodes cubically as you add more samples for accuracy, the proposed method scales much more gracefully, making "large $m$" approximations feasible for the first time.
  • Efficiency at Scale: On the MNIST-8M dataset (3.3 million examples), the algorithm performed spectral embedding in less than one hour on a basic PC with only 4GB of RAM.

Limitations and Future Work

  • Sampling Strategy: The paper focuses primarily on uniform sampling (picking columns at random). The authors acknowledge that more sophisticated, non-uniform sampling schemes exist and suggest that extending their hybrid approach to these schemes is a promising direction for future research.
  • Memory Constraints: While the algorithm is fast, it still requires storing the $m$ sampled columns. For truly astronomical datasets, memory might become the next bottleneck after processing power.
  • Parameter Tuning: The randomized SVD step introduces a few extra parameters (like the over-sampling parameter $p$ and power iteration $q$), though the authors found that standard defaults (like $q=2$) work well across most cases.

Summary updated

BibTeX
@inproceedings{li2010making,
  author = {Mu Li and James T. Kwok and Bao-Liang Lu},
  title = {{Making Large-Scale Nyström Approximation Possible}},
  booktitle = {International Conference on Machine Learning},
  year = {2010},
}
Figure