Skip to content
Is the Normal Distribution Curved?Chapter 1 Normal Distributions and the Ornstein–Uhlenbeck Process

Chapter 1 Normal Distributions and the Ornstein–Uhlenbeck Process

This chapter sets up the stage and the protagonist of the book. The stage is the set of normal distributions 𝒩⁢(m,Σ), and the protagonist is the Ornstein–Uhlenbeck process (OU process from now on). We use only the density and characteristic function of the multivariate normal distribution, change of variables in integrals, and the basics of Lebesgue integration. We do not use the theory of stochastic differential equations. The relation between the OU process and stochastic differential equations is only described in Remark 1.11. That theory can be found in Chapters 4 and 5 of Why Pictures Emerge from Noise [KEI26b], and the Kullback–Leibler divergence of general probability measures is treated in Chapter 1 of the same book.

The contents are as follows.

  • •

    The Gaussian family and its parameter space ℝd×Symd+ (Section 1.1).

  • •

    The Kullback–Leibler divergence (KL divergence) and the formula for the KL divergence between normal distributions (Section 1.2).

  • •

    The OU flow on normal distributions and the Fokker–Planck equation (Section 1.3).

The function F⁢(m,Σ)=KL⁡(𝒩⁢(m,Σ)∥γ) of Section 1.2 is the function studied throughout the book. The OU flow of Section 1.3 is one of the two gradient flows compared in Chapter 6.

History

The KL divergence is named after Kullback and Leibler’s 1951 paper [KL51].

1.1 The Gaussian Family

Let d≥1 be an integer. We write Symd for the set of real symmetric d×d matrices and Symd+ for the subset of positive definite ones. For Σ∈Symd we write Σ⪰0 if it is positive semidefinite and Σ≻0 if it is positive definite. We write I=Id for the identity matrix.

Definition 1.1 (Gaussian family).

For m∈ℝd and Σ∈Symd+, the probability distribution on ℝd with density

pm,Σ⁢(x)=(2⁢π)−d/2⁢(detΣ)−1/2⁢exp⁡(−12⁢(x−m)⊤⁢Σ−1⁢(x−m)) (1.1)

is called the normal distribution 𝒩⁢(m,Σ). In particular, γ=𝒩⁢(0,Id) is called the standard normal distribution. For positive semidefinite Σ⪰0, we write 𝒩⁢(m,Σ) for the law of m+Σ1/2⁢Z, where Z∼γ. When d=1, we write 𝒩⁢(m,σ2) with σ>0 and identify it with the point (m,σ) of the upper half-plane

ℍ={(m,σ)∈ℝ2:σ>0}.

When Σ≻0, the change of variables x=m+Σ1/2⁢z shows that the two definitions agree. The following facts follow from the characteristic function

𝔼⁢ei⁢u⋅X=exp⁡(i⁢u⋅m−12⁢u⊤⁢Σ⁢u)(X∼𝒩⁢(m,Σ),u∈ℝd).
  • •

    If X∼𝒩⁢(m,Σ), then 𝔼⁢X=m and Cov⁡X=Σ.

  • •

    If A is a d×d matrix and b∈ℝd, then A⁢X+b∼𝒩⁢(A⁢m+b,A⁢Σ⁢A⊤).

  • •

    If X∼𝒩⁢(m1,Σ1) and Y∼𝒩⁢(m2,Σ2) are independent, then X+Y∼𝒩⁢(m1+m2,Σ1+Σ2).

In particular, (m,Σ) is determined by the mean and the covariance matrix. Hence the normal distributions 𝒩⁢(m,Σ) with Σ≻0 are in one-to-one correspondence with the set ℝd×Symd+ of parameters (m,Σ).

Listing the diagonal entries and the entries above the diagonal identifies Symd with ℝd⁢(d+1)/2, so ℝd×Symd≅ℝd+d⁢(d+1)/2. The set Symd+ is open in Symd. Indeed, the smallest eigenvalue λmin⁢(Σ)=min|u|=1⁡u⊤⁢Σ⁢u satisfies

