Misplaced Pages

Kullback–Leibler divergence

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
(Redirected from Kullback–Leibler distance) Mathematical statistics distance measure

In mathematical statistics, the Kullback–Leibler (KL) divergence (also called relative entropy and I-divergence), denoted D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} , is a type of statistical distance: a measure of how much a model probability distribution Q is different from a true probability distribution P. Mathematically, it is defined as

D KL ( P Q ) = x X P ( x )   log (   P ( x )   Q ( x ) ) . {\displaystyle D_{\text{KL}}(P\parallel Q)=\sum _{x\in {\mathcal {X}}}P(x)\ \log \left({\frac {\ P(x)\ }{Q(x)}}\right).}

A simple interpretation of the KL divergence of P from Q is the expected excess surprise from using Q as a model instead of P when the actual distribution is P. While it is a measure of how different two distributions are, and in some sense is thus a "distance", it is not actually a metric, which is the most familiar and formal type of distance. In particular, it is not symmetric in the two distributions (in contrast to variation of information), and does not satisfy the triangle inequality. Instead, in terms of information geometry, it is a type of divergence, a generalization of squared distance, and for certain classes of distributions (notably an exponential family), it satisfies a generalized Pythagorean theorem (which applies to squared distances).

Relative entropy is always a non-negative real number, with value 0 if and only if the two distributions in question are identical. It has diverse applications, both theoretical, such as characterizing the relative (Shannon) entropy in information systems, randomness in continuous time-series, and information gain when comparing statistical models of inference; and practical, such as applied statistics, fluid mechanics, neuroscience, bioinformatics, and machine learning.

Introduction and context

Consider two probability distributions P and Q. Usually, P represents the data, the observations, or a measured probability distribution. Distribution Q represents instead a theory, a model, a description or an approximation of P. The Kullback–Leibler divergence D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} is then interpreted as the average difference of the number of bits required for encoding samples of P using a code optimized for Q rather than one optimized for P. Note that the roles of P and Q can be reversed in some situations where that is easier to compute, such as with the expectation–maximization algorithm (EM) and evidence lower bound (ELBO) computations.

Etymology

The relative entropy was introduced by Solomon Kullback and Richard Leibler in Kullback & Leibler (1951) as "the mean information for discrimination between H 1 {\displaystyle H_{1}} and H 2 {\displaystyle H_{2}} per observation from μ 1 {\displaystyle \mu _{1}} ", where one is comparing two probability measures μ 1 , μ 2 {\displaystyle \mu _{1},\mu _{2}} , and H 1 , H 2 {\displaystyle H_{1},H_{2}} are the hypotheses that one is selecting from measure μ 1 , μ 2 {\displaystyle \mu _{1},\mu _{2}} (respectively). They denoted this by I ( 1 : 2 ) {\displaystyle I(1:2)} , and defined the "'divergence' between μ 1 {\displaystyle \mu _{1}} and μ 2 {\displaystyle \mu _{2}} " as the symmetrized quantity J ( 1 , 2 ) = I ( 1 : 2 ) + I ( 2 : 1 ) {\displaystyle J(1,2)=I(1:2)+I(2:1)} , which had already been defined and used by Harold Jeffreys in 1948. In Kullback (1959), the symmetrized form is again referred to as the "divergence", and the relative entropies in each direction are referred to as a "directed divergences" between two distributions; Kullback preferred the term discrimination information. The term "divergence" is in contrast to a distance (metric), since the symmetrized divergence does not satisfy the triangle inequality. Numerous references to earlier uses of the symmetrized divergence and to other statistical distances are given in Kullback (1959, pp. 6–7, §1.3 Divergence). The asymmetric "directed divergence" has come to be known as the Kullback–Leibler divergence, while the symmetrized "divergence" is now referred to as the Jeffreys divergence.

Definition

For discrete probability distributions P and Q defined on the same sample space,   X   , {\displaystyle \ {\mathcal {X}}\ ,} the relative entropy from Q to P is defined to be

D KL ( P Q ) = x X P ( x )   log (   P ( x )   Q ( x ) )   , {\displaystyle D_{\text{KL}}(P\parallel Q)=\sum _{x\in {\mathcal {X}}}P(x)\ \log \left({\frac {\ P(x)\ }{Q(x)}}\right)\ ,}

which is equivalent to

D KL ( P Q ) = x X P ( x )   log (   Q ( x )   P ( x ) )   . {\displaystyle D_{\text{KL}}(P\parallel Q)=-\sum _{x\in {\mathcal {X}}}P(x)\ \log \left({\frac {\ Q(x)\ }{P(x)}}\right)~.}

In other words, it is the expectation of the logarithmic difference between the probabilities P and Q, where the expectation is taken using the probabilities P.

Relative entropy is only defined in this way if, for all x,   Q ( x ) = 0   {\displaystyle \ Q(x)=0\ } implies   P ( x ) = 0   {\displaystyle \ P(x)=0\ } (absolute continuity). Otherwise, it is often defined as + {\displaystyle +\infty } , but the value   +   {\displaystyle \ +\infty \ } is possible even if   Q ( x ) 0   {\displaystyle \ Q(x)\neq 0\ } everywhere, provided that   X   {\displaystyle \ {\mathcal {X}}\ } is infinite in extent. Analogous comments apply to the continuous and general measure cases defined below.

Whenever   P ( x )   {\displaystyle \ P(x)\ } is zero the contribution of the corresponding term is interpreted as zero because

lim x 0 + x log ( x ) = 0   . {\displaystyle \lim _{x\to 0^{+}}x\log(x)=0~.}

For distributions P and Q of a continuous random variable, relative entropy is defined to be the integral

D KL ( P Q ) = p ( x )   log ( p ( x ) q ( x ) )   d   x   , {\displaystyle D_{\text{KL}}(P\parallel Q)=\int _{-\infty }^{\infty }p(x)\ \log \left({\frac {p(x)}{q(x)}}\right)\ \mathrm {d} \ \!x\ ,}

where p and q denote the probability densities of P and Q.

More generally, if P and Q are probability measures on a measurable space   X   , {\displaystyle \ {\mathcal {X}}\ ,} and P is absolutely continuous with respect to Q, then the relative entropy from Q to P is defined as

D KL ( P Q ) = x X   log ( P ( d   x ) Q ( d   x ) )   P ( d   x )   , {\displaystyle D_{\text{KL}}(P\parallel Q)=\int _{x\in {\mathcal {X}}}\ \log \left({\frac {P(\mathrm {d} \ \!x)}{Q(\mathrm {d} \ \!x)}}\right)\ P(\mathrm {d} \ \!x)\ ,}

where     P ( d   x )   Q ( d   x )   {\displaystyle \ {\frac {\ P(\mathrm {d} \ \!x)\ }{Q(\mathrm {d} \ \!x)\ }}} is the Radon–Nikodym derivative of P with respect to Q, i.e. the unique Q almost everywhere defined function r on   X   {\displaystyle \ {\mathcal {X}}\ } such that   P ( d   x ) = r ( x ) Q ( d   x )   {\displaystyle \ P(\mathrm {d} \ \!x)=r(x)Q(\mathrm {d} \ \!x)\ } which exists because P is absolutely continuous with respect to Q. Also we assume the expression on the right-hand side exists. Equivalently (by the chain rule), this can be written as

D KL ( P Q ) = x X P ( d   x ) Q ( d   x )   log ( P ( d   x ) Q ( d   x ) )   Q ( d   x )   , {\displaystyle D_{\text{KL}}(P\parallel Q)=\int _{x\in {\mathcal {X}}}{\frac {P(\mathrm {d} \ \!x)}{Q(\mathrm {d} \ \!x)}}\ \log \left({\frac {P(\mathrm {d} \ \!x)}{Q(\mathrm {d} \ \!x)}}\right)\ Q(\mathrm {d} \ \!x)\ ,}

which is the entropy of P relative to Q. Continuing in this case, if μ {\displaystyle \mu } is any measure on X {\displaystyle {\mathcal {X}}} for which densities p and q with   P ( d   x ) = p ( x ) μ ( d   x )   {\displaystyle \ P(\mathrm {d} \ \!x)=p(x)\mu (\mathrm {d} \ \!x)\ } and   Q ( d   x ) = q ( x ) μ ( d   x )   {\displaystyle \ Q(\mathrm {d} \ \!x)=q(x)\mu (\mathrm {d} \ \!x)\ } exist (meaning that P and Q are both absolutely continuous with respect to   μ   {\displaystyle \ \mu \ } ), then the relative entropy from Q to P is given as

D KL ( P Q ) = x X p ( x )   log (   p ( x )   q ( x ) )   μ ( d   x )   . {\displaystyle D_{\text{KL}}(P\parallel Q)=\int _{x\in {\mathcal {X}}}p(x)\ \log \left({\frac {\ p(x)\ }{q(x)}}\right)\ \mu (\mathrm {d} \ \!x)~.}

Note that such a measure μ {\displaystyle \mu } for which densities can be defined always exists, since one can take   μ = 1 2 ( P + Q )   {\displaystyle \ \mu ={\frac {1}{2}}\left(P+Q\right)\ } although in practice it will usually be one that in the context like counting measure for discrete distributions, or Lebesgue measure or a convenient variant thereof like Gaussian measure or the uniform measure on the sphere, Haar measure on a Lie group etc. for continuous distributions. The logarithms in these formulae are usually taken to base 2 if information is measured in units of bits, or to base e if information is measured in nats. Most formulas involving relative entropy hold regardless of the base of the logarithm.

Various conventions exist for referring to   D KL ( P Q )   {\displaystyle \ D_{\text{KL}}(P\parallel Q)\ } in words. Often it is referred to as the divergence between P and Q, but this fails to convey the fundamental asymmetry in the relation. Sometimes, as in this article, it may be described as the divergence of P from Q or as the divergence from Q to P. This reflects the asymmetry in Bayesian inference, which starts from a prior Q and updates to the posterior P. Another common way to refer to   D KL ( P Q )   {\displaystyle \ D_{\text{KL}}(P\parallel Q)\ } is as the relative entropy of P with respect to Q or the information gain from P over Q.

Basic example

