The total variation distance between high-dimensional Gaussians with the same mean

Luc Devroye, Abbas Mehrabian, Tommy Reddad

Introduction

We denote by N(μ,Σ)N(\mu,\Sigma) a random variable with this distribution. Note that if X∼N(μ,Σ)X\sim\mathcal{N}(\mu,\Sigma) then EX=μ\mathbf{E}X=\mu and EXXT=Σ\mathbf{E}XX^{\mathsf{T}}=\Sigma.

with respect to the rr-dimensional Lebesgue measure on μ+range⁡(Σ)\mu+\operatorname{range}(\Sigma). The density is zero outside this affine subspace. For general background on high-dimensional Gaussian distributions (also called multivariate normal distributions), see .

If PP and QQ have densities pp and qq, then it is easy to verify that the set A≔{x:p(x)>q(x)}A\coloneqq\{x:p(x)>q(x)\} attains the supremum here, and this observation leads to the identity

that is, the total variation distance is half the L1L^{1} distance. In the following, we will sometimes write TV⁡(X,Y)\operatorname{TV}\left(X,Y\right) for TV⁡(P,Q)\operatorname{TV}\left(P,Q\right), where XX and YY are random variables distributed as PP and QQ, respectively. Observe that TV⁡(P,Q)\operatorname{TV}\left(P,Q\right) is a metric and is always between 0 and 1. For a survey on measures of distance between distributions and inequalities between them, see .

We have seen that the total variation distance can be written as an integral or as a supremum, but in general there is no known closed form for it. In this note, given two Gaussians with the same mean, we give closed-form lower and upper bounds for their total variation distance, which are within a constant factor of one another. If the Gaussians have different means, we give only a lower bound and leave a tight characterization as an open problem.This problem has been solved; see [1, Theorem 1.8].

Open Problem. Find closed-form lower and upper bounds for the total variation distance between two high-dimensional Gaussians that are within a constant factor of one another.

Note that if μ1+range⁡(Σ1)≠μ2+range⁡(Σ2)\mu_{1}+\operatorname{range}(\Sigma_{1})\neq\mu_{2}+\operatorname{range}(\Sigma_{2}), in particular if rank⁡(Σ1)≠rank⁡(Σ2)\operatorname{rank}(\Sigma_{1})\neq\operatorname{rank}(\Sigma_{2}), then we have TV⁡(N(μ1,Σ1),N(μ2,Σ2))=1\operatorname{TV}\left(\mathcal{N}(\mu_{1},\Sigma_{1}),\mathcal{N}(\mu_{2},\Sigma_{2})\right)=1, since the intersection of the supports have zero Lebesgue measure. Another trivial case is when μ1=μ2\mu_{1}=\mu_{2} and Σ1=Σ2\Sigma_{1}=\Sigma_{2}, in which case the total variation distance is zero. We will not explicitly treat these two cases.

Our first main result concerns the same-mean case. We have not tried to optimize the constants in our results.

If Σ1\Sigma_{1} and Σ2\Sigma_{2} are positive semi-definite, range⁡(Σ1)=range⁡(Σ2)\operatorname{range}(\Sigma_{1})=\operatorname{range}(\Sigma_{2}), and r=rank⁡(Σ1)=rank⁡(Σ2)r=\operatorname{rank}(\Sigma_{1})=\operatorname{rank}(\Sigma_{2}), then let Π\Pi be a d×rd\times r matrix that has the same range as Σ1\Sigma_{1} and Σ2\Sigma_{2} and let ρ1,…,ρr\rho_{1},\dots,\rho_{r} denote the eigenvalues of (ΠTΣ1Π)−1(ΠTΣ2Π)−Ir(\Pi^{\mathsf{T}}\Sigma_{1}\Pi)^{-1}(\Pi^{\mathsf{T}}\Sigma_{2}\Pi)-I_{r}. Then, we have