|λmin⁢(Σ)−λmin⁢(Σ′)|≤∥Σ−Σ′∥op

(where ∥⋅∥op is the operator norm), so it is continuous, and Symd+={λmin>0}. Thus the parameter space ℝd×Symd+ of the Gaussian family is an open subset of ℝd+d⁢(d+1)/2. For d=1 we have Symd+=(0,∞), so ℝ×Symd+=ℝ×(0,∞), and using the coordinates (m,σ) instead of (m,σ2) gives ℍ. The subject of the book is two geometries on this open set.

1.2 The Kullback–Leibler Divergence

We first prepare an elementary function used throughout the book.

Lemma 1.2.

For x>0 let φ⁢(x)=x−1−log⁡x. Then φ is strictly decreasing on (0,1] and strictly increasing on [1,∞). In particular φ⁢(x)≥0, with equality only for x=1.

Proof.

The derivative φ′⁢(x)=1−1/x is negative for 0<x<1 and positive for x>1. This gives the monotonicity, and φ attains its minimum φ⁢(1)=0 only at x=1. ∎

Definition 1.3 (KL divergence).

Let p, q be probability density functions on ℝd, with q positive everywhere. The quantity

KL⁡(p∥q)=∫ℝdp⁢(x)⁢log⁡p⁢(x)q⁢(x)⁢d⁢x∈(−∞,∞]

is called the Kullback–Leibler divergence (KL divergence) of p with respect to q. Here the integrand is taken to be 0 at points where p⁢(x)=0. When probability distributions P, Q have densities p, q, we write KL⁡(P∥Q)=KL⁡(p∥q).

We check that this integral makes sense. Write f=p⁢log⁡(p/q) for the integrand. At points where p⁢(x)>0,

f−p+q=p⁢(qp−1−log⁡qp)=p⁢φ⁢(qp)≥0 (1.2)

by Lemma 1.2. At points where p⁢(x)=0, we have f−p+q=q>0. Hence f≥p−q, and since p−q is integrable, the negative part of f is integrable. So the integral is well defined as a value in (−∞,∞]; the value +∞ can occur. Moreover, since ∫(p−q)⁢𝑑x=0,

KL⁡(p∥q)=∫ℝd(f−p+q)⁢𝑑x, (1.3)

and the integrand on the right is nonnegative.

Lemma 1.4.

For p, q as in Definition 1.3, KL⁡(p∥q)≥0. Equality holds only if p=q almost everywhere.

Proof.

The integrand in (1.3) is nonnegative, so KL⁡(p∥q)≥0. Suppose equality holds. Then the integrand vanishes almost everywhere. At points where p=0 the integrand is q>0, so {p=0} is a null set. At points where p>0, (1.2) and the equality case of Lemma 1.2 give q/p=1. Hence p=q almost everywhere. Conversely, if p=q, the integrand vanishes almost everywhere. ∎

We now compute the KL divergence between normal distributions, starting with d=1.

Example 1.5 (One-dimensional normal distributions).

Let (m1,σ1), (m2,σ2)∈ℍ, and let pj be the density of 𝒩⁢(mj,σj2). Then

log⁡p1⁢(x)p2⁢(x)=log⁡σ2σ1−(x−m1)22⁢σ12+(x−m2)22⁢σ22.

For X∼𝒩⁢(m1,σ12) we have 𝔼⁢(X−m1)2=σ12 and 𝔼⁢(X−m2)2=σ12+(m1−m2)2. The right-hand side is quadratic in x, hence integrable, and we obtain

KL⁡(𝒩⁢(m1,σ12)∥𝒩⁢(m2,σ22))=log⁡σ2σ1+σ12+(m1−m2)22⁢σ22−12. (1.4)

In particular, taking (m2,σ2)=(0,1),

