Pointwise mutual information explained

In statistics, probability theory and information theory, pointwise mutual information (PMI),[1] or point mutual information, is a measure of association. It compares the probability of two events occurring together to what this probability would be if the events were independent.[2]

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 [a] corpus than we would have expected them to appear by chance."

The concept was introduced in 1961 by Robert Fano 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 (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 variables X and Y quantifies the discrepancy between the probability of their coincidence given their joint distribution and their individual distributions, assuming independence. Mathematically:

\operatorname{pmi}(x;y)\equiv

log
2p(x,y)
p(x)p(y)

=

log
2p(x|y)
p(x)

=

log
2p(y|x)
p(y)

(with the latter two expressions being equal to the first by Bayes' theorem). The mutual information (MI) of the random variables X and Y is the expected value of the PMI (over all possible outcomes).

The measure is symmetric (

\operatorname{pmi}(x;y)=\operatorname{pmi}(y;x)

). It can take positive or negative values, but is zero if X and Y are independent. Note that even though PMI may be negative or positive, its expected outcome over all joint events (MI) is non-negative. PMI maximizes when X and Y are perfectly associated (i.e.

p(x|y)

or

p(y|x)=1

), yielding the following bounds:

-infty\leq\operatorname{pmi}(x;y)\leqmin\left[-logp(x),-logp(y)\right].

Finally,

\operatorname{pmi}(x;y)

will increase if

p(x|y)

is fixed but

p(x)

decreases.

Here is an example to illustrate:

xyp(xy)
000.1
010.7
100.15
110.05
Using this table we can marginalize to get the following additional table for the individual distributions:
p(x)p(y)
00.80.25
10.20.75
With this example, we can compute four values for

\operatorname{pmi}(x;y)

. Using base-2 logarithms:
pmi(x=0;y=0)=-1
pmi(x=0;y=1)=0.222392
pmi(x=1;y=0)=1.584963
pmi(x=1;y=1)=-1.584963

\operatorname{I}(X;Y)

would then be 0.2141709.)

Similarities to mutual information

Pointwise Mutual Information has many of the same relationships as the mutual information. In particular,

\begin{align} \operatorname{pmi}(x;y)&=&h(x)+h(y)-h(x,y)\ &=&h(x)-h(x\midy)\ &=&h(y)-h(y\midx) \end{align}

Where

h(x)

is the self-information, or

-log2p(x)

.

Variants

Several variations of PMI have been proposed, in particular to address what has been described as its "two main limitations":[3]

  1. PMI can take both positive and negative values and has no fixed bounds, which makes it harder to interpret.
  2. 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:

\operatorname{ppmi}(x;y)\equiv

max\left(log
2p(x,y)
p(x)p(y)

,0\right)

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

-infty

values for events that never occur together (

p(x,y)=0

), by setting PPMI for these to 0.

Normalized pointwise mutual information (npmi)

Pointwise mutual information can be normalized between [-1,+1] resulting in -1 (in the limit) for never occurring together, 0 for independence, and +1 for complete co-occurrence.[4]

\operatorname{npmi}(x;y)=

\operatorname{pmi
(x;y)}{h(x,

y)}

Where

h(x,y)

is the joint self-information

-log2p(x,y)

.

PMIk family

The PMIk 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[5]

\operatorname{pmi}k(x;y)\equiv

log
2p(x,y)k
p(x)p(y)

=\operatorname{pmi}(x;y)-(-(k-1))log2p(x,y))

In particular,

pmi1(x;y)=pmi(x;y)

. The additional factors of

p(x,y)

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 PMI3 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

pmi(x;y)

) were domain-specific ("midfielder", "cornerbacks", "goalkeepers") whereas the terms ranked most highly by PMI3 were much more general ("league", "clubs", "england").

Chain-rule

Like mutual information,[6] point mutual information follows the chain rule, that is,

\operatorname{pmi}(x;yz)=\operatorname{pmi}(x;y)+\operatorname{pmi}(x;z|y)

This is proven through application of Bayes' theorem:

\begin{align} \operatorname{pmi}(x;y)+\operatorname{pmi}(x;z|y)&{}=log

p(x,y)
p(x)p(y)

+log

p(x,z|y)
p(x|y)p(z|y)

\ &{}=log\left[

p(x,y)
p(x)p(y)
p(x,z|y)
p(x|y)p(z|y)

\right]\ &{}=log

p(x|y)p(y)p(x,z|y)
p(x)p(y)p(x|y)p(z|y)

\\ &{}=log

p(x,yz)
p(x)p(yz)

\\ &{}=\operatorname{pmi}(x;yz) \end{align}

Applications

PMI could be used in various disciplines e.g. in information theory, linguistics or chemistry (in profiling and analysis of chemical compounds).[7] In computational linguistics, PMI has been used for finding collocations and associations between words. For instance, countings of occurrences and co-occurrences of words in a text corpus can be used to approximate the probabilities

p(x)

and

p(x,y)

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)
word 1word 2count word 1count word 2count of co-occurrencesPMI
puertorico19381311115910.0349081703
hongkong2438269422059.72831972408
losangeles3501280827919.56067615065
carbondioxide4265135310329.09852946116
prizelaureate5131167612108.85870710982
sanfrancisco5237247717798.83305176711
nobelprize4098513124988.68948811416
icehockey5607300219338.6555759741
startrek8264159414898.63974676575
cardriver5578274913848.41470768304
itthe28389132932963347-1.72037278119
areof23445817614361019-2.09254205335
thisthe19988232932961211-2.38612756961
isof56567917614361562-2.54614706831
andof137539617614362949-2.79911817902
aand98444213753961457-2.92239510038
inand118765213753961537-3.05660070757
toand102565913753961286-3.08825363041
toin102565911876521066-3.12911348956
ofand176143613753961190-3.70663100173

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

. Fano. R M. Robert Fano. 1961. Transmission of Information: A Statistical Theory of Communications. MIT Press, Cambridge, MA. chapter 2. 978-0262561693.

External links

Notes and References

  1. Word association norms, mutual information, and lexicography. Kenneth Ward Church and Patrick Hanks. Comput. Linguist.. 16. 1. March 1990. 22–29.
  2. [Dan Jurafsky]
  3. 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
  4. Web site: Normalized (Pointwise) Mutual Information in Collocation Extraction. Bouma. Gerlof. 2009. Proceedings of the Biennial GSCL Conference.
  5. B. Daille. Approche mixte pour l'extraction automatique de terminologie : statistiques lexicales et filtres linguistiques. Thèse de Doctorat en Informatique Fondamentale. Université Paris 7. 1994. p.139
  6. Book: INFORMATION DYNAMICS: ITS THEORY AND APPLICATION TO EMBODIED COGNITIVE SYSTEMS. Paul L. Williams.
  7. Čmelo. I.. Voršilák. M.. Svozil. D.. 2021-01-10. Profiling and analysis of chemical compounds using pointwise mutual information. Journal of Cheminformatics. 13. 1. 3. 10.1186/s13321-020-00483-y. 33423694 . 7798221 . 1758-2946. free.