The paper proves a bound similar to Theorem 1.1 for Gaussian distributions in a general Hilbert space: if Σ1\Sigma_{1} and Σ2\Sigma_{2} are positive definite matrices, Σ1−1Σ2−I\Sigma_{1}^{-1}\Sigma_{2}-I has eigenvalues λ1,⋯\lambda_{1},\cdots, and ∑λi2≤1/50\sqrt{\sum\lambda_{i}^{2}}\leq 1/50, then [2, Corollary 2] gives

This result has the advantage that it covers infinite-dimensional spaces as well, but it holds only when ∑λi2{\sum\lambda_{i}^{2}} is smaller than a threshold.

One can express the quantities ∑λi2\sum\lambda_{i}^{2} and ∑ρi2\sum\rho_{i}^{2} in Theorem 1.1 in terms of Frobenius norms of appropriate matrices. For the first case, i.e., when Σ1,Σ2\Sigma_{1},\Sigma_{2} are positive definite, we have

To see this, first note that Σ1−1/2Σ2Σ1−1/2\Sigma_{1}^{-1/2}\Sigma_{2}\Sigma_{1}^{-1/2} have the same spectrum as Σ1−1Σ2\Sigma_{1}^{-1}\Sigma_{2}, because a vector vv is an eigenvector for Σ1−1Σ2\Sigma_{1}^{-1}\Sigma_{2} with eigenvalue α\alpha if and only if Σ11/2v\Sigma_{1}^{1/2}v is an eigenvector for Σ1−1/2Σ2Σ1−1/2\Sigma_{1}^{-1/2}\Sigma_{2}\Sigma_{1}^{-1/2} with eigenvalue α\alpha. Thus, the eigenvalues of (Σ1−1/2Σ2Σ1−1/2−Id)2\left(\Sigma_{1}^{-1/2}\Sigma_{2}\Sigma_{1}^{-1/2}-I_{d}\right)^{2} are λ12,…,λd2\lambda_{1}^{2},\dots,\lambda_{d}^{2}, proving the first equality in (2). The second equality follows by noting that the matrix Σ1−1/2Σ2Σ1−1/2−Id\Sigma_{1}^{-1/2}\Sigma_{2}\Sigma_{1}^{-1/2}-I_{d} is symmetric. The second case, i.e., when Σ1,Σ2\Sigma_{1},\Sigma_{2} are positive semi-definite, can be handled similarly.

For the case where the means are different, we prove the following lower bound.

Along the way of proving this theorem, we also give bounds for the one-dimensional case.

In the one-dimensional case, d=1d=1, we have

Although the total variation distance is symmetric, our lower and upper bounds are not symmetric, so they can be automatically strengthened; for instance, the following symmetric version of Theorem 1.3 holds:

Moreover, for Theorem 1.1, swapping Σ1\Sigma_{1} and Σ2\Sigma_{2} can change the estimation of the total variation distance by at most a multiplicative factor of 2. Namely, suppose Σ1\Sigma_{1} and Σ2\Sigma_{2} are positive definite d×dd\times d matrices, λ1,…,λd\lambda_{1},\dots,\lambda_{d} are the eigenvalues of Σ1−1Σ2−Id\Sigma_{1}^{-1}\Sigma_{2}-I_{d}, and ν1,…,νd\nu_{1},\dots,\nu_{d} are the eigenvalues of Σ2−1Σ1−Id\Sigma_{2}^{-1}\Sigma_{1}-I_{d}. Then elementary calculations give

Some preliminaries and other known bounds for the total variation distance between Gaussians appear in Section 2. We start by proving Theorem 1.1 in Section 3, then we prove Theorem 1.3 in Section 4, and finally we prove Theorem 1.2 in Section 5.

Preliminaries

The dd-dimensional identity matrix is denoted IdI_{d}. The trace and determinant of a matrix AA are denoted tr⁡(A)\operatorname{tr}(A) and det⁡(A)\det(A), respectively. The Frobenius norm (also called the Hilbert–Schmidt norm or the Schur norm) of a matrix AA is denoted by ∥A∥F≔tr⁡(AAT)\|A\|_{F}\coloneqq\sqrt{\operatorname{tr}(AA^{\mathsf{T}})}. Note that ∥A∥F2\|A\|_{F}^{2} equals the sum of squares of entries of AA. If AA is symmetric, ∥A∥F2\|A\|_{F}^{2} equals the sum of squares of eigenvalues of AA. For general background on matrix norms, see [4, Chapter 5].