KL⁡(𝒩⁢(m,σ2)∥γ)=12⁢(m2+σ2−1−2⁢log⁡σ)=12⁢m2+12⁢φ⁢(σ2).

The computation is the same for general d. For expectations of quadratic forms we use the following formula. Let Y be an ℝd-valued random variable with 𝔼⁢|Y|2<∞, and let μ=𝔼⁢Y and C=Cov⁡Y. For a d×d matrix A,

𝔼⁢[Y⊤⁢A⁢Y]=𝔼⁢tr⁡(A⁢Y⁢Y⊤)=tr⁡(A⁢𝔼⁢[Y⁢Y⊤])=tr⁡(A⁢C)+μ⊤⁢A⁢μ, (1.5)

where the last equality uses 𝔼⁢[Y⁢Y⊤]=C+μ⁢μ⊤.

Proposition 1.6.

For (m1,Σ1),(m2,Σ2)∈ℝd×Symd+,

KL⁡(𝒩⁢(m1,Σ1)∥𝒩⁢(m2,Σ2))=12⁢(tr⁡(Σ2−1⁢Σ1)+(m2−m1)⊤⁢Σ2−1⁢(m2−m1)−d+log⁡detΣ2detΣ1). (1.6)

In particular, if λ1,…,λd are the eigenvalues of Σ∈Symd+, then

KL⁡(𝒩⁢(m,Σ)∥γ)=12⁢(tr⁡Σ+|m|2−d−log⁢detΣ)=12⁢|m|2+12⁢∑i=1dφ⁢(λi). (1.7)
Proof.

Let pj=pmj,Σj. By (1.1),

log⁡p1⁢(x)p2⁢(x)=12⁢log⁡detΣ2detΣ1−12⁢(x−m1)⊤⁢Σ1−1⁢(x−m1)+12⁢(x−m2)⊤⁢Σ2−1⁢(x−m2).

The right-hand side is a quadratic polynomial in x, and normal distributions have second moments, so it is integrable with respect to p1. Let X∼𝒩⁢(m1,Σ1). Applying (1.5) to Y=X−m1 (with μ=0, C=Σ1) gives

𝔼⁢[(X−m1)⊤⁢Σ1−1⁢(X−m1)]=tr⁡(Σ1−1⁢Σ1)=d.

Applying it to Y=X−m2 (with μ=m1−m2, C=Σ1) gives

𝔼⁢[(X−m2)⊤⁢Σ2−1⁢(X−m2)]=tr⁡(Σ2−1⁢Σ1)+(m2−m1)⊤⁢Σ2−1⁢(m2−m1).

Substituting these yields (1.6).

Taking m2=0 and Σ2=I gives the first equality in (1.7). Since tr⁡Σ=∑iλi and log⁢detΣ=∑ilog⁡λi,

tr⁡Σ−d−log⁢detΣ=∑i=1d(λi−1−log⁡λi)=∑i=1dφ⁢(λi),

which is the second equality. ∎

Definition 1.7.

For (m,Σ)∈ℝd×Symd+ let

F⁢(m,Σ)=KL⁡(𝒩⁢(m,Σ)∥γ).

For d=1 we write it as a function of (m,σ)∈ℍ:

F⁢(m,σ)=12⁢m2+12⁢φ⁢(σ2) (1.8)

(Example 1.5).

By (1.7) and Lemma 1.2, F≥0. Equality F⁢(m,Σ)=0 holds only when m=0 and all eigenvalues equal 1, that is, only when (m,Σ)=(0,I); the last reformulation is the spectral theorem. Thus F is a nonnegative function on ℝd×Symd+ that vanishes only at the point (0,I) corresponding to γ.

Remark 1.8 (Asymmetry of the KL divergence).

The KL divergence is not symmetric in p and q. For example, by (1.4) of Example 1.5, for σ>0,

KL⁡(𝒩⁢(0,σ2)∥γ)=12⁢φ⁢(σ2),KL⁡(γ∥𝒩⁢(0,σ2))=12⁢φ⁢(1σ2).

