Revisiting the Nystrom method for improved large-scale machine learning

Alex Gittens, Michael W. Mahoney

Introduction

This paper breathes new life into the Nyström method, a classic technique for approximating massive matrices. By combining "fast" random projections with data-dependent sampling (leverage scores), the authors provide new theoretical bounds that are significantly tighter than previous ones. Crucially, they demonstrate that these sophisticated, highly accurate methods are now just as fast to compute as simple uniform sampling.

The Challenge: Scaling SPSD Matrices

In large-scale machine learning, practitioners frequently rely on Symmetric Positive Semi-Definite (SPSD) matrices, such as kernel matrices in Support Vector Machines (SVMs) or Laplacian matrices in graph analysis. As datasets grow to millions of points, these $n \times n$ matrices become too large to store in memory or decompose, given the $O(n^3)$ complexity of standard operations.

The Nyström method addresses this bottleneck by using a small subset of columns to "sketch" and approximate the full matrix. However, two major points of contention have historically plagued its use:

  1. Theory vs. Practice: Existing theoretical "worst-case" bounds were often too loose to be useful for practitioners, creating a disconnect between theoretical guarantees and empirical success.
  2. Uniform vs. Non-uniform Sampling: Many researchers argued that simple uniform sampling of columns was "good enough." Others advocated for "leverage score" sampling—a data-dependent way to pick the most informative columns—but critics claimed it was too computationally expensive to be practical.

Methodology: A Unified Sketching Model

The authors evaluate a unified SPSD Sketching Model. Given a matrix $A$, they choose a "sketching matrix" $S$ to create a low-rank approximation $CW^\dagger C^T$ (where $C=AS$ and $W=S^T AS$). They test four primary types of sketching:

  • Uniform Sampling: Picking columns at random.
  • Leverage Score Sampling: Picking columns based on their statistical "importance" or leverage.
  • Gaussian Projections: Mixing all columns using random Gaussian weights.
  • SRFT (Subsampled Randomized Fourier Transform): A "fast" random projection that uses the Fast Fourier Transform (FFT) to speed up the mixing process.

The "Secret Sauce": The authors introduce deterministic structural results. Instead of jumping straight to probabilistic bounds, they first prove how any sketching matrix performs based on how it interacts with the input matrix's top eigenspace. They then apply this framework to specific randomized methods to derive much tighter bounds.

To ensure their findings generalize, the authors tested these methods across a diverse suite of 16 datasets, including Laplacian kernels from sparse graphs (HEP, Enron, Gnutella), linear kernels from standard ML benchmarks (Dexter, Protein, Gisette), and Dense/Sparse RBF Kernels (Abalone, Wine) with varying bandwidth parameters ($\sigma$).

Key Findings

Theoretical Superiority

The new bounds for spectral and Frobenius norm errors are qualitatively better than landmark prior results (e.g., Drineas & Mahoney, 2005). Where previous bounds featured additive error terms involving the total sum of squares of the matrix, the new bounds scale much more gracefully with the "optimal" low-rank error. Furthermore, they provide the first relative-error bounds for the trace norm (nuclear norm), which is critical for many optimization problems in machine learning.

Comparison of theoretical bounds for Nyström approximation errors.

The Coherence Gap and Empirical Performance

Uniform sampling works well when a matrix has "low coherence" (information is spread evenly). However, real-world data—especially sparse graphs and RBF kernels with small $\sigma$—often exhibit "high coherence." In these scenarios, uniform sampling misses the critical "needle in the haystack" columns, whereas leverage score sampling successfully identifies them.

Empirically, on "difficult" datasets (like the Enron graph or Abalone with small $\sigma$), leverage-based sampling and SRFT projections consistently outperformed uniform sampling by a wide margin in terms of accuracy for the same number of samples.

Relative Frobenius and trace errors across various datasets and sketching methods.

Speed Parity and Implicit Regularization

Thanks to "fast" approximation algorithms, computing leverage scores is no longer a computational bottleneck. The authors show that high-quality sampling and random projections now have comparable running times to the simplest methods. While uniform sampling remains the absolute fastest to compute, methods like approximate leverage scores (via an iterative "power" method) provide a vastly superior time-to-error trade-off.

Interestingly, using approximate leverage scores sometimes yielded better reconstruction than exact leverage scores. This suggests that the approximation process acts as a form of implicit regularization, preventing the model from overfitting to specific rows in ill-conditioned matrices.

Limitations and Future Work

  • Parameter Sensitivity: The performance of RBF kernels is highly sensitive to the $\sigma$ parameter. While leverage scores help when $\sigma$ is small, choosing the optimal $\sigma$ for a specific downstream ML task remains a separate challenge.
  • Extension to Other Sketches: The deterministic framework introduced here is highly adaptable. Future work could apply it to newer sketching techniques, such as Count-Min sketches or Tensor sketches, further expanding the toolkit for large-scale machine learning.

Summary updated

BibTeX
@inproceedings{gittens2013revisiting,
  author = {Alex Gittens and Michael W. Mahoney},
  title = {{Revisiting the Nystrom method for improved large-scale machine learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2013},
}
Figure