Pointwise Mutual Information › Smoothing and Practical Considerations
Language AI HandbookAll chapters Pointwise Mutual Information › Smoothing and Practical ConsiderationsOne section · Sections in this chapter9 / 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
The basic PPMI formula works well for large, balanced corpora, but several practical issues arise in real deployments that require additional engineering decisions.
Minimum Frequency Thresholds
The simplest and most effective way to control the rare-word problem is to apply a minimum frequency threshold before computing PPMI. Any word that appears fewer than times in the corpus is excluded from the vocabulary, and any co-occurrence pair with fewer than joint occurrences is treated as zero. Typical values are for vocabulary thresholds and or for co-occurrence thresholds.
This approach has several benefits. It reduces the vocabulary size, which reduces memory requirements for the co-occurrence matrix. It eliminates the highest-variance PMI estimates, those based on only one or two co-occurrence events. And it focuses the representation on the part of the vocabulary with sufficient evidence for reliable estimates.
The main cost is coverage: words that appear fewer than five times in the corpus are excluded entirely, which can be significant for technical domains with specialized vocabulary or for morphologically rich languages where every inflected form is counted separately.
Laplace Smoothing
Laplace smoothing (also called add- smoothing) addresses the zero-count problem in a more principled way than simply discarding rare pairs. Instead of working with the raw counts , you add a small pseudocount to every cell:
With (standard Laplace smoothing) or (Lidstone smoothing), every word pair gets a small baseline probability even if it was never observed. This prevents from appearing in the PMI computation and reduces the variance of estimates for rare pairs.
The practical effect is that the PPMI matrix becomes denser: pairs that would have been zero now have small positive values. This can improve performance on downstream tasks that use the PPMI matrix as input to a learning algorithm, because the algorithm receives a more complete picture of the distributional structure.
Sublinear Scaling
Some PPMI implementations apply sublinear scaling to the co-occurrence counts before computing probabilities. One common variant counts each co-occurrence event with weight where is the distance between the two words within the window. Words that are immediately adjacent receive full weight, while words at the far edge of the window receive reduced weight.
This position-weighted counting better reflects the intuition that nearby words are more informative context than distant ones. The resulting PPMI values place more weight on tight, adjacent associations and less on loose, distant ones. GloVe uses a related but distinct weighting function: the weight decreases with distance but is bounded by a maximum value of 1 to avoid over-weighting very frequent immediate neighbors.
Context Distribution Smoothing
Levy and Goldberg also noted that word2vec implicitly raises context word frequencies to the power before using them as negative sampling probabilities. This smoothing reduces the dominance of very high-frequency context words in the model's training signal. The equivalent for PPMI is to raise the context word counts to the power (typically ) before computing column marginals:
where:
- : the smoothing exponent, typically 0.75
- : the smoothed count for context word
The modified PPMI using this smoothed marginal is:
This smoothing reduces the raw PMI of pairs involving very high-frequency context words, bringing the PPMI formulation closer to the implicit objective of word2vec with negative sampling. In practice, this variant consistently outperforms standard PPMI on word similarity benchmarks.