In
statistics,
probability theory
Probability theory is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expressing it through a set o ...
and
information theory
Information theory is the scientific study of the quantification, storage, and communication of information. The field was originally established by the works of Harry Nyquist and Ralph Hartley, in the 1920s, and Claude Shannon in the 1940s. ...
, pointwise mutual information (PMI),
or point mutual information, is a measure of
association
Association may refer to:
*Club (organization), an association of two or more people united by a common interest or goal
*Trade association, an organization founded and funded by businesses that operate in a specific industry
*Voluntary associatio ...
. It compares the probability of two events occurring together to what this probability would be if the events were
independent
Independent or Independents may refer to:
Arts, entertainment, and media Artist groups
* Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s
* Independe ...
.
Dan Jurafsky
Daniel Jurafsky is a professor of linguistics and computer science at Stanford University, and also an author. With Daniel Gildea, he is known for developing the first automatic system for semantic role labeling (SRL). He is the author of ''The L ...
and James H. Martin: Speech and Language Processing (3rd ed. draft), December 29, 2021
chapter 6
PMI (especially in its positive pointwise mutual information variant) has been described as "one of the most important concepts in
NLP", where it "draws on the intuition that the best way to weigh the association between two words is to ask how much more the two words co-occur in
corpus than we would have a priori expected them to appear by chance."
The concept was introduced in 1961 by
Robert Fano
Roberto Mario "Robert" Fano (11 November 1917 – 13 July 2016) was an Italian-American computer scientist and professor of electrical engineering and computer science at the Massachusetts Institute of Technology. He became a student and working ...
under the name of "mutual information", but today that term is instead used for a related measure of dependence between random variables:
The
mutual information
In probability theory and information theory, the mutual information (MI) of two random variables is a measure of the mutual dependence between the two variables. More specifically, it quantifies the " amount of information" (in units such as ...
(MI) of two discrete random variables refers to the average PMI of all possible events.
Definition
The PMI of a pair of
outcomes ''x'' and ''y'' belonging to
discrete random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
s ''X'' and ''Y'' quantifies the discrepancy between the probability of their coincidence given their
joint distribution
Given two random variables that are defined on the same probability space, the joint probability distribution is the corresponding probability distribution on all possible pairs of outputs. The joint distribution can just as well be considered ...
and their individual distributions, assuming
independence
Independence is a condition of a person, nation, country, or state in which residents and population, or some portion thereof, exercise self-government, and usually sovereignty, over its territory. The opposite of independence is the s ...
. Mathematically:
:
(with the latter two expressions being equal to the first by
Bayes' theorem
In probability theory and statistics, Bayes' theorem (alternatively Bayes' law or Bayes' rule), named after Thomas Bayes, describes the probability of an event, based on prior knowledge of conditions that might be related to the event. For exa ...
). The
mutual information
In probability theory and information theory, the mutual information (MI) of two random variables is a measure of the mutual dependence between the two variables. More specifically, it quantifies the " amount of information" (in units such as ...
(MI) of the random variables ''X'' and ''Y'' is the expected value of the PMI (over all possible outcomes).
The measure is symmetric (
). It can take positive or negative values, but is zero if ''X'' and ''Y'' are
independent
Independent or Independents may refer to:
Arts, entertainment, and media Artist groups
* Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s
* Independe ...
. Note that even though PMI may be negative or positive, its expected outcome over all joint events (MI) is positive. PMI maximizes when ''X'' and ''Y'' are perfectly associated (i.e.
or
), yielding the following bounds:
:
Finally,
will increase if
is fixed but
decreases.
Here is an example to illustrate:
Using this table we can
marginalize to get the following additional table for the individual distributions:
With this example, we can compute four values for
. Using base-2 logarithms:
(For reference, the
mutual information
In probability theory and information theory, the mutual information (MI) of two random variables is a measure of the mutual dependence between the two variables. More specifically, it quantifies the " amount of information" (in units such as ...
would then be 0.2141709.)
Similarities to mutual information
Pointwise Mutual Information has many of the same relationships as the mutual information. In particular,
Where
is the
self-information
In information theory, the information content, self-information, surprisal, or Shannon information is a basic quantity derived from the probability of a particular event occurring from a random variable. It can be thought of as an alternative w ...
, or
.
Variants
Several variations of PMI have been proposed, in particular to address what has been described as its "two main limitations":
[Francois Role, Moahmed Nadif]
Handling the Impact of Low frequency Events on Co-occurrence-based Measures of Word Similarity:A Case Study of Pointwise Mutual Information.
Proceedings of KDIR 2011 : KDIR- International Conference on Knowledge Discovery and Information Retrieval, Paris, October 26-29 2011
# PMI can take both positive and negative values and has no fixed bounds, which makes it harder to interpret.
# PMI has "a well-known tendency to give higher scores to low-frequency events", but in applications such as measuring word similarity, it is preferable to have "a higher score for pairs of words whose relatedness is supported by more evidence."
Positive PMI
The positive pointwise mutual information (PPMI) measure is defined by setting negative values of PMI to zero:
This definition is motivated by the observation that "negative PMI values (which imply things are co-occurring less often than we would expect by chance) tend to be unreliable unless our corpora are enormous" and also by a concern that "it’s not clear whether it’s even possible to evaluate such scores of ‘unrelatedness’ with human judgment".
It also avoid having to deal with
values for events that never occur together (
), by setting PPMI for these to 0.
Normalized pointwise mutual information (npmi)
Pointwise mutual information can be normalized between
1,+1
Onekama ( ) is a village in Manistee County in the U.S. state of Michigan. The population was 411 at the 2010 census. The village is located on the shores of Portage Lake and is surrounded by Onekama Township. The town's name is derived from "O ...
resulting in -1 (in the limit) for never occurring together, 0 for independence, and +1 for complete
co-occurrence In linguistics, co-occurrence or cooccurrence is an above-chance frequency of occurrence of two terms (also known as coincidence or concurrence) from a text corpus alongside each other in a certain order. Co-occurrence in this linguistic sense ...
.
Where
is the joint
self-information
In information theory, the information content, self-information, surprisal, or Shannon information is a basic quantity derived from the probability of a particular event occurring from a random variable. It can be thought of as an alternative w ...
.
PMIk family
The PMI
k measure (for k=2, 3 etc.), which was introduced by
Béatrice Daille around 1994, and as of 2011 was described as being "among the most widely used variants", is defined as
In particular,
. The additional factors of
inside the logarithm are intended to correct the bias of PMI towards low-frequency events, by boosting the scores of frequent pairs.
A 2011 case study demonstrated the success of PMI
3 in correcting this bias on a corpus drawn from English Wikipedia. Taking x to be the word "football", its most strongly associated words y according to the PMI measure (i.e. those maximizing
) were domain-specific ("midfielder", "cornerbacks", "goalkeepers") whereas the terms ranked most highly by PMI
3 were much more general ("league", "clubs", "england").
Chain-rule for pmi
Like
mutual information
In probability theory and information theory, the mutual information (MI) of two random variables is a measure of the mutual dependence between the two variables. More specifically, it quantifies the " amount of information" (in units such as ...
, point mutual information follows the
chain rule
In calculus, the chain rule is a formula that expresses the derivative of the Function composition, composition of two differentiable functions and in terms of the derivatives of and . More precisely, if h=f\circ g is the function such that h(x) ...
, that is,
:
This is easily proven through application of
Bayes' theorem
In probability theory and statistics, Bayes' theorem (alternatively Bayes' law or Bayes' rule), named after Thomas Bayes, describes the probability of an event, based on prior knowledge of conditions that might be related to the event. For exa ...
:
:
Applications
PMI could be used in various disciplines e.g. in information theory, linguistics or chemistry (in profiling and analysis of chemical compounds).
In
computational linguistics
Computational linguistics is an Interdisciplinarity, interdisciplinary field concerned with the computational modelling of natural language, as well as the study of appropriate computational approaches to linguistic questions. In general, comput ...
, PMI has been used for finding
collocation
In corpus linguistics, a collocation is a series of words or terms that co-occur more often than would be expected by chance. In phraseology, a collocation is a type of compositional phraseme, meaning that it can be understood from the words ...
s and associations between words. For instance,
countings of occurrences and
co-occurrence In linguistics, co-occurrence or cooccurrence is an above-chance frequency of occurrence of two terms (also known as coincidence or concurrence) from a text corpus alongside each other in a certain order. Co-occurrence in this linguistic sense ...
s of words in a
text corpus
In linguistics, a corpus (plural ''corpora'') or text corpus is a language resource consisting of a large and structured set of texts (nowadays usually electronically stored and processed). In corpus linguistics, they are used to do statistical ...
can be used to approximate the probabilities
and
respectively. The following table shows counts of pairs of words getting the most and the least PMI scores in the first 50 millions of words in Wikipedia (dump of October 2015) filtering by 1,000 or more co-occurrences. The frequency of each count can be obtained by dividing its value by 50,000,952. (Note: natural log is used to calculate the PMI values in this example, instead of log base 2)
Good collocation pairs have high PMI because the probability of co-occurrence is only slightly lower than the probabilities of occurrence of each word. Conversely, a pair of words whose probabilities of occurrence are considerably higher than their probability of co-occurrence gets a small PMI score.
References
* {{cite book, last1=Fano, first1=R M, authorlink=Robert Fano, year=1961, title=Transmission of Information: A Statistical Theory of Communications, publisher=MIT Press, Cambridge, MA, url=https://archive.org/details/TransmissionOfInformationAStatisticalTheoryOfCommunicationRobertFano, chapter=chapter 2, isbn=978-0262561693
External links
Demo at Rensselaer MSR Server(PMI values normalized to be between 0 and 1)
Information theory
Summary statistics for contingency tables
Entropy and information