Inferensys

Glossary

Pointwise Mutual Information (PMI)

An information-theoretic measure of association between two words, used as a foundational component in calculating topic coherence scores.
Strategy consultant facilitating AI use case discovery workshop, sticky notes on glass wall, casual corporate meeting.
INFORMATION THEORY

What is Pointwise Mutual Information (PMI)?

An information-theoretic measure quantifying the degree of statistical dependence between two specific events, most commonly applied to word co-occurrence in natural language processing.

Pointwise Mutual Information (PMI) is a metric that quantifies how much more often two events—typically words—co-occur than expected by random chance. It is calculated as the logarithm of the ratio between their observed joint probability and the product of their individual marginal probabilities, providing a direct measure of association strength for a specific pair.

A high positive PMI score indicates strong co-occurrence, a score near zero suggests statistical independence, and a negative score implies the words tend to repel each other. As a foundational component of topic coherence metrics like C_V coherence, PMI evaluates the semantic interpretability of latent themes by confirming that a topic's top-ranked words frequently appear together in a reference corpus.

INFORMATION THEORY

Core Characteristics of PMI

Pointwise Mutual Information (PMI) is a foundational metric for quantifying the statistical association between two discrete events, such as the co-occurrence of words. It measures how much more likely two items are to appear together than if they were independent.

01

Quantifying Statistical Association

PMI measures the deviation from statistical independence between two events. It calculates the log ratio between the observed joint probability and the expected probability if the events were independent. A high positive PMI indicates a strong association, a value near zero suggests independence, and a negative value implies the events tend to avoid each other.

02

The Core Formula

The calculation is defined as: PMI(x; y) = log₂ [P(x, y) / (P(x) * P(y))]

  • P(x, y): The joint probability of events x and y occurring together.
  • P(x) * P(y): The product of their individual probabilities, representing the expected co-occurrence if they were independent.
  • log₂: The binary logarithm, measuring the result in bits of information.
03

Role in Topic Coherence

PMI is the fundamental building block for evaluating topic models. It quantifies the semantic coherence of a topic by measuring the association between its top-ranked words.

  • UCI Coherence: Uses PMI based on word co-occurrence in a sliding window over an external corpus like Wikipedia.
  • UMass Coherence: A variant that uses document co-occurrence counts within the original corpus, avoiding the need for an external reference.
04

Handling the Zero-Frequency Problem

A critical limitation of raw PMI is its behavior with unobserved events. If two words never co-occur, their joint probability P(x, y) is zero, causing the PMI score to tend toward negative infinity. This makes raw PMI unreliable for ranking rare or unseen word pairs.

05

Normalized PMI (NPMI)

To correct for the zero-frequency issue and bound the score, Normalized Pointwise Mutual Information (NPMI) is widely used. It is calculated as NPMI(x; y) = PMI(x; y) / -log₂[P(x, y)]. This normalizes the score to a fixed range of [-1, +1], where -1 means no co-occurrence, 0 means independence, and +1 means perfect co-occurrence. NPMI is the standard metric for the C_V coherence measure.

06

PMI Matrix and Word Embeddings

A PMI matrix is constructed by calculating the PMI score for every word-context pair in a corpus. Early neural word embedding techniques, like GloVe, were theoretically linked to factorizing a shifted PMI matrix. This demonstrates that PMI captures the same distributional semantics that modern dense vectors encode.

PMI EXPLAINED

Frequently Asked Questions

Clear, technically precise answers to the most common questions about Pointwise Mutual Information and its role in evaluating topic models.

Pointwise Mutual Information (PMI) is an information-theoretic measure that quantifies the association between two specific events—in NLP, typically two words—by comparing their observed joint probability to their expected joint probability if they were statistically independent. The core formula is PMI(x; y) = log₂(p(x, y) / (p(x) * p(y))). A positive PMI score indicates that the words co-occur more frequently than chance would predict, suggesting a genuine semantic or syntactic association. A score near zero implies independence, while a negative score indicates the words tend to repel each other. Unlike simple co-occurrence counts, PMI corrects for the baseline frequency of individual words, preventing high-frequency but uninformative pairs (like "the" and "and") from dominating association rankings. The log₂ transformation maps the ratio to an intuitive scale where each unit of increase represents a doubling of the association strength over chance.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.