Kullback gives the following example (Table 2.1, Example 2.1). Let P and Q be the distributions shown in the table and figure. P is the distribution on the left side of the figure, a binomial distribution with N = 2 {\displaystyle N=2} and p = 0.4 {\displaystyle p=0.4} . Q is the distribution on the right side of the figure, a discrete uniform distribution with the three possible outcomes x = {\displaystyle x=} 0, 1, 2 (i.e. X = { 0 , 1 , 2 } {\displaystyle {\mathcal {X}}=\{0,1,2\}} ), each with probability p = 1 / 3 {\displaystyle p=1/3} .

Two distributions to illustrate relative entropy
x 0 1 2
Distribution P ( x ) {\displaystyle P(x)} 9 25 {\displaystyle {\frac {9}{25}}} 12 25 {\displaystyle {\frac {12}{25}}} 4 25 {\displaystyle {\frac {4}{25}}}
Distribution Q ( x ) {\displaystyle Q(x)} 1 3 {\displaystyle {\frac {1}{3}}} 1 3 {\displaystyle {\frac {1}{3}}} 1 3 {\displaystyle {\frac {1}{3}}}

Relative entropies D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} and D KL ( Q P ) {\displaystyle D_{\text{KL}}(Q\parallel P)} are calculated as follows. This example uses the natural log with base e, designated ln to get results in nats (see units of information):

D KL ( P Q ) = x X P ( x ) ln ( P ( x ) Q ( x ) ) = 9 25 ln ( 9 / 25 1 / 3 ) + 12 25 ln ( 12 / 25 1 / 3 ) + 4 25 ln ( 4 / 25 1 / 3 ) = 1 25 ( 32 ln ( 2 ) + 55 ln ( 3 ) 50 ln ( 5 ) ) 0.0852996 , {\displaystyle {\begin{aligned}D_{\text{KL}}(P\parallel Q)&=\sum _{x\in {\mathcal {X}}}P(x)\ln \left({\frac {P(x)}{Q(x)}}\right)\\&={\frac {9}{25}}\ln \left({\frac {9/25}{1/3}}\right)+{\frac {12}{25}}\ln \left({\frac {12/25}{1/3}}\right)+{\frac {4}{25}}\ln \left({\frac {4/25}{1/3}}\right)\\&={\frac {1}{25}}\left(32\ln(2)+55\ln(3)-50\ln(5)\right)\approx 0.0852996,\end{aligned}}}
D KL ( Q P ) = x X Q ( x ) ln ( Q ( x ) P ( x ) ) = 1 3 ln ( 1 / 3 9 / 25 ) + 1 3 ln ( 1 / 3 12 / 25 ) + 1 3 ln ( 1 / 3 4 / 25 ) = 1 3 ( 4 ln ( 2 ) 6 ln ( 3 ) + 6 ln ( 5 ) ) 0.097455. {\displaystyle {\begin{aligned}D_{\text{KL}}(Q\parallel P)&=\sum _{x\in {\mathcal {X}}}Q(x)\ln \left({\frac {Q(x)}{P(x)}}\right)\\&={\frac {1}{3}}\ln \left({\frac {1/3}{9/25}}\right)+{\frac {1}{3}}\ln \left({\frac {1/3}{12/25}}\right)+{\frac {1}{3}}\ln \left({\frac {1/3}{4/25}}\right)\\&={\frac {1}{3}}\left(-4\ln(2)-6\ln(3)+6\ln(5)\right)\approx 0.097455.\end{aligned}}}

Interpretations

Statistics

In the field of statistics, the Neyman–Pearson lemma states that the most powerful way to distinguish between the two distributions P and Q based on an observation Y (drawn from one of them) is through the log of the ratio of their likelihoods: log P ( Y ) log Q ( Y ) {\displaystyle \log P(Y)-\log Q(Y)} . The KL divergence is the expected value of this statistic if Y is actually drawn from P. Kullback motivated the statistic as an expected log likelihood ratio.

Coding

In the context of coding theory, D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} can be constructed by measuring the expected number of extra bits required to code samples from P using a code optimized for Q rather than the code optimized for P.

Inference

In the context of machine learning, D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} is often called the information gain achieved if P would be used instead of Q which is currently used. By analogy with information theory, it is called the relative entropy of P with respect to Q.

Expressed in the language of Bayesian inference, D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} is a measure of the information gained by revising one's beliefs from the prior probability distribution Q to the posterior probability distribution P. In other words, it is the amount of information lost when Q is used to approximate P.

Information geometry

In applications, P typically represents the "true" distribution of data, observations, or a precisely calculated theoretical distribution, while Q typically represents a theory, model, description, or approximation of P. In order to find a distribution Q that is closest to P, we can minimize the KL divergence and compute an information projection.

While it is a statistical distance, it is not a metric, the most familiar type of distance, but instead it is a divergence. While metrics are symmetric and generalize linear distance, satisfying the triangle inequality, divergences are asymmetric and generalize squared distance, in some cases satisfying a generalized Pythagorean theorem. In general D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} does not equal D KL ( Q P ) {\displaystyle D_{\text{KL}}(Q\parallel P)} , and the asymmetry is an important part of the geometry. The infinitesimal form of relative entropy, specifically its Hessian, gives a metric tensor that equals the Fisher information metric; see § Fisher information metric. Fisher information metric on the certain probability distribution let determine the natural gradient for information-geometric optimization algorithms. Its quantum version is Fubini-study metric. Relative entropy satisfies a generalized Pythagorean theorem for exponential families (geometrically interpreted as dually flat manifolds), and this allows one to minimize relative entropy by geometric means, for example by information projection and in maximum likelihood estimation.

The relative entropy is the Bregman divergence generated by the negative entropy, but it is also of the form of an f-divergence. For probabilities over a finite alphabet, it is unique in being a member of both of these classes of statistical divergences. The application of Bregman divergence can be found in mirror descent.

Finance (game theory)

Consider a growth-optimizing investor in a fair game with mutually exclusive outcomes (e.g. a “horse race” in which the official odds add up to one). The rate of return expected by such an investor is equal to the relative entropy between the investor's believed probabilities and the official odds. This is a special case of a much more general connection between financial returns and divergence measures.

Financial risks are connected to D KL {\displaystyle D_{\text{KL}}} via information geometry. Investors' views, the prevailing market view, and risky scenarios form triangles on the relevant manifold of probability distributions. The shape of the triangles determines key financial risks (both qualitatively and quantitatively). For instance, obtuse triangles in which investors' views and risk scenarios appear on “opposite sides” relative to the market describe negative risks, acute triangles describe positive exposure, and the right-angled situation in the middle corresponds to zero risk. Extending this concept, relative entropy can be hypothetically utilised to identify the behaviour of informed investors, if one takes this to be represented by the magnitude and deviations away from the prior expectations of fund flows, for example.

Motivation

Illustration of the relative entropy for two normal distributions. The typical asymmetry is clearly visible.

In information theory, the Kraft–McMillan theorem establishes that any directly decodable coding scheme for coding a message to identify one value x i {\displaystyle x_{i}} out of a set of possibilities X can be seen as representing an implicit probability distribution q ( x i ) = 2 i {\displaystyle q(x_{i})=2^{-\ell _{i}}} over X, where i {\displaystyle \ell _{i}} is the length of the code for x i {\displaystyle x_{i}} in bits. Therefore, relative entropy can be interpreted as the expected extra message-length per datum that must be communicated if a code that is optimal for a given (wrong) distribution Q is used, compared to using a code based on the true distribution P: it is the excess entropy.

D KL ( P Q ) = x X p ( x ) log 1 q ( x ) x X p ( x ) log 1 p ( x ) = H ( P , Q ) H ( P ) {\displaystyle {\begin{aligned}D_{\text{KL}}(P\parallel Q)&=\sum _{x\in {\mathcal {X}}}p(x)\log {\frac {1}{q(x)}}-\sum _{x\in {\mathcal {X}}}p(x)\log {\frac {1}{p(x)}}\\&=\mathrm {H} (P,Q)-\mathrm {H} (P)\end{aligned}}}

where H ( P , Q ) {\displaystyle \mathrm {H} (P,Q)} is the cross entropy of Q relative to P and H ( P ) {\displaystyle \mathrm {H} (P)} is the entropy of P (which is the same as the cross-entropy of P with itself).

The relative entropy D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} can be thought of geometrically as a statistical distance, a measure of how far the distribution Q is from the distribution P. Geometrically it is a divergence: an asymmetric, generalized form of squared distance. The cross-entropy H ( P , Q ) {\displaystyle H(P,Q)} is itself such a measurement (formally a loss function), but it cannot be thought of as a distance, since H ( P , P ) =: H ( P ) {\displaystyle H(P,P)=:H(P)} is not zero. This can be fixed by subtracting H ( P ) {\displaystyle H(P)} to make D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} agree more closely with our notion of distance, as the excess loss. The resulting function is asymmetric, and while this can be symmetrized (see § Symmetrised divergence), the asymmetric form is more useful. See § Interpretations for more on the geometric interpretation.

Relative entropy relates to "rate function" in the theory of large deviations.

Arthur Hobson proved that relative entropy is the only measure of difference between probability distributions that satisfies some desired properties, which are the canonical extension to those appearing in a commonly used characterization of entropy. Consequently, mutual information is the only measure of mutual dependence that obeys certain related conditions, since it can be defined in terms of Kullback–Leibler divergence.

Properties

  • Relative entropy is always non-negative, D KL ( P Q ) 0 , {\displaystyle D_{\text{KL}}(P\parallel Q)\geq 0,} a result known as Gibbs' inequality, with D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} equals zero if and only if P = Q {\displaystyle P=Q} as measures.

