Docsity

Differential Dynamic Programming (DDP), Lecture notes of Computer Science

Toggle sidebar
bg1
Appendix A
Gaussian and KL facts
This appendix collects a few elementary facts used in the derivations above.
A.1 Basic Gaussian and KL identities
Lemma A.1.1 (Linear combinations of independent Gaussians).Let
1, . . . , tbe independent standard Gaussian random vectors in Rd, and let
a1, . . . , atbe real numbers. Then
t
X
s=1
ass∼ N 0, t
X
s=1
a2
s!I!.(A.1)
Proof. The sum is Gaussian because it is a linear combination of jointly
Gaussian random vectors. Its mean is zero, and its covariance is
Cov t
X
s=1
ass!=
t
X
s=1
a2
sCov(s) = t
X
s=1
a2
s!I, (A.2)
where independence removes the cross-covariance terms.
Lemma A.1.2 (Conditioning a joint Gaussian).Suppose
A
B∼ NµA
µB,ΣAA ΣAB
ΣBA ΣBB ,(A.3)
with ΣBB invertible. Then
A|B=b∼ NµA+ ΣABΣ−1
BB (b−µB),ΣAA −ΣABΣ−1
BB ΣBA.(A.4)
Similarly, if ΣAA is invertible, then
B|A=a∼ NµB+ ΣBAΣ−1
AA(a−µA),ΣBB −ΣB AΣ−1
AAΣAB .(A.5)
266
pf3

Partial preview of the text

Download Differential Dynamic Programming (DDP) and more Lecture notes Computer Science in PDF only on Docsity!

Appendix A

Gaussian and KL facts

This appendix collects a few elementary facts used in the derivations above.

A.1 Basic Gaussian and KL identities

Lemma A.1.1 (Linear combinations of independent Gaussians). Let

 1 ,... , t be independent standard Gaussian random vectors in R d , and let

a 1 ,... , at be real numbers. Then

∑^ t

s=

ass ∼ N

∑t

s=

a 2 s

I

. (A.1)

Proof. The sum is Gaussian because it is a linear combination of jointly

Gaussian random vectors. Its mean is zero, and its covariance is

Cov

∑t

s=

ass

∑^ t

s=

a 2 s Cov(s) =

∑t

s=

a 2 s

I, (A.2)

where independence removes the cross-covariance terms.

Lemma A.1.2 (Conditioning a joint Gaussian). Suppose

( A B

∼ N

μA μB

ΣAA ΣAB

ΣBA ΣBB

, (A.3)

with ΣBB invertible. Then

A | B = b ∼ N

μA + ΣAB Σ − 1 BB (b^ −^ μB^ ),^ ΣAA^ −^ ΣAB^ Σ

− 1 BB ΣBA

. (A.4)

Similarly, if ΣAA is invertible, then

B | A = a ∼ N

μB + ΣBAΣ − 1 AA(a^ −^ μA),^ ΣBB^ −^ ΣBAΣ

− 1 AAΣAB

. (A.5)

Proof. Let

RA = A − μA − ΣAB Σ − 1 BB (B^ −^ μB^ ).^ (A.6)

Since (A, B) is jointly Gaussian, (RA, B) is jointly Gaussian. Moreover,

Cov(RA, B) = ΣAB − ΣAB Σ − 1 BB ΣBB^ = 0.^ (A.7)

For jointly Gaussian random variables, zero covariance implies independence,

so RA is independent of B. Its mean is zero and its covariance is

Cov(RA) = ΣAA − ΣAB Σ − 1 BB ΣBA.^ (A.8)

Therefore, conditioning on B = b only replaces B by b in the affine repre-

sentation of A, giving the displayed formula for A | B = b. The formula

for B | A = a follows by the same argument with the roles of A and B

interchanged.

Lemma A.1.3 (KL between Gaussians with the same covariance). If P =

N (m 1 , Σ) and Q = N (m 2 , Σ) with the same positive definite covariance ma-

trix Σ, then

KL(P ‖ Q) =

(m 1 − m 2 ) T Σ − 1 (m 1 − m 2 ). (A.9)

Proof. Writing the two Gaussian log densities and subtracting, the normal-

izing constants and quadratic terms in x cancel except for the difference in

means. Taking expectation under P gives

EP

[

log

dP

dQ

]

EP

[

(X − m 2 ) T Σ − 1 (X − m 2 ) − (X − m 1 ) T Σ − 1 (X − m 1 )

]

(A.10)

Since EP [X] = m 1 , this reduces to the stated expression.

Lemma A.1.4 (Chain rule for KL). Suppose q(x, y) = q(x)q(y | x) and

p(x, y) = p(x)p(y | x). Then

KL(q(x, y) ‖ p(x, y)) = KL(q(x) ‖ p(x)) + Eq(x) [KL(q(y | x) ‖ p(y | x))]. (A.11) More generally, if

q(x1:T ) = q(xT )

∏^ T

t=

q(xt− 1 | xt:T ) and p(x1:T ) = p(xT )

∏^ T

t=

p(xt− 1 | xt:T ),

(A.12)