For σ=2 the former is 12⁢(3−log⁡4)≈0.807 and the latter is 12⁢(log⁡4−34)≈0.318. So the KL divergence is not a distance. The KL divergence studied in this book is KL(⋅∥γ), with the second argument fixed to the standard normal distribution γ (in Chapters 4 and 6, a point of an exponential family is used instead of γ). There are two reasons for choosing this direction.

  1. 1.

    γ is the stationary distribution of the OU process (Remark 1.11). As we shall see in Chapter 6, the OU flow moves in the direction that decreases KL(⋅∥γ).

  2. 2.

    Since log⁡γ⁢(x)=−d2⁢log⁡(2⁢π)−12⁢|x|2, for the density p=pm,Σ of a normal distribution,

    KL⁡(p∥γ)=∫ℝdp⁢log⁡p⁢d⁢x+12⁢∫ℝd|x|2⁢p⁢𝑑x+d2⁢log⁡(2⁢π).

    The two integrals on the right are finite, since log⁡p is a quadratic polynomial in x. The first term is the negative entropy, and the second is the expectation of the potential 12⁢|x|2. On the other hand, since p⁢∇log⁡p=∇p, the Fokker–Planck equation (1.11) of the next section can be written as

    ∂tp=div⁡(p⁢∇(log⁡p+12⁢|x|2)).

    Here log⁡p comes from the first term and 12⁢|x|2 from the second.

1.3 The OU Flow on Normal Distributions

Definition 1.9 (OU flow).

Let m0∈ℝd, and let Σ0∈Symd be positive semidefinite. For t≥0 let

m⁢(t)=e−t⁢m0,Σ⁢(t)=e−2⁢t⁢Σ0+(1−e−2⁢t)⁢I. (1.9)

The family of normal distributions t↦𝒩⁢(m⁢(t),Σ⁢(t)) is called the OU flow starting from 𝒩⁢(m0,Σ0). For d=1 we write Σ0=σ02 with σ0≥0, and

m⁢(t)=e−t⁢m0,σ⁢(t)2=e−2⁢t⁢σ02+1−e−2⁢t.

We collect the basic properties of the OU flow.

  • •

    Σ0 may be singular. For t>0 we have Σ⁢(t)∈Symd+. Indeed, for u∈ℝd, u⊤⁢Σ⁢(t)⁢u=e−2⁢t⁢u⊤⁢Σ0⁢u+(1−e−2⁢t)⁢|u|2≥(1−e−2⁢t)⁢|u|2. If Σ0≻0, then also Σ⁢(0)=Σ0∈Symd+ at t=0.

  • •

    Σ⁢(t)−I=e−2⁢t⁢(Σ0−I). Hence Σ⁢(t) can be given the same eigenvectors as Σ0, and the corresponding eigenvalues satisfy λi⁢(t)−1=e−2⁢t⁢(λi⁢(0)−1).

  • •

    (m⁢(t),Σ⁢(t)) is the solution with initial value (m0,Σ0) of the ordinary differential equation

    m˙=−m,Σ˙=2⁢(I−Σ). (1.10)

    Since the equation is linear, this solution is unique.

  • •

    As t→∞, (m⁢(t),Σ⁢(t))→(0,I); that is, the OU flow approaches γ. If (m0,Σ0)=(0,I), then 𝒩⁢(m⁢(t),Σ⁢(t))=γ for all t.

Times in this book are restricted to t≥0. For t<0, Σ⁢(t) may fail to be positive definite. For example, if d=1 and σ0=0, then σ⁢(t)2=1−e−2⁢t<0 for t<0.

Figure 1.1 shows the densities of the OU flow starting from 𝒩⁢(2,1/4). The mean approaches 0 at rate e−t, and the variance approaches 1.