In particular, if P ( d x ) = p ( x ) μ ( d x ) {\displaystyle P(dx)=p(x)\mu (dx)} and Q ( d x ) = q ( x ) μ ( d x ) {\displaystyle Q(dx)=q(x)\mu (dx)} , then p ( x ) = q ( x ) {\displaystyle p(x)=q(x)} μ {\displaystyle \mu } -almost everywhere. The entropy H ( P ) {\displaystyle \mathrm {H} (P)} thus sets a minimum value for the cross-entropy H ( P , Q ) {\displaystyle \mathrm {H} (P,Q)} , the expected number of bits required when using a code based on Q rather than P; and the Kullback–Leibler divergence therefore represents the expected number of extra bits that must be transmitted to identify a value x drawn from X, if a code is used corresponding to the probability distribution Q, rather than the "true" distribution P.

  • No upper-bound exists for the general case. However, it is shown that if P and Q are two discrete probability distributions built by distributing the same discrete quantity, then the maximum value of D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} can be calculated.
  • Relative entropy remains well-defined for continuous distributions, and furthermore is invariant under parameter transformations. For example, if a transformation is made from variable x to variable y ( x ) {\displaystyle y(x)} , then, since P ( d x ) = p ( x ) d x = p ~ ( y ) d y = p ~ ( y ( x ) ) | d y d x ( x ) | d x {\displaystyle P(dx)=p(x)\,dx={\tilde {p}}(y)\,dy={\tilde {p}}(y(x))|{\tfrac {dy}{dx}}(x)|\,dx} and Q ( d x ) = q ( x ) d x = q ~ ( y ) d y = q ~ ( y ) | d y d x ( x ) | d x {\displaystyle Q(dx)=q(x)\,dx={\tilde {q}}(y)\,dy={\tilde {q}}(y)|{\tfrac {dy}{dx}}(x)|dx} where | d y d x ( x ) | {\displaystyle |{\tfrac {dy}{dx}}(x)|} is the absolute value of the derivative or more generally of the Jacobian, the relative entropy may be rewritten: D KL ( P Q ) = x a x b p ( x ) log ( p ( x ) q ( x ) ) d x = x a x b p ~ ( y ( x ) ) | d y d x ( x ) | log ( p ~ ( y ( x ) ) | d y d x ( x ) | q ~ ( y ( x ) ) | d y d x ( x ) | ) d x = y a y b p ~ ( y ) log ( p ~ ( y ) q ~ ( y ) ) d y {\displaystyle {\begin{aligned}D_{\text{KL}}(P\parallel Q)&=\int _{x_{a}}^{x_{b}}p(x)\log \left({\frac {p(x)}{q(x)}}\right)\,dx\\&=\int _{x_{a}}^{x_{b}}{\tilde {p}}(y(x))|{\frac {dy}{dx}}(x)|\log \left({\frac {{\tilde {p}}(y(x))\,|{\frac {dy}{dx}}(x)|}{{\tilde {q}}(y(x))\,|{\frac {dy}{dx}}(x)|}}\right)\,dx\\&=\int _{y_{a}}^{y_{b}}{\tilde {p}}(y)\log \left({\frac {{\tilde {p}}(y)}{{\tilde {q}}(y)}}\right)\,dy\end{aligned}}} where y a = y ( x a ) {\displaystyle y_{a}=y(x_{a})} and y b = y ( x b ) {\displaystyle y_{b}=y(x_{b})} . Although it was assumed that the transformation was continuous, this need not be the case. This also shows that the relative entropy produces a dimensionally consistent quantity, since if x is a dimensioned variable, p ( x ) {\displaystyle p(x)} and q ( x ) {\displaystyle q(x)} are also dimensioned, since e.g. P ( d x ) = p ( x ) d x {\displaystyle P(dx)=p(x)\,dx} is dimensionless. The argument of the logarithmic term is and remains dimensionless, as it must. It can therefore be seen as in some ways a more fundamental quantity than some other properties in information theory (such as self-information or Shannon entropy), which can become undefined or negative for non-discrete probabilities.
  • Relative entropy is additive for independent distributions in much the same way as Shannon entropy. If P 1 , P 2 {\displaystyle P_{1},P_{2}} are independent distributions, and P ( d x , d y ) = P 1 ( d x ) P 2 ( d y ) {\displaystyle P(dx,dy)=P_{1}(dx)P_{2}(dy)} , and likewise Q ( d x , d y ) = Q 1 ( d x ) Q 2 ( d y ) {\displaystyle Q(dx,dy)=Q_{1}(dx)Q_{2}(dy)} for independent distributions Q 1 , Q 2 {\displaystyle Q_{1},Q_{2}} then D KL ( P Q ) = D KL ( P 1 Q 1 ) + D KL ( P 2 Q 2 ) . {\displaystyle D_{\text{KL}}(P\parallel Q)=D_{\text{KL}}(P_{1}\parallel Q_{1})+D_{\text{KL}}(P_{2}\parallel Q_{2}).}
  • Relative entropy D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} is convex in the pair of probability measures ( P , Q ) {\displaystyle (P,Q)} , i.e. if ( P 1 , Q 1 ) {\displaystyle (P_{1},Q_{1})} and ( P 2 , Q 2 ) {\displaystyle (P_{2},Q_{2})} are two pairs of probability measures then D KL ( λ P 1 + ( 1 λ ) P 2 λ Q 1 + ( 1 λ ) Q 2 ) λ D KL ( P 1 Q 1 ) + ( 1 λ ) D KL ( P 2 Q 2 )  for  0 λ 1. {\displaystyle D_{\text{KL}}(\lambda P_{1}+(1-\lambda )P_{2}\parallel \lambda Q_{1}+(1-\lambda )Q_{2})\leq \lambda D_{\text{KL}}(P_{1}\parallel Q_{1})+(1-\lambda )D_{\text{KL}}(P_{2}\parallel Q_{2}){\text{ for }}0\leq \lambda \leq 1.}
  • D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} may be Taylor expanded about its minimum (i.e. P = Q {\displaystyle P=Q} ) as D KL ( P Q ) = n = 2 1 n ( n 1 ) x X ( Q ( x ) P ( x ) ) n Q ( x ) n 1 {\displaystyle D_{\text{KL}}(P\parallel Q)=\sum _{n=2}^{\infty }{\frac {1}{n(n-1)}}\sum _{x\in {\mathcal {X}}}{\frac {(Q(x)-P(x))^{n}}{Q(x)^{n-1}}}} which converges if and only if P 2 Q {\displaystyle P\leq 2Q} almost surely w.r.t Q {\displaystyle Q} .

Denote f ( α ) := D KL ( ( 1 α ) Q + α P Q ) {\displaystyle f(\alpha ):=D_{\text{KL}}((1-\alpha )Q+\alpha P\parallel Q)} and note that D KL ( P Q ) = f ( 1 ) {\displaystyle D_{\text{KL}}(P\parallel Q)=f(1)} . The first derivative of f {\displaystyle f} may be derived and evaluated as follows f ( α ) = x X ( P ( x ) Q ( x ) ) ( log ( ( 1 α ) Q ( x ) + α P ( x ) Q ( x ) ) + 1 ) = x X ( P ( x ) Q ( x ) ) log ( ( 1 α ) Q ( x ) + α P ( x ) Q ( x ) ) f ( 0 ) = 0 {\displaystyle {\begin{aligned}f'(\alpha )&=\sum _{x\in {\mathcal {X}}}(P(x)-Q(x))\left(\log \left({\frac {(1-\alpha )Q(x)+\alpha P(x)}{Q(x)}}\right)+1\right)\\&=\sum _{x\in {\mathcal {X}}}(P(x)-Q(x))\log \left({\frac {(1-\alpha )Q(x)+\alpha P(x)}{Q(x)}}\right)\\f'(0)&=0\end{aligned}}} Further derivatives may be derived and evaluated as follows f ( α ) = x X ( P ( x ) Q ( x ) ) 2 ( 1 α ) Q ( x ) + α P ( x ) f ( 0 ) = x X ( P ( x ) Q ( x ) ) 2 Q ( x ) f ( n ) ( α ) = ( 1 ) n ( n 2 ) ! x X ( P ( x ) Q ( x ) ) n ( ( 1 α ) Q ( x ) + α P ( x ) ) n 1 f ( n ) ( 0 ) = ( 1 ) n ( n 2 ) ! x X ( P ( x ) Q ( x ) ) n Q ( x ) n 1 {\displaystyle {\begin{aligned}f''(\alpha )&=\sum _{x\in {\mathcal {X}}}{\frac {(P(x)-Q(x))^{2}}{(1-\alpha )Q(x)+\alpha P(x)}}\\f''(0)&=\sum _{x\in {\mathcal {X}}}{\frac {(P(x)-Q(x))^{2}}{Q(x)}}\\f^{(n)}(\alpha )&=(-1)^{n}(n-2)!\sum _{x\in {\mathcal {X}}}{\frac {(P(x)-Q(x))^{n}}{\left((1-\alpha )Q(x)+\alpha P(x)\right)^{n-1}}}\\f^{(n)}(0)&=(-1)^{n}(n-2)!\sum _{x\in {\mathcal {X}}}{\frac {(P(x)-Q(x))^{n}}{Q(x)^{n-1}}}\end{aligned}}} Hence solving for D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} via the Taylor expansion of f {\displaystyle f} about 0 {\displaystyle 0} evaluated at α = 1 {\displaystyle \alpha =1} yields D KL ( P Q ) = n = 0 f ( n ) ( 0 ) n ! = n = 2 1 n ( n 1 ) x X ( Q ( x ) P ( x ) ) n Q ( x ) n 1 {\displaystyle {\begin{aligned}D_{\text{KL}}(P\parallel Q)&=\sum _{n=0}^{\infty }{\frac {f^{(n)}(0)}{n!}}\\&=\sum _{n=2}^{\infty }{\frac {1}{n(n-1)}}\sum _{x\in {\mathcal {X}}}{\frac {(Q(x)-P(x))^{n}}{Q(x)^{n-1}}}\end{aligned}}} P 2 Q {\displaystyle P\leq 2Q} a.s. is a sufficient condition for convergence of the series by the following absolute convergence argument n = 2 | 1 n ( n 1 ) x X ( Q ( x ) P ( x ) ) n Q ( x ) n 1 | = n = 2 1 n ( n 1 ) x X | Q ( x ) P ( x ) | | 1 P ( x ) Q ( x ) | n 1 n = 2 1 n ( n 1 ) x X | Q ( x ) P ( x ) | n = 2 1 n ( n 1 ) = 1 {\displaystyle {\begin{aligned}\sum _{n=2}^{\infty }\left\vert {\frac {1}{n(n-1)}}\sum _{x\in {\mathcal {X}}}{\frac {(Q(x)-P(x))^{n}}{Q(x)^{n-1}}}\right\vert &=\sum _{n=2}^{\infty }{\frac {1}{n(n-1)}}\sum _{x\in {\mathcal {X}}}\left\vert Q(x)-P(x)\right\vert \left\vert 1-{\frac {P(x)}{Q(x)}}\right\vert ^{n-1}\\&\leq \sum _{n=2}^{\infty }{\frac {1}{n(n-1)}}\sum _{x\in {\mathcal {X}}}\left\vert Q(x)-P(x)\right\vert \\&\leq \sum _{n=2}^{\infty }{\frac {1}{n(n-1)}}\\&=1\end{aligned}}} P 2 Q {\displaystyle P\leq 2Q} a.s. is also a necessary condition for convergence of the series by the following proof by contradiction. Assume that P > 2 Q {\displaystyle P>2Q} with measure strictly greater than 0 {\displaystyle 0} . It then follows that there must exist some values ϵ > 0 {\displaystyle \epsilon >0} , ρ > 0 {\displaystyle \rho >0} , and U < {\displaystyle U<\infty } such that P 2 Q + ϵ {\displaystyle P\geq 2Q+\epsilon } and Q U {\displaystyle Q\leq U} with measure ρ {\displaystyle \rho } . The previous proof of sufficiency demonstrated that the measure 1 ρ {\displaystyle 1-\rho } component of the series where P 2 Q {\displaystyle P\leq 2Q} is bounded, so we need only concern ourselves with the behavior of the measure ρ {\displaystyle \rho } component of the series where P 2 Q + ϵ {\displaystyle P\geq 2Q+\epsilon } . The absolute value of the n {\displaystyle n} th term of this component of the series is then lower bounded by 1 n ( n 1 ) ρ ( 1 + ϵ U ) n {\displaystyle {\frac {1}{n(n-1)}}\rho \left(1+{\frac {\epsilon }{U}}\right)^{n}} , which is unbounded as n {\displaystyle n\to \infty } , so the series diverges.


