How does the GloVe objective arise from the idea that meaning is carried by ratios of co-occurrence probabilities? What is the role of ?
Sequence models and transformers, Word embeddings
Level L3 Intermediate. Length Long. Nature Th+Mat Both.
What's being asked
Whether you can walk from the ratio property to the log-bilinear form, and justify the weighting function.
Key idea
If and turns differences into ratios, then and .
Steps
- Let be how often word appears in the context of word , , and . For words ice, steam, the ratio is large for solid, small for gas, and near for unrelated .
- Ask that vectors encode this: . The argument is linear in the vectors.
- The map from differences to ratios requires . This is satisfied by , so .
- The term does not depend on , so absorb it into a bias . Add to keep symmetry between and . This gives .
- Fit this by weighted least squares. The weight is for and otherwise, with .
- Why : is undefined, so drops unseen pairs. Rare pairs are noisy, so gives them low weight. Very frequent pairs (such as "the") are capped so they do not dominate. For example, with , a count of gets weight .
Common mistakes
- Saying GloVe uses a neural network; it is weighted least squares on a count matrix.
- Forgetting the biases, which come from absorbing .
- Describing as only a normaliser; it also handles zero counts and noise.
How long your answer should be
One page; 6–8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Sequence models and transformers: In skip-gram with a full softmax, and the loss is . Show that . For a three-word vocabulary with , , , centre vector and true context word , what is the gradient?
Next in Sequence models and transformers: For a GRU with , what is the direct term in , and why does a small let gradients survive many steps? If at every step, what does that direct path contribute over steps?