Latent semantic analysis
Latent semantic analysis is a text-analysis technique that uses dimensionality reduction of term-document data to represent latent relationships among words and documents.
Natural Language Processing in Action, Second Edition
Latent semantic indexing, also called latent semantic analysis, is a dimensionality-reduction technique that represents words and documents in a lower-dimensional semantic space derived from term-document statistics.
- How it is used
- Uses compact topic features for semantic search, document comparison, and toxic-comment classification.
- How deep it goes
- Explains dimensionality reduction through a shadow analogy and develops LSA from TF–IDF matrices to topic features and classifier comparisons.
- Examples
- Uses 5,000 Wikipedia discussion comments, including 650 labeled toxic, to compare reduced topic features for classification.
- What you can do after
- Apply it via scikit-learn’s TruncatedSVD to create topic features for a classifier.
Read how Natural Language Processing in Action, Second Edition explains latent semantic analysis →
Math and Architectures of Deep Learning
A document-retrieval technique that uses low-dimensional structure in document-term data to capture latent topics and relationships.
- How it is used
- Uses dimensionality reduction and topic projection to improve document retrieval beyond direct term overlap.
- How deep it goes
- Explains the PCA and SVD basis, geometric compression, rank truncation, and projected cosine similarity through a toy computation.
- Examples
- Uses a four-term toy matrix and compares two documents before and after projection into one topic dimension.
- What you can do after
- Apply it via PyTorch to decompose a document-term matrix, reduce its rank, project documents, and compare topic-space vectors.
Read how Math and Architectures of Deep Learning explains latent semantic analysis →
Also covered in
- WordPress Power Toolkit: Harness AI to build next-level websites
- Retrieval Augmented Generation, The Foundational IdeasIn early access (MEAP)
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
Related concepts
- dimensionality reductionkind of · Dimensionality reduction transforms data into a representation with fewer dimensions while attempting to retain relevant information or structure.
- matrix factorizationuses · Matrix factorization is the decomposition or approximation of a matrix as a product of simpler, often lower-dimensional or structured matrices.
- singular value decompositionproduced by · Singular value decomposition is a matrix factorization that expresses a matrix using orthogonal or unitary matrices and a diagonal matrix of nonnegative singular values.
- term frequency-inverse document frequencyuses · Term frequency-inverse document frequency (TF-IDF) is a text-weighting scheme that combines a term’s frequency in a document with its inverse frequency across a document collection.
- principal component analysisused by · Principal component analysis is a linear statistical technique that represents data along orthogonal directions, called principal components, ordered by the variance they capture.
- topic vectorproduces · A numerical vector encoding the strengths of associations between terms or documents and latent topics.
Questions about latent semantic analysis
What is latent semantic analysis?
Latent semantic analysis is a text-analysis technique that uses dimensionality reduction of term-document data to represent latent relationships among words and documents.
Which Manning books explain latent semantic analysis?
Natural Language Processing in Action, Second Edition and Math and Architectures of Deep Learning.
What should I know before learning latent semantic analysis?
Manning books that teach latent semantic analysis usually introduce language model first.
What is latent semantic analysis a kind of?
Latent semantic analysis is a kind of dimensionality reduction. Dimensionality reduction transforms data into a representation with fewer dimensions while attempting to retain relevant information or structure.
What is latent semantic analysis also called?
Latent semantic analysis is also called latent semantic indexing or LSA.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

