Maximum Entropy
The maximum entropy distribution under moment constraints, worked examples, the anomalous ε-achievable case, spectrum estimation, and Burg's maximum entropy theorem
Motivation: the temperature of a gas
The temperature of a gas corresponds to the average kinetic energy of its molecules. What can we say about the distribution of velocities at a given temperature? Physics tells us it is the maximum entropy distribution under the temperature constraint — the Maxwell–Boltzmann distribution.
IntuitionMacrostates and microstates
The maximum entropy distribution corresponds to the macrostate (indexed by the empirical distribution) that has the most microstates (the individual gas velocities). Implicit in the use of maximum entropy methods in physics is a sort of AEP: all microstates are equally probable, so the macrostate with the most of them is the one you will observe.
This is the same counting we did in the method of types: polynomially many types, exponentially many sequences per type, and — so the type with the largest entropy has the most sequences. Maximum entropy is a counting principle before it is a modelling principle.
ImportantWhat this chapter adds
The conditional limit theorem already showed that maximum entropy is a theorem about conditioning, not just a modelling choice. This chapter gives the general solution: given any set of moment constraints, what exactly is the maximizing density, and when does it fail to exist?
The maximum entropy distribution
The problem. Maximize over all probability densities satisfying
- , with equality outside the support set
- for
So is a density on meeting moment constraints .
Approach 1: calculus (suggests the form)
DerivationLagrange multipliers on the entropy functional
is a concave function over a convex set. Form the functional
and “differentiate” with respect to , the th component of :
Setting this to zero and solving for gives the exponential form below.
FormulaThe maximizing density
with chosen so that satisfies the constraints.
WarningCalculus only suggests the form
This argument produces a candidate. To prove it is the maximum we would have to take the second variation. It is far simpler to use the information inequality , which is Approach 2.
Approach 2: the information inequality (proves it)
TheoremMaximum entropy distribution
Let , , with the chosen so satisfies the constraints. Then uniquely maximizes over all densities satisfying the constraints.
ProofInsert into the entropy, then use
Let satisfy the constraints. Multiply and divide inside the logarithm by :
where (a) is non-negativity of relative entropy, (b) is the definition of , and (c) is the fact that and satisfy the same constraints — so the integral of any linear combination of and the is the same under both. Equality in (a) holds iff almost everywhere, proving uniqueness.
∎
IntuitionWhy the proof works so cleanly
The whole argument turns on step (c): is, by construction, a linear combination of exactly the functions the constraints pin down. So the cross term cannot tell from , and the only surviving difference is .
This is the identical trick used in the Gaussian max-entropy theorem, where was a quadratic form and the constraint was a covariance. That theorem is the special case . The same approach holds for discrete entropies and for multivariate distributions.
Examples
ExampleOne-dimensional gas with a temperature constraint
Constraints , give the form . The exponent is a quadratic, so by inspection this is a normal density; matching the constraints:
ExampleDice, no constraints
with no moment constraints: the maximizer is the uniform distribution . (Setting all leaves a constant.)
ExampleBounded support
, no other constraints: the uniform distribution on that range.
ExamplePositive half-line with a mean constraint — the atmosphere
and give the exponential density
Physical reading: consider the height of molecules in the atmosphere. The average potential energy is fixed, so the gas tends to the maximum entropy distribution subject to fixed — an exponential. The density of the atmosphere does indeed have this distribution.
WarningA mean constraint on the whole line gives no maximizer
with only : the maximum entropy is infinite and there is no maximum entropy distribution. (Consider normal distributions with larger and larger variances — all satisfy the mean constraint, with entropy growing without bound.) A first moment alone does not confine the distribution to a finite effective volume.
ExampleWhole line, first and second moments
, give .
ExampleMultivariate covariance constraint
, : the density is . The exponent is a quadratic form, so by inspection it is a multivariate normal with zero mean; matching the second moments fixes the covariance:
ExamplePartial covariance constraints force zeros in
Suppose we know only for — say only for . Comparing the general form with the Gaussian density , the are the entries of — and unconstrained pairs have . Hence
The entries of the inverse covariance vanish outside the constraint set. This is the information-theoretic origin of sparse precision matrices and of conditional-independence structure in Gaussian graphical models.
ExampleDice with a mean constraint — Boltzmann’s example
Throw dice and be told the total number of spots is . What proportion show face ?
The counting approach. There are ways for dice to show face — a macrostate indexed by corresponding to that many microstates, each of probability . To find the most probable macrostate, maximize the multinomial subject to .
Using a crude Stirling approximation :
So maximizing the multinomial under the constraint is almost equivalent to maximizing under . By the theorem,
with chosen so . The most probable macrostate is .
The approximations are justified. By the conditional limit theorem, not only is the maximum entropy macrostate the most likely, it contains almost all the probability: for rational ,
as along the subsequence where is an integer.
The anomalous maximum entropy problem
The problem. We proved the maximizer is if the satisfying the constraints exist. What if they don’t?
Consider maximizing entropy subject to four constraints on the whole line:
WarningThe method appears to fail
The maximizer, if it exists, must be . But if then and the density cannot be normalized — a cubic exponent blows up on one side. So must be 0. But then we have four equations and only three free variables, so in general the constants cannot be chosen.
ImportantThe resolution: the supremum is not attained
The entropy has a least upper bound under these constraints, but it is not possible to attain it.
With only first and second moment constraints, the maximizer is the normal with those moments. Adding a third moment constraint cannot raise the maximum. Can we achieve that same value? We cannot achieve it, but we can come arbitrarily close.
IntuitionThe wiggle construction
Take a normal distribution and add a small “wiggle” at a very high value of . Because grows so fast out there, a tiny amount of probability mass placed far enough out moves the third moment a lot while barely disturbing the first and second — and barely disturbing the entropy. Any residual change to the first two moments can be cancelled by adding further wiggles to balance them.
By choosing the positions of the wiggles we can hit any value of the third moment without reducing the entropy significantly below that of the associated normal. Hence
NoteThe lesson
The maximum entropy may be only -achievable. The theorem’s hypothesis — “if satisfying the constraints exist” — is not a technicality to be waved through. When a constraint function grows faster than the exponential tail can be normalized against, the supremum is approached but never reached.
Spectrum estimation
The problem. Given a stationary zero-mean process , the autocorrelation function is , and its Fourier transform is the power spectral density
Since the spectrum indicates the structure of the process, we want to estimate it from a sample.
WarningWhy the naive (periodogram) method fails
The simplest approach estimates the autocorrelation by sample averages,
and feeds all of them into the transform. The resulting estimate does not converge to the true spectrum for large , so this periodogram method is rarely used.
The reason: the estimates have very different accuracies. Low lags are based on many samples; high on very few. Truncating — setting high-lag autocorrelations to 0 — introduces artifacts from the sudden transition, and various windowing schemes that smooth the transition reduce spectral resolution and can produce negative power estimates.
ImportantBurg’s idea
In the late 1960s, working on geophysical spectral estimation, Burg suggested: instead of setting the high-lag autocorrelations to zero, set them to the values that make the fewest assumptions about the data — i.e. the values that maximize the entropy rate of the process.
Setting them to zero is an assumption (that the process decorrelates abruptly); maximizing entropy is the absence of one. This is the maximum entropy principle as articulated by Jaynes.
Burg assumed the process stationary and Gaussian, and found that the maximizer subject to the correlation constraints is an autoregressive Gaussian process of the appropriate order. Where an underlying autoregressive model is plausible, this determines the model parameters — as in linear predictive coding for speech. The method is known as the maximum entropy method or Burg’s method.
Entropy rates of a Gaussian process
DefinitionDifferential entropy rate
if the limit exists. As in the discrete case, for stationary processes the limit exists and equals both
For a stationary Gaussian process,
where is Toeplitz with along the top row, i.e. .
ImportantKolmogorov’s formula
As the density of eigenvalues of the covariance matrix tends to the spectrum of the process, and the entropy rate is
IntuitionSame Toeplitz-to-spectrum move as in the Gaussian channel
The step “eigenvalue density of a Toeplitz matrix power spectrum” is exactly the one that turned eigenvalue water-filling into water-filling in the spectral domain. The entropy rate is (up to constants) the average of over frequency — a geometric mean of the spectrum.
FormulaEntropy rate as prediction error
The entropy rate is also . Since the process is Gaussian the conditional distribution is Gaussian, so this conditional entropy is , where is the variance of the error in the best estimate of given the infinite past. Hence
IntuitionWhat this identity says
The entropy rate corresponds to the minimum mean-squared error of the best predictor of the process given its infinite past. A process you can predict well has low entropy rate. Note this is precisely the estimation bound — holding with equality here, because the process is Gaussian and the conditional mean is the estimator.
Burg’s maximum entropy theorem
TheoremBurg
The maximum entropy rate stochastic process satisfying
is the th-order Gauss–Markov process
where the are i.i.d. and are chosen to satisfy the constraints.
ImportantWhat is not assumed
We do not assume is (a) zero mean, (b) Gaussian, or (c) wide-sense stationary. All three are conclusions: the maximizer turns out to be Gaussian and autoregressive, over the class of all processes meeting the correlation constraints.
ProofTwo bounds: Gaussian beats anything, and th-order Markov beats Gaussian
Let be any process satisfying the constraints, and let be a Gaussian process with the same covariance matrix.
Step 1: Gaussian is the best for a given covariance. By the multivariate max-entropy theorem,
Step 2: Chain rule, then truncate the conditioning.
by the chain rule and conditioning-reduces-entropy. Truncating the past to terms is where the th-order structure enters — and it is an upper bound, so it points the right way.
Step 3: Replace by a genuine th-order process. Define as a th-order Gauss–Markov process with the same distribution as for all orders up to (existence verified by the Yule–Walker equations below). Since depends only on the th-order distribution, these conditional entropies are equal:
where the last equality is the th-order Markovity of — for this process the truncated conditioning is not an approximation but exact.
Step 4: Divide and take the limit.
∎
IntuitionThe proof in one line
The entropy of a finite segment is bounded above by that of a Gaussian process with the same covariance, which is in turn bounded above by that of the minimal order Gauss–Markov process satisfying the same covariance constraints. Two successive relaxations, each of which the candidate process attains with equality.
The Yule–Walker equations
The question left open. Given covariances , does a th-order Gauss–Markov process with those covariances exist, and can we find its coefficients?
DerivationMultiply the recursion by and take expectations
From , multiplying by and using :
These are the Yule–Walker equations: equations in the unknowns . So we can solve for the process parameters from the covariances — answering the existence question.
ImportantYule–Walker extension
Beyond providing a linear system for the and , these equations indicate how the autocorrelations behave for lags greater than : the high-lag autocorrelations are an extension of the values for lags below , called the Yule–Walker extension. This is precisely Burg’s answer to the truncation problem — rather than zeroing the unknown lags, extend them by the recursion.
Fast algorithms (Levinson, Durbin) exploit the special structure of these equations to compute the coefficients efficiently. (Set for consistent notation.)
FormulaThe maximum entropy spectrum
This is the maximum entropy spectral density subject to .
NoteComputing the entropy rate without the
Let be the autocorrelation matrix with along the top row. Then
— a ratio of determinants, no coefficients required.
WarningHow many lags? The model-order question
In practice we are given a sample and compute autocorrelations from it. How many lags should we use — what is the optimum ? Nothing in Burg’s theorem answers this: it tells you the best process for a given , and larger always allows higher entropy… on the sample.
A logically sound method is to choose the minimizing the total description length in a two-stage description of the data (Rissanen, Barron) — pay for the model, then pay for the data given the model. This is closely related to Kolmogorov complexity, and is the principled answer to a question that maximum entropy alone cannot settle.
Quick reference
| Constraint set | Maximum entropy distribution |
|---|---|
| Support , nothing else | Uniform on |
| Finite alphabet, nothing else | Uniform |
| , | Exponential, |
| , only | None — entropy unbounded |
| , and | |
| , | , |
| Covariance known only on | with off |
| Finite alphabet, | (exponential tilt) |
| , first three moments | None attained; |
| Process, , | th-order Gauss–Markov (Burg) |
Facts to keep to hand:
- The general form is always — an exponential family whose sufficient statistics are exactly the constrained moments.
- The proof is one move: is a linear combination of the constrained functions, so , leaving only .
- Existence is a real hypothesis. If the required do not exist (cubic moment on the whole line), the supremum is only -achievable via distant wiggles.
- Gaussian process facts: (Kolmogorov), and — entropy rate is best-prediction error.
- Burg: max entropy rate under correlation constraints th-order Gauss–Markov, with parameters from Yule–Walker and high-lag correlations given by the Yule–Walker extension rather than set to zero.
- Maximum entropy does not choose the model order ; description length does.
References
- [[lit/cover2006-elements|Cover & Thomas, Elements of Information Theory]] — Chapter 12