Inmathematical statistics, theKullback–Leibler (KL)divergence (also calledrelative entropy andI-divergence[1]), denoted, is a type ofstatistical distance: a measure of how much an approximatingprobability distributionQ is different from a true probability distributionP.[2][3] Mathematically, it is defined as
A simpleinterpretation of the KL divergence ofP fromQ is theexpected excesssurprisal from using the approximationQ instead ofP when the actual isP. While it is a measure of how different two distributions are and is thus a distance in some sense, it is not actually ametric, which is the most familiar and formal type of distance. In particular, it is not symmetric in the two distributions (in contrast tovariation of information), and does not satisfy thetriangle inequality. Instead, in terms ofinformation geometry, it is a type ofdivergence,[4] a generalization ofsquared distance, and for certain classes of distributions (notably anexponential family), it satisfies a generalizedPythagorean theorem (which applies to squared distances).[5]
Relative entropy is always a non-negativereal 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 continuoustime-series, and information gain when comparing statistical models ofinference; and practical, such as applied statistics,fluid mechanics,neuroscience,bioinformatics, andmachine learning.
Consider two probability distributions, a trueP and an approximatingQ. Often,P represents the data, the observations, or a measured probability distribution and distributionQ represents instead a theory, a model, a description, or another approximation ofP. However, sometimes the true distributionP represents a model and the approximating distributionQ represents (simulated) data that are intended to match the true distribution. The Kullback–Leibler divergence is then interpreted as the average difference of the number of bits required for encoding samples ofP using acode optimized forQ rather than one optimized forP.
Note that the roles ofP andQ can be reversed in some situations where that is easier to compute and the goal is to minimize, such as with theexpectation–maximization algorithm (EM) andevidence lower bound (ELBO) computations. This role-reversal approach exploits that if and only if and that, in many cases, reducing one has the effect of reducing the other.
The relative entropy was introduced bySolomon Kullback andRichard Leibler inKullback & Leibler (1951) as "the mean information for discrimination between and per observation from",[6] where one is comparing two probability measures, and are the hypotheses that one is selecting from measure (respectively). They denoted this by, and defined the "'divergence' between and" as the symmetrized quantity, which had already been defined and used byHarold Jeffreys in 1948.[7] InKullback (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;[8] Kullback preferred the termdiscrimination information.[9] The term "divergence" is in contrast to a distance (metric), since the symmetrized divergence does not satisfy the triangle inequality.[10] Numerous references to earlier uses of the symmetrized divergence and to otherstatistical distances are given inKullback (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 theJeffreys divergence.
Fordiscrete probability distributionsP andQ defined on the samesample space,, the relative entropy fromQ toP is defined[11] to be
which is equivalent to
In other words, it is theexpectation of the logarithmic difference between the probabilitiesP andQ, where the expectation is taken using the probabilitiesP.
Relative entropy is only defined in this way if, for allx, implies (absolute continuity). Otherwise, it is often defined as,[1] but the value is possible even if everywhere,[12][13] provided that is infinite in extent. Analogous comments apply to the continuous and general measure cases defined below.
Whenever is zero the contribution of the corresponding term is interpreted as zero because
For distributionsP andQ of acontinuous random variable, relative entropy is defined to be the integral[14]
wherep andq denote theprobability densities ofP andQ.
More generally, ifP andQ are probabilitymeasures on ameasurable space andP isabsolutely continuous with respect toQ, then the relative entropy fromQ toP is defined as
where is theRadon–Nikodym derivative ofP with respect toQ, i.e. the uniqueQ almost everywhere defined functionr on such that which exists becauseP is absolutely continuous with respect toQ. Also we assume the expression on the right-hand side exists. Equivalently (by thechain rule), this can be written as
which is theentropy ofP relative toQ. Continuing in this case, if is any measure on for which densitiesp andq with and exist (meaning thatP andQ are both absolutely continuous with respect to), then the relative entropy fromQ toP is given as
Note that such a measure for which densities can be defined always exists, since one can take although in practice it will usually be one that applies in the context such ascounting measure for discrete distributions, orLebesgue measure or a convenient variant thereof such asGaussian measure or the uniform measure on thesphere,Haar measure on aLie group etc. for continuous distributions.The logarithms in these formulae are usually taken tobase 2 if information is measured in units ofbits, or to basee if information is measured innats. Most formulas involving relative entropy hold regardless of the base of the logarithm.
Various conventions exist for referring to in words. Often it is referred to as the divergencebetweenP andQ, but this fails to convey the fundamental asymmetry in the relation. Sometimes, as in this article, it may be described as the divergence ofPfromQ or as the divergencefromQtoP. This reflects theasymmetry inBayesian inference, which startsfrom apriorQ and updatesto theposteriorP. Another common way to refer to is as the relative entropy ofPwith respect toQ or the information gain fromP overQ.
Kullback[3] gives the following example (Table 2.1, Example 2.1). LetP andQ be the distributions shown in the table and figure.P is the distribution on the left side of the figure, abinomial distribution with and.Q is the distribution on the right side of the figure, adiscrete uniform distribution with the three possible outcomesx =0,1,2 (i.e.), each with probability.

x Distribution | 0 | 1 | 2 |
|---|---|---|---|
| 9/25 | 12/25 | 4/25 | |
| 1/3 | 1/3 | 1/3 |
Relative entropies and are calculated as follows. This example uses thenatural log with basee, designatedln to get results innats (seeunits of information):
In the field of statistics, theNeyman–Pearson lemma states that the most powerful way to distinguish between the two distributionsP andQ based on an observationY (drawn from one of them) is through the log of the ratio of their likelihoods:. The KL divergence is the expected value of this statistic ifY is actually drawn fromP. Kullback motivated the statistic as an expected log likelihood ratio.[15]
In the context ofcoding theory, can be constructed by measuring the expected number of extrabits required tocode samples fromP using a code optimized forQ rather than the code optimized forP.
In the context ofmachine learning, is often called theinformation gain achieved ifP would be used instead ofQ which is currently used. By analogy with information theory, it is called therelative entropy ofP with respect toQ.
Expressed in the language ofBayesian inference, is a measure of the information gained by revising one's beliefs from theprior probability distributionQ to theposterior probability distributionP. In other words, it is the amount of information lost whenQ is used to approximateP.[16]
In applications,P typically represents the "true" distribution of data, observations, or a precisely calculated theoretical distribution, whileQ typically represents a theory, model, description, orapproximation ofP. In order to find a distributionQ that is closest toP, we can minimize the KL divergence and compute aninformation projection.
While it is astatistical distance, it is not ametric, the most familiar type of distance, but instead it is adivergence.[4] While metrics are symmetric and generalizelinear distance, satisfying thetriangle inequality, divergences are asymmetric and generalizesquared distance, in some cases satisfying a generalizedPythagorean theorem. In general does not equal, and the asymmetry is an important part of the geometry.[4] Theinfinitesimal form of relative entropy, specifically itsHessian, gives ametric tensor that equals theFisher information metric; see§ Fisher information metric. Fisher information metric on the certain probability distribution let determine the natural gradient for information-geometric optimization algorithms.[17] Its quantum version is Fubini-study metric.[18] Relative entropy satisfies a generalized Pythagorean theorem forexponential families (geometrically interpreted asdually flat manifolds), and this allows one to minimize relative entropy by geometric means, for example byinformation projection and inmaximum likelihood estimation.[5]
The relative entropy is theBregman divergence generated by the negative entropy, but it is also of the form of anf-divergence. For probabilities over a finitealphabet, it is unique in being a member of both of these classes ofstatistical divergences. The application of Bregman divergence can be found in mirror descent.[19]
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 entropybetween the investor's believed probabilities and the official odds.[20]This is a special case of a much more general connection between financial returns and divergence measures.[21]
Financial risks are connected to via information geometry.[22] 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.[23]

In information theory, theKraft–McMillan theorem establishes that any directly decodable coding scheme for coding a message to identify one value out of a set of possibilitiesX can be seen as representing an implicit probability distribution overX, where is the length of the code for 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) distributionQ is used, compared to using a code based on the true distributionP: it is theexcess entropy.
where is thecross entropy ofQ relative toP and is theentropy ofP (which is the same as the cross-entropy of P with itself).
The relative entropy can be thought of geometrically as astatistical distance, a measure of how far the distributionQ is from the distributionP. Geometrically it is adivergence: an asymmetric, generalized form of squared distance. The cross-entropy is itself such a measurement (formally aloss function), but it cannot be thought of as a distance, since is not zero. This can be fixed by subtracting to make agree more closely with our notion of distance, as theexcess 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 oflarge deviations.[24][25]
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 usedcharacterization of entropy.[26] Consequently,mutual information is the only measure of mutual dependence that obeys certain related conditions, since it can be definedin terms of Kullback–Leibler divergence.
In particular, if and, then-almost everywhere. The entropy thus sets a minimum value for the cross-entropy, theexpected number ofbits required when using a code based onQ rather thanP; and the Kullback–Leibler divergence therefore represents the expected number of extra bits that must be transmitted to identify a valuex drawn fromX, if a code is used corresponding to the probability distributionQ, rather than the "true" distributionP.
Denote and note that. The first derivative of may be derived and evaluated as followsFurther derivatives may be derived and evaluated as followsHence solving for via the Taylor expansion of about evaluated at yields a.s. is a sufficient condition for convergence of the series by the following absolute convergence argument a.s. is also a necessary condition for convergence of the series by the following proof by contradiction. Assume that with measure strictly greater than. It then follows that there must exist some values,, and such that and with measure. The previous proof of sufficiency demonstrated that the measure component of the series where is bounded, so we need only concern ourselves with the behavior of the measure component of the series where. The absolute value of theth term of this component of the series is then lower bounded by, which is unbounded as, so the series diverges.
The following result, due to Donsker and Varadhan,[29] is known asDonsker and Varadhan's variational formula.
Theorem [Duality Formula for Variational Inference]—Let be a set endowed with an appropriate-field, and two probability measuresP andQ, which formulate twoprobability spaces and, with. ( indicates thatQ is absolutely continuous with respect toP.) Leth be a real-valued integrablerandom variable on. Then the following equality holds
Further, the supremum on the right-hand side is attained if and only if it holds
almost surely with respect to probability measureP, where denotes the Radon-Nikodym derivative ofQ with respect toP.
For a short proof assuming integrability of with respect toP, let haveP-density, i.e. Then
Therefore,
where the last inequality follows from, for which equality occurs if and only if. The conclusion follows.
Suppose that we have twomultivariate normal distributions, with means and with (non-singular)covariance matrices If the two distributions have the same dimension,k, then the relative entropy between the distributions is as follows:[30]
Thelogarithm in the last term must be taken to basee 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 innats. Dividing the entire expression above by yields the divergence inbits.
In a numerical implementation, it is helpful to express the result in terms of the Cholesky decompositions such that and. Then withM andy solutions to the triangular linear systems, and,
A special case, and a common quantity invariational inference, is the relative entropy between a diagonal multivariate normal, and a standard normal distribution (with zero mean and unit variance):
For two univariate normal distributionsp andq the above simplifies to[31]
In the case of co-centered normal distributions with, this simplifies[32] to:
Consider two uniform distributions, with the support of enclosed within (). Then the information gain is:
Intuitively,[32] the information gain to ak times narrower uniform distribution contains bits. This connects with the use of bits in computing, where bits would be needed to identify one element of ak long stream.
Theexponential family of distribution is given by
where is reference measure, issufficient statistics, is canonical natural parameters, and is the log-partition function.
The KL divergence between two distributions and is given by[33]
where is the mean parameter of.
For example, for thePoisson distribution with mean, the sufficient statistics, the natural parameter, and log partition function. As such, the divergence between two Poisson distributions with means and is
As another example, for a normal distribution with unit variance, the sufficient statistics, the natural parameter, and log partition function. Thus, the divergence between two normal distributions and is
As final example, the divergence between a normal distribution with unit variance and a Poisson distribution with mean is
While relative entropy is astatistical distance, it is not ametric on the space of probability distributions, but instead it is adivergence.[4] While metrics are symmetric and generalizelinear distance, satisfying thetriangle inequality, divergences are asymmetric in general and generalizesquared distance, in some cases satisfying a generalizedPythagorean theorem. In general does not equal, and while this can be symmetrized (see§ Symmetrised divergence), the asymmetry is an important part of the geometry.[4]
It generates atopology on the space ofprobability distributions. More concretely, if is a sequence of distributions such that
then it is said that
Pinsker's inequality entails that
where the latter stands for the usual convergence intotal variation.
Relative entropy is directly related to theFisher information metric. This can be made explicit as follows. Assume that the probability distributionsP andQ are both parameterized by some (possibly multi-dimensional) parameter. Consider then two close by values of and so that the parameter differs by only a small amount from the parameter value. Specifically, up to first order one has (using theEinstein summation convention)
with a small change of in thej direction, and the corresponding rate of change in the probability distribution. Since relative entropy has an absolute minimum 0 for, i.e., it changes only tosecond order in the small parameters. More formally, as for any minimum, the first derivatives of the divergence vanish
and by theTaylor expansion one has up to second order
where theHessian matrix of the divergence
must bepositive semidefinite. Letting vary (and dropping the subindex 0) the Hessian defines a (possibly degenerate)Riemannian metric on theθparameter space, called the Fisher information metric.
There is an associated theorem.[3]When satisfies the following regularity conditions:
exist,
whereξ is independent ofρ
then:
Another information-theoretic metric isvariation of information, which is roughly a symmetrization ofconditional entropy. It is a metric on the set ofpartitions of a discreteprobability space.
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.
Many of the other quantities of information theory can be interpreted as applications of relative entropy to specific cases.
Theself-information, also known as theinformation content of a signal, random variable, orevent is defined as the negative logarithm of theprobability of the given outcome occurring.
When applied to adiscrete random variable, the self-information can be represented as[citation needed]
is the relative entropy of the probability distribution from aKronecker delta representing certainty that — i.e. the number of extra bits that must be transmitted to identifyi if only the probability distribution is available to the receiver, not the fact that.
is the relative entropy of thejoint probability distribution from the product of the twomarginal probability distributions — i.e. the expected number of extra bits that must be transmitted to identifyX andY if they are coded using only their marginal distributions instead of the joint distribution.
TheShannon entropy,
is the number of bits which would have to be transmitted to identifyX fromN equally likely possibilities,less the relative entropy of the uniform distribution on therandom variates ofX,, from the true distribution — i.e.less the expected number of bits saved, which would have had to be sent if the value ofX were coded according to the uniform distribution rather than the true distribution. This definition of Shannon entropy forms the basis ofE.T. Jaynes's alternative generalization to continuous distributions, thelimiting density of discrete points (as opposed to the usualdifferential entropy), which defines the continuous entropy aswhich is equivalent to:
is the number of bits which would have to be transmitted to identifyX fromN equally likely possibilities,less the relative entropy of the true joint distribution from the product distribution from — i.e.less the expected number of bits saved which would have had to be sent if the value ofX were coded according to the uniform distribution rather than the conditional distribution ofX givenY.
When we have a set of possible events, coming from the distributionp, we can encode them (with alossless data compression) usingentropy 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 distributionp in advance, we can devise an encoding that would be optimal (e.g.: usingHuffman coding). Meaning the messages we encode will have the shortest length on average (assuming the encoded events are sampled fromp), which will be equal toShannon's Entropy ofp (denoted as). However, if we use a different probability distribution (q) when creating the entropy encoding scheme, then a larger number ofbits will be used (on average) to identify an event from a set of possibilities. This new (larger) number is measured by thecross entropy betweenp andq.
Thecross entropy between twoprobability distributions (p andq) measures the average number ofbits needed to identify an event from a set of possibilities, if a coding scheme is used based on a given probability distributionq, rather than the "true" distributionp. The cross entropy for two distributionsp andq over the sameprobability space is thus defined as follows.
For explicit derivation of this, see theMotivation section above.
Under this scenario, relative entropies (kl-divergence) can be interpreted as the extra number of bits, on average, that are needed (beyond) for encoding the events because of usingq for constructing the encoding scheme instead ofp.
InBayesian statistics, relative entropy can be used as a measure of the information gain in moving from aprior distribution to aposterior distribution:. If some new fact is discovered, it can be used to update the posterior distribution forX from to a new posterior distribution usingBayes' theorem:
This distribution has a newentropy:
which may be less than or greater than the original entropy. However, from the standpoint of the new probability distribution one can estimate that to have used the original code based on instead of a new code based on would have added an expected number of bits:
to the message length. This therefore represents the amount of useful information, or information gain, aboutX, that has been learned by discovering.
If a further piece of data,, subsequently comes in, the probability distribution forx can be updated further, to give a new best guess. If one reinvestigates the information gain for using rather than, it turns out that it may be either greater or less than previously estimated:
may be ≤ or > than
and so the combined information gain doesnot obey the triangle inequality:
may be <, = or > than
All one can say is that onaverage, averaging using, the two sides will average out.
A common goal inBayesian experimental design is to maximise the expected relative entropy between the prior and the posterior.[35] When posteriors are approximated to be Gaussian distributions, a design maximising the expected relative entropy is calledBayes d-optimal.
Relative entropy can also be interpreted as the expecteddiscrimination information for over: the mean information per sample for discriminating in favor of a hypothesis against a hypothesis, when hypothesis is true.[36] Another name for this quantity, given to it byI. J. Good, is the expected weight of evidence for over to be expected from each sample.
The expected weight of evidence for over isnot the same as the information gain expected per sample about the probability distribution of the hypotheses,
Either of the two quantities can be used as autility 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 ofinformation 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 thelogit 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, theRiemann hypothesis is correct, compared to being certain that it is correct because one has amathematical proof. These two different scales ofloss function for uncertainty areboth useful, according to how well each reflects the particular circumstances of the problem in question.
The idea of relative entropy as discrimination information led Kullback to propose the Principle ofMinimum Discrimination Information (MDI): given new facts, a new distributionf should be chosen which is as hard to discriminate from the original distribution as possible; so that the new data produces as small an information gain as possible.
For example, if one had a prior distribution overx anda, and subsequently learnt the true distribution ofa was, then the relative entropy between the new joint distribution forx anda,, and the earlier prior distribution would be:
i.e. the sum of the relative entropy of the prior distribution fora from the updated distribution, plus the expected value (using the probability distribution) of the relative entropy of the prior conditional distribution from the new conditional distribution. (Note that often the later expected value is called theconditional relative entropy (orconditional Kullback–Leibler divergence) and denoted by[3][34]) This is minimized if over the whole support of; and we note that this result incorporates Bayes' theorem, if the new distribution is in fact a δ function representing certainty thata has one particular value.
MDI can be seen as an extension ofLaplace'sPrinciple of Insufficient Reason, and thePrinciple of Maximum Entropy ofE.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 (seedifferential entropy), but the relative entropy continues to be just as relevant.
In the engineering literature, MDI is sometimes called thePrinciple of Minimum Cross-Entropy (MCE) orMinxent for short. Minimising relative entropy fromm top with respect tom is equivalent to minimizing the cross-entropy ofp andm, since
which is appropriate if one is trying to choose an adequate approximation top. However, this is just as oftennot the task one is trying to achieve. Instead, just as often it ism that is some fixed prior reference measure, andp that one is attempting to optimise by minimising 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, rather than[citation needed].

Surprisals[37] add where probabilities multiply. The surprisal for an event of probabilityp is defined as. Ifk is then surprisal is innats, bits, or so that, for instance, there areN bits of surprisal for landing all "heads" on a toss ofN coins.
Best-guess states (e.g. for atoms in a gas) are inferred by maximizing theaverage surprisalS (entropy) for a given set of control parameters (like pressureP or volumeV). This constrainedentropy maximization, both classically[38] and quantum mechanically,[39] minimizesGibbs availability in entropy units[40] whereZ is a constrained multiplicity orpartition function.
When temperatureT is fixed, free energy () is also minimized. Thus if and number of moleculesN are constant, theHelmholtz free energy (whereU is energy andS is entropy) is minimized as a system "equilibrates." IfT andP are held constant (say during processes in your body), theGibbs free energy is minimized instead. The change in free energy under these conditions is a measure of availablework that might be done in the process. Thus available work for an ideal gas at constant temperature and pressure is where and (see alsoGibbs inequality).
More generally[41] thework available relative to some ambient is obtained by multiplying ambient temperature by relative entropy ornet surprisal defined as the average value of where 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 and is thus, where relative entropy
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.[42] Thus relative entropy measures thermodynamic availability in bits.
Fordensity matricesP andQ on aHilbert space, thequantum relative entropy fromQ toP is defined to be
Inquantum information science the minimum of over all separable statesQ can also be used as a measure ofentanglement in the stateP.
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 describesdistance to equilibrium or (when multiplied by ambient temperature) the amount ofavailable 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 astatistical model viaAkaike information criterion are particularly well described in papers[43] and a book[44] 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 themean 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 asmaximum likelihood andmaximum spacing estimators.[citation needed]
Kullback & Leibler (1951)also considered the symmetrized function:[6]
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 byHarold Jeffreys in 1948;[7] it is accordingly called theJeffreys divergence.
This quantity has sometimes been used forfeature selection inclassification problems, whereP andQ are the conditionalpdfs of a feature under two different classes. In the Banking and Finance industries, this quantity is referred to asPopulation Stability Index (PSI), and is used to assess distributional shifts in model features through time.
An alternative is given via the-divergence,
which can be interpreted as the expected information gain aboutX from discovering which probability distributionX is drawn from,P orQ, if they currently have probabilities and respectively.[clarification needed][citation needed]
The value gives theJensen–Shannon divergence, defined by
whereM is the average of the two distributions,
We can also interpret as the capacity of a noisy information channel with two inputs giving the output distributionsP andQ. The Jensen–Shannon divergence, like allf-divergences, islocally proportional to theFisher information metric. It is similar to theHellinger metric (in the sense that it induces the same affine connection on astatistical manifold).
Furthermore, the Jensen–Shannon divergence can be generalized using abstract statistical M-mixtures relying on an abstract mean M.[45][46]
There are many other important measures ofprobability distance. Some of these are particularly connected with relative entropy. For example:
Other notable measures of distance include theHellinger distance,histogram intersection,Chi-squared statistic,quadratic form distance,match distance,Kolmogorov–Smirnov distance, andearth mover's distance.[49]
Just asabsolute entropy serves as theoretical background fordatacompression,relative entropy serves as theoretical background fordatadifferencing – 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 targetgiven the source (minimum size of apatch).
{{cite book}}: CS1 maint: multiple names: authors list (link) Equation 2.25.