1 Entropy and KL divergence

1 Entropy and KL divergence

While studying the derivation of minimax lower bounds in nonparametric statistics, I recently came across Fano’s method. The intrinsic connection between it and information theory is fascinating. This note intends to reorganize these concepts using the language of measure theory to facilitate a deeper understanding. For probability theory, while Durrett’s textbook [2] is widely recommended, my personal references of choice are [3] and [4].

Let’s start from the concept of entropy. Let the ambient probability measure space be (E,,)𝐸. Suppose the real valued random variable X𝑋 has the density function p(x)𝑝𝑥, that is, X:=X1assignsubscript𝑋superscript𝑋1 is absolutely continuous with respect to the Lebesgue measure. The differential entropy is defined as

H(X)=𝔼[logp(X)]=p(x)logp(x)dx.𝐻𝑋𝔼delimited-[]𝑝𝑋subscript𝑝𝑥𝑝𝑥differential-d𝑥

It is the continuous analogue of the Shannon entropy for discrete random variables.

Consider two random variables X𝑋 and Y𝑌, and (X,Y)=Xνsubscript𝑋𝑌tensor-productsubscript𝑋𝜈, where ν𝜈 is the conditional distribution of Y|Xconditional𝑌𝑋, that is, ν𝜈 is a transition probability satisfying (YA|X=x):=𝔼[1YA|X=x]=ν(x,A)assign𝑌conditional𝐴𝑋𝑥𝔼delimited-[]conditionalsubscript1𝑌𝐴𝑋𝑥𝜈𝑥𝐴, Xsubscript𝑋-a.s for each x𝑥 and A()𝐴. Suppose (X,Y)𝑋𝑌 has density function p(x,y)𝑝𝑥𝑦. Then the density of X𝑋 is pX(x)=p(x,y)dysubscript𝑝𝑋𝑥subscript𝑝𝑥𝑦differential-d𝑦, where pX(x):=0assignsubscript𝑝𝑋𝑥0 if the integral is infinite (on a set of zero Lebesgue measure). Note that A:={x:pX(x)=0}assign𝐴conditional-set𝑥subscript𝑝𝑋𝑥0 has zero Xsubscript𝑋-measure since X(A)=ApX(x)dx=0subscript𝑋𝐴subscript𝐴subscript𝑝𝑋𝑥differential-d𝑥0. Using Fubini’s theorem, one can verify for any A,B()𝐴𝐵 that

(X,Y)(A×B)=A×Bp(x,y)dxdy=A(Bp(x,y)pX(x)1pX(x)>0dy)pX(x)dx.subscript𝑋𝑌𝐴𝐵subscript𝐴𝐵𝑝𝑥𝑦differential-d𝑥differential-d𝑦subscript𝐴subscript𝐵𝑝𝑥𝑦subscript𝑝𝑋𝑥subscript1subscript𝑝𝑋𝑥0differential-d𝑦subscript𝑝𝑋𝑥differential-d𝑥

Therefore, we can define

ν(x,B)=1pX(x)>0Bp(x,y)pX(x)dy+1pX(x)=0Bϕ(y)dy,𝜈𝑥𝐵subscript1subscript𝑝𝑋𝑥0subscript𝐵𝑝𝑥𝑦subscript𝑝𝑋𝑥differential-d𝑦subscript1subscript𝑝𝑋𝑥0subscript𝐵italic-ϕ𝑦differential-d𝑦

where ϕ(y)italic-ϕ𝑦 is an arbitrary density function. This implies that ν(x,)λmuch-less-than𝜈𝑥𝜆 for Xsubscript𝑋-a.e. x𝑥 (where λ𝜆 denotes the Lebesgue measure). The density function of Y|Xconditional𝑌𝑋 is pY|X(y|x)=p(x,y)pX(x)1pX(x)>0+ϕ(y)1pX(x)=0subscript𝑝conditional𝑌𝑋conditional𝑦𝑥𝑝𝑥𝑦subscript𝑝𝑋𝑥subscript1subscript𝑝𝑋𝑥0italic-ϕ𝑦subscript1subscript𝑝𝑋𝑥0, which is unique in the Xsubscript𝑋-a.e. sense. The conditional entropy is then defined as