The coupling characterization of the total variation distance.

For two distributions PP and QQ, a pair (X,Y)(X,Y) of random variables defined on the same probability space is called a coupling for PP and QQ if X∼PX\sim P and Y∼QY\sim Q. An extremely useful property of the total variation distance is the coupling characterization: for any two distributions PP and QQ, we have TV⁡(P,Q)≤t\operatorname{TV}\left(P,Q\right)\leq t if and only if there exists a coupling (X,Y)(X,Y) for them such that P{X≠Y}≤t\mathbf{P}\left\{{X\neq Y}\right\}\leq t (see, e.g., [6, Proposition 4.7]). This characterization implies that for any function ff we have TV⁡(f(X),f(Y))≤TV⁡(X,Y)\operatorname{TV}\left(f(X),f(Y)\right)\leq\operatorname{TV}\left(X,Y\right). If ff is invertible (for instance if f(v)=Av+bf(v)=Av+b where AA is full-rank) this also implies TV⁡(f(X),f(Y))=TV⁡(X,Y)\operatorname{TV}\left(f(X),f(Y)\right)=\operatorname{TV}\left(X,Y\right).

An important property of the Gaussian distribution is that any linear transformation of a Gaussian random variable is also Gaussian: if X∼N(μ,Σ)X\sim\mathcal{N}(\mu,\Sigma) then

For a positive semi-definite matrix Σ\Sigma with eigendecomposition Σ=∑i=1dλiviviT\Sigma=\sum_{i=1}^{d}\lambda_{i}v_{i}v_{i}^{\mathsf{T}} where the viv_{i} are orthonormal, we define Σ1/2≔∑i=1dλiviviT\Sigma^{1/2}\coloneqq\sum_{i=1}^{d}\sqrt{\lambda_{i}}v_{i}v_{i}^{\mathsf{T}} and Σ−1/2≔∑i=1dviviT/λi\Sigma^{-1/2}\coloneqq\sum_{i=1}^{d}v_{i}v_{i}^{\mathsf{T}}/\sqrt{\lambda_{i}}. It is easy to observe that if g∼N(0,I)g\sim\mathcal{N}(0,I) then Σ1/2g∼N(0,Σ)\Sigma^{1/2}g\sim\mathcal{N}(0,\Sigma).

throughout, which implies that for any x≥−2/3x\geq-2/3 there exists a b∈b\in such that x−log⁡(1+x)=bx2x-\log(1+x)=bx^{2}.

We next state some known bounds for the total variation distance between two Gaussians, which may be more convenient than the above bounds for some applications.

For the case when the two Gaussians have the same covariance matrix, [2, Theorem 1] gives

The following bounds follow from known relations between statistical distances.

An upper bound for the total variation distance using the KL-divergence.

and Pinsker’s inequality [11, Lemma 2.5] states that TV⁡(P,Q)≤KL⁡(P∥Q)/2\operatorname{TV}\left(P,Q\right)\leq\sqrt{\operatorname{KL}\left(P\parallel Q\right)/2} for any pair of distributions. The KL-divergence between two Gaussians has a closed form (e.g., [8, Formula (A.23)]):

Combining these gives the following proposition.

If Σ1\Sigma_{1} and Σ2\Sigma_{2} are positive definite, then

Bounds for the total variation distance using the Hellinger distance.

see [5, page 44]. The Hellinger distance between two Gaussians has a closed form (e.g., [7, Exercises 11 and 14 in Chapter 1]):

Combining these gives the following proposition.

Assume that Σ1,Σ2\Sigma_{1},\Sigma_{2} are positive definite, and let

The same-mean case: proof of Theorem 1.1

In this section we consider the case when both Gaussians have the same mean. For proving the theorem we will need two lemmas.

