Pointwise Mutual Information › Smoothing and Practical Considerations

Michael BrenndoerferUpdated March 21, 20264 min read
Language AI HandbookAll chapters
Part 3 of 67Distributional Semantics
Chapter 17Pointwise Mutual Information › Smoothing and Practical Considerations
Reading section 9 of 13 · Smoothing and Practical Considerations · 4 minSection 9 of 13 · 4 min

Book contents

Section 9 of 13 · 4 min read

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 kk times in the corpus is excluded from the vocabulary, and any co-occurrence pair with fewer than mm joint occurrences is treated as zero. Typical values are k=5k = 5 for vocabulary thresholds and m=2m = 2 or m=5m = 5 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-α\alpha smoothing) addresses the zero-count problem in a more principled way than simply discarding rare pairs. Instead of working with the raw counts count(w,c)\text{count}(w, c), you add a small pseudocount α\alpha to every cell:

countα(w,c)=count(w,c)+α\text{count}_\alpha(w, c) = \text{count}(w, c) + \alpha

With α=1\alpha = 1 (standard Laplace smoothing) or α<1\alpha < 1 (Lidstone smoothing), every word pair gets a small baseline probability even if it was never observed. This prevents −∞-\infty 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 1/d1 / d where dd 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 3/43/4 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 α\alpha (typically α=0.75\alpha = 0.75) before computing column marginals:

Pα(c)=count(c)α∑c′count(c′)αP_\alpha(c) = \frac{\text{count}(c)^\alpha}{\sum_{c'} \text{count}(c')^\alpha}

where:

  • α\alpha: the smoothing exponent, typically 0.75
  • count(c)α\text{count}(c)^\alpha: the smoothed count for context word cc

The modified PPMI using this smoothed marginal is:

PPMIα(w,c)=max⁡(0,  log⁡2P(w,c)P(w)⋅Pα(c))\text{PPMI}_\alpha(w, c) = \max\Bigl(0,\; \log_2 \frac{P(w, c)}{P(w) \cdot P_\alpha(c)}\Bigr)

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.