Harman Patil (Editor)

Differential entropy

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

Differential entropy (also referred to as continuous entropy) is a concept in information theory that began as an attempt by Shannon to extend the idea of (Shannon) entropy, a measure of average surprisal of a random variable, to continuous probability distributions. Unfortunately, Shannon did not derive this formula, and rather just assumed it was the correct continuous analogue of discrete entropy, but it is not. The actual continuous version of discrete entropy is the limiting density of discrete points (LDDP). Differential entropy (described here) is commonly encountered in the literature, but it is a limiting case of the LDDP, and one that loses its fundamental association with discrete entropy.

Contents

Definition

Let X be a random variable with a probability density function f whose support is a set X . The differential entropy h(X) or h(f) is defined as

h ( X ) = X f ( x ) log f ( x ) d x .

For probability distributions which don't have an explicit density function expression, but have an explicit quantile function expression, Q(p), then h(Q) can be defined in terms of the derivative of Q(p) i.e. the quantile density function Q'(p) as

h ( Q ) = 0 1 log Q ( p ) d p .

As with its discrete analog, the units of differential entropy depend on the base of the logarithm, which is usually 2 (i.e., the units are bits). See logarithmic units for logarithms taken in different bases. Related concepts such as joint, conditional differential entropy, and relative entropy are defined in a similar fashion. Unlike the discrete analog, the differential entropy has an offset that depends on the units used to measure X. For example, the differential entropy of a quantity measured in millimeters will be log(1000) more than the same quantity measured in meters; a dimensionless quantity will have differential entropy of log(1000) more than the same quantity divided by 1000.

One must take care in trying to apply properties of discrete entropy to differential entropy, since probability density functions can be greater than 1. For example, Uniform(0,1/2) has negative differential entropy

0 1 2 2 log ( 2 ) d x = log ( 2 ) .

Thus, differential entropy does not share all properties of discrete entropy.

Note that the continuous mutual information I(X;Y) has the distinction of retaining its fundamental significance as a measure of discrete information since it is actually the limit of the discrete mutual information of partitions of X and Y as these partitions become finer and finer. Thus it is invariant under non-linear homeomorphisms (continuous and uniquely invertible maps) , including linear transformations of X and Y, and still represents the amount of discrete information that can be transmitted over a channel that admits a continuous space of values.

For the direct analogue of discrete entropy extended to the continuous space, see limiting density of discrete points.

