Pointwise Mutual Information (PMI) for Text
"Strong tea" sounds right; "powerful tea" does not, even though the two adjectives mean nearly the same thing. Nothing inside either word explains the preference — it lives entirely in which words turn up beside which, and this is how you measure that from a corpus.
Co-occurrence against chance
Pointwise mutual information compares how often two words appear together with how often they would appear together if they were independent: the log of the joint probability divided by the product of the individual probabilities. Zero means exactly as expected; a large positive value means a genuine association. This is what raw counts cannot give you, because the most frequent neighbour of almost any word is "the".
From a matrix to embeddings
Replace the raw counts in a word-context matrix with PMI values and you have the classic distributional representation of meaning, with two standard repairs:
- Negative values are unreliable — claiming two words avoid each other needs far more data than claiming they attract — so they are clipped to zero, giving PPMI.
- Rare pairs inflate the score: a pair seen once together and nowhere else looks like a perfect association. Count thresholds and smoothed context probabilities hold this down.
Where you meet it
Factorising a PPMI matrix with SVD yields dense word vectors, and skip-gram with negative sampling turns out to be implicitly factorising a shifted version of that same matrix — so PMI sits directly behind the embeddings that appeared to replace it. It is also the standard scorer for collocation discovery in NLTK, for pulling multi-word terms out of a specialist corpus, and for topic coherence, where a topic is judged by whether its top words genuinely co-occur in real documents.
Pointwise mutual information scores how strongly two words associate, as the log ratio of their joint probability to the product of their individual probabilities — high when a pair co-occurs far more than chance predicts. Clipped at zero it becomes PPMI, the standard weighting for word-context matrices, and it underlies collocation discovery and topic coherence. Raw co-occurrence counts cannot do this job, because frequent function words dominate every context window.
Think about the word "tea". Plenty of words sit near it — "the", "and", "is" — but those sit near everything. "Strong", "kettle" and "milk" are different: they turn up with tea far more than coincidence would explain.
That is the whole idea. Pointwise mutual information is a score that asks whether two words appear together more than you would expect if they had nothing to do with each other. Software uses it to discover which word pairs really belong together, which is how a program learns that "machine learning" is one idea rather than two unrelated words, and how it begins to grasp what a word means from the company it keeps.