Bregman divergence

From HandWiki
Short description: A measure of difference between two points

In mathematics, specifically statistics and information geometry, a Bregman divergence or Bregman distance is a measure of difference between two points, defined in terms of a strictly convex function; they form an important class of divergences. When the points are interpreted as probability distributions – notably as either values of the parameter of a parametric model or as a data set of observed values – the resulting distance is a statistical distance. The most basic Bregman divergence is the squared Euclidean distance.

Bregman divergences are similar to metrics, but satisfy neither the triangle inequality (ever) nor symmetry (in general). However, they satisfy a generalization of the Pythagorean theorem, and in information geometry the corresponding statistical manifold is interpreted as a (dually) flat manifold. This allows many techniques of optimization theory to be generalized to Bregman divergences, geometrically as generalizations of least squares.

Bregman divergences are named after Russian mathematician Lev M. Bregman, who introduced the concept in 1967.

Definition

Let [math]\displaystyle{ F: \Omega \to \mathbb{R} }[/math] be a continuously-differentiable, strictly convex function defined on a convex set [math]\displaystyle{ \Omega }[/math].

The Bregman distance associated with F for points [math]\displaystyle{ p, q \in \Omega }[/math] is the difference between the value of F at point p and the value of the first-order Taylor expansion of F around point q evaluated at point p:

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

Properties

  • Non-negativity: [math]\displaystyle{ D_F(p, q) \ge 0 }[/math] for all [math]\displaystyle{ p }[/math], [math]\displaystyle{ q }[/math]. This is a consequence of the convexity of [math]\displaystyle{ F }[/math].
  • Positivity: When [math]\displaystyle{ F }[/math] is strictly convex, [math]\displaystyle{ D_F(p, q) = 0 }[/math] iff [math]\displaystyle{ p=q }[/math].
  • Uniqueness up to affine difference: [math]\displaystyle{ D_F = D_G }[/math] iff [math]\displaystyle{ F-G }[/math] is an affine function.
  • Convexity: [math]\displaystyle{ D_F(p, q) }[/math] is convex in its first argument, but not necessarily in the second argument. If F is strictly convex, then [math]\displaystyle{ D_F(p, q) }[/math] is strictly convex in its first argument.
    • For example, Take f(x) = |x|, smooth it at 0, then take [math]\displaystyle{ y = 1, x_1 = 0.1, x_2 = -0.9, x_3 = 0.9x_1 + 0.1x_2 }[/math], then [math]\displaystyle{ D_f(y, x_3) \approx 1 \gt 0.9 D_f(y, x_1) + 0.1 D_f(y, x_2) \approx 0.2 }[/math].
  • Linearity: If we think of the Bregman distance as an operator on the function F, then it is linear with respect to non-negative coefficients. In other words, for [math]\displaystyle{ F_1, F_2 }[/math] strictly convex and differentiable, and [math]\displaystyle{ \lambda \ge 0 }[/math],
[math]\displaystyle{ D_{F_1 + \lambda F_2}(p, q) = D_{F_1}(p, q) + \lambda D_{F_2}(p, q) }[/math]
  • Duality: If F is strictly convex, then the function F has a convex conjugate [math]\displaystyle{ F^* }[/math] which is also strictly convex and continuously differentiable on some convex set [math]\displaystyle{ \Omega^* }[/math]. The Bregman distance defined with respect to [math]\displaystyle{ F^* }[/math] is dual to [math]\displaystyle{ D_F(p, q) }[/math] as
[math]\displaystyle{ D_{F^*}(p^*, q^*) = D_F(q, p) }[/math]
Here, [math]\displaystyle{ p^* = \nabla F(p) }[/math] and [math]\displaystyle{ q^* = \nabla F(q) }[/math] are the dual points corresponding to p and q.
Moreover, using the same notations :
[math]\displaystyle{ D_{F}(p, q) = F(p) + F^*(q^*) - \langle p, q^* \rangle }[/math]
  • Mean as minimizer: A key result about Bregman divergences is that, given a random vector, the mean vector minimizes the expected Bregman divergence from the random vector. This result generalizes the textbook result that the mean of a set minimizes total squared error to elements in the set. This result was proved for the vector case by (Banerjee et al. 2005), and extended to the case of functions/distributions by (Frigyik et al. 2008). This result is important because it further justifies using a mean as a representative of a random set, particularly in Bayesian estimation.
  • Bregman balls are bounded, and compact if X is closed: Define Bregman ball centered at x with radius r by [math]\displaystyle{ B_f(x, r):= \left\{y\in X: D_f(y, x)\leq r\right\} }[/math]. When [math]\displaystyle{ X\subset \R^n }[/math] is finite dimensional, [math]\displaystyle{ \forall x\in X }[/math], if [math]\displaystyle{ x }[/math] is in the relative interior of [math]\displaystyle{ X }[/math], or if [math]\displaystyle{ X }[/math] is locally closed at [math]\displaystyle{ x }[/math] (that is, there exists a closed ball [math]\displaystyle{ B(x, r) }[/math] centered at [math]\displaystyle{ x }[/math], such that [math]\displaystyle{ B(x,r) \cap X }[/math] is closed), then [math]\displaystyle{ B_f(x, r) }[/math] is bounded for all [math]\displaystyle{ r }[/math] . If [math]\displaystyle{ X }[/math] is closed, then [math]\displaystyle{ B_f(x, r) }[/math] is compact for all [math]\displaystyle{ r }[/math].
  • Law of cosines:[1]

For any [math]\displaystyle{ p,q,z }[/math]

[math]\displaystyle{ D_F(p, q) = D_F(p, z) + D_F(z, q) - (p - z)^T(\nabla F(q) - \nabla F(z)) }[/math]

[math]\displaystyle{ B_{F}\left(\theta_{1}: \theta\right)+B_{F}\left(\theta_{2}: \theta\right)=B_{F}\left(\theta_{1}: \frac{\theta_{1}+\theta_{2}}{2}\right)+B_{F}\left(\theta_{2}: \frac{\theta_{1}+\theta_{2}}{2}\right)+2 B_{F}\left(\frac{\theta_{1}+\theta_{2}}{2}: \theta\right) }[/math]

Generalized Pythagorean theorem for Bregman divergence .[2]
  • Bregman projection: For any [math]\displaystyle{ W\subset \Omega }[/math], define the "Bregman projection" of [math]\displaystyle{ q }[/math] onto [math]\displaystyle{ W }[/math]:

[math]\displaystyle{ P_W(q) = \text{argmin}_{\omega\in W} D_F(\omega, q) }[/math]. Then

    • if [math]\displaystyle{ W }[/math] is convex, then the projection is unique if it exists;
    • if [math]\displaystyle{ W }[/math] is nonempty, closed, and convex and [math]\displaystyle{ \Omega\subset \R^n }[/math] is finite dimensional, then the projection exists and is unique.[citation needed]
  • Generalized Pythagorean Theorem:[1]

For any [math]\displaystyle{ v\in \Omega, a\in W }[/math],

[math]\displaystyle{ D_F(a, v) \ge D_F(a, P_W(v)) + D_F(P_W(v), v). }[/math]

This is an equality if [math]\displaystyle{ P_W(v) }[/math] is in the relative interior of [math]\displaystyle{ W }[/math].

In particular, this always happens when [math]\displaystyle{ W }[/math] is an affine set.

  • Lack of triangle inequality: Since the Bregman divergence is essentially a generalization of squared Euclidean distance, there is no triangle inequality. Indeed, [math]\displaystyle{ D_F(z, x) - D_F(z, y) - D_F(y, x) = \langle\nabla f(y) - \nabla f(x), z-y\rangle }[/math], which may be positive or negative.

Proofs

  • Non-negativity and positivity: use Jensen's inequality.
  • Uniqueness up to affine difference: Fix some [math]\displaystyle{ x\in \Omega }[/math], then for any other [math]\displaystyle{ y\in \Omega }[/math], we have by definition[math]\displaystyle{ F(y) - G(y) = F(x) - G(x) + \langle\nabla F(x) - \nabla G(x) , y-x \rangle }[/math].
  • Convexity in the first argument: by definition, and use convexity of F. Same for strict convexity.
  • Linearity in F, law of cosines, parallelogram law: by definition.
  • Duality: See figure 1 of.[3]
  • Bregman balls are bounded, and compact if X is closed:

Fix [math]\displaystyle{ x\in X }[/math] . Take affine transform on [math]\displaystyle{ f }[/math] , so that [math]\displaystyle{ \nabla f(x) = 0 }[/math].

Take some [math]\displaystyle{ \epsilon \gt 0 }[/math], such that [math]\displaystyle{ \partial B(x, \epsilon) \subset X }[/math]. Then consider the "radial-directional" derivative of [math]\displaystyle{ f }[/math] on the Euclidean sphere [math]\displaystyle{ \partial B(x, \epsilon) }[/math].

[math]\displaystyle{ \langle\nabla f(y), (y-x)\rangle }[/math] for all [math]\displaystyle{ y\in \partial B(x, \epsilon) }[/math].

Since [math]\displaystyle{ \partial B(x, \epsilon)\subset \R^n }[/math] is compact, it achieves minimal value [math]\displaystyle{ \delta }[/math] at some [math]\displaystyle{ y_0\in \partial B(x, \epsilon) }[/math].

Since [math]\displaystyle{ f }[/math] is strictly convex, [math]\displaystyle{ \delta \gt 0 }[/math]. Then [math]\displaystyle{ B_f(x, r)\subset B(x, r/\delta)\cap X }[/math].

Since [math]\displaystyle{ D_f(y, x) }[/math] is [math]\displaystyle{ C^1 }[/math] in [math]\displaystyle{ y }[/math], [math]\displaystyle{ D_f }[/math] is continuous in [math]\displaystyle{ y }[/math], thus [math]\displaystyle{ B_f(x, r) }[/math] is closed if [math]\displaystyle{ X }[/math] is.

  • Projection [math]\displaystyle{ P_W }[/math] is well-defined when [math]\displaystyle{ W }[/math] is closed and convex.

Fix [math]\displaystyle{ v\in X }[/math]. Take some [math]\displaystyle{ w\in W }[/math] , then let [math]\displaystyle{ r := D_f(w, v) }[/math]. Then draw the Bregman ball [math]\displaystyle{ B_f(v, r)\cap W }[/math]. It is closed and bounded, thus compact. Since [math]\displaystyle{ D_f(\cdot, v) }[/math] is continuous and strictly convex on it, and bounded below by [math]\displaystyle{ 0 }[/math], it achieves a unique minimum on it.

  • Pythagorean inequality.

By cosine law, [math]\displaystyle{ D_f(w, v) - D_f(w, P_W(v)) - D_f(P_W(v), v) = \langle \nabla_y D_f(y, v)|_{y = P_W(v)} , w - P_W(v)\rangle }[/math], which must be [math]\displaystyle{ \geq 0 }[/math], since [math]\displaystyle{ P_W(v) }[/math] minimizes [math]\displaystyle{ D_f(\cdot, v) }[/math] in [math]\displaystyle{ W }[/math], and [math]\displaystyle{ W }[/math] is convex.

  • Pythagorean equality when [math]\displaystyle{ P_W(v) }[/math] is in the relative interior of [math]\displaystyle{ X }[/math].

If [math]\displaystyle{ \langle \nabla_y D_f(y, v)|_{y = P_W(v)}, w - P_W(v)\rangle \gt 0 }[/math], then since [math]\displaystyle{ w }[/math] is in the relative interior, we can move from [math]\displaystyle{ P_W(v) }[/math] in the direction opposite of [math]\displaystyle{ w }[/math], to decrease [math]\displaystyle{ D_f(y, v) }[/math] , contradiction.

Thus [math]\displaystyle{ \langle \nabla_y D_f(y, v)|_{y = P_W(v)}, w - P_W(v)\rangle = 0 }[/math].

Classification theorems

  • The only symmetric Bregman divergences on [math]\displaystyle{ X\subset \R^n }[/math] are squared generalized Euclidean distances (Mahalanobis distance), that is, [math]\displaystyle{ D_f(y, x) = (y-x)^T A (y-x) }[/math] for some positive definite [math]\displaystyle{ A }[/math].[4]

The following two characterizations are for divergences on [math]\displaystyle{ \Gamma_n }[/math], the set of all probability measures on [math]\displaystyle{ \{1, 2, ..., n\} }[/math], with [math]\displaystyle{ n \geq 2 }[/math].

Define a divergence on [math]\displaystyle{ \Gamma_n }[/math] as any function of type [math]\displaystyle{ D: \Gamma_n \times \Gamma_n \to [0, \infty] }[/math], such that [math]\displaystyle{ D(x, x) = 0 }[/math] for all [math]\displaystyle{ x\in\Gamma_n }[/math], then:

  • The only divergence on [math]\displaystyle{ \Gamma_n }[/math] that is both a Bregman divergence and an f-divergence is the Kullback–Leibler divergence.[5]
  • If [math]\displaystyle{ n \geq 3 }[/math], then any Bregman divergence on [math]\displaystyle{ \Gamma_n }[/math] that satisfies the data processing inequality must be the Kullback–Leibler divergence. (In fact, a weaker assumption of "sufficiency" is enough.) Counterexamples exist when [math]\displaystyle{ n = 2 }[/math].[5]

Given a Bregman divergence [math]\displaystyle{ D_F }[/math], its "opposite", defined by [math]\displaystyle{ D_F^*(v, w) = D_F(w, v) }[/math], is generally not a Bregman divergence. For example, the Kullback-Leiber divergence is both a Bregman divergence and an f-divergence. Its reverse is also an f-divergence, but by the above characterization, the reverse KL divergence cannot be a Bregman divergence.

Examples

  • The squared Mahalanobis distance [math]\displaystyle{ D_F(x,y)=\tfrac{1}{2}(x-y)^T Q (x-y) }[/math] is generated by the convex quadratic form [math]\displaystyle{ F(x) = \tfrac{1}{2} x^T Q x }[/math].
  • The canonical example of a Bregman distance is the squared Euclidean distance [math]\displaystyle{ D_F(x,y) = \|x - y\|^2 }[/math]. It results as the special case of the above, when [math]\displaystyle{ Q }[/math] is the identity, i.e. for [math]\displaystyle{ F(x) = \|x\|^2 }[/math]. As noted, affine differences, i.e. the lower orders added in [math]\displaystyle{ F }[/math], are irrelevant to [math]\displaystyle{ D_F }[/math].
  • The generalized Kullback–Leibler divergence
[math]\displaystyle{ D_F(p, q) = \sum_i p(i) \log \frac{p(i)}{q(i)} - \sum p(i) + \sum q(i) }[/math]
is generated by the negative entropy function
[math]\displaystyle{ F(p) = \sum_i p(i)\log p(i) }[/math]
When restricted to the simplex, the last two terms cancel, giving the usual Kullback–Leibler divergence for distributions.
[math]\displaystyle{ D_F(p, q) = \sum_i \left(\frac {p(i)}{q(i)} - \log \frac{p(i)}{q(i)} - 1 \right) }[/math]
is generated by the convex function
[math]\displaystyle{ F(p) = - \sum_i \log p(i) }[/math]

Generalizing projective duality

A key tool in computational geometry is the idea of projective duality, which maps points to hyperplanes and vice versa, while preserving incidence and above-below relationships. There are numerous analytical forms of the projective dual: one common form maps the point [math]\displaystyle{ p = (p_1, \ldots p_d) }[/math] to the hyperplane [math]\displaystyle{ x_{d+1} = \sum_1^d 2p_i x_i }[/math]. This mapping can be interpreted (identifying the hyperplane with its normal) as the convex conjugate mapping that takes the point p to its dual point [math]\displaystyle{ p^* = \nabla F(p) }[/math], where F defines the d-dimensional paraboloid [math]\displaystyle{ x_{d+1} = \sum x_i^2 }[/math].

If we now replace the paraboloid by an arbitrary convex function, we obtain a different dual mapping that retains the incidence and above-below properties of the standard projective dual. This implies that natural dual concepts in computational geometry like Voronoi diagrams and Delaunay triangulations retain their meaning in distance spaces defined by an arbitrary Bregman divergence. Thus, algorithms from "normal" geometry extend directly to these spaces (Boissonnat, Nielsen and Nock, 2010)