Figure 1.1: Densities of the OU flow 𝒩⁢(m⁢(t),σ⁢(t)2) starting from 𝒩⁢(2,1/4) (m0=2, σ0=1/2). Here m⁢(t)=2⁢e−t and σ⁢(t)2=14⁢e−2⁢t+1−e−2⁢t; the densities for t=0,1/4,1/2,1 are drawn, together with the density of the limiting standard normal distribution γ (grey).

The densities of the OU flow satisfy the Fokker–Planck equation, where div⁡(x⁢p)=∑i=1d∂xi(xi⁢p). The next proposition also states the converse: the OU flow is the only family of normal densities satisfying this equation.

Proposition 1.10.

Let J⊆ℝ be an open interval, and let t↦(m⁢(t),Σ⁢(t)) be a C1 curve from J to ℝd×Symd+. Let p⁢(t,x)=pm⁢(t),Σ⁢(t)⁢(x). Then p satisfies the Fokker–Planck equation

∂tp=Δ⁢p+div⁡(x⁢p) (1.11)

on J×ℝd if and only if (m,Σ) satisfies (1.10) on J. In particular, the densities of the OU flow of Definition 1.9 satisfy (1.11) on (0,∞)×ℝd.

Proof.

Let P=Σ−1 and y=x−m. Both P and y depend on t, and y˙=−m˙. We first check two differentiation formulae. Differentiating P⁢Σ=I gives P˙=−P⁢Σ˙⁢P. Also det(Σ+h⁢Σ˙)=detΣ⁢det(I+h⁢P⁢Σ˙)=detΣ⁢(1+h⁢tr⁡(P⁢Σ˙)+O⁢(h2)), so ∂tlog⁢detΣ=tr⁡(P⁢Σ˙).

By (1.1), log⁡p=−d2⁢log⁡(2⁢π)−12⁢log⁢detΣ−12⁢y⊤⁢P⁢y. The two formulae above give

∂tpp=∂tlog⁡p=−12⁢tr⁡(P⁢Σ˙)+m˙⊤⁢P⁢y+12⁢y⊤⁢P⁢Σ˙⁢P⁢y.

Next we differentiate in x. Since ∇p=−p⁢P⁢y,

Δ⁢pp=|P⁢y|2−tr⁡P,div⁡(x⁢p)p=d+x⋅∇pp=d−y⊤⁢P⁢y−m⊤⁢P⁢y,

where we used x=y+m. Noting |P⁢y|2=y⊤⁢P2⁢y and collecting terms, we obtain

∂tp−Δ⁢p−div⁡(x⁢p)p=y⊤⁢(12⁢P⁢Σ˙⁢P−P2+P)⁢y+(m˙+m)⊤⁢P⁢y+(tr⁡P−d−12⁢tr⁡(P⁢Σ˙)). (1.12)

Suppose (1.10) holds. Then Σ˙=2⁢(I−Σ) gives 12⁢P⁢Σ˙⁢P=P2−P and 12⁢tr⁡(P⁢Σ˙)=tr⁡P−d, and m˙+m=0. Hence the right-hand side of (1.12) is 0, and since p>0, (1.11) holds.

Conversely, suppose (1.11) holds. For each t∈J, the right-hand side of (1.12) vanishes identically as a polynomial in y∈ℝd. Replacing y by s⁢y and regarding it as a polynomial in s, the quadratic and linear terms each vanish. The matrix 12⁢P⁢Σ˙⁢P−P2+P of the quadratic term is symmetric, so it is itself 0. Multiplying by Σ on both sides gives 12⁢Σ˙−I+Σ=0, that is, Σ˙=2⁢(I−Σ). The linear term gives P⁢(m˙+m)=0, and since P is invertible, m˙=−m.

Finally, the curve (m⁢(t),Σ⁢(t)) of the OU flow is a C1 curve on (0,∞) with values in ℝd×Symd+ and satisfies (1.10). So the last assertion follows from the first part. ∎

Remark 1.11 (Relation to the OU process).

Let B be a d-dimensional Brownian motion and X0 a random variable independent of B. The solution of the stochastic differential equation