Duality formula for variational inference

The following result, due to Donsker and Varadhan, is known as Donsker and Varadhan's variational formula.

Theorem  — Let Θ {\displaystyle \Theta } be a set endowed with an appropriate σ {\displaystyle \sigma } -field F {\displaystyle {\mathcal {F}}} , and two probability measures P and Q, which formulate two probability spaces ( Θ , F , P ) {\displaystyle (\Theta ,{\mathcal {F}},P)} and ( Θ , F , Q ) {\displaystyle (\Theta ,{\mathcal {F}},Q)} , with Q P {\displaystyle Q\ll P} . ( Q P {\displaystyle Q\ll P} indicates that Q is absolutely continuous with respect to P.) Let h be a real-valued integrable random variable on ( Θ , F , P ) {\displaystyle (\Theta ,{\mathcal {F}},P)} . Then the following equality holds

log E P [ exp h ] = sup Q P { E Q [ h ] D KL ( Q P ) } . {\displaystyle \log E_{P}={\text{sup}}_{Q\ll P}\{E_{Q}-D_{\text{KL}}(Q\parallel P)\}.}

Further, the supremum on the right-hand side is attained if and only if it holds

Q ( d θ ) P ( d θ ) = exp h ( θ ) E P [ exp h ] , {\displaystyle {\frac {Q(d\theta )}{P(d\theta )}}={\frac {\exp h(\theta )}{E_{P}}},}

almost surely with respect to probability measure P, where Q ( d θ ) P ( d θ ) {\displaystyle {\frac {Q(d\theta )}{P(d\theta )}}} denotes the Radon-Nikodym derivative of Q with respect to P .

Proof

For a short proof assuming integrability of exp ( h ) {\displaystyle \exp(h)} with respect to P, let Q {\displaystyle Q^{*}} have P-density exp h ( θ ) E P [ exp h ] {\displaystyle {\frac {\exp h(\theta )}{E_{P}}}} , i.e. Q ( d θ ) = exp h ( θ ) E P [ exp h ] P ( d θ ) {\displaystyle Q^{*}(d\theta )={\frac {\exp h(\theta )}{E_{P}}}P(d\theta )} Then

D KL ( Q Q ) D KL ( Q P ) = E Q [ h ] + log E P [ exp h ] . {\displaystyle D_{\text{KL}}(Q\parallel Q^{*})-D_{\text{KL}}(Q\parallel P)=-E_{Q}+\log E_{P}.}

Therefore,

E Q [ h ] D KL ( Q P ) = log E P [ exp h ] D KL ( Q Q ) log E P [ exp h ] , {\displaystyle E_{Q}-D_{\text{KL}}(Q\parallel P)=\log E_{P}-D_{\text{KL}}(Q\parallel Q^{*})\leq \log E_{P},}

where the last inequality follows from D KL ( Q Q ) 0 {\displaystyle D_{\text{KL}}(Q\parallel Q^{*})\geq 0} , for which equality occurs if and only if Q = Q {\displaystyle Q=Q^{*}} . The conclusion follows.

Examples

Multivariate normal distributions

Suppose that we have two multivariate normal distributions, with means μ 0 , μ 1 {\displaystyle \mu _{0},\mu _{1}} and with (non-singular) covariance matrices Σ 0 , Σ 1 . {\displaystyle \Sigma _{0},\Sigma _{1}.} If the two distributions have the same dimension, k, then the relative entropy between the distributions is as follows:

D KL ( N 0 N 1 ) = 1 2 ( tr ( Σ 1 1 Σ 0 ) k + ( μ 1 μ 0 ) T Σ 1 1 ( μ 1 μ 0 ) + ln ( det Σ 1 det Σ 0 ) ) . {\displaystyle D_{\text{KL}}\left({\mathcal {N}}_{0}\parallel {\mathcal {N}}_{1}\right)={\frac {1}{2}}\left(\operatorname {tr} \left(\Sigma _{1}^{-1}\Sigma _{0}\right)-k+\left(\mu _{1}-\mu _{0}\right)^{\mathsf {T}}\Sigma _{1}^{-1}\left(\mu _{1}-\mu _{0}\right)+\ln \left({\frac {\det \Sigma _{1}}{\det \Sigma _{0}}}\right)\right).}

The logarithm in the last term must be taken to base e since all terms apart from the last are base-e logarithms of expressions that are either factors of the density function or otherwise arise naturally. The equation therefore gives a result measured in nats. Dividing the entire expression above by ln ( 2 ) {\displaystyle \ln(2)} yields the divergence in bits.

In a numerical implementation, it is helpful to express the result in terms of the Cholesky decompositions L 0 , L 1 {\displaystyle L_{0},L_{1}} such that Σ 0 = L 0 L 0 T {\displaystyle \Sigma _{0}=L_{0}L_{0}^{T}} and Σ 1 = L 1 L 1 T {\displaystyle \Sigma _{1}=L_{1}L_{1}^{T}} . Then with M and y solutions to the triangular linear systems L 1 M = L 0 {\displaystyle L_{1}M=L_{0}} , and L 1 y = μ 1 μ 0 {\displaystyle L_{1}y=\mu _{1}-\mu _{0}} ,

D KL ( N 0 N 1 ) = 1 2 ( i , j = 1 k ( M i j ) 2 k + | y | 2 + 2 i = 1 k ln ( L 1 ) i i ( L 0 ) i i ) . {\displaystyle D_{\text{KL}}\left({\mathcal {N}}_{0}\parallel {\mathcal {N}}_{1}\right)={\frac {1}{2}}\left(\sum _{i,j=1}^{k}(M_{ij})^{2}-k+|y|^{2}+2\sum _{i=1}^{k}\ln {\frac {(L_{1})_{ii}}{(L_{0})_{ii}}}\right).}

A special case, and a common quantity in variational inference, is the relative entropy between a diagonal multivariate normal, and a standard normal distribution (with zero mean and unit variance):

D KL ( N ( ( μ 1 , , μ k ) T , diag ( σ 1 2 , , σ k 2 ) ) N ( 0 , I ) ) = 1 2 i = 1 k ( σ i 2 + μ i 2 1 ln ( σ i 2 ) ) . {\displaystyle D_{\text{KL}}\left({\mathcal {N}}\left(\left(\mu _{1},\ldots ,\mu _{k}\right)^{\mathsf {T}},\operatorname {diag} \left(\sigma _{1}^{2},\ldots ,\sigma _{k}^{2}\right)\right)\parallel {\mathcal {N}}\left(\mathbf {0} ,\mathbf {I} \right)\right)={1 \over 2}\sum _{i=1}^{k}\left(\sigma _{i}^{2}+\mu _{i}^{2}-1-\ln \left(\sigma _{i}^{2}\right)\right).}

For two univariate normal distributions p and q the above simplifies to

D KL ( p q ) = log σ 1 σ 0 + σ 0 2 + ( μ 0 μ 1 ) 2 2 σ 1 2 1 2 {\displaystyle D_{\text{KL}}\left({\mathcal {p}}\parallel {\mathcal {q}}\right)=\log {\frac {\sigma _{1}}{\sigma _{0}}}+{\frac {\sigma _{0}^{2}+(\mu _{0}-\mu _{1})^{2}}{2\sigma _{1}^{2}}}-{\frac {1}{2}}}

In the case of co-centered normal distributions with k = σ 1 / σ 0 {\displaystyle k=\sigma _{1}/\sigma _{0}} , this simplifies to:

D KL ( p q ) = log 2 k + ( k 2 1 ) / 2 / ln ( 2 ) b i t s {\displaystyle D_{\text{KL}}\left({\mathcal {p}}\parallel {\mathcal {q}}\right)=\log _{2}k+(k^{-2}-1)/2/\ln(2)\mathrm {bits} }

Uniform distributions

Consider two uniform distributions, with the support of p = [ A , B ] {\displaystyle p=} enclosed within q = [ C , D ] {\displaystyle q=} ( C A < B D {\displaystyle C\leq A<B\leq D} ). Then the information gain is:

D KL ( p q ) = log D C B A {\displaystyle D_{\text{KL}}\left({\mathcal {p}}\parallel {\mathcal {q}}\right)=\log {\frac {D-C}{B-A}}}

Intuitively, the information gain to a k times narrower uniform distribution contains log 2 k {\displaystyle \log _{2}k} bits. This connects with the use of bits in computing, where log 2 k {\displaystyle \log _{2}k} bits would be needed to identify one element of a k long stream.

Relation to metrics