H(Y|X)𝐻conditional𝑌𝑋 =𝔼X[H(Y|X=)]=(pY|X(y|x)logpY|X(y|x)dy)pX(x)dxabsentsubscript𝔼subscript𝑋delimited-[]𝐻conditional𝑌𝑋subscriptsubscriptsubscript𝑝conditional𝑌𝑋conditional𝑦𝑥subscript𝑝conditional𝑌𝑋conditional𝑦𝑥d𝑦subscript𝑝𝑋𝑥differential-d𝑥
=×logpY|X(y|x)(X,Y)(d(x,y))=𝔼[logpY|X(Y|X)],absentsubscriptsubscript𝑝conditional𝑌𝑋conditional𝑦𝑥subscript𝑋𝑌d𝑥𝑦𝔼delimited-[]subscript𝑝conditional𝑌𝑋conditional𝑌𝑋

where H(Y|X=):=pY|X(y|)logpY|X(y|)dyassign𝐻conditional𝑌𝑋subscriptsubscript𝑝conditional𝑌𝑋conditional𝑦subscript𝑝conditional𝑌𝑋conditional𝑦d𝑦 is a measurable function defined in the Xsubscript𝑋-a.e. sense. Note that H(Y|X)𝐻conditional𝑌𝑋 does not depend on the value of pY|X(y|x)subscript𝑝conditional𝑌𝑋conditional𝑦𝑥 on pX(x)=0subscript𝑝𝑋𝑥0, hence is well-defined. It holds that

H(Y|X)𝐻conditional𝑌𝑋 =(p(x,y)[logp(x,y)logpX(x)]dy)dxabsentsubscriptsubscript𝑝𝑥𝑦delimited-[]𝑝𝑥𝑦subscript𝑝𝑋𝑥d𝑦differential-d𝑥
=H(X,Y)H(X).absent𝐻𝑋𝑌𝐻𝑋

This is a commonly used identity in the information theory.

Now we recall the Kullback-Leibler (KL) divergence of two probability measures 1subscript1 and 2subscript2 on (E,)𝐸. It is defined as