Suppose λ1,…,λd≥−2/3\lambda_{1},\dots,\lambda_{d}\geq-2/3 and let ρ≔∑i=1dλi2\rho\coloneqq\sqrt{\sum_{i=1}^{d}\lambda_{i}^{2}}. If CC is a diagonal matrix with diagonal entries 1+λ1,…,1+λd1+\lambda_{1},\dots,1+\lambda_{d}, then TV⁡(N(0,C−1),N(0,Id))≥ρ/6−ρ2/8−(eρ2−1)/2.\operatorname{TV}\left(\mathcal{N}(0,C^{-1}),\mathcal{N}(0,I_{d})\right)\geq\rho/6-\rho^{2}/8-(e^{\rho^{2}}-1)/2.

Define a random vector g=(g1,…,gd)∼N(0,Id)g=(g_{1},\dots,g_{d})\sim\mathcal{N}(0,I_{d}). From (1) we have

Since λi≥−2/3\lambda_{i}\geq-2/3 for all ii, we have log⁡(1+λi)/2=λi/2−biλi2/2\log(1+\lambda_{i})/2=\lambda_{i}/2-b_{i}\lambda_{i}^{2}/2 for some bi∈b_{i}\in, and summing these up we find ∑i=1dlog⁡(1+λi)/2=∑i=1dλi/2−bρ2\sum_{i=1}^{d}\log(1+\lambda_{i})/2=\sum_{i=1}^{d}\lambda_{i}/2-b\rho^{2} for some b∈b\in. Also let hi=1−gi2h_{i}=1-g_{i}^{2} and X=∑i=1dλihi/2X=\sum_{i=1}^{d}\lambda_{i}h_{i}/2, whence

where the first inequality is the triangle inequality, the second one follows from

and the third one follows from Hölder’s inequality (see, e.g., [3, Lemma 14.8]). We control each term on the right-hand-side of (3). First, observe that since hih_{i} is mean-zero, we have Ehihj=0\mathbf{E}h_{i}h_{j}=0 for all i≠ji\neq j, and since Ehi2=2\mathbf{E}h_{i}^{2}=2,

Second, since Egi2=1,Egi4=3,Egi6=15\mathbf{E}g_{i}^{2}=1,\mathbf{E}g_{i}^{4}=3,\mathbf{E}g_{i}^{6}=15, and Egi8=105,\mathbf{E}g_{i}^{8}=105, we have Ehi4=60\mathbf{E}h_{i}^{4}=60; thus,

Finally, for the exponential moment, note that Eexp⁡(tgi2)=(1−2t)−1/2\mathbf{E}\exp(tg_{i}^{2})=(1-2t)^{-1/2} for any t<1/2t<1/2, hence

If λ2≥0.01\lambda^{2}\geq 0.01 then TV⁡(N(0,1),N(0,1+λ))>0.01\operatorname{TV}\left(\mathcal{N}(0,1),\mathcal{N}(0,1+\lambda)\right)>0.01.

If λ>0\lambda>0 then 1+λ≥1.11+\lambda\geq 1.1, so we have

and if λ<0\lambda<0 then 1+λ≤0.91+\lambda\leq 0.9, so we have

For both parts of the theorem, we may assume that μ=0\mu=0. We start with the case that Σ1\Sigma_{1} and Σ2\Sigma_{2} are positive definite, i.e., they have full rank. Recall that Σ1−1Σ2\Sigma_{1}^{-1}\Sigma_{2} have eigenvalues 1+λ1,…,1+λd1+\lambda_{1},\dots,1+\lambda_{d}. Let ρ≔∑i=1dλi2\rho\coloneqq\sqrt{\sum_{i=1}^{d}{\lambda_{i}^{2}}}.

We first prove the upper bound. If some λi<−2/3\lambda_{i}<-2/3 then trivially

and the upper bound in the theorem is proved.

For proving the lower bound, we first claim that if CC is a diagonal matrix with diagonal entries 1+λ1,…,1+λd1+\lambda_{1},\dots,1+\lambda_{d}, then