While relative entropy is a statistical distance, it is not a metric on the space of probability distributions, but instead it is a divergence. While metrics are symmetric and generalize linear distance, satisfying the triangle inequality, divergences are asymmetric in general and generalize squared distance, in some cases satisfying a generalized Pythagorean theorem. In general D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} does not equal D KL ( Q P ) {\displaystyle D_{\text{KL}}(Q\parallel P)} , and while this can be symmetrized (see § Symmetrised divergence), the asymmetry is an important part of the geometry.

It generates a topology on the space of probability distributions. More concretely, if { P 1 , P 2 , } {\displaystyle \{P_{1},P_{2},\ldots \}} is a sequence of distributions such that

lim n D KL ( P n Q ) = 0 {\displaystyle \lim _{n\to \infty }D_{\text{KL}}(P_{n}\parallel Q)=0} ,

then it is said that

P n D Q {\displaystyle P_{n}{\xrightarrow {D}}Q} .

Pinsker's inequality entails that

P n D P P n T V P {\displaystyle P_{n}\xrightarrow {D} P\Rightarrow P_{n}\xrightarrow {TV} P} ,

where the latter stands for the usual convergence in total variation.

Fisher information metric

Relative entropy is directly related to the Fisher information metric. This can be made explicit as follows. Assume that the probability distributions P and Q are both parameterized by some (possibly multi-dimensional) parameter θ {\displaystyle \theta } . Consider then two close by values of P = P ( θ ) {\displaystyle P=P(\theta )} and Q = P ( θ 0 ) {\displaystyle Q=P(\theta _{0})} so that the parameter θ {\displaystyle \theta } differs by only a small amount from the parameter value θ 0 {\displaystyle \theta _{0}} . Specifically, up to first order one has (using the Einstein summation convention)

P ( θ ) = P ( θ 0 ) + Δ θ j P j ( θ 0 ) + {\displaystyle P(\theta )=P(\theta _{0})+\Delta \theta _{j}\,P_{j}(\theta _{0})+\cdots }

with Δ θ j = ( θ θ 0 ) j {\displaystyle \Delta \theta _{j}=(\theta -\theta _{0})_{j}} a small change of θ {\displaystyle \theta } in the j direction, and P j ( θ 0 ) = P θ j ( θ 0 ) {\displaystyle P_{j}\left(\theta _{0}\right)={\frac {\partial P}{\partial \theta _{j}}}(\theta _{0})} the corresponding rate of change in the probability distribution. Since relative entropy has an absolute minimum 0 for P = Q {\displaystyle P=Q} , i.e. θ = θ 0 {\displaystyle \theta =\theta _{0}} , it changes only to second order in the small parameters Δ θ j {\displaystyle \Delta \theta _{j}} . More formally, as for any minimum, the first derivatives of the divergence vanish

θ j | θ = θ 0 D KL ( P ( θ ) P ( θ 0 ) ) = 0 , {\displaystyle \left.{\frac {\partial }{\partial \theta _{j}}}\right|_{\theta =\theta _{0}}D_{\text{KL}}(P(\theta )\parallel P(\theta _{0}))=0,}

and by the Taylor expansion one has up to second order

D KL ( P ( θ ) P ( θ 0 ) ) = 1 2 Δ θ j Δ θ k g j k ( θ 0 ) + {\displaystyle D_{\text{KL}}(P(\theta )\parallel P(\theta _{0}))={\frac {1}{2}}\,\Delta \theta _{j}\,\Delta \theta _{k}\,g_{jk}(\theta _{0})+\cdots }

where the Hessian matrix of the divergence

g j k ( θ 0 ) = 2 θ j θ k | θ = θ 0 D KL ( P ( θ ) P ( θ 0 ) ) {\displaystyle g_{jk}(\theta _{0})=\left.{\frac {\partial ^{2}}{\partial \theta _{j}\,\partial \theta _{k}}}\right|_{\theta =\theta _{0}}D_{\text{KL}}(P(\theta )\parallel P(\theta _{0}))}

must be positive semidefinite. Letting θ 0 {\displaystyle \theta _{0}} vary (and dropping the subindex 0) the Hessian g j k ( θ ) {\displaystyle g_{jk}(\theta )} defines a (possibly degenerate) Riemannian metric on the θ parameter space, called the Fisher information metric.

Fisher information metric theorem

When p ( x , ρ ) {\displaystyle p_{(x,\rho )}} satisfies the following regularity conditions:

log ( p ) ρ , 2 log ( p ) ρ 2 , 3 log ( p ) ρ 3 {\displaystyle {\frac {\partial \log(p)}{\partial \rho }},{\frac {\partial ^{2}\log(p)}{\partial \rho ^{2}}},{\frac {\partial ^{3}\log(p)}{\partial \rho ^{3}}}} exist,
| p ρ | < F ( x ) : x = 0 F ( x ) d x < , | 2 p ρ 2 | < G ( x ) : x = 0 G ( x ) d x < | 3 log ( p ) ρ 3 | < H ( x ) : x = 0 p ( x , 0 ) H ( x ) d x < ξ < {\displaystyle {\begin{aligned}\left|{\frac {\partial p}{\partial \rho }}\right|&<F(x):\int _{x=0}^{\infty }F(x)\,dx<\infty ,\\\left|{\frac {\partial ^{2}p}{\partial \rho ^{2}}}\right|&<G(x):\int _{x=0}^{\infty }G(x)\,dx<\infty \\\left|{\frac {\partial ^{3}\log(p)}{\partial \rho ^{3}}}\right|&<H(x):\int _{x=0}^{\infty }p(x,0)H(x)\,dx<\xi <\infty \end{aligned}}}

where ξ is independent of ρ

x = 0 p ( x , ρ ) ρ | ρ = 0 d x = x = 0 2 p ( x , ρ ) ρ 2 | ρ = 0 d x = 0 {\displaystyle \left.\int _{x=0}^{\infty }{\frac {\partial p(x,\rho )}{\partial \rho }}\right|_{\rho =0}\,dx=\left.\int _{x=0}^{\infty }{\frac {\partial ^{2}p(x,\rho )}{\partial \rho ^{2}}}\right|_{\rho =0}\,dx=0}

then:

D ( p ( x , 0 ) p ( x , ρ ) ) = c ρ 2 2 + O ( ρ 3 )  as  ρ 0. {\displaystyle {\mathcal {D}}(p(x,0)\parallel p(x,\rho ))={\frac {c\rho ^{2}}{2}}+{\mathcal {O}}\left(\rho ^{3}\right){\text{ as }}\rho \to 0.}

Variation of information

Another information-theoretic metric is variation of information, which is roughly a symmetrization of conditional entropy. It is a metric on the set of partitions of a discrete probability space.

MAUVE Metric

MAUVE is a measure of the statistical gap between two text distributions, such as the difference between text generated by a model and human-written text. This measure is computed using Kullback-Leibler divergences between the two distributions in a quantized embedding space of a foundation model.

Relation to other quantities of information theory

Many of the other quantities of information theory can be interpreted as applications of relative entropy to specific cases.

Self-information

Main article: Information content

The self-information, also known as the information content of a signal, random variable, or event is defined as the negative logarithm of the probability of the given outcome occurring.

When applied to a discrete random variable, the self-information can be represented as

I ( m ) = D KL ( δ im { p i } ) , {\displaystyle \operatorname {\operatorname {I} } (m)=D_{\text{KL}}\left(\delta _{\text{im}}\parallel \{p_{i}\}\right),}

is the relative entropy of the probability distribution P ( i ) {\displaystyle P(i)} from a Kronecker delta representing certainty that i = m {\displaystyle i=m} — i.e. the number of extra bits that must be transmitted to identify i if only the probability distribution P ( i ) {\displaystyle P(i)} is available to the receiver, not the fact that i = m {\displaystyle i=m} .

Mutual information

The mutual information,

I ( X ; Y ) = D KL ( P ( X , Y ) P ( X ) P ( Y ) ) = E X { D KL ( P ( Y X ) P ( Y ) ) } = E Y { D KL ( P ( X Y ) P ( X ) ) } {\displaystyle {\begin{aligned}\operatorname {I} (X;Y)&=D_{\text{KL}}(P(X,Y)\parallel P(X)P(Y))\\&=\operatorname {E} _{X}\{D_{\text{KL}}(P(Y\mid X)\parallel P(Y))\}\\&=\operatorname {E} _{Y}\{D_{\text{KL}}(P(X\mid Y)\parallel P(X))\}\end{aligned}}}

is the relative entropy of the joint probability distribution P ( X , Y ) {\displaystyle P(X,Y)} from the product P ( X ) P ( Y ) {\displaystyle P(X)P(Y)} of the two marginal probability distributions — i.e. the expected number of extra bits that must be transmitted to identify X and Y if they are coded using only their marginal distributions instead of the joint distribution. Equivalently, if the joint probability P ( X , Y ) {\displaystyle P(X,Y)} is known, it is the expected number of extra bits that must on average be sent to identify Y if the value of X is not already known to the receiver.

Shannon entropy

The Shannon entropy,

H ( X ) = E [ I X ( x ) ] = log ( N ) D KL ( p X ( x ) P U ( X ) ) {\displaystyle {\begin{aligned}\mathrm {H} (X)&=\operatorname {E} \left\\&=\log(N)-D_{\text{KL}}\left(p_{X}(x)\parallel P_{U}(X)\right)\end{aligned}}}

is the number of bits which would have to be transmitted to identify X from N equally likely possibilities, less the relative entropy of the uniform distribution on the random variates of X, P U ( X ) {\displaystyle P_{U}(X)} , from the true distribution P ( X ) {\displaystyle P(X)} — i.e. less the expected number of bits saved, which would have had to be sent if the value of X were coded according to the uniform distribution P U ( X ) {\displaystyle P_{U}(X)} rather than the true distribution P ( X ) {\displaystyle P(X)} . This definition of Shannon entropy forms the basis of E.T. Jaynes's alternative generalization to continuous distributions, the limiting density of discrete points (as opposed to the usual differential entropy), which defines the continuous entropy as

lim N H N ( X ) = log ( N ) p ( x ) log p ( x ) m ( x ) d x , {\displaystyle \lim _{N\rightarrow \infty }H_{N}(X)=\log(N)-\int p(x)\log {\frac {p(x)}{m(x)}}\,dx,}

which is equivalent to:

