Venn diagram showing additive and subtractive relationships of various information measures associated with correlated variables and.[1] The area contained by either circle is thejoint entropy. The circle on the left (red and violet) is theindividual entropy, with the red being theconditional entropy. The circle on the right (blue and violet) is, with the blue being. The violet is the mutual information.
Inprobability theory andinformation theory, themutual information (MI) of tworandom variables is a measure of the mutualdependence between the two variables. More specifically, it quantifies the "amount of information" (inunits such asshannons (bits),nats orhartleys) obtained about one random variable by observing the other random variable. The concept of mutual information is intimately linked to that ofentropy of a random variable, a fundamental notion in information theory that quantifies the expected "amount of information" held in a random variable.
Let be a pair ofrandom variables with values over the space. If their joint distribution is and the marginal distributions are and, the mutual information is defined as
Notice, as per property of theKullback–Leibler divergence, that is equal to zero precisely when the joint distribution coincides with the product of the marginals, i.e. when and are independent (and hence observing tells you nothing about). is non-negative. It is a measure of the price for encoding as a pair of independent random variables when in reality they are not.
If thenatural logarithm is used, the unit of mutual information is thenat. If thelog base 2 is used, the unit of mutual information is theshannon, also known as the bit. If thelog base 10 is used, the unit of mutual information is thehartley, also known as the ban or the dit.
Intuitively, mutual information measures the information that and share: It measures how much knowing one of these variables reduces uncertainty about the other. For example, if and are independent, then knowing does not give any information about and vice versa, so their mutual information is zero. At the other extreme, if is a deterministic function of and is a deterministic function of then all information conveyed by is shared with: knowing determines the value of and vice versa. As a result, the mutual information is the same as the uncertainty contained in (or) alone, namely theentropy of (or). A very special case of this is when and are the same random variable.
Mutual information is a measure of the inherent dependence expressed in thejoint distribution of and relative to the marginal distribution of and under the assumption of independence. Mutual information therefore measures dependence in the following sense:if and only if and are independent random variables. This is easy to see in one direction: if and are independent, then, and therefore:
.
Moreover, mutual information is nonnegative (i.e. see below) andsymmetric (i.e. see below).
Notice the analogy to the union, difference, and intersection of two sets: in this respect, all the formulas given above are apparent from the Venn diagram reported at the beginning of the article.
In terms of a communication channel in which the output is a noisy version of the input, these relations are summarised in the figure:
The relationships between information theoretic quantities
Because is non-negative, consequently,. Here we give the detailed deduction of for the case of jointly discrete random variables:
The proofs of the other identities above are similar. The proof of the general case (not just discrete) is similar, with integrals replacing sums.
Intuitively, if entropy is regarded as a measure of uncertainty about a random variable, then is a measure of what doesnot say about. This is "the amount of uncertainty remaining about after is known", and thus the right side of the second of these equalities can be read as "the amount of uncertainty in, minus the amount of uncertainty in which remains after is known", which is equivalent to "the amount of uncertainty in which is removed by knowing". This corroborates the intuitive meaning of mutual information as the amount of information (that is, reduction in uncertainty) that knowing either variable provides about the other.
Note that in the discrete case and therefore. Thus, and one can formulate the basic principle that a variable contains at least as much information about itself as any other variable can provide.
Furthermore, let be the conditional mass or density function. Then, we have the identity
The proof for jointly discrete random variables is as follows:
Similarly this identity can be established for jointly continuous random variables.
Note that here the Kullback–Leibler divergence involves integration over the values of the random variable only, and the expression still denotes a random variable because is random. Thus mutual information can also be understood as theexpectation over of the Kullback–Leibler divergence of theconditional distribution of given from theunivariate distribution of: the more different the distributions and are on average, the greater theinformation gain.
If samples from a joint distribution are available, a Bayesian approach can be used to estimate the mutual information of that distribution. The first work to do this, which also showed how to do Bayesian estimation of many other information-theoretic properties besides mutual information, was.[5] Subsequent researchers have rederived[6] and extended[7]this analysis. See[8] for a recent paper based on a prior specifically tailored to estimation of mutual information per se. Besides, recently an estimation method accounting for continuous and multivariate outputs,, was proposed in .[9]
The Kullback-Leibler divergence formulation of the mutual information is predicated on that one is interested in comparing to the fully factorizedouter product. In many problems, such asnon-negative matrix factorization, one is interested in less extreme factorizations; specifically, one wishes to compare to a low-rank matrix approximation in some unknown variable; that is, to what degree one might have
Alternately, one might be interested in knowing how much more information carries over its factorization. In such a case, the excess information that the full distribution carries over the matrix factorization is given by the Kullback-Leibler divergence
The conventional definition of the mutual information is recovered in the extreme case that the process has only one value for.
Several variations on mutual information have been proposed to suit various needs. Among these are normalized variants and generalizations to more than two variables.
If are discrete random variables then all the entropy terms are non-negative, so and one can define a normalized distance
Plugging in the definitions shows that
This is known as the Rajski Distance.[11] In a set-theoretic interpretation of information (see the figure forConditional entropy), this is effectively theJaccard distance between and.
Conditioning on a third random variable may either increase or decrease the mutual information, but it is always true that
for discrete, jointly distributed random variables. This result has been used as a basic building block for proving otherinequalities in information theory.
Several generalizations of mutual information to more than two random variables have been proposed, such astotal correlation (or multi-information) anddual total correlation. The expression and study of multivariate higher-degree mutual information was achieved in two seemingly independent works: McGill (1954)[12] who called these functions "interaction information", and Hu Kuo Ting (1962).[13] Interaction information is defined for one variable as follows:
and for
Some authors reverse the order of the terms on the right-hand side of the preceding equation, which changes the sign when the number of random variables is odd. (And in this case, the single-variable expression becomes the negative of the entropy.) Note that
The multivariate mutual information functions generalize thepairwise independence case that states that if and only if, to arbitrary numerous variable. n variables are mutually independent if and only if the mutual information functions vanish with (theorem 2[14]). In this sense, the can be used as a refined statistical independence criterion.
For 3 variables, Brenner et al. applied multivariate mutual information toneural coding and called its negativity "synergy"[15] and Watkinson et al. applied it to genetic expression.[16] For arbitrary k variables, Tapia et al. applied multivariate mutual information togene expression.[17][14] It can be zero, positive, or negative.[13] The positivity corresponds to relations generalizing the pairwise correlations, nullity corresponds to a refined notion of independence, and negativity detects high dimensional "emergent" relations and clustered datapoints[17]).
One high-dimensional generalization scheme which maximizes the mutual information between the joint distribution and other target variables is found to be useful infeature selection.[18]
Mutual information is also used in the area of signal processing as ameasure of similarity between two signals. For example, FMI metric[19] is an image fusion performance measure that makes use of mutual information in order to measure the amount of information that the fused image contains about the source images. TheMatlab code for this metric can be found at.[20] A python package for computing all multivariate mutual informations,conditional mutual information, joint entropies, total correlations, information distance in a dataset of n variables is available.[21]
Directed information,, measures the amount of information that flows from the process to, where denotes the vector and denotes. The termdirected information was coined byJames Massey and is defined as
.
Note that if, the directed information becomes the mutual information. Directed information has many applications in problems wherecausality plays an important role, such ascapacity of channel with feedback.[22][23]
Normalized variants of the mutual information are provided by thecoefficients of constraint,[24]uncertainty coefficient[25] or proficiency:[26]
The two coefficients have a value ranging in [0, 1], but are not necessarily equal. This measure is not symmetric. If one desires a symmetric measure, one may consider the followingredundancy measure:
which attains a minimum of zero when the variables are independent and a maximum value of
This normalized version is also known asInformation Quality Ratio (IQR) and quantifies the amount of information of a variable based on another variable against total uncertainty:[27]
In the traditional formulation of the mutual information,
eachevent orobject specified by is weighted by the corresponding probability. This assumes that all objects or events are equivalentapart from their probability of occurrence. However, in some applications it may be the case that certain objects or events are moresignificant than others, or that certain patterns of association are more semantically important than others.
For example, the deterministic mapping may be viewed as stronger than the deterministic mapping, although these relationships would yield the same mutual information. This is because the mutual information is not sensitive at all to any inherent ordering in the variable values (Cronbach 1954,Coombs, Dawes & Tversky 1970,Lockhead 1970), and is therefore not sensitive at all to theform of the relational mapping between the associated variables. If it is desired that the former relation—showing agreement on all variable values—be judged stronger than the later relation, then it is possible to use the followingweighted mutual information (Guiasu 1977).
which places a weight on the probability of each variable value co-occurrence,. This allows that certain probabilities may carry more or less significance than others, thereby allowing the quantification of relevantholistic orPrägnanz factors. In the above example, using larger relative weights for,, and would have the effect of assessing greaterinformativeness for the relation than for the relation, which may be desirable in some cases of pattern recognition, and the like. This weighted mutual information is a form of weighted KL-Divergence, which is known to take negative values for some inputs,[30] and there are examples where the weighted mutual information also takes negative values.[31]
A probability distribution can be viewed as apartition of a set. One may then ask: if a set were partitioned randomly, what would the distribution of probabilities be? What would the expectation value of the mutual information be? Theadjusted mutual information or AMI subtracts the expectation value of the MI, so that the AMI is zero when two different distributions are random, and one when two distributions are identical. The AMI is defined in analogy to theadjusted Rand index of two different partitions of a set.
Unlike correlation coefficients, such as theproduct moment correlation coefficient, mutual information contains information about all dependence—linear and nonlinear—and not just linear dependence as the correlation coefficient measures. However, in the narrow case that the joint distribution for and is abivariate normal distribution (implying in particular that both marginal distributions are normally distributed), there is an exact relationship between and the correlation coefficient (Gel'fand & Yaglom 1957).
The equation above can be derived as follows for a bivariate Gaussian:
When and are limited to be in a discrete number of states, observation data is summarized in acontingency table, with row variable (or) and column variable (or). Mutual information is one of the measures ofassociation orcorrelation between the row and column variables.
Other measures of association includePearson's chi-squared test statistics,G-test statistics, etc. In fact, with the same log base, mutual information will be equal to theG-test log-likelihood statistic divided by, where is the sample size.
In many applications, one wants to maximize mutual information (thus increasing dependencies), which is often equivalent to minimizingconditional entropy. Examples include:
Insearch engine technology, mutual information between phrases and contexts is used as a feature fork-means clustering to discover semantic clusters (concepts).[32] For example, the mutual information of a bigram might be calculated as:
where is the number of times the bigram xy appears in the corpus, is the number of times the unigram x appears in the corpus, B is the total number of bigrams, and U is the total number of unigrams.[32]
Mutual information is used in determining the similarity of two differentclusterings of a dataset. As such, it provides some advantages over the traditionalRand index.
Mutual information of words is often used as a significance function for the computation ofcollocations incorpus linguistics. This has the added complexity that no word-instance is an instance to two different words; rather, one counts instances where 2 words occur adjacent or in close proximity; this slightly complicates the calculation, since the expected probability of one word occurring within words of another, goes up with
Mutual information is used inmedical imaging forimage registration. Given a reference image (for example, a brain scan), and a second image which needs to be put into the samecoordinate system as the reference image, this image is deformed until the mutual information between it and the reference image is maximized.
Instatistical mechanics,Loschmidt's paradox may be expressed in terms of mutual information.[33][34] Loschmidt noted that it must be impossible to determine a physical law which lackstime reversal symmetry (e.g. thesecond law of thermodynamics) only from physical laws which have this symmetry. He pointed out that theH-theorem ofBoltzmann made the assumption that the velocities of particles in a gas were permanently uncorrelated, which removed the time symmetry inherent in the H-theorem. It can be shown that if a system is described by a probability density inphase space, thenLiouville's theorem implies that the joint information (negative of the joint entropy) of the distribution remains constant in time. The joint information is equal to the mutual information plus the sum of all the marginal information (negative of the marginal entropies) for each particle coordinate. Boltzmann's assumption amounts to ignoring the mutual information in the calculation of entropy, which yields the thermodynamic entropy (divided by the Boltzmann constant).
Instochastic processes coupled to changing environments, mutual information can be used to disentangle internal and effective environmental dependencies.[35][36] This is particularly useful when a physical system undergoes changes in the parameters describing its dynamics, e.g., changes in temperature.
The mutual information is used to learn the structure ofBayesian networks/dynamic Bayesian networks, which is thought to explain the causal relationship between random variables, as exemplified by the GlobalMIT toolkit:[37] learning the globally optimal dynamic Bayesian network with the Mutual Information Test criterion.
The mutual information is used to quantify information transmitted during the updating procedure in theGibbs sampling algorithm.[38]
The mutual information is used incosmology to test the influence of large-scale environments on galaxy properties in theGalaxy Zoo.
The mutual information was used inSolar Physics to derive the solardifferential rotation profile, a travel-time deviation map for sunspots, and a time–distance diagram from quiet-Sun measurements[39]
Used in Invariant Information Clustering to automatically train neural network classifiers and image segmenters given no labelled data.[40]
Instochastic dynamical systems with multiple timescales, mutual information has been shown to capture the functional couplings between different temporal scales.[41] Importantly, it was shown that physical interactions may or may not give rise to mutual information, depending on the typical timescale of their dynamics.
^Haghighat, M. B. A.; Aghagolzadeh, A.; Seyedarabi, H. (2011). "A non-reference image fusion metric based on mutual information of image features".Computers & Electrical Engineering.37 (5):744–756.doi:10.1016/j.compeleceng.2011.07.012.S2CID7738541.
^Massey, James (1990). "Causality, Feedback And Directed Informatio".Proc. 1990 Intl. Symp. on Info. Th. and its Applications, Waikiki, Hawaii, Nov. 27-30, 1990.CiteSeerX10.1.1.36.5688.
^Permuter, Haim Henry; Weissman, Tsachy; Goldsmith, Andrea J. (February 2009). "Finite State Channels With Time-Invariant Deterministic Feedback".IEEE Transactions on Information Theory.55 (2):644–662.arXiv:cs/0608070.doi:10.1109/TIT.2008.2009849.S2CID13178.
^Wijaya, Dedy Rahman; Sarno, Riyanarto; Zulaika, Enny (2017). "Information Quality Ratio as a novel metric for mother wavelet selection".Chemometrics and Intelligent Laboratory Systems.160:59–71.doi:10.1016/j.chemolab.2016.11.012.
^Jerdee, M., Kirkley, A. & Newman, M. Normalized mutual information is a biased measure for classification and community detection.Nat Commun (2025).https://doi.org/10.1038/s41467-025-66150-8
^Kvålseth, T. O. (1991). "The relative useful information measure: some comments".Information Sciences.56 (1):35–38.doi:10.1016/0020-0255(91)90022-m.
Cronbach, L. J. (1954). "On the non-rational application of information measures in psychology". InQuastler, Henry (ed.).Information Theory in Psychology: Problems and Methods. Glencoe, Illinois: Free Press. pp. 14–30.
Coombs, C. H.; Dawes, R. M.; Tversky, A. (1970).Mathematical Psychology: An Elementary Introduction. Englewood Cliffs, New Jersey: Prentice-Hall.
Gel'fand, I.M.; Yaglom, A.M. (1957). "Calculation of amount of information about a random function contained in another such function".American Mathematical Society Translations. Series 2.12:199–246.doi:10.1090/trans2/012/09.ISBN978-0-8218-1712-4.{{cite journal}}:ISBN / Date incompatibility (help) English translation of original inUspekhi Matematicheskikh Nauk12 (1): 3-52.
Guiasu, Silviu (1977).Information Theory with Applications. McGraw-Hill, New York.ISBN978-0-07-025109-0.
Li, Ming; Vitányi, Paul (February 1997).An introduction to Kolmogorov complexity and its applications. New York:Springer-Verlag.ISBN978-0-387-94868-3.
Lockhead, G. R. (1970). "Identification and the form of multidimensional discrimination space".Journal of Experimental Psychology.85 (1):1–10.doi:10.1037/h0029508.PMID5458322.
Haghighat, M. B. A.; Aghagolzadeh, A.; Seyedarabi, H. (2011). "A non-reference image fusion metric based on mutual information of image features".Computers & Electrical Engineering.37 (5):744–756.doi:10.1016/j.compeleceng.2011.07.012.S2CID7738541.
Athanasios Papoulis.Probability, Random Variables, and Stochastic Processes, second edition. New York: McGraw-Hill, 1984.(See Chapter 15.)