Generalization of Bregman divergences

Bregman divergences can be interpreted as limit cases of skewed Jensen divergences (see Nielsen and Boltz, 2011). Jensen divergences can be generalized using comparative convexity, and limit cases of these skewed Jensen divergences generalizations yields generalized Bregman divergence (see Nielsen and Nock, 2017). The Bregman chord divergence[6] is obtained by taking a chord instead of a tangent line.

Bregman divergence on other objects

Bregman divergences can also be defined between matrices, between functions, and between measures (distributions). Bregman divergences between matrices include the Stein's loss and von Neumann entropy. Bregman divergences between functions include total squared error, relative entropy, and squared bias; see the references by Frigyik et al. below for definitions and properties. Similarly Bregman divergences have also been defined over sets, through a submodular set function which is known as the discrete analog of a convex function. The submodular Bregman divergences subsume a number of discrete distance measures, like the Hamming distance, precision and recall, mutual information and some other set based distance measures (see Iyer & Bilmes, 2012 for more details and properties of the submodular Bregman.)

For a list of common matrix Bregman divergences, see Table 15.1 in.[7]

Applications

In machine learning, Bregman divergences are used to calculate the bi-tempered logistic loss, performing better than the softmax function with noisy datasets.[8]

Bregman divergence is used in the formulation of mirror descent, which includes optimization algorithms used in machine learning such as gradient descent and the hedge algorithm.

References

  1. 1.0 1.1 "Learning with Bregman Divergences". https://www.cs.utexas.edu/users/inderjit/Talks/bregtut.pdf. 
  2. Adamčík, Martin (2014). "The Information Geometry of Bregman Divergences and Some Applications in Multi-Expert Reasoning". Entropy 16 (12): 6338–6381. doi:10.3390/e16126338. Bibcode2014Entrp..16.6338A. 
  3. Nielsen, Frank (2021-10-28). "Fast Approximations of the Jeffreys Divergence between Univariate Gaussian Mixtures via Mixture Conversions to Exponential-Polynomial Distributions". Entropy 23 (11): 1417. doi:10.3390/e23111417. ISSN 1099-4300. PMID 34828115. Bibcode2021Entrp..23.1417N. 
  4. Nielsen, Frank (September 2010). "Bregman Voronoi Diagrams: Properties, Algorithms and Applications". Discrete & Computational Geometry 44 (2): 281–307. doi:10.1007/s00454-010-9256-1. ISSN 0179-5376. 
  5. 5.0 5.1 Jiao, Jiantao; Courtade, Thomas; No, Albert; Venkat, Kartik; Weissman, Tsachy (December 2014). "Information Measures: the Curious Case of the Binary Alphabet". IEEE Transactions on Information Theory 60 (12): 7616–7626. doi:10.1109/TIT.2014.2360184. ISSN 0018-9448. 
  6. Nielsen, Frank; Nock, Richard (2019). "The Bregman Chord Divergence". Geometric Science of Information. Lecture Notes in Computer Science. 11712. pp. 299–308. doi:10.1007/978-3-030-26980-7_31. ISBN 978-3-030-26979-1. 
  7. "Matrix Information Geometry", R. Nock, B. Magdalou, E. Briys and F. Nielsen, pdf, from this book
  8. Ehsan Amid, Manfred K. Warmuth, Rohan Anil, Tomer Koren (2019). "Robust Bi-Tempered Logistic Loss Based on Bregman Divergences". Conference on Neural Information Processing Systems. pp. 14987-14996. pdf
| last1 = Nielsen
| first1 = Frank
| last2 = Boissonnat
| first2 = Jean-Daniel
| last3 = Nock
| first3 = Richard
| title = On Visualizing Bregman Voronoi diagrams
| book-title = Proc. 23rd ACM Symposium on Computational Geometry (video track)
| doi = 10.1145/1247069.1247089
| url = http://www.csl.sony.co.jp/person/nielsen/PT/SoCG07/
| year = 2007