log ( N ) D KL ( p ( x ) | | m ( x ) ) {\displaystyle \log(N)-D_{\text{KL}}(p(x)||m(x))}

Conditional entropy

The conditional entropy,

H ( X Y ) = log ( N ) D KL ( P ( X , Y ) P U ( X ) P ( Y ) ) = log ( N ) D KL ( P ( X , Y ) P ( X ) P ( Y ) ) D KL ( P ( X ) P U ( X ) ) = H ( X ) I ( X ; Y ) = log ( N ) E Y [ D KL ( P ( X Y ) P U ( X ) ) ] {\displaystyle {\begin{aligned}\mathrm {H} (X\mid Y)&=\log(N)-D_{\text{KL}}(P(X,Y)\parallel P_{U}(X)P(Y))\\&=\log(N)-D_{\text{KL}}(P(X,Y)\parallel P(X)P(Y))-D_{\text{KL}}(P(X)\parallel P_{U}(X))\\&=\mathrm {H} (X)-\operatorname {I} (X;Y)\\&=\log(N)-\operatorname {E} _{Y}\left\end{aligned}}}

is the number of bits which would have to be transmitted to identify X from N equally likely possibilities, less the relative entropy of the product distribution P U ( X ) P ( Y ) {\displaystyle P_{U}(X)P(Y)} from the true joint distribution P ( X , Y ) {\displaystyle P(X,Y)} — i.e. less the expected number of bits saved which would have had to be sent if the value of X were coded according to the uniform distribution P U ( X ) {\displaystyle P_{U}(X)} rather than the conditional distribution P ( X | Y ) {\displaystyle P(X|Y)} of X given Y.

Cross entropy

When we have a set of possible events, coming from the distribution p, we can encode them (with a lossless data compression) using entropy encoding. This compresses the data by replacing each fixed-length input symbol with a corresponding unique, variable-length, prefix-free code (e.g.: the events (A, B, C) with probabilities p = (1/2, 1/4, 1/4) can be encoded as the bits (0, 10, 11)). If we know the distribution p in advance, we can devise an encoding that would be optimal (e.g.: using Huffman coding). Meaning the messages we encode will have the shortest length on average (assuming the encoded events are sampled from p), which will be equal to Shannon's Entropy of p (denoted as H ( p ) {\displaystyle \mathrm {H} (p)} ). However, if we use a different probability distribution (q) when creating the entropy encoding scheme, then a larger number of bits will be used (on average) to identify an event from a set of possibilities. This new (larger) number is measured by the cross entropy between p and q.

The cross entropy between two probability distributions (p and q) measures the average number of bits needed to identify an event from a set of possibilities, if a coding scheme is used based on a given probability distribution q, rather than the "true" distribution p. The cross entropy for two distributions p and q over the same probability space is thus defined as follows.

H ( p , q ) = E p [ log ( q ) ] = H ( p ) + D KL ( p q ) . {\displaystyle \mathrm {H} (p,q)=\operatorname {E} _{p}=\mathrm {H} (p)+D_{\text{KL}}(p\parallel q).}

For explicit derivation of this, see the Motivation section above.

Under this scenario, relative entropies (kl-divergence) can be interpreted as the extra number of bits, on average, that are needed (beyond H ( p ) {\displaystyle \mathrm {H} (p)} ) for encoding the events because of using q for constructing the encoding scheme instead of p.

Bayesian updating

In Bayesian statistics, relative entropy can be used as a measure of the information gain in moving from a prior distribution to a posterior distribution: p ( x ) p ( x I ) {\displaystyle p(x)\to p(x\mid I)} . If some new fact Y = y {\displaystyle Y=y} is discovered, it can be used to update the posterior distribution for X from p ( x I ) {\displaystyle p(x\mid I)} to a new posterior distribution p ( x y , I ) {\displaystyle p(x\mid y,I)} using Bayes' theorem:

p ( x y , I ) = p ( y x , I ) p ( x I ) p ( y I ) {\displaystyle p(x\mid y,I)={\frac {p(y\mid x,I)p(x\mid I)}{p(y\mid I)}}}

This distribution has a new entropy:

H ( p ( x y , I ) ) = x p ( x y , I ) log p ( x y , I ) , {\displaystyle \mathrm {H} {\big (}p(x\mid y,I){\big )}=-\sum _{x}p(x\mid y,I)\log p(x\mid y,I),}

which may be less than or greater than the original entropy H ( p ( x I ) ) {\displaystyle \mathrm {H} (p(x\mid I))} . However, from the standpoint of the new probability distribution one can estimate that to have used the original code based on p ( x I ) {\displaystyle p(x\mid I)} instead of a new code based on p ( x y , I ) {\displaystyle p(x\mid y,I)} would have added an expected number of bits:

D KL ( p ( x y , I ) p ( x I ) ) = x p ( x y , I ) log ( p ( x y , I ) p ( x I ) ) {\displaystyle D_{\text{KL}}{\big (}p(x\mid y,I)\parallel p(x\mid I){\big )}=\sum _{x}p(x\mid y,I)\log \left({\frac {p(x\mid y,I)}{p(x\mid I)}}\right)}

to the message length. This therefore represents the amount of useful information, or information gain, about X, that has been learned by discovering Y = y {\displaystyle Y=y} .

If a further piece of data, Y 2 = y 2 {\displaystyle Y_{2}=y_{2}} , subsequently comes in, the probability distribution for x can be updated further, to give a new best guess p ( x y 1 , y 2 , I ) {\displaystyle p(x\mid y_{1},y_{2},I)} . If one reinvestigates the information gain for using p ( x y 1 , I ) {\displaystyle p(x\mid y_{1},I)} rather than p ( x I ) {\displaystyle p(x\mid I)} , it turns out that it may be either greater or less than previously estimated:

x p ( x y 1 , y 2 , I ) log ( p ( x y 1 , y 2 , I ) p ( x I ) ) {\displaystyle \sum _{x}p(x\mid y_{1},y_{2},I)\log \left({\frac {p(x\mid y_{1},y_{2},I)}{p(x\mid I)}}\right)} may be ≤ or > than x p ( x y 1 , I ) log ( p ( x y 1 , I ) p ( x I ) ) {\displaystyle \displaystyle \sum _{x}p(x\mid y_{1},I)\log \left({\frac {p(x\mid y_{1},I)}{p(x\mid I)}}\right)}

and so the combined information gain does not obey the triangle inequality:

D KL ( p ( x y 1 , y 2 , I ) p ( x I ) ) {\displaystyle D_{\text{KL}}{\big (}p(x\mid y_{1},y_{2},I)\parallel p(x\mid I){\big )}} may be <, = or > than D KL ( p ( x y 1 , y 2 , I ) p ( x y 1 , I ) ) + D KL ( p ( x y 1 , I ) p ( x I ) ) {\displaystyle D_{\text{KL}}{\big (}p(x\mid y_{1},y_{2},I)\parallel p(x\mid y_{1},I){\big )}+D_{\text{KL}}{\big (}p(x\mid y_{1},I)\parallel p(x\mid I){\big )}}

All one can say is that on average, averaging using p ( y 2 y 1 , x , I ) {\displaystyle p(y_{2}\mid y_{1},x,I)} , the two sides will average out.

Bayesian experimental design

A common goal in Bayesian experimental design is to maximise the expected relative entropy between the prior and the posterior. When posteriors are approximated to be Gaussian distributions, a design maximising the expected relative entropy is called Bayes d-optimal.

Discrimination information

Relative entropy D KL ( p ( x H 1 ) p ( x H 0 ) ) {\textstyle D_{\text{KL}}{\bigl (}p(x\mid H_{1})\parallel p(x\mid H_{0}){\bigr )}} can also be interpreted as the expected discrimination information for H 1 {\displaystyle H_{1}} over H 0 {\displaystyle H_{0}} : the mean information per sample for discriminating in favor of a hypothesis H 1 {\displaystyle H_{1}} against a hypothesis H 0 {\displaystyle H_{0}} , when hypothesis H 1 {\displaystyle H_{1}} is true. Another name for this quantity, given to it by I. J. Good, is the expected weight of evidence for H 1 {\displaystyle H_{1}} over H 0 {\displaystyle H_{0}} to be expected from each sample.

The expected weight of evidence for H 1 {\displaystyle H_{1}} over H 0 {\displaystyle H_{0}} is not the same as the information gain expected per sample about the probability distribution p ( H ) {\displaystyle p(H)} of the hypotheses,

D KL ( p ( x H 1 ) p ( x H 0 ) ) I G = D KL ( p ( H x ) p ( H I ) ) . {\displaystyle D_{\text{KL}}(p(x\mid H_{1})\parallel p(x\mid H_{0}))\neq IG=D_{\text{KL}}(p(H\mid x)\parallel p(H\mid I)).}

Either of the two quantities can be used as a utility function in Bayesian experimental design, to choose an optimal next question to investigate: but they will in general lead to rather different experimental strategies.

On the entropy scale of information gain there is very little difference between near certainty and absolute certainty—coding according to a near certainty requires hardly any more bits than coding according to an absolute certainty. On the other hand, on the logit scale implied by weight of evidence, the difference between the two is enormous – infinite perhaps; this might reflect the difference between being almost sure (on a probabilistic level) that, say, the Riemann hypothesis is correct, compared to being certain that it is correct because one has a mathematical proof. These two different scales of loss function for uncertainty are both useful, according to how well each reflects the particular circumstances of the problem in question.

Principle of minimum discrimination information

The idea of relative entropy as discrimination information led Kullback to propose the Principle of Minimum Discrimination Information (MDI): given new facts, a new distribution f should be chosen which is as hard to discriminate from the original distribution f 0 {\displaystyle f_{0}} as possible; so that the new data produces as small an information gain D KL ( f f 0 ) {\displaystyle D_{\text{KL}}(f\parallel f_{0})} as possible.

For example, if one had a prior distribution p ( x , a ) {\displaystyle p(x,a)} over x and a, and subsequently learnt the true distribution of a was u ( a ) {\displaystyle u(a)} , then the relative entropy between the new joint distribution for x and a, q ( x a ) u ( a ) {\displaystyle q(x\mid a)u(a)} , and the earlier prior distribution would be:

D KL ( q ( x a ) u ( a ) p ( x , a ) ) = E u ( a ) { D KL ( q ( x a ) p ( x a ) ) } + D KL ( u ( a ) p ( a ) ) , {\displaystyle D_{\text{KL}}(q(x\mid a)u(a)\parallel p(x,a))=\operatorname {E} _{u(a)}\left\{D_{\text{KL}}(q(x\mid a)\parallel p(x\mid a))\right\}+D_{\text{KL}}(u(a)\parallel p(a)),}

i.e. the sum of the relative entropy of p ( a ) {\displaystyle p(a)} the prior distribution for a from the updated distribution u ( a ) {\displaystyle u(a)} , plus the expected value (using the probability distribution u ( a ) {\displaystyle u(a)} ) of the relative entropy of the prior conditional distribution p ( x a ) {\displaystyle p(x\mid a)} from the new conditional distribution q ( x a ) {\displaystyle q(x\mid a)} . (Note that often the later expected value is called the conditional relative entropy (or conditional Kullback–Leibler divergence) and denoted by D KL ( q ( x a ) p ( x a ) ) {\displaystyle D_{\text{KL}}(q(x\mid a)\parallel p(x\mid a))} ) This is minimized if q ( x a ) = p ( x a ) {\displaystyle q(x\mid a)=p(x\mid a)} over the whole support of u ( a ) {\displaystyle u(a)} ; and we note that this result incorporates Bayes' theorem, if the new distribution u ( a ) {\displaystyle u(a)} is in fact a δ function representing certainty that a has one particular value.

MDI can be seen as an extension of Laplace's Principle of Insufficient Reason, and the Principle of Maximum Entropy of E.T. Jaynes. In particular, it is the natural extension of the principle of maximum entropy from discrete to continuous distributions, for which Shannon entropy ceases to be so useful (see differential entropy), but the relative entropy continues to be just as relevant.

In the engineering literature, MDI is sometimes called the Principle of Minimum Cross-Entropy (MCE) or Minxent for short. Minimising relative entropy from m to p with respect to m is equivalent to minimizing the cross-entropy of p and m, since

H ( p , m ) = H ( p ) + D KL ( p m ) , {\displaystyle \mathrm {H} (p,m)=\mathrm {H} (p)+D_{\text{KL}}(p\parallel m),}

which is appropriate if one is trying to choose an adequate approximation to p. However, this is just as often not the task one is trying to achieve. Instead, just as often it is m that is some fixed prior reference measure, and p that one is attempting to optimise by minimising D KL ( p m ) {\displaystyle D_{\text{KL}}(p\parallel m)} subject to some constraint. This has led to some ambiguity in the literature, with some authors attempting to resolve the inconsistency by redefining cross-entropy to be D KL ( p m ) {\displaystyle D_{\text{KL}}(p\parallel m)} , rather than H ( p , m ) {\displaystyle \mathrm {H} (p,m)} .

Relationship to available work

Pressure versus volume plot of available work from a mole of argon gas relative to ambient, calculated as T o {\displaystyle T_{o}} times the Kullback–Leibler divergence

Surprisals add where probabilities multiply. The surprisal for an event of probability p is defined as s = k ln ( 1 / p ) {\displaystyle s=k\ln(1/p)} . If k is { 1 , 1 / ln 2 , 1.38 × 10 23 } {\displaystyle \left\{1,1/\ln 2,1.38\times 10^{-23}\right\}} then surprisal is in { {\displaystyle \{} nats, bits, or J / K } {\displaystyle J/K\}} so that, for instance, there are N bits of surprisal for landing all "heads" on a toss of N coins.

Best-guess states (e.g. for atoms in a gas) are inferred by maximizing the average surprisal S (entropy) for a given set of control parameters (like pressure P or volume V). This constrained entropy maximization, both classically and quantum mechanically, minimizes Gibbs availability in entropy units A k ln ( Z ) {\displaystyle A\equiv -k\ln(Z)} where Z is a constrained multiplicity or partition function.

When temperature T is fixed, free energy ( T × A {\displaystyle T\times A} ) is also minimized. Thus if T , V {\displaystyle T,V} and number of molecules N are constant, the Helmholtz free energy F U T S {\displaystyle F\equiv U-TS} (where U is energy and S is entropy) is minimized as a system "equilibrates." If T and P are held constant (say during processes in your body), the Gibbs free energy G = U + P V T S {\displaystyle G=U+PV-TS} is minimized instead. The change in free energy under these conditions is a measure of available work that might be done in the process. Thus available work for an ideal gas at constant temperature T o {\displaystyle T_{o}} and pressure P o {\displaystyle P_{o}} is W = Δ G = N k T o Θ ( V / V o ) {\displaystyle W=\Delta G=NkT_{o}\Theta (V/V_{o})} where V o = N k T o / P o {\displaystyle V_{o}=NkT_{o}/P_{o}} and Θ ( x ) = x 1 ln x 0 {\displaystyle \Theta (x)=x-1-\ln x\geq 0} (see also Gibbs inequality).

More generally the work available relative to some ambient is obtained by multiplying ambient temperature T o {\displaystyle T_{o}} by relative entropy or net surprisal Δ I 0 , {\displaystyle \Delta I\geq 0,} defined as the average value of k ln ( p / p o ) {\displaystyle k\ln(p/p_{o})} where p o {\displaystyle p_{o}} is the probability of a given state under ambient conditions. For instance, the work available in equilibrating a monatomic ideal gas to ambient values of V o {\displaystyle V_{o}} and T o {\displaystyle T_{o}} is thus W = T o Δ I {\displaystyle W=T_{o}\Delta I} , where relative entropy

Δ I = N k [ Θ ( V V o ) + 3 2 Θ ( T T o ) ] . {\displaystyle \Delta I=Nk\left.}

The resulting contours of constant relative entropy, shown at right for a mole of Argon at standard temperature and pressure, for example put limits on the conversion of hot to cold as in flame-powered air-conditioning or in the unpowered device to convert boiling-water to ice-water discussed here. Thus relative entropy measures thermodynamic availability in bits.

Quantum information theory

For density matrices P and Q on a Hilbert space, the quantum relative entropy from Q to P is defined to be

D KL ( P Q ) = Tr ( P ( log ( P ) log ( Q ) ) ) . {\displaystyle D_{\text{KL}}(P\parallel Q)=\operatorname {Tr} (P(\log(P)-\log(Q))).}

In quantum information science the minimum of D KL ( P Q ) {\displaystyle D_{\text{KL}}(P\parallel Q)} over all separable states Q can also be used as a measure of entanglement in the state P.

Relationship between models and reality

See also: Maximum likelihood estimation § Relation to minimizing Kullback–Leibler divergence and cross entropy Further information: Model selection

Just as relative entropy of "actual from ambient" measures thermodynamic availability, relative entropy of "reality from a model" is also useful even if the only clues we have about reality are some experimental measurements. In the former case relative entropy describes distance to equilibrium or (when multiplied by ambient temperature) the amount of available work, while in the latter case it tells you about surprises that reality has up its sleeve or, in other words, how much the model has yet to learn.

Although this tool for evaluating models against systems that are accessible experimentally may be applied in any field, its application to selecting a statistical model via Akaike information criterion are particularly well described in papers and a book by Burnham and Anderson. In a nutshell the relative entropy of reality from a model may be estimated, to within a constant additive term, by a function of the deviations observed between data and the model's predictions (like the mean squared deviation) . Estimates of such divergence for models that share the same additive term can in turn be used to select among models.

When trying to fit parametrized models to data there are various estimators which attempt to minimize relative entropy, such as maximum likelihood and maximum spacing estimators.

Symmetrised divergence

Kullback & Leibler (1951) also considered the symmetrized function:

D KL ( P Q ) + D KL ( Q P ) {\displaystyle D_{\text{KL}}(P\parallel Q)+D_{\text{KL}}(Q\parallel P)}

which they referred to as the "divergence", though today the "KL divergence" refers to the asymmetric function (see § Etymology for the evolution of the term). This function is symmetric and nonnegative, and had already been defined and used by Harold Jeffreys in 1948; it is accordingly called the Jeffreys divergence.

This quantity has sometimes been used for feature selection in classification problems, where P and Q are the conditional pdfs of a feature under two different classes. In the Banking and Finance industries, this quantity is referred to as Population Stability Index (PSI), and is used to assess distributional shifts in model features through time.

An alternative is given via the λ {\displaystyle \lambda } -divergence,

D λ ( P Q ) = λ D KL ( P λ P + ( 1 λ ) Q ) + ( 1 λ ) D KL ( Q λ P + ( 1 λ ) Q ) , {\displaystyle D_{\lambda }(P\parallel Q)=\lambda D_{\text{KL}}(P\parallel \lambda P+(1-\lambda )Q)+(1-\lambda )D_{\text{KL}}(Q\parallel \lambda P+(1-\lambda )Q),}

which can be interpreted as the expected information gain about X from discovering which probability distribution X is drawn from, P or Q, if they currently have probabilities λ {\displaystyle \lambda } and 1 λ {\displaystyle 1-\lambda } respectively.

The value λ = 0.5 {\displaystyle \lambda =0.5} gives the Jensen–Shannon divergence, defined by

D JS = 1 2 D KL ( P M ) + 1 2 D KL ( Q M ) {\displaystyle D_{\text{JS}}={\frac {1}{2}}D_{\text{KL}}(P\parallel M)+{\frac {1}{2}}D_{\text{KL}}(Q\parallel M)}

where M is the average of the two distributions,

M = 1 2 ( P + Q ) . {\displaystyle M={\frac {1}{2}}(P+Q).}

We can also interpret D JS {\displaystyle D_{\text{JS}}} as the capacity of a noisy information channel with two inputs giving the output distributions P and Q. The Jensen–Shannon divergence, like all f-divergences, is locally proportional to the Fisher information metric. It is similar to the Hellinger metric (in the sense that it induces the same affine connection on a statistical manifold).

Furthermore, the Jensen–Shannon divergence can be generalized using abstract statistical M-mixtures relying on an abstract mean M.

Relationship to other probability-distance measures

