GloVe › Connection to Matrix Factorization
Language AI HandbookAll chapters GloVe › Connection to Matrix FactorizationOne section · Sections in this chapter6 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
GloVe has a deep connection to classical matrix factorization methods, particularly Latent Semantic Analysis (LSA) and Pointwise Mutual Information (PMI) factorization. Understanding this connection reveals why GloVe works and what it computes.
LSA and PMI Factorization
LSA applies Singular Value Decomposition (SVD) to a term-document matrix, factorizing it into two lower-rank matrices whose rows become word vectors. A related approach applies SVD to the Pointwise Mutual Information (PMI) matrix, where:
where:
- : the joint probability of words and co-occurring
- : the marginal probability of word appearing as a context center
- : the marginal probability of word appearing as a context word
- : total co-occurrence count across the entire corpus
PMI measures how much more often words and co-occur than we would expect if they were statistically independent. A high positive PMI means the two words appear together far more often than chance; a negative PMI means they avoid each other. In practice, Positive PMI (PPMI) is often used, which clips negative values to zero, because negative PMI values are unreliable for sparse data.
Factorizing the PMI matrix with SVD produces word vectors that, like GloVe, capture semantic relationships. But SVD has two practical limitations. First, zero entries in the PMI matrix (words that never co-occurred) create numerical issues: the log of zero is undefined, so zero entries must either be excluded or replaced with a large negative value. Second, SVD weights all entries equally, giving as much importance to the noisy "the" co-occurring with "antidisestablishmentarianism" once as to "ice" co-occurring with "cold" a thousand times. Neither limitation is easy to fix within the SVD framework.
How GloVe Relates to PMI
GloVe's target is related to PMI. Starting from the PMI definition:
Rearranging:
The terms , , and are all word-frequency effects and constant offsets. The bias terms and absorb these terms during training. So the dot product learns to approximate:
In other words, GloVe implicitly factorizes a shifted PMI matrix. The shift is , a constant that ensures the target values are centered, not unlike how Shifted Positive PMI (SPPMI) works in the PMI literature.
This connection, established formally by Levy and Goldberg (2014) shortly after the GloVe paper, is a key theoretical contribution. It shows that prediction-based methods (Word2Vec) and count-based methods (GloVe, PMI factorization) are not fundamentally different: they are all learning to factorize different variants of the PMI matrix. The apparent dichotomy between the two traditions dissolves under this unified view.
What GloVe Adds Over Simple SVD
A naive log-count factorization via SVD suffers from the two problems described above: zero entries and uniform weighting. GloVe's weighted least squares formulation addresses both:
Zero entries are handled by the weighting function: means zero co-occurrences contribute nothing to the objective, so the problem never arises.
Unequal reliability is handled by giving each pair a weight proportional to how informative its count is. Common, reliable pairs get weight close to 1; rare, noisy pairs get lower weight. This is exactly the kind of reweighting that SVD cannot express, because SVD treats all entries of the matrix symmetrically.
GloVe can also be thought of as a noise-robust version of PMI factorization. By using a polynomial weighting scheme tuned for NLP statistics, GloVe extracts the signal from co-occurrence data more efficiently than either raw SVD or unweighted least squares.