Divergence (statistics)

From HandWiki

In statistics and information geometry, a divergence is a kind of statistical distance: a binary function which establishes the "distance" from one probability distribution to another on a statistical manifold. Historically the term "divergence" was used informally for various statistical distances, and what are now known as divergences were known by various names (see § History), but today there is a commonly used definition (see § Definition).

Divergences differ from metrics (a more familiar notion of distance) in a number of ways. Firstly, divergences do not need to be symmetric (though a divergence can always be symmetrized), and the asymmetry is an important part of their structure.[1] Accordingly, one often refers asymmetrically to the divergence "of q from p" or "from p to q", in contrast to referring symmetrically to the distance "between p and q". Secondly, divergences generalize squared distance, not linear distance, and thus do not satisfy the triangle inequality (which applies to linear distances),[1] but instead in some cases satisfy a form of the Pythagorean theorem (which applies to squared distances).[2]

The simplest divergence is squared Euclidean distance (SED), and divergences can be viewed as generalizations of SED. The other most important divergence is relative entropy (Kullback–Leibler divergence, KL divergence), which is central to information theory. There are numerous other specific divergences and classes of divergences, notably f-divergences and Bregman divergences (see § Examples).


Given a differentiable manifold[lower-alpha 1] M, a divergence on M is a function D(p, q): M×MR satisfying:[3][4]

  1. D(p, q) ≥ 0 for all p, qM (non-negativity),
  2. D(p, q) = 0 if and only if p = q (identity of indiscernibles),
  3. the quadratic part of the Taylor expansion of D(p, p + dp) defines a Riemannian metric on M.
    • Concretely, for every point in M, given a coordinate chart with coordinate denoted by x, the divergence is infinitesimally expressed as [math]\displaystyle{ D(x, x + dx) = \textstyle\frac{1}{2} g_x(dx, dx) + O(|dx|^3) }[/math] for a positive-definite matrix gx, where the matrix depends on the coordinate chart and the point x. The corresponding inner product gp on the tangent space TpM, which is independent of the coordinate chart (but varies by point p), is a Riemannian metric on M.

Condition 1 and 2 together produce (global) positive definiteness, and are common general conditions for statistical distances; condition 3 is the distinguishing characteristic of divergences. Conditions 1 and 2 imply that D(p, p + dp) has no constant part (since D(p, p) = 0), no linear part, and that gp has no negative direction (there is no dp for which gp(dp, dp) < 0; i.e. it is positive semi-definite), as either a linear or negative quadratic part would mean that D is negative for a sufficiently small step in that direction. Condition 3 additionally requires that gp not only be positive semi-definite (positive or zero), but positive definite (non-zero if dp is non-zero).

The factor of 1/2 is the coefficient of the quadratic term in the Taylor expansion, and means that g agrees with the Riemannian metric that is induced by the divergence, instead of differing by a factor of 2; see § Geometrical properties. Dimensional analysis of condition 3 shows that divergence has the dimension of squared distance.[1]

Informally, a divergence is a globally positive-definite statistical distance that is infinitesimally positive-definite on its diagonal (equivalently, that infinitesimally agrees with a Riemannian metric g on its diagonal).

In statistics, the manifold M is typically a space of probability distributions with common support.

The dual divergence D* is defined as:

[math]\displaystyle{ D^*(p, q) = D(q, p). }[/math]

When necessary to specify the original function D, it may be referred to as the primal divergence.

A divergence can always be symmetrized by averaging it with its dual divergence:[1]

[math]\displaystyle{ D_S(p, q) = \textstyle\frac{1}{2}\big(D(p,q) + D(q, p)\big). }[/math]


Notation for divergences varies significantly between fields, though there are some conventions.

Divergences are generally notated with an uppercase 'D', as in [math]\displaystyle{ D(x, y) }[/math], to distinguish them from metric distances, which are notated with a lowercase 'd'. When multiple divergences are in use, they are commonly distinguished with subscripts, as in [math]\displaystyle{ D_\text{KL} }[/math] for Kullback–Leibler divergence (KL divergence).

