How does the Nystroem method approximate a full kernel matrix?

Quick Overview

Asks how the Nystroem method builds a low-rank approximation of a kernel matrix from a sample of landmark points. Tests the matrix construction, the explicit feature map it gives a linear model, when the approximation is accurate, its cost, and how it compares with random Fourier features.

How does the Nystroem method approximate a full kernel matrix?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

Kernel methods such as SVMs need the full $n \times n$ kernel matrix, which becomes too large to store or factor once $n$ reaches the hundreds of thousands. How does the `Nystroem` method approximate a full kernel matrix? ```hint Which blocks can you afford Suppose you evaluate the kernel only between every point and a small subset of points. Think about which blocks of the full matrix that gives you and how you could fill in the rest. ``` ```hint From a matrix to features Once you have an approximation of $K$, ask what explicit feature vector $\phi(x)$ would make $\phi(x)^\top \phi(y)$ equal to its entries. ``` ```hint Count every step When you estimate the cost, include turning the point-to-subset kernel values into features for all $n$ points, as well as building and inverting the small matrix. ``` ### What a Strong Answer Covers - How the landmark points are chosen and which kernel blocks are computed. - The low-rank approximation formula and the explicit feature map it implies. - When the approximation is exact and when it is accurate, tied to rank and the eigenvalue spectrum. - The time and memory cost compared with working with the exact kernel matrix. - How it compares with random Fourier features. ### Follow-up Questions - How would you choose the number of landmarks $m$ in practice? - What happens numerically when the landmark kernel matrix is close to singular, and how do you handle it? - Why can sampling landmarks by leverage scores give a better approximation than uniform sampling? - For an RBF kernel, how does the bandwidth parameter $\gamma$ affect how many landmarks you need?

Overview: Asks how the Nystroem method builds a low-rank approximation of a kernel matrix from a sample of landmark points. Tests the matrix construction, the explicit feature map it gives a linear model, when the approximation is accurate, its cost, and how it compares with random Fourier features.

PracHub logo
General
Nov 25, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

Kernel methods such as SVMs need the full n×nn \times n kernel matrix, which becomes too large to store or factor once nn reaches the hundreds of thousands. How does the Nystroem method approximate a full kernel matrix?

What a Strong Answer Covers Guidance

  • How the landmark points are chosen and which kernel blocks are computed.
  • The low-rank approximation formula and the explicit feature map it implies.
  • When the approximation is exact and when it is accurate, tied to rank and the eigenvalue spectrum.
  • The time and memory cost compared with working with the exact kernel matrix.
  • How it compares with random Fourier features.

Follow-up Questions Guidance

  • How would you choose the number of landmarks mm in practice?
  • What happens numerically when the landmark kernel matrix is close to singular, and how do you handle it?
  • Why can sampling landmarks by leverage scores give a better approximation than uniform sampling?
  • For an RBF kernel, how does the bandwidth parameter γ\gamma affect how many landmarks you need?