Why is Truncated SVD used instead of standard PCA on sparse matrices such as TF-IDF?

Quick Overview

Asks why sparse text matrices such as TF-IDF are reduced with Truncated SVD and not with standard PCA. Tests understanding of what mean-centering does to sparsity and memory, how sparse SVD solvers scale, and how the result relates to PCA and Latent Semantic Analysis.

Why is Truncated SVD used instead of standard PCA on sparse matrices such as TF-IDF?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why is Truncated SVD used instead of standard PCA on sparse matrices such as TF-IDF? Picture a document-term matrix with millions of documents and a vocabulary of a hundred thousand terms, where each document uses only a few dozen of them. ```hint Look at the first step of PCA Write down what PCA does to the matrix before it computes any eigenvectors, and ask what that step does to all the zero entries. ``` ```hint Count the cost Estimate how much memory the matrix needs in sparse form and in dense form, then think about which operations an iterative SVD solver needs from the matrix. ``` ### What a Strong Answer Covers - Why the centering step of PCA is a problem for a sparse matrix, with a rough sense of the memory involved - How Truncated SVD computes its components and what its cost depends on - How the result differs from PCA, and why that difference is acceptable for text - Whether current libraries can run PCA on sparse input without densifying it ### Follow-up Questions - How would you choose the number of components for Latent Semantic Analysis on a large corpus? - How does randomized SVD work, and what do oversampling and power iterations buy you? - Before clustering the reduced vectors with k-means, would you normalize them, and why? - When would you choose NMF or a topic model such as LDA over Truncated SVD for text?

Overview: Asks why sparse text matrices such as TF-IDF are reduced with Truncated SVD and not with standard PCA. Tests understanding of what mean-centering does to sparsity and memory, how sparse SVD solvers scale, and how the result relates to PCA and Latent Semantic Analysis.

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

Why is Truncated SVD used instead of standard PCA on sparse matrices such as TF-IDF?

Picture a document-term matrix with millions of documents and a vocabulary of a hundred thousand terms, where each document uses only a few dozen of them.

What a Strong Answer Covers Guidance

  • Why the centering step of PCA is a problem for a sparse matrix, with a rough sense of the memory involved
  • How Truncated SVD computes its components and what its cost depends on
  • How the result differs from PCA, and why that difference is acceptable for text
  • Whether current libraries can run PCA on sparse input without densifying it

Follow-up Questions Guidance

  • How would you choose the number of components for Latent Semantic Analysis on a large corpus?
  • How does randomized SVD work, and what do oversampling and power iterations buy you?
  • Before clustering the reduced vectors with k-means, would you normalize them, and why?
  • When would you choose NMF or a topic model such as LDA over Truncated SVD for text?