Often a different separator between parameters is used, particularly to emphasize the asymmetry. In information theory, a double bar is commonly used: [math]\displaystyle{ D(p \parallel q) }[/math]; this is similar to, but distinct from, the notation for conditional probability, [math]\displaystyle{ P(A | B) }[/math], and emphasizes interpreting the divergence as a relative measurement, as in relative entropy; this notation is common for the KL divergence. A colon may be used instead,[lower-alpha 2] as [math]\displaystyle{ D(p : q) }[/math]; this emphasizes the relative information supporting the two distributions.

The notation for parameters varies as well. Uppercase [math]\displaystyle{ P, Q }[/math] interprets the parameters as probability distributions, while lowercase [math]\displaystyle{ p, q }[/math] or [math]\displaystyle{ x, y }[/math] interprets them geometrically as points in a space, and [math]\displaystyle{ \mu_1, \mu_2 }[/math] or [math]\displaystyle{ m_1, m_2 }[/math] interprets them as measures.

Geometrical properties

Many properties of divergences can be derived if we restrict S to be a statistical manifold, meaning that it can be parametrized with a finite-dimensional coordinate system θ, so that for a distribution pS we can write p = p(θ).

For a pair of points p, qS with coordinates θp and θq, denote the partial derivatives of D(p, q) as

[math]\displaystyle{ \begin{align} D((\partial_i)_p, q) \ \ &\stackrel{\mathrm{def}}{=}\ \ \tfrac{\partial}{\partial\theta^i_p} D(p, q), \\ D((\partial_i\partial_j)_p, (\partial_k)_q) \ \ &\stackrel{\mathrm{def}}{=}\ \ \tfrac{\partial}{\partial\theta^i_p} \tfrac{\partial}{\partial\theta^j_p}\tfrac{\partial}{\partial\theta^k_q}D(p, q), \ \ \mathrm{etc.} \end{align} }[/math]

Now we restrict these functions to a diagonal p = q, and denote [5]

[math]\displaystyle{ \begin{align} D[\partial_i, \cdot]\ &:\ p \mapsto D((\partial_i)_p, p), \\ D[\partial_i, \partial_j]\ &:\ p \mapsto D((\partial_i)_p, (\partial_j)_p),\ \ \mathrm{etc.} \end{align} }[/math]

By definition, the function D(p, q) is minimized at p = q, and therefore

[math]\displaystyle{ \begin{align} & D[\partial_i, \cdot] = D[\cdot, \partial_i] = 0, \\ & D[\partial_i\partial_j, \cdot] = D[\cdot, \partial_i\partial_j] = -D[\partial_i, \partial_j] \ \equiv\ g_{ij}^{(D)}, \end{align} }[/math]

where matrix g(D) is positive semi-definite and defines a unique Riemannian metric on the manifold S.

Divergence D(·, ·) also defines a unique torsion-free affine connection(D) with coefficients

[math]\displaystyle{ \Gamma_{ij,k}^{(D)} = -D[\partial_i\partial_j, \partial_k], }[/math]

and the dual to this connection ∇* is generated by the dual divergence D*.

Thus, a divergence D(·, ·) generates on a statistical manifold a unique dualistic structure (g(D), ∇(D), ∇(D*)). The converse is also true: every torsion-free dualistic structure on a statistical manifold is induced from some globally defined divergence function (which however need not be unique).[6]

For example, when D is an f-divergence for some function ƒ(·), then it generates the metric g(Df) = c·g and the connection (Df) = ∇(α), where g is the canonical Fisher information metric, ∇(α) is the α-connection, c = ƒ′′(1), and α = 3 + 2ƒ′′′(1)/ƒ′′(1).


The two most important divergences are the relative entropy (Kullback–Leibler divergence, KL divergence), which is central to information theory and statistics, and the squared Euclidean distance (SED). Minimizing these two divergences is the main way that linear inverse problem are solved, via the principle of maximum entropy and least squares, notably in logistic regression and linear regression.[7]

The two most important classes of divergences are the f-divergences and Bregman divergences; however, other types of divergence functions are also encountered in the literature. The only divergence that is both an f-divergence and a Bregman divergence is the Kullback–Leibler divergence; the squared Euclidean divergence is a Bregman divergence (corresponding to the function [math]\displaystyle{ x^2 }[/math]), but not an f-divergence.


This family of divergences are generated through functions f(u), convex on u > 0 and such that f(1) = 0. Then an f-divergence is defined as

[math]\displaystyle{ D_f(p, q) = \int p(x)f\bigg(\frac{q(x)}{p(x)}\bigg) dx }[/math]
Kullback–Leibler divergence: [math]\displaystyle{ D_\mathrm{KL}(p, q) = \int p(x)\ln\left( \frac{p(x)}{q(x)}\right) dx }[/math]
squared Hellinger distance: [math]\displaystyle{ H^2(p,\, q) = 2 \int \Big( \sqrt{p(x)} - \sqrt{q(x)}\, \Big)^2 dx }[/math]
Jeffreys divergence: [math]\displaystyle{ D_J(p, q) = \int (p(x) - q(x))\big( \ln p(x) - \ln q(x) \big) dx }[/math]
Chernoff's α-divergence: [math]\displaystyle{ D^{(\alpha)}(p, q) = \frac{4}{1-\alpha^2}\bigg(1 - \int p(x)^\frac{1-\alpha}{2} q(x)^\frac{1+\alpha}{2} dx \bigg) }[/math]
exponential divergence: [math]\displaystyle{ D_e(p, q) = \int p(x)\big( \ln p(x) - \ln q(x) \big)^2 dx }[/math]
Kagan's divergence: [math]\displaystyle{ D_{\chi^2}(p, q) = \frac12 \int \frac{(p(x) - q(x))^2}{p(x)} dx }[/math]
(α,β)-product divergence: [math]\displaystyle{ D_{\alpha,\beta}(p, q) = \frac{2}{(1-\alpha)(1-\beta)} \int \Big(1 - \Big(\tfrac{q(x)}{p(x)}\Big)^{\!\!\frac{1-\alpha}{2}} \Big) \Big(1 - \Big(\tfrac{q(x)}{p(x)}\Big)^{\!\!\frac{1-\beta}{2}} \Big) p(x) dx }[/math]

If a Markov process has a positive equilibrium probability distribution [math]\displaystyle{ p^* }[/math] then [math]\displaystyle{ D_f(p(t), p^*) }[/math] is a monotonic (non-increasing) function of time, where the probability distribution [math]\displaystyle{ p(t) }[/math] is a solution of the Kolmogorov forward equations (or Master equation), used to describe the time evolution of the probability distribution in the Markov process. This means that all f-divergences [math]\displaystyle{ D_f(p(t), p^*) }[/math] are the Lyapunov functions of the Kolmogorov forward equations. Reverse statement is also true: If [math]\displaystyle{ H(p) }[/math] is a Lyapunov function for all Markov chains with positive equilibrium [math]\displaystyle{ p^* }[/math] and is of the trace-form ([math]\displaystyle{ H(p)=\sum_{i}h(p_{i},p_{i}^{*}) }[/math]) then [math]\displaystyle{ H(p)= D_f(p(t), p^*) }[/math], for some convex function f.[8][9] Bregman divergences in general do not have such property and can increase in Markov processes.

Bregman divergences

Main page: Bregman divergence

Bregman divergences correspond to convex functions on convex sets. Given a strictly convex, continuously-differentiable function F on a convex set, known as the Bregman generator, the Bregman divergence measures the convexity of: the error of the linear approximation of F from q as an approximation of the value at p:

[math]\displaystyle{ D_F(p, q) = F(p)-F(q)-\langle \nabla F(q), p-q\rangle. }[/math]

The dual divergence to a Bregman divergence is the divergence generated by the convex conjugate F* of the Bregman generator of the original divergence. For example, for the squared Euclidean distance, the generator is [math]\displaystyle{ x^2 }[/math], while for the relative entropy the generator is the negative entropy [math]\displaystyle{ x \log x }[/math].


The use of the term "divergence" – both what functions it refers to, and what various statistical distances are called – has varied significantly over time, but by c. 2000 had settled on the current usage within information geometry, notably in the textbook (Amari Nagaoka).[3]

The term "divergence" for a statistical distance was used informally in various contexts from c. 1910 to c. 1940. Its formal use dates at least to (Bhattacharyya 1943), entitled "On a measure of divergence between two statistical populations defined by their probability distributions", which defined the Bhattacharyya distance, and (Bhattacharyya 1946), entitled "On a Measure of Divergence between Two Multinomial Populations", which defined the Bhattacharyya angle. The term was popularized by its use for the Kullback–Leibler divergence in (Kullback Leibler) and its use in the textbook (Kullback 1959). The term "divergence" was used generally by (Ali Silvey) for statistically distances. Numerous references to earlier uses of statistical distances are given in (Adhikari Joshi) and (Kullback 1959).

(Kullback Leibler) actually used "divergence" to refer to the symmetrized divergence (this function had already been defined and used by Harold Jeffreys in 1948[10]), referring to the asymmetric function as "the mean information for discrimination ... per observation",[11] while (Kullback 1959) referred to the asymmetric function as the "directed divergence".[12] (Ali Silvey) referred generally to such a function as a "coefficient of divergence", and showed that many existing functions could be expressed as f-divergences, referring to Jeffreys' function as "Jeffreys' measure of divergence" (today "Jeffreys divergence"), and Kullback–Leibler's asymmetric function (in each direction) as "Kullback's and Leibler's measures of discriminatory information" (today "Kullback–Leibler divergence").[13]

The information geometry definition of divergence (the subject of this article) was initially referred to by alternative terms, including "quasi-distance" (Amari 1982) and "contrast function" (Eguchi 1985), though "divergence" was used in (Amari 1985) for the α-divergence, and has become standard for the general class.[3][4]

The term "divergence" is in contrast to a distance (metric), since the symmetrized divergence does not satisfy the triangle inequality.[14] For example, the term "Bregman distance" is still found, but "Bregman divergence" is now preferred.

Notationally, (Kullback Leibler) denoted their asymmetric function as [math]\displaystyle{ I(1:2) }[/math], while (Ali Silvey) denote their functions with a lowercase 'd' as [math]\displaystyle{ d\left(P_1, P_2\right) }[/math].

See also


  1. Throughout, we only require differentiability class C2 (continuous with continuous first and second derivatives), since only second derivatives are required. In practice, commonly used statistical manifolds and divergences are infinitely differentiable ("smooth").
  2. A colon is used in (Kullback Leibler), where the KL divergence between measure [math]\displaystyle{ \mu_1 }[/math] and [math]\displaystyle{ \mu_2 }[/math] is written as [math]\displaystyle{ I(1 : 2) }[/math].


  1. 1.0 1.1 1.2 1.3 Amari 2016, p. 10.
  2. Amari 2016, 1.6.1 Generalized Pythagorean Theorem.
  3. 3.0 3.1 3.2 Amari & Nagaoka 2000, chapter 3.2.
  4. 4.0 4.1 Amari 2016, p. 10, Definition 1.1.
  5. (Eguchi 1992)
  6. (Matumoto 1993)
  7. Csiszár 1991.
  8. Gorban, Pavel A. (15 October 2003). "Monotonically equivalent entropies and solution of additivity equation". Physica A 328 (3-4): 380–390. doi:10.1016/S0378-4371(03)00578-8. 
  9. Amari, Shun'ichi (2009). "Divergence, Optimization, Geometry". in Leung, C.S.. The 16th International Conference on Neural Information Processing (ICONIP 20009), Bangkok, Thailand, 1--5 December 2009. Berlin, Heidelberg: Springer. pp. 185–193. doi:10.1007/978-3-642-10677-4_21. 
  10. Jeffreys 1948, p. 158.
  11. Kullback & Leibler 1951, p. 80.
  12. Kullback 1959, p. 7.
  13. Ali & Silvey 1966, p. 139.
  14. Kullback 1959, p. 6.