There are many other important measures of probability distance. Some of these are particularly connected with relative entropy. For example:

  • The total-variation distance, δ ( p , q ) {\displaystyle \delta (p,q)} . This is connected to the divergence through Pinsker's inequality: δ ( P , Q ) 1 2 D KL ( P Q ) . {\displaystyle \delta (P,Q)\leq {\sqrt {{\frac {1}{2}}D_{\text{KL}}(P\parallel Q)}}.} Pinsker's inequality is vacuous for any distributions where D K L ( P Q ) > 2 {\displaystyle D_{\mathrm {KL} }(P\parallel Q)>2} , since the total variation distance is at most 1. For such distributions, an alternative bound can be used, due to Bretagnolle and Huber (see, also, Tsybakov): δ ( P , Q ) 1 e D K L ( P Q ) . {\displaystyle \delta (P,Q)\leq {\sqrt {1-e^{-D_{\mathrm {KL} }(P\parallel Q)}}}.}
  • The family of Rényi divergences generalize relative entropy. Depending on the value of a certain parameter, α {\displaystyle \alpha } , various inequalities may be deduced.

Other notable measures of distance include the Hellinger distance, histogram intersection, Chi-squared statistic, quadratic form distance, match distance, Kolmogorov–Smirnov distance, and earth mover's distance.

Data differencing

Main article: Data differencing

Just as absolute entropy serves as theoretical background for data compression, relative entropy serves as theoretical background for data differencing – the absolute entropy of a set of data in this sense being the data required to reconstruct it (minimum compressed size), while the relative entropy of a target set of data, given a source set of data, is the data required to reconstruct the target given the source (minimum size of a patch).

See also

References

  1. ^ Csiszar, I (February 1975). "I-Divergence Geometry of Probability Distributions and Minimization Problems". Ann. Probab. 3 (1): 146–158. doi:10.1214/aop/1176996454.
  2. Kullback, S.; Leibler, R.A. (1951). "On information and sufficiency". Annals of Mathematical Statistics. 22 (1): 79–86. doi:10.1214/aoms/1177729694. JSTOR 2236703. MR 0039968.
  3. ^ Kullback 1959.
  4. ^ Amari 2016, p. 11.
  5. ^ Amari 2016, p. 28.
  6. ^ Kullback & Leibler 1951, p. 80.
  7. ^ Jeffreys 1948, p. 158.
  8. Kullback 1959, p. 7.
  9. Kullback, S. (1987). "Letter to the Editor: The Kullback–Leibler distance". The American Statistician. 41 (4): 340–341. doi:10.1080/00031305.1987.10475510. JSTOR 2684769.
  10. Kullback 1959, p. 6.
  11. MacKay, David J.C. (2003). Information Theory, Inference, and Learning Algorithms (1st ed.). Cambridge University Press. p. 34. ISBN 9780521642989 – via Google Books.
  12. "What's the maximum value of Kullback-Leibler (KL) divergence?". Machine learning. Statistics Stack Exchange (stats.stackexchange.com). Cross validated.
  13. "In what situations is the integral equal to infinity?". Integration. Mathematics Stack Exchange (math.stackexchange.com).
  14. Bishop, Christopher M. Pattern recognition and machine learning. p. 55. OCLC 1334664824.
  15. Kullback 1959, p. 5.
  16. Burnham, K. P.; Anderson, D. R. (2002). Model Selection and Multi-Model Inference (2nd ed.). Springer. p. 51. ISBN 9780387953649.
  17. Abdulkadirov, Ruslan; Lyakhov, Pavel; Nagornov, Nikolay (January 2023). "Survey of Optimization Algorithms in Modern Neural Networks". Mathematics. 11 (11): 2466. doi:10.3390/math11112466. ISSN 2227-7390.
  18. Matassa, Marco (December 2021). "Fubini-Study metrics and Levi-Civita connections on quantum projective spaces". Advances in Mathematics. 393: 108101. arXiv:2010.03291. doi:10.1016/j.aim.2021.108101. ISSN 0001-8708.
  19. Lan, Guanghui (March 2023). "Policy mirror descent for reinforcement learning: linear convergence, new sampling complexity, and generalized problem classes". Mathematical Programming. 198 (1): 1059–1106. doi:10.1007/s10107-022-01816-5. ISSN 1436-4646.
  20. Kelly, J. L. Jr. (1956). "A New Interpretation of Information Rate". Bell Syst. Tech. J. 2 (4): 917–926. doi:10.1002/j.1538-7305.1956.tb03809.x.
  21. Soklakov, A. N. (2020). "Economics of Disagreement—Financial Intuition for the Rényi Divergence". Entropy. 22 (8): 860. arXiv:1811.08308. Bibcode:2020Entrp..22..860S. doi:10.3390/e22080860. PMC 7517462. PMID 33286632.
  22. Soklakov, A. N. (2023). "Information Geometry of Risks and Returns". Risk. June. SSRN 4134885.
  23. Henide, Karim (30 September 2024). "Flow Rider: Tradable Ecosystems' Relative Entropy of Flows As a Determinant of Relative Value". The Journal of Investing. 33 (6): 34–58. doi:10.3905/joi.2024.1.321.
  24. Sanov, I.N. (1957). "On the probability of large deviations of random magnitudes". Mat. Sbornik. 42 (84): 11–44.
  25. Novak S.Y. (2011), Extreme Value Methods with Applications to Finance ch. 14.5 (Chapman & Hall). ISBN 978-1-4398-3574-6.
  26. Hobson, Arthur (1971). Concepts in statistical mechanics. New York: Gordon and Breach. ISBN 978-0677032405.
  27. Bonnici, V. (2020). "Kullback-Leibler divergence between quantum distributions, and its upper-bound". arXiv:2008.05932 .
  28. See the section "differential entropy – 4" in Relative Entropy video lecture by Sergio Verdú NIPS 2009
  29. Donsker, Monroe D.; Varadhan, SR Srinivasa (1983). "Asymptotic evaluation of certain Markov process expectations for large time. IV". Communications on Pure and Applied Mathematics. 36 (2): 183–212. doi:10.1002/cpa.3160360204.
  30. Duchi J. "Derivations for Linear Algebra and Optimization" (PDF). p. 13.
  31. Belov, Dmitry I.; Armstrong, Ronald D. (2011-04-15). "Distributions of the Kullback-Leibler divergence with applications". British Journal of Mathematical and Statistical Psychology. 64 (2): 291–309. doi:10.1348/000711010x522227. ISSN 0007-1102. PMID 21492134.
  32. ^ Buchner, Johannes (2022-04-29). An intuition for physicists: information gain from experiments. OCLC 1363563215.
  33. ^ Cover, Thomas M.; Thomas, Joy A. (1991), Elements of Information Theory, John Wiley & Sons, p. 22
  34. Chaloner, K.; Verdinelli, I. (1995). "Bayesian experimental design: a review". Statistical Science. 10 (3): 273–304. doi:10.1214/ss/1177009939. hdl:11299/199630.
  35. Press, W.H.; Teukolsky, S.A.; Vetterling, W.T.; Flannery, B.P. (2007). "Section 14.7.2. Kullback–Leibler Distance". Numerical Recipes: The Art of Scientific Computing (3rd ed.). Cambridge University Press. ISBN 978-0-521-88068-8.
  36. Tribus, Myron (1959). Thermostatics and Thermodynamics: An Introduction to Energy, Information and States of Matter, with Engineering Applications. Van Nostrand.
  37. Jaynes, E. T. (1957). "Information theory and statistical mechanics" (PDF). Physical Review. 106 (4): 620–630. Bibcode:1957PhRv..106..620J. doi:10.1103/physrev.106.620. S2CID 17870175.
  38. Jaynes, E. T. (1957). "Information theory and statistical mechanics II" (PDF). Physical Review. 108 (2): 171–190. Bibcode:1957PhRv..108..171J. doi:10.1103/physrev.108.171.
  39. Gibbs, Josiah Willard (1871). A Method of Geometrical Representation of the Thermodynamic Properties of Substances by Means of Surfaces. The Academy. footnote page 52.
  40. Tribus, M.; McIrvine, E. C. (1971). "Energy and information". Scientific American. 224 (3): 179–186. Bibcode:1971SciAm.225c.179T. doi:10.1038/scientificamerican0971-179.
  41. Fraundorf, P. (2007). "Thermal roots of correlation-based complexity". Complexity. 13 (3): 18–26. arXiv:1103.2481. Bibcode:2008Cmplx..13c..18F. doi:10.1002/cplx.20195. S2CID 20794688. Archived from the original on 2011-08-13.
  42. Burnham, K.P.; Anderson, D.R. (2001). "Kullback–Leibler information as a basis for strong inference in ecological studies". Wildlife Research. 28 (2): 111–119. doi:10.1071/WR99107.
  43. Burnham, Kenneth P. (December 2010). Model selection and multimodel inference : a practical information-theoretic approach. Springer. ISBN 978-1-4419-2973-0. OCLC 878132909.
  44. Nielsen, Frank (2019). "On the Jensen–Shannon Symmetrization of Distances Relying on Abstract Means". Entropy. 21 (5): 485. arXiv:1904.04017. Bibcode:2019Entrp..21..485N. doi:10.3390/e21050485. PMC 7514974. PMID 33267199.
  45. Nielsen, Frank (2020). "On a Generalization of the Jensen–Shannon Divergence and the Jensen–Shannon Centroid". Entropy. 22 (2): 221. arXiv:1912.00610. Bibcode:2020Entrp..22..221N. doi:10.3390/e22020221. PMC 7516653. PMID 33285995.
  46. Bretagnolle, J.; Huber, C. (1978), "Estimation des densités : Risque minimax", Séminaire de Probabilités XII, Lecture Notes in Mathematics (in French), vol. 649, Berlin, Heidelberg: Springer Berlin Heidelberg, pp. 342–363, doi:10.1007/bfb0064610, ISBN 978-3-540-08761-8, S2CID 122597694, retrieved 2023-02-14 Lemma 2.1
  47. B.), Tsybakov, A. B. (Alexandre (2010). Introduction to nonparametric estimation. Springer. ISBN 978-1-4419-2709-5. OCLC 757859245.{{cite book}}: CS1 maint: multiple names: authors list (link) Equation 2.25.
  48. Rubner, Y.; Tomasi, C.; Guibas, L. J. (2000). "The earth mover's distance as a metric for image retrieval". International Journal of Computer Vision. 40 (2): 99–121. doi:10.1023/A:1026543900054. S2CID 14106275.

External links

Categories: