F-divergence explained

In probability theory, an

f

-divergence is a certain type of function

Df(P\|Q)

that measures the difference between two probability distributions

P

and

Q

. Many common divergences, such as KL-divergence, Hellinger distance, and total variation distance, are special cases of

f

-divergence.

History

These divergences were introduced by Alfréd Rényi[1] in the same paper where he introduced the well-known Rényi entropy. He proved that these divergences decrease in Markov processes. f-divergences were studied further independently by, and and are sometimes known as Csiszár

f

-divergences, Csiszár–Morimoto divergences, or Ali–Silvey distances.

Definition

Non-singular case

Let

P

and

Q

be two probability distributions over a space

\Omega

, such that

P\llQ

, that is,

P

is absolutely continuous with respect to

Q

. Then, for a convex function

f:[0,+infty)\to(-infty,+infty]

such that

f(x)

is finite for all

x>0

,

f(1)=0

, and
f(0)=\lim
t\to0+

f(t)

(which could be infinite), the

f

-divergence of

P

from

Q

is defined as

Df(P\parallelQ)\equiv\int\Omegaf\left(

dP
dQ

\right)dQ.

We call

f

the generator of

Df

.

In concrete applications, there is usually a reference distribution

\mu

on

\Omega

(for example, when

\Omega=\Rn

, the reference distribution is the Lebesgue measure), such that

P,Q\ll\mu

, then we can use Radon–Nikodym theorem to take their probability densities

p

and

q

, giving

Df(P\parallelQ)=\int\Omegaf\left(

p(x)
q(x)

\right)q(x)d\mu(x).

When there is no such reference distribution ready at hand, we can simply define

\mu=P+Q

, and proceed as above. This is a useful technique in more abstract proofs.

The above definition can be extended to cases where

P\llQ

is no longer satisfied (Definition 7.1 of [2]).

Since

f

is convex, and

f(1)=0

, the function
f(x)
x-1
must nondecrease, so there exists

f'(infty):=\limx\toinftyf(x)/x

, taking value in

(-infty,+infty]

.

Since for any

p(x)>0

, we have

\limq(x)\toq(x)f\left(

p(x)
q(x)

\right)=p(x)f'(infty)

, we can extend f-divergence to the

P\not\llQ

.

Properties

Basic relations between f-divergences

D
\sumiaifi

=\sumiai

D
fi
given a finite sequence of nonnegative real numbers

ai

and generators

fi

.

Df=Dg

iff

f(x)=g(x)+c(x-1)

for some

c\in\R

.

Basic properties of f-divergences

In particular, the monotonicity implies that if a Markov process has a positive equilibrium probability distribution

P*

then

Df(P(t)\parallelP*)

is a monotonic (non-increasing) function of time, where the probability distribution

P(t)

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

Df(P(t)\parallelP*)

are the Lyapunov functions of the Kolmogorov forward equations. The converse statement is also true: If

H(P)

is a Lyapunov function for all Markov chains with positive equilibrium

P*

and is of the trace-form(

H(P)=\sumif(Pi

*
,P
i

)

) then

H(P)=Df(P(t)\parallelP*)

, for some convex function f.[3] [4] For example, Bregman divergences in general do not have such property and can increase in Markov processes.[5]

Analytic properties

The f-divergences can be expressed using Taylor series and rewritten using a weighted sum of chi-type distances .

Naive variational representation

Let

f*

be the convex conjugate of

f

. Let

effdom(f*)

be the effective domain of

f*

, that is,

effdom(f*)=\{y:f*(y)<infty\}

. Then we have two variational representations of

Df

, which we describe below.

Basic variational representation

Under the above setup,

This is Theorem 7.24 in.

Example applications

Using this theorem on total variation distance, with generator

f(x)=

1
2

|x-1|,

its convex conjugate is

f*(x*)=\begin{cases} x*on[-1/2,1/2],\\ +inftyelse. \end{cases}

, and we obtainTV(P\| Q) = \sup_
\leq 1/2
E_P[g(X)] - E_Q[g(X)].For chi-squared divergence, defined by

f(x)=(x-1)2,f*(y)=y2/4+y

, we obtain\chi^2(P; Q) = \sup_g E_P[g(X)] - E_Q[g(X)^2/4 + g(X)].Since the variation term is not affine-invariant in

g

, even though the domain over which

g

varies is affine-invariant, we can use up the affine-invariance to obtain a leaner expression.

Replacing

g

by

ag+b

and taking the maximum over

a,b\in\R

, we obtain\chi^2(P; Q) = \sup_g \frac,which is just a few steps away from the Hammersley–Chapman–Robbins bound and the Cramér–Rao bound (Theorem 29.1 and its corollary in).

For

\alpha

-divergence with

\alpha\in(-infty,0)\cup(0,1)

, we have

f\alpha(x)=

x\alpha-\alphax-(1-\alpha)
\alpha(\alpha-1)
, with range

x\in[0,infty)

. Its convex conjugate is
*(y)=1
\alpha
f
\alpha

(x(y)\alpha-1)

with range

y\in(-infty,(1-\alpha)-1)

, where

x(y)=((\alpha-1)y+

1
\alpha-1
1)
.

Applying this theorem yields, after substitution with

h=

1
\alpha-1
((\alpha-1)g+1)
,D_\alpha(P\| Q) = \frac - \inf_\left(E_Q\left[\frac{h^\alpha}{\alpha}\right] + E_P\left[\frac{h^{\alpha-1}}{1-\alpha}\right] \right),or, releasing the constraint on

h

,D_\alpha(P\| Q) = \frac - \inf_\left(E_Q\left[\frac{|h|^\alpha}{\alpha}\right] + E_P\left[\frac{|h|^{\alpha-1}}{1-\alpha}\right] \right).Setting

\alpha=-1

yields the variational representation of

\chi2

-divergence obtained above.

The domain over which

h

varies is not affine-invariant in general, unlike the

\chi2

-divergence case. The

\chi2

-divergence is special, since in that case, we can remove the

||

from

|h|

.

For general

\alpha\in(-infty,0)\cup(0,1)

, the domain over which

h

varies is merely scale invariant. Similar to above, we can replace

h

by

ah

, and take minimum over

a>0

to obtainD_\alpha(P\| Q) = \sup_ \left[\frac{1}{\alpha(1-\alpha)} \left(1-\frac{E_P[h^{\alpha-1}]^\alpha}\right) \right].Setting
\alpha=1
2
, and performing another substitution by

g=\sqrth

, yields two variational representations of the squared Hellinger distance:H^2(P\|Q) = \frac 1 2 D_(P\| Q) = 2 - \inf_\left(E_Q\left[h(X)\right] + E_P\left[h(X)^{-1}\right] \right),H^2(P\|Q) = 2 \sup_ \left(1-\sqrt\right).Applying this theorem to the KL-divergence, defined by

f(x)=xlnx,f*(y)=ey-1

, yieldsD_(P; Q) =\sup_g E_P[g(X)] - e^E_Q[e^{g(X)}].This is strictly less efficient than the Donsker–Varadhan representationD_(P; Q) = \sup_g E_P[g(X)]- \ln E_Q[e^{g(X)}].This defect is fixed by the next theorem.

Improved variational representation

Assume the setup in the beginning of this section ("Variational representations").

This is Theorem 7.25 in.

Example applications

Applying this theorem to KL-divergence yields the Donsker–Varadhan representation.

Attempting to apply this theorem to the general

\alpha

-divergence with

\alpha\in(-infty,0)\cup(0,1)

does not yield a closed-form solution.

Common examples of f-divergences

The following table lists many of the common divergences between probability distributions and the possible generating functions to which they correspond. Notably, except for total variation distance, all others are special cases of

\alpha

-divergence, or linear sums of

\alpha

-divergences.

For each f-divergence

Df

, its generating function is not uniquely defined, but only up to

c(t-1)

, where

c

is any real constant. That is, for any

f

that generates an f-divergence, we have

Df(t)=Df(t)

. This freedom is not only convenient, but actually necessary.
DivergenceCorresponding f(t)Discrete Form

\chi\alpha

-divergence,

\alpha\ge1

12
t - 1^ \,
12
\sum

i\left

\frac\right^\alpha q_i \,
Total variation distance (

\alpha=1

)
12
t - 1\,
12
\sum

i

p_i - q_i\,
α-divergence

\begin{cases}

t\alpha-\alphat-\left(1-\alpha\right)
\alpha\left(\alpha-1\right)

&if\alpha0,\alpha1,\\ tlnt-t+1,&if\alpha=1,\\ -lnt+t-1,&if\alpha=0 \end{cases}

KL-divergence (

\alpha=1

)

tlnt

\sumipiln

pi
qi

reverse KL-divergence (

\alpha=0

)

-lnt

\sumiqiln

qi
pi

Jensen–Shannon divergence
1
2

\left(tlnt-(t+1)ln\left(

t+1
2

\right)\right)

1
2

\sumi\left(piln

pi
(pi+qi)/2

+qiln

qi
(pi+qi)/2

\right)

Jeffrey's divergence (KL + reverse KL)

(t-1)ln(t)

\sumi(pi-qi)ln

pi
qi