Properties of differential entropy

  • For densities f and g, the Kullback–Leibler divergence D(f||g) is nonnegative with equality if f = g almost everywhere. Similarly, for two random variables X and Y, I(X;Y) ≥ 0 and h(X|Y) ≤ h(X) with equality if and only if X and Y are independent.
  • The chain rule for differential entropy holds as in the discrete case
  • Differential entropy is translation invariant, i.e., h(X + c) = h(X) for a constant c.
  • Differential entropy is in general not invariant under arbitrary invertible maps. In particular, for a constant a, h(aX) = h(X) + log|a|. For a vector valued random variable X and a matrix A, h(A X) = h(X) + log|det(A)|.
  • In general, for a transformation from a random vector to another random vector with same dimension Y = m(X), the corresponding entropies are related via
  • where | m x | is the Jacobian of the transformation m. The above inequality becomes an equality if the transform is a bijection. Furthermore, when m is a rigid rotation, translation, or combination thereof, the Jacobian determinant is always 1, and h(Y) = h(X).
  • If a random vector X in Rn has mean zero and covariance matrix K, h ( X ) 1 2 log ( det 2 π e K ) = 1 2 log [ ( 2 π e ) n det K ] with equality if and only if X is jointly gaussian (see below).
  • However, differential entropy does not have other desirable properties:

  • It is not invariant under change of variables, and is therefore most useful with dimensionless variables.
  • It can be negative.
  • A modification of differential entropy that addresses these drawbacks is the relative information entropy, also known as the Kullback–Leibler divergence, which includes an invariant measure factor (see limiting density of discrete points).

    Maximization in the normal distribution

    With a normal distribution, differential entropy is maximized for a given variance. The following is a proof that a Gaussian variable has the largest entropy amongst all random variables of equal variance, or, alternatively, that the maximum entropy distribution under constraints of mean and variance is the Gaussian.

    Let g(x) be a Gaussian PDF with mean μ and variance σ2 and f(x) an arbitrary PDF with the same variance. Since differential entropy is translation invariant we can assume that f(x) has the same mean of μ as g(x).

    Consider the Kullback–Leibler divergence between the two distributions

    0 D K L ( f | | g ) = f ( x ) log ( f ( x ) g ( x ) ) d x = h ( f ) f ( x ) log ( g ( x ) ) d x .

    Now note that

    f ( x ) log ( g ( x ) ) d x = f ( x ) log ( 1 2 π σ 2 e ( x μ ) 2 2 σ 2 ) d x = f ( x ) log 1 2 π σ 2 d x + log ( e ) f ( x ) ( ( x μ ) 2 2 σ 2 ) d x = 1 2 log ( 2 π σ 2 ) log ( e ) σ 2 2 σ 2 = 1 2 ( log ( 2 π σ 2 ) + log ( e ) ) = 1 2 log ( 2 π e σ 2 ) = h ( g )

    because the result does not depend on f(x) other than through the variance. Combining the two results yields

    h ( g ) h ( f ) 0

    with equality when g(x) = f(x) following from the properties of Kullback–Leibler divergence.

    This result may also be demonstrated using the variational calculus. A Lagrangian function with two Lagrangian multipliers may be defined as:

    L = g ( x ) ln ( g ( x ) ) d x λ 0 ( 1 g ( x ) d x ) λ ( σ 2 g ( x ) ( x μ ) 2 d x )

    where g(x) is some function with mean μ. When the entropy of g(x) is at a maximum and the constraint equations, which consist of the normalization condition ( 1 = g ( x ) d x ) and the requirement of fixed variance ( σ 2 = g ( x ) ( x μ ) 2 d x ) , are both satisfied, then a small variation δg(x) about g(x) will produce a variation δL about L which is equal to zero:

    0 = δ L = δ g ( x ) ( ln ( g ( x ) ) + 1 + λ 0 + λ ( x μ ) 2 ) d x

    Since this must hold for any small δg(x), the term in brackets must be zero, and solving for g(x) yields:

    g ( x ) = e λ 0 1 λ ( x μ ) 2

    Using the constraint equations to solve for λ0 and λ yields the normal distribution:

    g ( x ) = 1 2 π σ 2 e ( x μ ) 2 2 σ 2

    Example: Exponential distribution

    Let X be an exponentially distributed random variable with parameter λ, that is, with probability density function

    f ( x ) = λ e λ x  for  x 0.

    Its differential entropy is then

    Here, h e ( X ) was used rather than h ( X ) to make it explicit that the logarithm was taken to base e, to simplify the calculation.

    Differential entropies for various distributions

    In the table below Γ ( x ) = 0 e t t x 1 d t is the gamma function, ψ ( x ) = d d x ln Γ ( x ) = Γ ( x ) Γ ( x ) is the digamma function, B ( p , q ) = Γ ( p ) Γ ( q ) Γ ( p + q ) is the beta function, and γE is Euler's constant.

    (Many of the differential entropies are from.

    Variants

    As described above, differential entropy does not share all properties of discrete entropy. For example, the differential entropy can be negative; also it is not invariant under continuous coordinate transformations. Edwin Thompson Jaynes showed in fact that the expression above is not the correct limit of the expression for a finite set of probabilities.

    A modification of differential entropy adds an invariant measure factor to correct this, (see limiting density of discrete points). If m(x) is further constrained to be a probability density, the resulting notion is called relative entropy in information theory:

    D ( p | | m ) = p ( x ) log p ( x ) m ( x ) d x .

    The definition of differential entropy above can be obtained by partitioning the range of X into bins of length h with associated sample points ih within the bins, for X Riemann integrable. This gives a quantized version of X, defined by Xh = ih if ihX ≤ (i+1)h. Then the entropy of Xh is

    H h = i h f ( i h ) log ( f ( i h ) ) h f ( i h ) log ( h ) .

    The first term on the right approximates the differential entropy, while the second term is approximately −log(h). Note that this procedure suggests that the entropy in the discrete sense of a continuous random variable should be ∞.

    References

    Differential entropy Wikipedia