[Image goes here]
Published on

Ergodic Theory and Metric Entropy

What is Entropy?

Entropy is a central quantity in many different fields, and accordingly there are a bunch of "derivations" to arrive at the same formula. At the very basic level, entropy is commonly used to mean the "uncertainty" or "disorder" of a system.

Entropy via Physics

But what does that actually mean? On one hand we can take the physics route. In stat mech, we have the idea of a "microstates," which define the particular configuration of particles in a system, and these configurations give rise to "macrostates," which is what we can observe. In general, a macrostate consists of many microstates. So for example, a system may be defined by NN particles, each with some sort of 3D momentum, spin, etc. The particular configuration of those NN particles would be the microstate, but macrostates of the system would be something like energy, pressure, number of particles, etc. So many microstates can correspond to the same macrostate: if our macrostate is the system at a particular energy EE, many microstates (ie. particular configurations of the NN particles) correspond to the same total energy EE.

Suppose we fix a macrostate, that is we fix the system to be at energy EE with generalized coordinates x\textbf{x} (taking from Kardar's language). The central postulate of stat mech is that given this conditioning, all valid microstates are equally likely. That is, our distribution over microstates is

p(μ)=1Ω(E,x)1H(μ)=Ep(\mu) = \frac{1}{\Omega(E, x)} 1_{\mathcal{H}(\mu) = E}

where H\mathcal{H} represents the Hamiltonian. We want some sort of function S(Ω)S(\Omega) which describes how much "uncertainty" over microstates this particular macrostate has. What sort of properties should this function have?

  • If two systems with Ω1\Omega_1 and Ω2\Omega_2 microstates are independent, the combined system has Ω1Ω2\Omega_1 \Omega_2 microstates (this just follows from counting), so we want S(Ω1Ω2)=S(Ω1)+S(Ω2)S(\Omega_1 \Omega_2) = S(\Omega_1) + S(\Omega_2) -- entropy should be "extensive" (additive over independent systems). This requirement is a bit hand-wavy but given "phenomologically" by classical thermodynamics. I'm not fully convinced I understand the additivity requirement, and any "derivation" I see online starts with the fact that entropy is log-based, which puts the cart before the horse.
  • SS should be monotonically increasing in Ω\Omega: more microstates means more uncertainty. I can get by this!
  • S(1)=0S(1) = 0: a system with only one possible microstate has no uncertainty. This also makes sense!

These three properties uniquely determine SS up to a constant. The functional equation S(mn)=S(m)+S(n)S(mn) = S(m) + S(n) on positive integers, combined with monotonicity, forces S(Ω)=clogΩS(\Omega) = c \log \Omega for some c>0c > 0 (cauchy's log equation). And in physics, the constant that makes the units work out is kBk_B, Boltzmann's constant, giving

S=kBlogΩ.S = k_B \log \Omega.

Setting kB=1k_B = 1, this says entropy is the log-number of accessible microstates -- or equivalently, how many bits you'd need to specify the system's microstate. Alternatively, it's also the entropy of a uniform probability distribution over a state space of size Ω|\Omega|, going back to our central postulate of stat mech that all microstates for a particular macrostate are equally likely.

Entropy via Information Theory

The above derivation holds for the specific case of the uniform microcanonical distribution, but what we really want is some measure of uncertainty over general probability distributions. This sort of thing lies outside the purview of physics (as wonderful as it is) and leads us to the info theory derivation of entropy. Specifically, the Shannon-Kinchin theorem derives the entropy formula from a few guiding principles (similar to above): given any distribution p=(p1,,pn)p = (p_1, \ldots, p_n) over nn outcomes, we want a function H(p1,,pn)H(p_1, \ldots, p_n) satisfying:

  1. Continuity: HH is continuous in all pip_i.
  2. Maximality: H(p1,,pn)H(1/n,,1/n)H(p_1, \ldots, p_n) \leq H(1/n, \ldots, 1/n) -- uniform has maximum entropy.
  3. Expandability: H(p1,,pn,0)=H(p1,,pn)H(p_1, \ldots, p_n, 0) = H(p_1, \ldots, p_n) -- adding an impossible outcome doesn't change entropy.
  4. Chain rule: Entropy decomposes over groupings:
H(p1,,pn)=H(p1+p2,p3,,pn)+(p1+p2)H ⁣(p1p1+p2,p2p1+p2).H(p_1, \ldots, p_n) = H(p_1 + p_2, p_3, \ldots, p_n) + (p_1+p_2)\, H\!\left(\frac{p_1}{p_1+p_2}, \frac{p_2}{p_1+p_2}\right).

WE usually learn the chain rule as a side effect of the entropy formula, but I guess it's one of the axioms under which it's built.

Theorem (Shannon-Khinchin): The only functions satisfying these four axioms are

H(p1,,pn)=λi=1npilogpiH(p_1, \ldots, p_n) = -\lambda \sum_{i=1}^n p_i \log p_i

for some λ>0\lambda > 0.

Proof sketch. First consider the uniform case Hn=H(1/n,,1/n)H_n = H(1/n, \ldots, 1/n), which is what we did in the stat mech microcanonical ensemble example. Applying the chain rule, a uniform distribution over mnmn outcomes decomposes into choosing one of mm equal blocks, then one of nn outcomes within the block -- both uniform -- so

Hmn=Hm+Hn.H_{mn} = H_m + H_n.

This is the same equation we saw above, which with continuity it forces Hn=λlognH_n = \lambda \log n.

For a non-uniform distribution with rational pi=ki/Np_i = k_i/N (where ki=N\sum k_i = N), we can think of it as a uniform distribution over NN outcomes grouped into blocks of sizes k1,,knk_1, \ldots, k_n. The chain rule gives

λlogN=H(p1,,pn)+ipiλlogki\lambda \log N = H(p_1, \ldots, p_n) + \sum_i p_i \cdot \lambda \log k_i

(the λlogN\lambda \log N on the left is HNH_N the uniform distribution entropy, and the rhs is the expected within-block entropy).Then rearranging gives

H(p1,,pn)=λlogNλipilogki=λipilogkiN=λipilogpi.H(p_1, \ldots, p_n) = \lambda \log N - \lambda \sum_i p_i \log k_i = -\lambda \sum_i p_i \log \frac{k_i}{N} = -\lambda \sum_i p_i \log p_i.

Continuity extends this to all reals.

Note this recovers the physics formula: in the microcanonical ensemble pi=1/Ωp_i = 1/\Omega for all ii, so H=i=1Ω1Ωlog1Ω=logΩH = -\sum_{i=1}^\Omega \frac{1}{\Omega}\log\frac{1}{\Omega} = \log \Omega. The starting axioms are also very similar in flavor.

What is Entropy, Really?

The last place I expected to see entropy resurface was in our stat 205b (Berkeley probability theory class) unit on ergodic theory (to be fair, I had no prior knowledge of ergodic theory, so I guess I couldn't really expect anything). Broadly speaking, ergodic theory deals with "long-term behavior of dynamical systems."

When we say dynamical systems, the easiest way to think of it is as some space (say a set SS) that undergoes a transformation (ie. "dynamics") every timestep, which can be given by some map T:SST : S \to S. We care about how our initial space SS "evolves" as we keep applying TT. This idea gives rise to the notion of "orbits." For a particular point xSx \in S, we can define its orbit as {Tnx:nN}\{T^n x : n \in \mathbb{N}\}. If we think of this as a physical system with xx as some initial position, this orbit describes what kind of "path" over the space this point will trace out as we keep applying our dynamics. Metric entropy then arises as a notion of "orbit complexity" for a particular map TT. This is all sounding too general, so lets formalize everything.

Ergodic Theory

The first phenomenon that's of interest is the idea of recurrence: if we take a set EE, what can we say about the behavior of the orbits of points xEx \in E? For a particular type of map (measure preserving), we have the following result:

Definition: Poincare Recurrence: If TT is measure preserving and and EE is measurable, for almost every xEx \in E, there are infinitely many nn such that TnxET^n x \in E.

I tried to draw this out until I realized the all-powerful Claude can just generate a much better looking diagram:

Poincare recurrence illustration

Ergodicity then gives an idea of "indecomposability" of sorts for invariant sets -- a system is ergodic if for any BBB \in \mathcal{B} for a measure preserving TT, all invariant sets (ie. T1(B)=BT^{-1}(B) = B) must be measure zero or one. In this sense, we cannot take an invariant subset and "decompose" it further into smaller sets.

The whole point of talking about ergodic theory in this writeup is to see how the idea of entropy evolves as a natural measure of "orbit complexity" -- that is, for different ergodic systems, we'll see a difference in roughly speaking how "complex" the orbits generated by these systems are.

First, it's helpful to look at a couple of examples of ergodic systems:

Example 1: The Bernoulli Shift

Let Ω={0,1}Z\Omega = \{0, 1\}^{\mathbb{Z}} with the product measure

μp=nZ(pδ1+(1p)δ0),0<p<1\mu_p = \bigotimes_{n \in \mathbb{Z}} (p \delta_1 + (1-p) \delta_0), \quad 0 < p < 1

and let TT be the left shift: (Tω)n=ωn+1(T\omega)_n = \omega_{n+1}. This is basically the canonical model for an i.i.d. coin-flip sequence, and TT just slides our view of the sequence one step forward.

Why is this ergodic? Suppose AA is a TT-invariant set, so T1A=AT^{-1}A = A. Because the sequence is invariant under the shift, membership in AA can only depend on the "tail" of the sequence. By Kolmogorov's 0-1 law, any tail event has probability 0 or 1 -- so μp(A){0,1}\mu_p(A) \in \{0, 1\}.

Example 2: The Irrational Rotation

Let T=R/Z\mathbb{T} = \mathbb{R}/\mathbb{Z} (the circle), with Lebesgue measure λ\lambda, and fix αRQ\alpha \in \mathbb{R} \setminus \mathbb{Q}. Define

Tα(x)=x+α(mod1).T_\alpha(x) = x + \alpha \pmod 1.

Unlike the last example which has some stochasticity in the Bernoulli measure choice per point, here the map is completely deterministic and simply just rotations around the circle.

Proof of ergodicity: This is a bit more involved. We start with proving a useful intermediate formula, namely that there is some interval II such that for small ϵ>0\epsilon > 0,

λ(AI)/λ(I)>1ϵ\lambda(A \cap I)/\lambda(I) > 1 - \epsilon

that is, AA intersects with at least 1ϵ1-\epsilon fraction of this interval.

Subproof: A useful tool here is the inner regularity of Lebesgue measure: that is, any measurable AA satisfies λ(A)=sup{λ(F):FA,F compact and measurable }\lambda(A) = \sup\{\lambda(F) : F \subseteq A, F \text{ compact and measurable }\}.

So inner regularity gives us some KA,λ(K)>0K \subset A, \lambda(K) > 0. Likewise by outer regularity we can get an open set UU where λ(K)>λ(U)(1ϵ)\lambda(K) > \lambda(U) (1 - \epsilon) (choose a big enough KK and small enough UU where KAUK \subset A \subset U). But the subset identity implies that AUKA \cap U \supset K so it follows that

λ(AU)λ(U)>1ϵ\frac{\lambda(A \cap U)}{\lambda(U)} > 1 - \epsilon

And every open set UU on T\mathbb{T} can be expressed as disjoint subset of intervals j=1Ij\sqcup_{j = 1}^\infty I_j, so λ(AU)=jλ(AIj)\lambda(A \cap U) = \sum_{j} \lambda(A \cap I_j). At least one IjI_j must satisfy the original identity by UU (else sum them and UU won't satisfy the original inequality, a contradiction). This completes the subproof.

Return to main proof: Now with this interval II, take the orbit {nαmod1:nZ}\{n \alpha \mod 1 : n \in \mathbb{Z}\}, which is dense in T\mathbb{T}. By density, now select 0<n0<n1<<nk0 < n_0 < n_1 < \cdots < n_k so IjI+njαI_j \triangleq I + n_j \alpha (mod 1) cover the whole circle up to some δ>0\delta > 0.

Because AA is invariant under TT, it occupies at least (1ϵ)(1-\epsilon) fraction of IjI_j. For Tαnj(A)=AT_\alpha^{n_j} (A) = A, and TαT_\alpha is measure preserving, so

λ(AIj)=λ(Tαnj(A)Tαnj(I))=λ(Tαnj(AI))=λ(AI)\lambda(A \cap I_j) = \lambda(T_\alpha^{n_j}(A) \cap T_\alpha^{n_j}(I)) = \lambda(T_\alpha^{n_j}(A \cap I)) = \lambda(A \cap I)

and likewise λ(Ij)=λ(I)\lambda(I_j) = \lambda(I) and so the same inequality holds for any iterate IjI_j of II. If AA covers at least (1ϵ)(1-\epsilon) of all the IjI_j, then it must cover at least (1ϵ)(1-\epsilon) of their union, but their union was chosen such that they cover at least measure (1δ)(1-\delta), and so λ(A)(1ϵ)(1δ)\lambda(A) \geq (1 - \epsilon)(1-\delta). Both variables were chosen arbitrarily, so it follows that λ(A)=1\lambda(A) = 1.

So both of these systems are ergodic, but have very different "structure": in the first example, it is the tail behavior of probabilistic events that provide ergodicity. But in the above case, it is instead this "uniformity" of orbits across the circle that bring ergodicity.

Comparing Orbit Complexity

Seeing both of the previous systems suggests the idea that perhaps there should be a way to quantify how "complex" a system's orbits are. With this goal in mind, we can try and come up with ways to formalize this idea. One intuition we might have is that a more "complex" system should somehow generate a much more diverse set of orbits that all look different from one another. From an info theory perspective (which is sort've cheating by already knowing the end result), the idea of a "typical set" might be useful here, in particular what is the size (or number of orbits) that comprise a certain amount of probability space.

To formalize this idea, we will think of the "diversity of space that each orbit traverses through." Suppose we take a partition P={P1,,Pk}\mathcal{P} = \{P_1, \ldots, P_k\} of XX, then we can encode the orbit of any point xx as a symbolic sequence: record which partition element the orbit visits at each time step. For time 00 through N1N-1, we get a word of length NN:

PN(x)=(i0,i1,,iN1),where TnxPin.\mathcal{P}_N(x) = (i_0, i_1, \ldots, i_{N-1}), \quad \text{where } T^n x \in P_{i_n}.

Now a clear definition of complexity arises from this, namely the number of distinct words of length NN that would show up from orbits. We can take our two systems from before as case studies:

Bernoulli shift: We can do our partition P\mathcal{P} based on the 0th coordinate (so P0={ω0=0}P_0 = \{\omega_0 = 0\} points and P1={ω0=1}P_1 = \{\omega_0 = 1\} points). Then PN(ω)=(ω0,,ωN1)\mathcal{P}_N(\omega) = (\omega_0, \ldots, \omega_{N-1}), just a binary string of length NN.

By the law of large numbers, most of the measure is on sequences with about pNpN ones.Specifically, if we take SN(ω)=i=0N1ωiS_N(\omega) = \sum_{i = 0}^{N-1} \omega_i, then LLN gives us that SN(ω)Np\frac{S_N(\omega)}{N} \to p almost surely (each ωi\omega_i is sampled iid from Bernoulli(p)), meaning it also converges in measure.

The total measure carried by blocks kpNk \approx pN (reminiscent of typical set in info theory) is

kpNϵ(Nk)pk(1p)Nk1\sum_{|k - pN| \leq \epsilon} {N \choose k} p^k (1-p)^{N-k} \approx 1

Then, Stirling's approximation gives that the number of such sequences is roughly (NpN)eNH(p)\binom{N}{pN} \approx e^{N H(p)}, where

H(p)=plogp(1p)log(1p)H(p) = -p \log p - (1-p)\log(1-p)

is the binary entropy. Each individual typical sequence has measure eNH(p)\approx e^{-N H(p)}, so you need roughly eNH(p)e^{N H(p)} of them to account for a fixed fraction of the total measure. What we see here is that the number of distinct length-NN blocks grows exponentially with NN.

Irrational rotation: Fix a partition into kk intervals {I1,,Ik}\{I_1, \ldots, I_k\}. The word (j0,,jN1)(j_0, \ldots, j_{N-1}) occurs for initial point xx iff x+nαIjnx + n\alpha \in I_{j_n} for each nn, meaning xx sits in the intersection n(Ijnnα)\bigcap_n (I_{j_n} - n\alpha). Each such intersection is an interval (or empty), and the endpoints of all these intervals come from at most kNkN points on T\mathbb{T}. So there are at most kNkN distinct words of length NN. For k=2k=2 this is at most N+1N+1. So here, the number of distinct orbit words only grows linearly in NN.

So even though both systems are ergodic (time averages = space averages), the Bernoulli shift generates exponentially many distinguishable orbit patterns, while the rotation generates barely any. This is the qualitative picture of "orbit complexity."

Note on Initial Conditions

When going through the stat 205b notes, one thing that was unclear is how this discussion depends on the choice of initial partitions.

Metric Entropy

The above formalization of orbit complexity suggests a sort of invariant: the exponential growth rate of distinct orbit words. This is exactly where metric entropy comes in:

For a finite partition P\mathcal{P} and a measure-preserving system (X,B,μ,T)(X, \mathcal{B}, \mu, T), the Shannon entropy of the joined partition n=0N1TnP\bigvee_{n=0}^{N-1} T^{-n} \mathcal{P} (which encodes length-NN words) grows at most linearly in NN. So define

h(T,P)=limN1NH ⁣(n=0N1TnP)h(T, \mathcal{P}) = \lim_{N \to \infty} \frac{1}{N} H\!\left(\bigvee_{n=0}^{N-1} T^{-n} \mathcal{P}\right)

and then take the supremum over all finite partitions:

h(T)=supPh(T,P).h(T) = \sup_{\mathcal{P}} \, h(T, \mathcal{P}).

This limit always exists (the sequence H(n=0N1TnP)H(\bigvee_{n=0}^{N-1} T^{-n}\mathcal{P}) is subadditive), and h(T)h(T) doesn't depend on the choice of representative for the system.

For our two examples:

  • Bernoulli shift: h(T)=H(p)=plogp(1p)log(1p)h(T) = H(p) = -p\log p - (1-p)\log(1-p). Taking p=1/2p = 1/2 gives h=log2h = \log 2, ie. a full "bit" of entropy that is generated per step by a fair coin.
  • Irrational rotation: h(Tα)=0h(T_\alpha) = 0 for any irrational α\alpha. Despite being ergodic, the orbit is in some sense so "geometrically constrained" that no new information is generated each step.

Putting it all Together

still figuring this out

References

  1. Stat 205b notes by Prof. Alan Hammond
  2. Statistical Physics of Particles (Kardar)
  3. A Mathematical Theory of Communication