d⁢Xt=−Xt⁢d⁢t+2⁢d⁢Bt

is called the OU process. It is given by

Xt=e−t⁢X0+2⁢∫0te−(t−s)⁢𝑑Bs,

where the second term on the right is independent of X0 and has law 𝒩⁢(0,(1−e−2⁢t)⁢I) (not proved in this book). A proof is in Chapter 4 of Why Pictures Emerge from Noise [KEI26b]. Granting this, if X0∼𝒩⁢(m0,Σ0), the facts of Section 1.1 give

Xt∼𝒩⁢(e−t⁢m0,e−2⁢t⁢Σ0+(1−e−2⁢t)⁢I)=𝒩⁢(m⁢(t),Σ⁢(t)).

Thus the OU flow is the time evolution of the law of the OU process started from a normal distribution. With the normalisation that multiplies the noise by 2, X0∼γ implies Xt∼γ; that is, γ is the stationary distribution of the OU process. The general relation between the law of the OU process and the Fokker–Planck equation (1.11) is treated in Chapter 5 of the same book. This book uses only the case of a normal initial law, which Proposition 1.10 verified directly.

Problems

  1. 1.

    Let A be an invertible d×d matrix, b∈ℝd, and (m1,Σ1),(m2,Σ2)∈ℝd×Symd+. Show that the KL divergence of 𝒩⁢(A⁢m1+b,A⁢Σ1⁢A⊤) with respect to 𝒩⁢(A⁢m2+b,A⁢Σ2⁢A⊤) equals KL⁡(𝒩⁢(m1,Σ1)∥𝒩⁢(m2,Σ2)).

    Hint: In (1.6), use tr⁡((A⁢Σ2⁢A⊤)−1⁢A⁢Σ1⁢A⊤)=tr⁡(Σ2−1⁢Σ1) and det(A⁢Σ⁢A⊤)=(detA)2⁢detΣ.

  2. 2.

    Let (m,Σ)∈ℝd×Symd+, and let λ1,…,λd be the eigenvalues of Σ. Show that

    KL⁡(γ∥𝒩⁢(m,Σ))=12⁢m⊤⁢Σ−1⁢m+12⁢∑i=1dφ⁢(1λi).

    Show further that, for d=1, m=0 and σ>0, the inequality KL⁡(𝒩⁢(0,σ2)∥γ)<KL⁡(γ∥𝒩⁢(0,σ2)) is equivalent to σ<1.

    Hint: For the second part, let h⁢(s)=φ⁢(s)−φ⁢(1/s)=s−1/s−2⁢log⁡s; then h′⁢(s)=(1−1/s)2≥0 and h⁢(1)=0.

  3. 3.

    Let d=1, m0=0 and σ0>0, and let f⁢(t)=F⁢(0,σ⁢(t)) along the OU flow. Show that f′⁢(t)=−(σ⁢(t)2−1)2/σ⁢(t)2. Show further that if σ0≠1, then f is strictly decreasing and f⁢(t)→0 as t→∞.

    Hint: With q=σ2 we have q˙=2⁢(1−q), and f=12⁢φ⁢(q) by (1.8).

  4. 4.

    For the OU flow of Definition 1.9, let s,t≥0. Show that the OU flow starting from 𝒩⁢(m⁢(s),Σ⁢(s)) takes the value 𝒩⁢(m⁢(s+t),Σ⁢(s+t)) at time t.

    Hint: Substitute into (1.9) and use e−2⁢t⁢(1−e−2⁢s)+1−e−2⁢t=1−e−2⁢(s+t).

  5. 5.

    Let d=1 and σ0=0 (the initial law is concentrated at m0). Show that F⁢(m⁢(t),σ⁢(t))=12⁢m02⁢e−2⁢t+12⁢φ⁢(1−e−2⁢t) for t>0, and that this diverges to +∞ as t↓0.

    Hint: For 0<x<1, φ⁢(x)≥−log⁡x−1.