To prove this, let g∼N(0,Id)g\sim\mathcal{N}(0,I_{d}). We first claim if EE and FF are positive definite matrices with the same spectrum, then TV⁡(Eg,g)=TV⁡(Fg,g)\operatorname{TV}(Eg,g)=\operatorname{TV}(Fg,g). To see this, let s1,…,sds_{1},\dots,s_{d} be the eigenvalues of EE and FF, and let g1,…,gdg_{1},\dots,g_{d} be the components of gg. By rotational invariance of the standard Gaussian distribution (see, e.g., [12, Proposition 3.3.2]), both TV⁡(Eg,g)\operatorname{TV}(Eg,g) and TV⁡(Fg,g)\operatorname{TV}(Fg,g) are equal to TV⁡((s1g1,s2g2,…,sdgd),(g1,g2,…,gd))\operatorname{TV}((s_{1}g_{1},s_{2}g_{2},\dots,s_{d}g_{d}),(g_{1},g_{2},\dots,g_{d})), and the claim is proved. This also implies, for any two positive definite matrices EE and FF with the same spectrum,

Now Σ2−1/2Σ1Σ2−1/2\Sigma_{2}^{-1/2}\Sigma_{1}\Sigma_{2}^{-1/2} has the same spectrum as Σ2−1Σ1\Sigma_{2}^{-1}\Sigma_{1}, which has the same spectrum as C−1C^{-1}, whence (4) is proved.

For proving the lower bound in the theorem we consider three cases.

Case 1: there exists some ii with ∣λi∣≥0.1|\lambda_{i}|\geq 0.1. Observe that if we project a random variable distributed as N(0,C−1)\mathcal{N}(0,C^{-1}) onto the iith component, we obtain a one-dimensional N(0,(1+λi)−1)\mathcal{N}(0,(1+\lambda_{i})^{-1}) random variable . Since projection can only decrease the total variation distance, using Lemma 3.2 we obtain

as required. The above equality holds because the total variation distance is invariant under any linear transformation.

Case 2: ∣λi∣<0.1|\lambda_{i}|<0.1 for all ii, and ρ≤0.17\rho\leq 0.17. In this case Lemma 3.1 gives

Case 3: ∣λi∣<0.1|\lambda_{i}|<0.1 for all ii, and ρ>0.17\rho>0.17. Define

and observe that f(x)≥0.01f(x)\geq 0.01 for 0.1≤x≤0.170.1\leq x\leq 0.17. Let 1≤j<d1\leq j<d be the largest index such that ∑i=1jλi2≤0.172\sum_{i=1}^{j}\lambda_{i}^{2}\leq 0.17^{2}, and observe that since ∣λi∣<0.1|\lambda_{i}|<0.1 for all ii, we have ρ′2≔∑i=1jλi2≥0.172−0.12>0.01\rho^{\prime 2}\coloneqq\sum_{i=1}^{j}\lambda_{i}^{2}\geq 0.17^{2}-0.1^{2}>0.01 and so f(ρ′)≥0.01f(\rho^{\prime})\geq 0.01. Let C′C^{\prime} be the diagonal j×jj\times j matrix with diagonal entries 1+λ1,…,1+λj1+\lambda_{1},\dots,1+\lambda_{j}. If we project a random variable distributed as N(0,C−1)\mathcal{N}(0,C^{-1}) onto the first jj coordinates, we obtain a N(0,C′−1)\mathcal{N}(0,C^{\prime-1}) random variable. Since projection can only decrease the total variation distance, using Lemma 3.1 we obtain

The matrices ΠTΣ1Π\Pi^{\mathsf{T}}\Sigma_{1}\Pi and ΠTΣ2Π\Pi^{\mathsf{T}}\Sigma_{2}\Pi are positive definite r×rr\times r matrices, hence the second part of the theorem follows from the first part. ∎

The one-dimensional case: proof of Theorem 1.3

