Bregman divergence

Bregman divergence between two points on the real line for the case F = exp. It shows that in this case, the divergence is asymmetric.

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 Soviet and Israeli mathematician Lev M. Bregman, who introduced the concept in 1967.

Definition

Let F:Ω→ℝ be a continuously-differentiable, strictly convex function defined on a convex set Ω.

The Bregman distance associated with F for points p,q∈Ω 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: DF(p,q)=F(p)−F(q)−⟨∇F(q),p−q⟩.

Properties

Proofs

  • Non-negativity and positivity: use Jensen's inequality.
  • Uniqueness up to affine difference: Fix some x∈Ω, then for any other y∈Ω, we have by definitionF(y)−G(y)=F(x)−G(x)+⟨∇F(x)−∇G(x),y−x⟩.
  • 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.
  • Bregman balls are bounded, and compact if X is closed:

    Fix x∈X . Take affine transform on f , so that ∇f(x)=0.

    Take some ϵ>0, such that ∂B(x,ϵ)⊂X. Then consider the "radial-directional" derivative of f on the Euclidean sphere ∂B(x,ϵ).

    ⟨∇f(y),(y−x)⟩ for all y∈∂B(x,ϵ).

    Since ∂B(x,ϵ)⊂ℝn is compact, it achieves minimal value δ at some y0∈∂B(x,ϵ).

    Since f is strictly convex, δ>0. Then Bf(x,r)⊂B(x,r/δ)∩X.

    Since Df(y,x) is C1 in y, Df is continuous in y, thus Bf(x,r) is closed if X is.
  • Projection PW is well-defined when W is closed and convex.
    Fix v∈X. Take some w∈W , then let r:=Df(w,v). Then draw the Bregman ball Bf(v,r)∩W. It is closed and bounded, thus compact. Since Df(⋅,v) is continuous and strictly convex on it, and bounded below by 0, it achieves a unique minimum on it.
  • Pythagorean inequality.
    By cosine law, Df(w,v)−Df(w,PW(v))−Df(PW(v),v)=⟨∇yDf(y,v)|y=PW(v),w−PW(v)⟩, which must be ≥0, since PW(v) minimizes Df(⋅,v) in W, and W is convex.
  • Pythagorean equality when PW(v) is in the relative interior of X.

    If ⟨∇yDf(y,v)|y=PW(v),w−PW(v)⟩>0, then since w is in the relative interior, we can move from PW(v) in the direction opposite of w, to decrease Df(y,v) , contradiction.

    Thus ⟨∇yDf(y,v)|y=PW(v),w−PW(v)⟩=0.

Proof that the minimizer the mean value

Let Y be a real-valued random variable with finite expectation 𝔼[Y], and let ϕ:ℝ→ℝ be a twice continuously differentiable, strictly convex function. The Bregman divergence generated by ϕ defines the loss function:

S(y,ŷ)=ϕ(y)−ϕ(ŷ)−ϕ′(ŷ)(y−ŷ)

The expected loss associated with a point forecast ŷ is given by:

𝔼[S(Y,ŷ)]=𝔼[ϕ(Y)−ϕ(ŷ)−ϕ′(ŷ)(Y−ŷ)]

By the linearity of expectation, this expands to:

𝔼[S(Y,ŷ)]=𝔼[ϕ(Y)]−ϕ(ŷ)−ϕ′(ŷ)(𝔼[Y]−ŷ)

Differentiating with respect to ŷ using the product rule yields:

ddŷ𝔼[S(Y,ŷ)]=0−ϕ′(ŷ)−(ϕ″(ŷ)(𝔼[Y]−ŷ)+ϕ′(ŷ)(−1))=−ϕ′(ŷ)−ϕ″(ŷ)(𝔼[Y]−ŷ)+ϕ′(ŷ)=ϕ″(ŷ)(ŷ−𝔼[Y])

Setting the first derivative to zero for the critical point:

ϕ″(ŷ∗)(ŷ∗−𝔼[Y])=0

Since ϕ is strictly convex, its second derivative satisfies ϕ″(ŷ)>0 for all ŷ. Dividing by ϕ″(ŷ) yields the unique minimizer:

ŷ∗=𝔼[Y]◼

Classification theorems

Proof
Bregman divergence interpreted as areas.

For any x≠y∈X , define r=‖y−x‖,v=(y−x)/r,g(t)=f(x+tv) for t∈[0,r] . Let z(t)=x+tv.

Then g′(t)=⟨∇f(z(t)),v⟩ for t∈(0,r) , and since ∇f is continuous, also for t=0,r .

Then, from the diagram, we see that for Df(x;z(t))=Df(z(t);x) for all t∈[0,r] , we must have g′(t) linear on t∈[0,r].

Thus we find that ∇f varies linearly along any direction. By the next lemma, f is quadratic. Since f is also strictly convex, it is of form f(x)+xTAx+BTx+C , where A≻0.

Lemma: If S is an open subset of ℝn , f:S→ℝ has continuous derivative, and given any line segment [x,x+v]⊂S , the function h(t):=⟨∇f(x+tv),v⟩ is linear in t , then f is a quadratic function.

Proof idea: For any quadratic function q:S→ℝ , we have f−q still has such derivative-linearity, so we will subtract away a few quadratic functions and show that f becomes zero.

The proof idea can be illustrated fully for the case of S=ℝ2 , so we prove it in this case.

By the derivative-linearity, f is a quadratic function on any line segment in ℝ2. We subtract away four quadratic functions, such that g:=f−q0−q1−q2−q3 becomes identically zero on the x-axis, y-axis, and the {x=y} line.

Let q0(x,y)=f(0,0)+∇f(0,0)⋅(x,y),q1(x,y)=A1x2,q2(x,y)=A2y2,q3(x,y)=A3xy, for well-chosen A1,A2,A3. Now use q0 to remove the linear term, and use q1,q2,q3 respectively to remove the quadratic terms along the three lines.

∀(x,y)∈ℝ2 not on the origin, there exists a line l across (x,y) that intersects the x-axis, y-axis, and the {x=y} line at three different points. Since g is quadratic on l , and is zero on three different points, g is identically zero on l , thus g(x,y)=0. Thus f=q0+q1+q2+q3 is quadratic.

The following two characterizations are for divergences on Γn, the set of all probability measures on {1,2,...,n}, with n≥2.

Define a divergence on Γn as any function of type D:Γn×Γn→[0,∞], such that D(x,x)=0 for all x∈Γn, then:

  • The only divergence on Γn that is both a Bregman divergence and an f-divergence is the Kullback–Leibler divergence.
  • If n≥3, then any Bregman divergence on Γn that satisfies the data processing inequality must be the Kullback–Leibler divergence. (In fact, a weaker assumption of "sufficiency" is enough.) Counterexamples exist when n=2.

Given a Bregman divergence DF, its "opposite", defined by DF∗(v,w)=DF(w,v), 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

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 p=(p1,…pd) to the hyperplane xd+1=∑i=1d2pixi. 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 p∗=∇F(p), where F defines the d-dimensional paraboloid xd+1=∑ixi2.

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 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.

Applications

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

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.