DKL(12)={𝔼1[logd1d2]if12,+otherwise.subscript𝐷KLconditionalsubscript1subscript2casessubscript𝔼subscript1delimited-[]dsubscript1dsubscript2much-less-thanifsubscript1subscript2otherwise (1)

If 1subscript1 and 2subscript2 have densities p1(x)subscript𝑝1𝑥 and p2(x)subscript𝑝2𝑥 with respect to a common dominating measure (e.g., Lebesgue measure), then the KL divergence becomes

DKL(12)=p1(x)logp1(x)p2(x)dx.subscript𝐷KLconditionalsubscript1subscript2subscriptsubscript𝑝1𝑥subscript𝑝1𝑥subscript𝑝2𝑥d𝑥

This is the most commonly used form (although not fully rigorous) in data science and machine learning. There are many important properties of the KL divergence. Here I only list three of them:

  1. 1.

    Additivity for product distributions:

    DKL(1122)=DKL(12)+DKL(12);subscript𝐷KLconditionaltensor-productsubscript1subscript1tensor-productsubscript2subscript2subscript𝐷KLconditionalsubscript1subscript2subscript𝐷KLconditionalsubscript1subscript2
  2. 2.

    Joint convexity:

    DKL(λ1+(1λ)1λ2+(1λ)2)λDKL(12)+(1λ)DKL(12)subscript𝐷KL𝜆subscript1conditional1𝜆subscript1𝜆subscript21𝜆subscript2𝜆subscript𝐷KLconditionalsubscript1subscript21𝜆subscript𝐷KLconditionalsubscript1subscript2

    for any 0λ10𝜆1;

  3. 3.

    Non-negativity (Gibbs’ inequality):

    DKL(12)0,with equality iff 1=2.formulae-sequencesubscript𝐷KLconditionalsubscript1subscript20with equality iff subscript1subscript2

Here I give a short proof for the non-negativity based on the definition (1). We only need to prove the case that 12much-less-thansubscript1subscript2. Let d1d2(ω)=f(ω)dsubscript1dsubscript2𝜔𝑓𝜔, where f𝑓 is 2subscript2-a.s. measurable. By noticing that xlogx𝑥𝑥 is a convex function, using Jensen’s inequality we obtain

𝔼1[logd1d2]subscript𝔼subscript1delimited-[]dsubscript1dsubscript2 =Ed1d2logd1d2d2absentsubscript𝐸dsubscript1dsubscript2dsubscript1dsubscript2dsubscript2
=Ef(ω)logf(ω)2(dω)absentsubscript𝐸𝑓𝜔𝑓𝜔subscript2d𝜔
=xlogx(2f1)(dx)absentsubscript𝑥𝑥subscript2superscript𝑓1d𝑥
x(2f1)(dx)log(x(2f1)(dx))absentsubscript𝑥subscript2superscript𝑓1d𝑥subscript𝑥subscript2superscript𝑓1d𝑥
=0,absent0

since x(2f1)(dx)=Ef(ω)2(dω)=1(E)=1subscript𝑥subscript2superscript𝑓1d𝑥subscript𝐸𝑓𝜔subscript2d𝜔subscript1𝐸1.

For any two random variables X𝑋 and Y𝑌, their mutual information is defined as

I(X;Y)=DKL((X,Y)XY).𝐼𝑋𝑌subscript𝐷KLconditionalsubscript𝑋𝑌tensor-productsubscript𝑋subscript𝑌 (2)

Suppose (X,Y)𝑋𝑌 has the density function p(x,y)𝑝𝑥𝑦. Then the density function of XYtensor-productsubscript𝑋subscript𝑌 is pX(x)pY(y)subscript𝑝𝑋𝑥subscript𝑝𝑌𝑦. Using that d1d2=d1/dμd2/dμdsubscript1dsubscript2dsubscript1d𝜇dsubscript2d𝜇 where 1,2μmuch-less-thansubscript1subscript2𝜇, one can verify

I(X;Y)=H(X)+H(Y)H(X,Y)=H(Y)H(Y|X).𝐼𝑋𝑌𝐻𝑋𝐻𝑌𝐻𝑋𝑌𝐻𝑌𝐻conditional𝑌𝑋

Using the non-negativity of the KL divergence, the above identify implies that H(Y|X)H(Y)𝐻conditional𝑌𝑋𝐻𝑌, i.e., conditioning reduces the entropy.

2 Fano’s inequality

Now we consider the nonparametric estimation. Suppose we have a family of probability distributions 𝒫={θ:θΘ}𝒫conditional-setsubscript𝜃𝜃Θ on a measurable space (F,)𝐹, and a Borel measurable space on a metric space (Θ,d)Θ𝑑 with d(,)𝑑 being the metric. From a statistical perspective, the aim is to estimate a parameter θΘ𝜃Θ from a sample data X𝑋 by assuming Xθsimilar-to𝑋subscript𝜃 with a θΘ𝜃Θ. The whole set of estimators is 𝒮est={θ^:(θ^:FΘ) is measurable}, consisting of all measurable maps from the observation space F𝐹 to parameter space ΘΘ. In order to quantify the estimation in the worst case, consider the minimax risk

(Θ)=infθ^𝒮estsupθΘ𝔼θ[d(θ^(),θ)],Θsubscriptinfimum^𝜃subscript𝒮estsubscriptsupremum𝜃Θsubscript𝔼subscript𝜃delimited-[]𝑑^𝜃𝜃 (3)

where supθΘ𝔼θ[d(θ^(),θ)]subscriptsupremum𝜃Θsubscript𝔼subscript𝜃delimited-[]𝑑^𝜃𝜃 is the worst-case risk given an estimator θ^^𝜃. In particular, the definition of the minimax risk does not require an underlying random variable X𝑋. Nevertheless, in statistical inference one typically starts from sample data X𝑋 and then constructs an estimator θ^(X)^𝜃𝑋.

Fano’s inequality is a fundamental tool in information theory and statistical minimax lower bounds. It provides a way to quantify the intrinsic difficulty of an estimation or decision problem by reducing it to a multi-class hypothesis testing problem. The core intuition is:

If the estimation problem is essentially a hard classification task (among M𝑀 possible distributions), and the available data does not provide enough information to reliably identify the true model, then any estimator will necessarily make large errors.

If we can construct a finite collection of well-separated parameters {θ1,,θM}subscript𝜃1subscript𝜃𝑀, such that their corresponding distributions θ1,,θMsubscriptsubscript𝜃1subscriptsubscript𝜃𝑀 are hard to distinguish (e.g., their KL divergences are small), then any estimator θ^^𝜃 must incur large error.

The following version of Fano’s inequality is presented in a pure probabilistic manner, which is slightly different from the standard forms in the literature. It is adapted from the one presented in [1] with minor modifications.

Theorem 1 (Fano’s inequality).

Let (E,,)𝐸 be a probability measure space such that X:(E,)(F,):𝑋𝐸𝐹 is an F𝐹-valued random variable and J:E{1,2,,M}:𝐽𝐸12𝑀 is uniformly distributed with M2𝑀2. Then for any measurable map ψ:F{1,2,,M}:𝜓𝐹12𝑀, it holds

(ψ(X)J)1I(X;J)+log2logM.𝜓𝑋𝐽1𝐼𝑋𝐽2𝑀 (4)

Since I(X;J)𝐼𝑋𝐽 measures how much information the data X𝑋 carries about the hidden index J𝐽 (an interesting property is: I(J;X)=I(X;J)H(J)𝐼𝐽𝑋𝐼𝑋𝐽𝐻𝐽 with equality if and only if J𝐽 is determined by X𝑋), if X𝑋 is not sufficiently informative to distinguish among the M𝑀 hypotheses, then I(X;J)𝐼𝑋𝐽 is small. In this case, the lower bound in Fano’s inequality is larger, implying that any test ψ(X)𝜓𝑋 must fail to identify the true index J𝐽 with high probability.

3 Fano’s method for minimax lower bounds

Let’s come back to the nonparametric estimation. The basic settings are:

  • A metric space (Θ,d)Θ𝑑 which leads to a Borel measurable space;

  • A family of probability measures 𝒫={θ:θΘ}𝒫conditional-setsubscript𝜃𝜃Θ on a measurable space (F,)𝐹;

  • A set of estimators 𝒮est={θ^:(θ^:FΘ) is measurable}.

From a pure theoretical perspective, an F𝐹-valued random variable X𝑋 is not needed. However, to establish Fano’s method, we will introduce such an X𝑋, and let F𝐹 to be a Polish space to ensure the existence of regular conditional distribution of X𝑋 knowing another random variable.

Theorem 2 (Fano’s method).

Suppose there are M𝑀 parameters θ1,,θMΘsubscript𝜃1subscript𝜃𝑀Θ satisfying that:

  • d(θi,θj)2δ>0𝑑subscript𝜃𝑖subscript𝜃𝑗2𝛿0 for all ij𝑖𝑗;

  • the average pairwise KL divergence satisfies

    1M2ijDKL(θiθj)β.1superscript𝑀2subscript𝑖𝑗subscript𝐷KLconditionalsubscriptsubscript𝜃𝑖subscriptsubscript𝜃𝑗𝛽

Then it holds

infθ^𝒮estmax1iMθi(d(θ^,θi)δ)1β+log2logM.subscriptinfimum^𝜃subscript𝒮estsubscript1𝑖𝑀subscriptsubscript𝜃𝑖𝑑^𝜃subscript𝜃𝑖𝛿1𝛽2𝑀 (5)
Proof.

To apply Fano’s inequality, we introduce an ambient space (E,,)𝐸 that ensures a uniformly distributed map J:E{1,2,,M}:𝐽𝐸12𝑀 and a measurable map X~:EF:~𝑋𝐸𝐹 satisfying X~|J=jθjconditional~𝑋𝐽𝑗similar-tosubscriptsubscript𝜃𝑗. Then the distribution of X~~𝑋 is

X~(A)=𝔼[1X~A]=𝔼[𝔼[1X~A|J]]=i=1M𝔼[1X~A|J=j](J=j)=1Mj=1Mθj(A)subscript~𝑋𝐴𝔼delimited-[]subscript1~𝑋𝐴𝔼delimited-[]𝔼delimited-[]conditionalsubscript1~𝑋𝐴𝐽superscriptsubscript𝑖1𝑀𝔼delimited-[]conditionalsubscript1~𝑋𝐴𝐽𝑗𝐽𝑗1𝑀superscriptsubscript𝑗1𝑀subscriptsubscript𝜃𝑗𝐴

for any A𝐴. This implies that X~=1Mj=1Mθjsubscript~𝑋1𝑀superscriptsubscript𝑗1𝑀subscriptsubscript𝜃𝑗. Now we calculate I(X~;J)𝐼~𝑋𝐽. It is easy to verify that (X~,J)X~Jmuch-less-thansubscript~𝑋𝐽tensor-productsubscript~𝑋subscript𝐽. Let f(x,j)=d(X~,J)d(X~J)(x,j)𝑓𝑥𝑗dsubscript~𝑋𝐽dtensor-productsubscript~𝑋subscript𝐽𝑥𝑗. We have

I(X~;J)𝐼~𝑋𝐽 =DKL((X~,J)X~J)=𝔼(X~,J)[logf]absentsubscript𝐷KLconditionalsubscript~𝑋𝐽tensor-productsubscript~𝑋subscript𝐽subscript𝔼subscript~𝑋𝐽delimited-[]𝑓
=𝔼[𝔼[logf(X~,J)|J]]=1Mj=1M𝔼θj[logf(,j)].absent𝔼delimited-[]𝔼delimited-[]conditional𝑓~𝑋𝐽𝐽1𝑀superscriptsubscript𝑗1𝑀subscript𝔼subscriptsubscript𝜃𝑗delimited-[]𝑓𝑗

By noticing that

θj(A)M=(X~,J)(A×{j})=A×{j}f(x,j)(X~J)(d(x,j))=1MAf(x,j)X~(dx),subscriptsubscript𝜃𝑗𝐴𝑀subscript~𝑋𝐽𝐴𝑗subscript𝐴𝑗𝑓𝑥𝑗tensor-productsubscript~𝑋subscript𝐽d𝑥𝑗1𝑀subscript𝐴𝑓𝑥𝑗subscript~𝑋d𝑥

for any A𝐴 and j{1,,M}𝑗1𝑀, it holds θj(A)=Af(x,j)X~(dx)subscriptsubscript𝜃𝑗𝐴subscript𝐴𝑓𝑥𝑗subscript~𝑋d𝑥, implying dθjdX~=f(,j)dsubscriptsubscript𝜃𝑗dsubscript~𝑋𝑓𝑗. Thus,

I(X~;J)=1Mj=1M𝔼θj[logdθjdX~]=1Mj=1MDKL(θjX~).𝐼~𝑋𝐽1𝑀superscriptsubscript𝑗1𝑀subscript𝔼subscriptsubscript𝜃𝑗delimited-[]dsubscriptsubscript𝜃𝑗dsubscript~𝑋1𝑀superscriptsubscript𝑗1𝑀subscript𝐷KLconditionalsubscriptsubscript𝜃𝑗subscript~𝑋

Using the convexity of KL divergence, we have

DKL(θjX~)=DKL(i=1M1Mθji=1M1Mθi)1Mi=1MDKL(θjθi).subscript𝐷KLconditionalsubscriptsubscript𝜃𝑗subscript~𝑋subscript𝐷KLconditionalsuperscriptsubscript𝑖1𝑀1𝑀subscriptsubscript𝜃𝑗superscriptsubscript𝑖1𝑀1𝑀subscriptsubscript𝜃𝑖1𝑀superscriptsubscript𝑖1𝑀subscript𝐷KLconditionalsubscriptsubscript𝜃𝑗subscriptsubscript𝜃𝑖

Combining the above relations obtains

I(X~;J)1M2ijDKL(θiθj)β.𝐼~𝑋𝐽1superscript𝑀2subscript𝑖𝑗subscript𝐷KLconditionalsubscriptsubscript𝜃𝑖subscriptsubscript𝜃𝑗𝛽

Define the map ψ:F{1,2,,M}:𝜓𝐹12𝑀 as ψ(x)=argmin1iMd(θ^(x),θi)𝜓𝑥subscriptargmin1𝑖𝑀𝑑^𝜃𝑥subscript𝜃𝑖 (take the smallest index if there are multiple smallest θisubscript𝜃𝑖), which is measurable since d(,θi)𝑑subscript𝜃𝑖 is Borel measurable on ΘΘ. Then for any 1jM1𝑗𝑀 it holds

d(θψ(x),θj)d(θ^(x),θj)+d(θ^(x),θψ(x))2d(θ^(x),θj).𝑑subscript𝜃𝜓𝑥subscript𝜃𝑗𝑑^𝜃𝑥subscript𝜃𝑗𝑑^𝜃𝑥subscript𝜃𝜓𝑥2𝑑^𝜃𝑥subscript𝜃𝑗

Since d(θψ(x),θj)2δ𝑑subscript𝜃𝜓𝑥subscript𝜃𝑗2𝛿 when ψ(x)j𝜓𝑥𝑗, we have

{ψj}{d(θ^,θj)δ}θj(d(θ^,θj)δ)θj(ψj).formulae-sequence𝜓𝑗𝑑^𝜃subscript𝜃𝑗𝛿subscriptsubscript𝜃𝑗𝑑^𝜃subscript𝜃𝑗𝛿subscriptsubscript𝜃𝑗𝜓𝑗

For this X~~𝑋, we have

(ψ(X~)J)=𝔼[𝔼[1ψ(X~)J|J]]=1Mj=1Mθj(ψj).𝜓~𝑋𝐽𝔼delimited-[]𝔼delimited-[]conditionalsubscript1𝜓~𝑋𝐽𝐽1𝑀superscriptsubscript𝑗1𝑀subscriptsubscript𝜃𝑗𝜓𝑗

The above two relations lead to

(ψ(X~)J)1Mj=1Mθj(d(θ^,θj)δ)max1iMθi(d(θ^,θi)δ).𝜓~𝑋𝐽1𝑀superscriptsubscript𝑗1𝑀subscriptsubscript𝜃𝑗𝑑^𝜃subscript𝜃𝑗𝛿subscript1𝑖𝑀subscriptsubscript𝜃𝑖𝑑^𝜃subscript𝜃𝑖𝛿

Using Fano’s inequality, we obtain

max1iMθi(d(θ^,θi)δ)1I(X~;J)+log2logM1β+log2logM.subscript1𝑖𝑀subscriptsubscript𝜃𝑖𝑑^𝜃subscript𝜃𝑖𝛿1𝐼~𝑋𝐽2𝑀1𝛽2𝑀

Taking infimum for θ^^𝜃 gives the desired lower bound. ∎

Using the relation 𝔼θ[d(θ^,θ)]δθ(d(θ^,θ)δ)subscript𝔼subscript𝜃delimited-[]𝑑^𝜃𝜃𝛿subscript𝜃𝑑^𝜃𝜃𝛿, we have

supθΘ𝔼θ[d(θ^,θ)]max1iMδθi(d(θ^,θi)δ).subscriptsupremum𝜃Θsubscript𝔼subscript𝜃delimited-[]𝑑^𝜃𝜃subscript1𝑖𝑀𝛿subscriptsubscript𝜃𝑖𝑑^𝜃subscript𝜃𝑖𝛿

Then the Fano’s method gives

(Θ)δ(1β+log2logM).Θ𝛿1𝛽2𝑀

In [5, §2.6], there are several other variants of Fano’s method, all sharing the same core intuition as the version presented here. A systematic application of Fano’s method as well as other methods to concrete statistical inference problems can also be found in this book.

References

  • [1] Y. Chen (2020) Lecture 18: minimax lower bounds. Lecture note for High Dimensional Probability and Statistics, pp. 1–3. External Links: Link Cited by: §2.
  • [2] R. Durrett (2019) Probability: Theory and Examples. 5th edition, Cambridge University Press. External Links: Link Cited by: §1.
  • [3] A. Klenke (2020) Probability theory: a comprehensive course. 3rd edition, Springer. External Links: Link Cited by: §1.
  • [4] J. Le Gall (2022) Measure theory, probability, and stochastic processes. Springer. External Links: Link Cited by: §1.
  • [5] A. B. Tsybakov (2009) Introduction to nonparametric estimation. Springer. External Links: Link Cited by: §3.