We start with the upper bound. If ∣σ12−σ22∣σ12≥2/3\frac{|\sigma_{1}^{2}-\sigma_{2}^{2}|}{\sigma_{1}^{2}}\geq 2/3, then the right-hand-side is at least 1 and the bound holds because the total variation distance is at most 1. Otherwise, since σ22/σ12−1≥−2/3{\sigma_{2}^{2}}/{\sigma_{1}^{2}}-1\geq-2/3, we have σ22/σ12−1−log⁡(σ22/σ12)≤(σ22/σ12−1)2{\sigma_{2}^{2}}/{\sigma_{1}^{2}}-1-\log({\sigma_{2}^{2}}/{\sigma_{1}^{2}})\leq({\sigma_{2}^{2}}/{\sigma_{1}^{2}}-1)^{2}, so from Proposition 2.1 we have

The lower bound follows from the following two lower bounds:

and then (5) follows from Theorem 1.1. Assume, without loss of generality, that σ1≤σ2\sigma_{1}\leq\sigma_{2} and μ1≤μ2\mu_{1}\leq\mu_{2}. By the form of the density of the normal distribution, this implies there exists some c=c(σ1,σ2)c=c(\sigma_{1},\sigma_{2}) such that

To complete the proof of Theorem 1.3 we need only prove (6). By symmetry, we may assume μ1≤μ2\mu_{1}\leq\mu_{2}. Let X∼N(μ1,σ12)X\sim\mathcal{N}(\mu_{1},\sigma_{1}^{2}). Then

which proves (6) and completes the proof of the theorem.

The general case: proof of Theorem 1.2

with P≔Id−vvT/vTvP\coloneqq I_{d}-vv^{\mathsf{T}}/v^{\mathsf{T}}v.

Let X∼N(μ1,Σ1)X\sim\mathcal{N}(\mu_{1},\Sigma_{1}) and Y∼N(μ2,Σ2)Y\sim\mathcal{N}(\mu_{2},\Sigma_{2}). Then we have, by the coupling characterization of the total variation distance,

We next claim that f1(X)∼N(12,vTΣ1v(vTv)2)\displaystyle f_{1}(X)\sim\mathcal{N}\left(\frac{1}{2},\frac{v^{\mathsf{T}}\Sigma_{1}v}{(v^{\mathsf{T}}v)^{2}}\right). To see this, observe that f1(X)f_{1}(X) is a linear map of a Gaussian, so it is Gaussian. Its mean and covariance can be computed from those of XX. Similarly, one can compute f1(Y)∼N(−12,vTΣ2v(vTv)2)\displaystyle f_{1}(Y)\sim\mathcal{N}\left(-\frac{1}{2},\frac{v^{\mathsf{T}}\Sigma_{2}v}{(v^{\mathsf{T}}v)^{2}}\right). So, Theorem 1.3 gives

On the other hand, since f2(w)=P(w−u)f_{2}(w)=P(w-u), both f2(X)f_{2}(X) and f2(Y)f_{2}(Y) are also Gaussians, with f2(X)∼N(0,PΣ1P)f_{2}(X)\sim\mathcal{N}(0,P\Sigma_{1}P) and f2(Y)∼N(0,PΣ2P)f_{2}(Y)\sim\mathcal{N}(0,P\Sigma_{2}P). Note that range⁡(PΣ1P)=range⁡(PΣ2P)=range⁡(Π)\operatorname{range}(P\Sigma_{1}P)=\operatorname{range}(P\Sigma_{2}P)=\operatorname{range}(\Pi). Also observe that since each column of Π\Pi is orthogonal to vv, we have ΠTP=Π\Pi^{\mathsf{T}}P=\Pi and PΠ=ΠP\Pi=\Pi. Recall that ρ1,…,ρd−1\rho_{1},\dots,\rho_{d-1} are the eigenvalues of (ΠTΣ1Π)−1ΠTΣ2Π−Id−1(\Pi^{\mathsf{T}}\Sigma_{1}\Pi)^{-1}\Pi^{\mathsf{T}}\Sigma_{2}\Pi-I_{d-1}. Hence the second part of Theorem 1.1 gives

We are grateful to Michael Kohler, Gautam Kamath, Cole Franks, and Shirshendu Ganguly for pointing out inaccuracies in earlier versions of this paper.

References