squared Hellinger distance (
\alpha=1
2
)
1
2

(\sqrt{t}-1)2,1-\sqrt{t}

1
2

\sumi(\sqrt{pi}-

2;
\sqrt{q
i})

1-\sumi\sqrt{piqi}

Pearson

\chi2

-divergence (rescaling of

\alpha=2

)

(t-1)2,t2-1,t2-t

\sumi

(p-
2
q
i)
i
qi

Neyman

\chi2

-divergence (reverse Pearson)(rescaling of

\alpha=-1

)
1t-1,1t-t

2+\sumi

(p-
2
q
i)
i
pi

Let

f\alpha

be the generator of

\alpha

-divergence, then

f\alpha

and

f1-\alpha

are convex inversions of each other, so

D\alpha(P\|Q)=D1-\alpha(Q\|P)

. In particular, this shows that the squared Hellinger distance and Jensen-Shannon divergence are symmetric.

In the literature, the

\alpha

-divergences are sometimes parametrized as

\begin{cases}

4
1-\alpha2

(1-t(1+\alpha)/2),&if\alpha\pm1,\\ tlnt,&if\alpha=1,\\ -lnt,&if\alpha=-1 \end{cases}

which is equivalent to the parametrization in this page by substituting

\alpha\leftarrow

\alpha+1
2
.

Relations to other statistical divergences

Here, we compare f-divergences with other statistical divergences.

Rényi divergence

The Rényi divergences is a family of divergences defined by

R\alpha(P\|Q)=

1
\alpha-1
log( E
Q\left[\left(dP
dQ

\right)\alpha\right] )

when

\alpha\in(0,1)\cup(1,+infty)

. It is extended to the cases of

\alpha=0,1,+infty

by taking the limit.

Simple algebra shows that

R\alpha(P\|Q)=

1
\alpha-1

ln(1+\alpha(\alpha-1)D\alpha(P\|Q))

, where

D\alpha

is the

\alpha

-divergence defined above.

Bregman divergence

The only f-divergence that is also a Bregman divergence is the KL divergence.[6]

Integral probability metrics

The only f-divergence that is also an integral probability metric is the total variation.[7]

Financial interpretation

A pair of probability distributions can be viewed as a game of chance in which one of the distributions defines the official odds and the other contains the actual probabilities. Knowledge of the actual probabilities allows a player to profit from the game. For a large class of rational players the expected profit rate has the same general form as the ƒ-divergence.[8]

See also

References

Notes and References

  1. On measures of entropy and information. Alfréd. Rényi . 1961. The 4th Berkeley Symposium on Mathematics, Statistics and Probability, 1960. University of California Press. Berkeley, CA. 547–561. Eq. (4.20)
  2. Book: Polyanskiy . Yury . Information Theory: From Coding to Learning (draft of October 20, 2022) . Yihong . Wu . Cambridge University Press . 2022 . https://web.archive.org/web/20230201222557/https://people.lids.mit.edu/yp/homepage/data/itbook-export.pdf . 2023-02-01.
  3. Gorban. Pavel A.. 15 October 2003. Monotonically equivalent entropies and solution of additivity equation. Physica A. 328. 3–4 . 380–390. 10.1016/S0378-4371(03)00578-8 . cond-mat/0304131. 2003PhyA..328..380G. 14975501.
  4. Divergence, Optimization, Geometry. Shun'ichi . Amari . Shun'ichi Amari . 2009. The 16th International Conference on Neural Information Processing (ICONIP 20009), Bangkok, Thailand, 1--5 December 2009 . Leung, C.S. . Lee, M. . Chan, J.H.. Lecture Notes in Computer Science, vol 5863 . Springer . Berlin, Heidelberg . 185–193 . 10.1007/978-3-642-10677-4_21 .
  5. Gorban. Alexander N.. 29 April 2014. General H-theorem and Entropies that Violate the Second Law. Entropy. 16. 5. 2408–2432. 10.3390/e16052408. 1212.6767. 2014Entrp..16.2408G. free.
  6. 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 . 10.1109/TIT.2014.2360184 . 0018-9448. 1404.6810 . 13108908 .
  7. 0901.2698 . Sriperumbudur . Bharath K. . Fukumizu . Kenji . Gretton . Arthur . Schölkopf . Bernhard . Bernhard Schölkopf . Lanckriet . Gert R. G. . On integral probability metrics, φ-divergences and binary classification . 2009 . cs.IT .
  8. Soklakov. Andrei N.. 2020. Economics of Disagreement—Financial Intuition for the Rényi Divergence. Entropy. 22. 8. 860. 10.3390/e22080860. 33286632. 7517462. 1811.08308. 2020Entrp..22..860S. free.