# Separating Gaussian data

After having studied in previous chapters the properties of high-dimensional data that comes from a Gaussian distribution, we now want use this knowledge to understand under which conditions it is possible to separate (or ‘disentangle’) the data that stems from two ‘Gaussians’ with variance one and different means. Let us first look at low dimensions, for example at the 2-dimensional data set in Figure, which we generated by drawing samples of equal size from two Gaussians with different centers.

Separation (or disentanglement) in Figure would mean to determine for each point if it came from the lower left Gaussian or from the upper right Gaussian. Firstly, we observe that this cannot be done in a deterministic way but only ‘with high probability for almost all points’. Secondly we see, that for this to be possible it is necessary that the distance between the two means is sufficiently large. If this is the case, we might have a good chance that pairs of data points with small distances belong to the same Gaussian whereas pairs with large distances belong to different Gaussians. Moreover, there will be only a few points located half way between the centers which means that if we start by picking an arbitrary data point and then compute the other points' distances from the fixed one, we may expect that two clusters, corresponding to the two Gaussians, appear.

In high dimensions the picture looks different. We know that here most data points of a Gaussian are located in an annulus with radius $\sqrt{d}$ around the mean of the Gaussian. An analogue of the assumption in the 2-dimensional case would thus require that the distance $\Delta:=\|\mu_1-\mu_2\|$ between the means is larger than $2\sqrt{d}$, see Figure, implying that the data sets will be almost disjoint. \begin{center}

If this is the case, then we may expect that separation can be done analogously to the low-dimensional situation. There are however two principal differences: Firstly, our asymptotic approach to high dimensions means that we do not consider $d$ as a constant but always ask what happens for $d\rightarrow\infty$. Therefore, we need to understand the distance of the means $\Delta=\Delta(d)$ as a function of the dimension as well. Otherwise, i.e., for constant $\Delta$ and dimension tending to infinity, the two annuli would eventually overlap more and more and become almost coincident. From this we see that we have to require that $\Delta\rightarrow\infty$. Our low-dimensional arguments suggest that $\Delta \gt 2\sqrt{d}$ yields one scenario in which disentanglement can be achieved. On the other hand, the picture in Figure suggests that the overlap might also be small, even if $\Delta\leqslant2\sqrt{d}$.

We emphasize that Figure and in particular Figure constitute rather imperfect 2-dimensional abstract illustrations of high dimensional facts. Notice, e.g., that any two points in one of the annuli have, with high probability, distance $\sqrt{2d}$. The picture does however not represent this at all!

Notice that also in this second scenario $\Delta\rightarrow\infty$ must hold in order to avoid that for large $d$ the the two annuli become almost coincident. The picture suggests nevertheless that this can be achieved also for $\Delta$'s that grow slower than $2\sqrt{d}$ and experiments corroborate this idea. For Figure below we considered two Gaussians in dimension $d=1000$, sampled 100 points from each of them, and plotted the distribution of the sample's mutual distances.

Indeed, the distances of points that belong to the same Gaussian accumulate around $\sqrt{2d}\approx44.72$. This suggests that the other ‘bump’ in the picture belongs to those pairs of points which come from different Gaussians. In our example we have a distance of $\Delta\approx31.62$ between the Gaussians' centers and $2\sqrt{d}\approx63.25$. This shows that we are in the situation of Figure, i.e., the Gaussians overlap. The distribution of mutual distances suggest that it nevertheless should be possible to disentangle them with high accuracy. Indeed, if we pick for a start one point at random and then take its 100 nearest neighbors, Figure suggests that our odds are good that these 100 points will belong to one of the Gaussians and the rest of the points to the other.

Our aim now is to make the above formal. We start by computing the expected values for the distance between points that belong to different Gaussians.

Theorem

Let $\mu_1$, $\mu_2\in\mathbb{R}^d$ and $\Delta:=\|\mu_1-\mu_2\|$. Let $X_1\sim\mathcal{N}(\mu_1,1,\mathbb{R}^d)$ and $X_2\sim\mathcal{N}(\mu_2,1,\mathbb{R}^d)$ be random vectors.

• $\forall\:d\geqslant1\colon\bigl|\E\bigl(\|X_1-X_2\|-\sqrt{\Delta^2+2d}\bigr)\bigr|\leqslant \medfrac{3d+8\Delta^2+\sqrt{24}\Delta d^{1/2}}{2(\Delta^2+2d)^{3/2}}$.
• $\forall\:d\geqslant1\colon\V(\|X_1-X_2\|)\leqslant \Bigl(\medfrac{3d+8\Delta^2+\sqrt{24}\Delta d^{1/2}}{2(\Delta^2+2d)^{3/2}}\Bigr)^2 + \medfrac{3d+8\Delta^2+\sqrt{24}\Delta d^{1/2}}{\Delta^2+2d}$.

(i) Let $X_1$, $X_2\colon\Omega\rightarrow\mathbb{R}^d$ be as above. We define the auxiliary random vector $\tilde{X}_1:=\mu_2+X_1-\mu_1$. Then $\tilde{X}_1\sim\mathcal{N}(\mu_2,1,\mathbb{R}^d)$ holds. Moreover, $\tilde{X}_1$ and $X_2$ are independent. For a fixed $\omega\in\Omega$ we get the following picture for the values $x_1:=X_1(\omega)$, $x_2:=X_2(\omega)$ and $\tilde{x}_1:=\tilde{X}_1(\omega)\in\mathbb{R}^d$. Firstly, in view of Theorem we may assume that $x_1$ will be located near the surface of a ball with radius $\sqrt{d}$ centered at $\mu_1$ and that $x_2$ and $\tilde{x}_1$ will both be located near the surface of a ball with radius $\sqrt{d}$ centered at $\mu_2$. By definition of $\tilde{x}_1$ the lines connecting $\mu_1$ with $x_1$ and $\mu_2$ with $\tilde{x}_1$, respectively, will be parallel. Moreover, if we think of a coordinate system in which $\mu_2$ is the origin, then we may expect that $\tilde{x}_1$ and $x_2$ have a distance of approximately $\sqrt{2d}$, compare Theorem. Finally, we think of the line going from $\mu_2$ to $\mu_1$ marking the north pole of $\B(\mu_2,\sqrt{d})$. Then Theorem suggests that $\tilde{x}_1$ and $x_2$ will be located close to the equator of $\B(\mu_2,\sqrt{d})$, since the scalar products $\langle{}\tilde{x}_1-\mu_2,\mu_1-\mu_2\rangle{}$ and $\langle{}x_2-\mu_2,\mu_1-\mu_2\rangle{}$ both will be close to zero. In the triangle given by all three points we thus may expect that the angle $\theta$ will be close to $90^{\circ}$ which implies that $\|x_1-x_2\|^2\approx\Delta^2+2d$ should hold.

Following the above intuition, we will now formally use the cosine law and our results from Chapter The curse of high dimensions to compute the expectation. We put $\xi:=\mu_1-\mu_2$ and start with

[$] $$\label{COS-LAW} \begin{array}{rl} \|X_1-X_2\|^2\hspace{-7pt}\,& = \|X_2-\tilde{X}_1\|^2+\|X_1-\tilde{X}_1\|^2 - 2\|X_2-\tilde{X}_1\|\|\tilde{X}_1-X_1\|\cos(\theta)\\ & = \|X_2-\tilde{X}_1\|^2+\|\mu_1-\mu_2\|^2 - 2\langle{}X_2-\tilde{X}_1,X_1-\tilde{X}_1\rangle{}\\ & = \|X_2-\tilde{X}_1\|^2+\Delta^2 -2(\langle{}X_2-\mu_2,\xi\rangle{}+ \langle{}X_1-\mu_1,-\xi\rangle{})=:(\circ) \end{array}$$ [$]
where we know $\E(\|X_2-\tilde{X}_1\|^2)=2d$ since $\tilde{X}_1\sim\mathcal{N}(\mu_2,1,\mathbb{R}^d)$ by EXP-NORM-SQUARED. Moreover, by Theorem we get $\E(\langle{}X_2-\mu_2,\xi\rangle{})=\E(\langle{}X_1-\mu_1,-\xi\rangle{})=0$ which leads to

[$] \E(\|X_1-X_2\|^2)=2d + \Delta^2 + 2(0 - 0) = \Delta+2d. [$]
Now we estimate the variance of $\|X_1-X_2\|^2$ but we have to be careful as the three non-constant expressions in \eqref{COS-LAW} are not independent. Indeed, from the second line of \eqref{COS-LAW} we get

[] \begin{align*} \V(\|X_1-X_2\|^2) & = \V(\|X_2-\tilde{X}_1\|^2 + \Delta^2 - 2\langle{}X_2-\tilde{X}_1,X_1-\tilde{X}_1\rangle{})\\ & = \V(\|X_2-\tilde{X}_1\|^2) + 4\V(\langle{}X_2-\tilde{X}_1,X_1-\tilde{X}_1\rangle{})\\ & + \Cov(\|X_2-\tilde{X}_1\|^2,-2\langle{}X_2-\tilde{X}_1,X_1-\tilde{X}_1\rangle{})\\ & \leqslant \V(\|X_2-\tilde{X}_1\|^2) + 4\V(\langle{}X_2-\tilde{X}_1,X_1-\tilde{X}_1\rangle{})\\ & + \bigl(\V(\|X_2-\tilde{X}_1\|^2)\cdot\V(-2\langle{}X_2-\tilde{X}_1,X_1-\tilde{X}_1\rangle{})\bigr)^{1/2}=:(*) \end{align*} []
where we know, see Problem, that $\V(\|X_2-\tilde{X}_1\|^2)\leqslant 3d$ holds. For the second term under the root we compute

[] \begin{align*} \V(\langle{}X_2-\tilde{X}_1,X_1-\tilde{X}_1\rangle{}) & = \V(\langle{}X_2-\mu_2,\mu_1-\mu_2\rangle{} + \langle{}X_1-\mu_1,\mu_2-\mu_1\rangle{} )\\ & = \V(\langle{}X_2-\mu_2,\mu_1-\mu_2\rangle{}) + \V(\langle{}X_1-\mu_1,\mu_2-\mu_1\rangle{} )\\ & \leqslant 2\|\mu_1-\mu_2\|^2 \end{align*} []
where we use $Z:=X_i-\mu_i\sim\mathcal{N}(0,1,\mathbb{R}^d)$, $\xi:=\pm(\mu_1-\mu_2)$ together with Theorem to get $\V(\langle{}Z,\xi\rangle{}) = \|\xi\|^2$. This allows us to continue the estimate of the variance as follows

[$] (*) \leqslant 3d+8\|\mu_1-\mu_2\|^2 + (3d\cdot8\|\mu_1-\mu_2\|^2)^{1/2}= 3d+8\Delta^2+\sqrt{24}\Delta d^{1/2}. [$]
Now we adapt the method used in the proof of Theorem and split

[$] \|X_1-X_2\|-\sqrt{\Delta^2+2d} = \medfrac{\|X_1-X_2\|^2-(\Delta^2+2d)}{2\sqrt{\Delta^2+2d}} - \medfrac{(\|X_1-X_2\|^2-(\Delta^2+2d))^2}{2\sqrt{\Delta^2+2d}(\|X_1-X_2\|+\sqrt{\Delta^2+2d})^2} [$]
where we know that the expectation of the first term is zero. The expectation of the second term we estimate by

[$] 0\leqslant \E\Bigl(\medfrac{(\|X_1-X_2\|^2-(\Delta^2+2d))^2}{2\sqrt{\Delta^2+2d}(\|X_1-X_2\|+\sqrt{\Delta^2+2d})^2}\Bigr)\leqslant \medfrac{\V(\|X_1-X_2\|^2)}{2(\Delta^2+2d)^{3/2} }\leqslant \medfrac{3d+8\Delta^2+\sqrt{24}\Delta d^{1/2}}{2(\Delta^2+2d)^{3/2} } [$]
where we used our previous estimate for $\V(\|X_1-X_2\|^2)$. This establishes (i).

(ii) Finally we get

[] \begin{align*} \V(\|X_1-X_2\|) &= \bigl|\E\bigl((\|X_1-X_2\|)^2\bigr) - \bigl(\E(\|X_1-X_2\|)\bigr)^2\bigr|\\ & = \bigl|(\Delta^2+2d) - \bigl[\E\bigl(\|X_1-X_2\|-\sqrt{\Delta^2+2d}\bigr)+\sqrt{\Delta^2+2d}\bigr]^2\bigr|\\ & = \bigl|(\Delta^2+2d) -\bigl[\bigl(\E\bigl(\|X_1-X_2\|-\sqrt{\Delta^2+2d}\bigr)\bigr)^2\\ &+2\E\bigl(\|X_1-X_2\|-\sqrt{\Delta^2+2d}\bigr)\sqrt{\Delta^2+2d}+(\Delta^2+2d)\bigr]\bigr|\\ & \leqslant \bigl|\E\bigl(\|X_1-X_2\|-\sqrt{\Delta^2+2d}\bigr)\bigr|^2\\ & + 2\bigr|\E\bigl(\|X_1-X_2\|-\sqrt{\Delta^2+2d}\bigr)\bigr|\sqrt{\Delta^2+2d} \end{align*} []
which shows (ii) by employing twice the estimate from (i).

In the following results we understand $\Delta=\Delta(d)$ as a function of the dimension. To keep the notation short we will however drop the ‘of $d$’ most of the time.

Corollary

Let $\mu_1$, $\mu_2\in\mathbb{R}^d$ and $\Delta:=\|\mu_1-\mu_2\|$. Let $X_1\sim\mathcal{N}(\mu_1,1,\mathbb{R}^d)$ and $X_2\sim\mathcal{N}(\mu_2,1,\mathbb{R}^d)$ be random variables. Assume either that there exists $d_0\geqslant1$ such that $\Delta\geqslant2\sqrt{d}$ holds for all $d\geqslant d_0$ or that there exists $d_0\geqslant1$ such that $\Delta \lt 2\sqrt{d}$ holds for all $d\geqslant d_0$. Then

[$] \lim_{d\rightarrow\infty}\E\bigl(\|X_1-X_2\|-\sqrt{\Delta^2+2d}\bigr)=0 \;\;\text{ and }\;\; \limsup_{d\rightarrow\infty}\V\bigl(\|X_1-X_2\|\bigr)\leqslant23. [$]

We start with the first scenario, assume $\Delta\geqslant2\sqrt{d}$, i.e., $d\leqslant\Delta^2/4$, and estimate

[$] \medfrac{3d+8\Delta^2+\sqrt{24}\Delta d^{1/2}}{2(\Delta^2+2d)^{3/2}} \leqslant \medfrac{(3/4)\Delta^2+8\Delta^2+\sqrt{6}\Delta^2}{2(\Delta^2)^{3/2}}\leqslant\medfrac{3/4+8+\sqrt{6}}{4\sqrt{d}}\xrightarrow{d\rightarrow\infty}0. [$]
For the second scenario assume $\Delta \lt 2\sqrt{d}$. Then

[$] \medfrac{3d+8\Delta^2+\sqrt{24}\Delta d^{1/2}}{2(\Delta^2+2d)^{3/2}} \leqslant \medfrac{3d+32d+2\sqrt{24}d}{2(2d)^{3/2}} = \medfrac{17+\sqrt{24}}{2\sqrt{2d}}\xrightarrow{d\rightarrow\infty}0 [$]
holds. This shows that the expectation tends to zero. For the variance we get from the above that the first term will tend to zero and it thus remains to bound the second. In the first scenario we estimate

[$] \medfrac{3d+8\Delta^2+\sqrt{24}\Delta d^{1/2}}{\Delta^2+2d}\leqslant\medfrac{(3/4+8+\sqrt{6})\Delta^2}{\Delta^2+2d}\leqslant\medfrac{12}{1+(2d/\Delta^2)}\leqslant 12 [$]
and in the second

[$] \medfrac{3d+8\Delta^2+\sqrt{24}\Delta d^{1/2}}{\Delta^2+2d} \leqslant\medfrac{45d}{\Delta^2+2d}= \medfrac{45}{(\Delta^2/d)+2}\leqslant \medfrac{45}{2} [$]
which finishes the proof.

The above suggests that if we pick two points $x$ and $y$ from Gaussians with different centers at random, then we have to expect that $\|x-y\|\approx\sqrt{\Delta^2+2d}$ holds for large $d$ and that the distribution does not spread out when $d$ increases. On the other hand we know already from Chapter The curse of high dimensions that $\|x-y\|\approx\sqrt{2d}$ for large $d$ provided that $x$ and $y$ are sampled from the same Gaussian. This implies that the question if the two Gaussians can be separated, requires that the distance $\sqrt{\Delta^2+2d}-\sqrt{2d}$ between the two expectational values is large enough. For the two scenarios covered by Corollary we get the following.

Lemma

Let $\Delta\colon\mathbb{N}\rightarrow(0,\infty)$ and $\delta\colon\mathbb{N}\rightarrow(0,\infty)$, $\delta(d):=\sqrt{\Delta^2+2d}-\sqrt{2d}$.

• If there exists $d_0\geqslant1$ such that $\Delta\geqslant2\sqrt{d}$ holds for all $d\geqslant d_0$, then $\delta(d)\geqslant\sqrt{d}$ holds for $d\geqslant d_0$.
• If there exists $d_0\geqslant1$, $c \gt 0$ and $\alpha\geqslant0$ such that $cd^{1/4+\alpha}\leqslant\Delta \lt 2\sqrt{d}$ holds for all $d\geqslant d_0$, then $\delta(d)\geqslant (c^2/4)d^{2\alpha}$ holds for $d\geqslant d_0$.

(i) In this case we compute

[$] \delta(d)=\sqrt{\Delta^2+2d}-\sqrt{2d} \geqslant \sqrt{4d+2d}-\sqrt{2d} = (\sqrt{6}-\sqrt{2})\sqrt{d}\geqslant\sqrt{d}. [$]
(ii) Using $\Delta^2\leqslant4d$ and $\Delta \gt cd^{1/4+\alpha}$ we get

[$] \delta(d)=\medfrac{\Delta^2}{\sqrt{\Delta^2+2d}+\sqrt{2d}}\geqslant\medfrac{(cd^{1/4+\alpha})^2}{\sqrt{6d}+\sqrt{2d}}\geqslant \medfrac{c^2d^{2\alpha}}{(\sqrt{6}+\sqrt{2})}\geqslant \medfrac{c^2}{4}\cdot d^{2\alpha} [$]
as claimed.

We will see later how Lemma outlines for the situation sketched in Figure, how fast $\Delta$ needs to grow in order to separate two Gaussians. Before we discuss this, we need however the following explicit probability estimate complementing our results in Theorem and Corollary on expectation and variance.

Theorem

Let $\mu_1$, $\mu_2\in\mathbb{R}^d$ and let $\Delta:=\|\mu_1-\mu_2\| \gt 0$. Let $x_1$ and $x_2$ be drawn at random with respect to Gaussian distribution with unit variance and means $\mu_1$ and $\mu_2$, respectively. Then

[$] \P\bigl[\bigl|\|x_1-x_2\|-\sqrt{\Delta^2+2d}\bigr|\geqslant\epsilon\bigr] \leqslant \medfrac{54}{\epsilon}+\medfrac{8}{\sqrt{d}}+\medfrac{20}{\epsilon\sqrt{d}} [$]
holds for $\epsilon \gt 54$ and $d\geqslant\epsilon^2/9$.

Formally, we consider random variables $X_i\sim\mathcal{N}(\mu_i,1,\mathbb{R}^d)$ for $i=1,2$ and we estimate

[$] P:=\P\bigl[\bigl|\|X_1-X_2\|-\sqrt{\Delta^2+2d}\bigr|\geqslant\epsilon\bigr] [$]
by the same trick that we used already in Theorem and Theorem, namely by multiplying the left side of estimate in the square brackets by $\|X_1-X_2\|+\sqrt{\Delta^2+2d}$ and the right side by $\sqrt{\Delta^2+2d}$. This way we get

[$] P \leqslant \P\bigl[\bigl|\|X_1-X_2\|^2-(\Delta^2+2d)\bigr|\geqslant\epsilon\sqrt{\Delta^2+2d}\bigr]=:(\circ). [$]
Now we introduce the auxiliary random variable $\tilde{X}_1:=\mu_2+X_1-\mu_1\sim\mathcal{N}(\mu_2,1,\mathbb{R}^d)$ and formula \eqref{COS-LAW} that we derived from the cosine law to get

[] \begin{align*} (\circ)& = \P\bigl[\bigl|\|X_1-X_2\|^2-(\Delta^2+2d)\bigr|\geqslant\epsilon\sqrt{\Delta^2+2d}\bigr]\\ & = 1 - \P\bigl[-\epsilon\sqrt{\Delta^2+2d}\leqslant\|X_2-\tilde{X}_1\|^2+\Delta^2-2\bigl(\langle{}X_2-\mu_2,\mu_1-\mu_2\rangle{}\\ & +\langle{}X_1-\mu_1,\mu_2-\mu_1\rangle{}\bigr)-\Delta^2-2d\leqslant\epsilon\sqrt{\Delta^2+2d}\bigr]\\ & \leqslant 1 - \P\bigl[-\medfrac{\epsilon\sqrt{\Delta^2+2d}}{3}\leqslant\|X_2-\tilde{X}_1\|^2-2d\leqslant\medfrac{\epsilon\sqrt{\Delta^2+2d}}{3}\bigr]\\ & \cdot\P\bigl[-\medfrac{\epsilon\sqrt{\Delta^2+2d}}{3}\leqslant-2\langle{}X_2-\mu_2,\mu_1-\mu_2\rangle{}\leqslant\medfrac{\epsilon\sqrt{\Delta^2+2d}}{3}\bigr]\\ & \cdot\P\bigl[-\medfrac{\epsilon\sqrt{\Delta^2+2d}}{3}\leqslant-2\langle{}X_1-\mu_1,\mu_2-\mu_1\rangle{}\leqslant\medfrac{\epsilon\sqrt{\Delta^2+2d}}{3}\bigr]\\ & \leqslant 1 - \P\bigl[\bigl|\|X_2-\tilde{X}_1\|^2-2d\bigr|\leqslant\medfrac{\epsilon\sqrt{2d}}{3}\bigr]\cdot\P\bigl[|\langle{}Z,\xi\rangle{}|\leqslant\medfrac{\epsilon\sqrt{\Delta^2}}{6}\bigr]^2 =:(*) \end{align*} []
where we use $Z:=X_i-\mu_i\sim\mathcal{N}(0,1,\mathbb{R}^d)$ and $\xi:=\mu_1-\mu_2$. In order to continue we need to estimate both probabilities in $(*)$ from below. From Corollary we get for $\epsilon/3 \gt 18$ and $d\geqslant(\epsilon/3)^2$ the estimate

[$] \P\bigl[\bigl|\|X_2-\tilde{X}_1\|^2-2d\bigr|\leqslant\medfrac{\epsilon\sqrt{2d}}{3}\bigr]\geqslant1-\bigl(\medfrac{18}{\epsilon/3}+\medfrac{8}{\sqrt{d}}\bigr)=1-\bigl(\medfrac{54}{\epsilon}+\medfrac{8}{\sqrt{d}}\bigr). [$]
Using Corollary we get

[$] \P\bigl[|\langle{}Z,\xi\rangle{}|\leqslant\medfrac{\epsilon\sqrt{\Delta^2}}{6}\bigr]\geqslant1-\medfrac{4}{\sqrt{2\pi}}\medfrac{\|\xi\|}{(\epsilon\Delta/6)\sqrt{d}} = 1-\medfrac{24}{\sqrt{2\pi}\epsilon\sqrt{d}}\geqslant1-\medfrac{10}{\epsilon\sqrt{d}}. [$]
Combining both leads to

[] \begin{align*} (*) & = 1 - \P\bigl[\bigl|\|X_2-\tilde{X}_1\|^2-2d\bigr|\leqslant\medfrac{\epsilon\sqrt{2d}}{3}\bigr]\cdot\P\bigl[\bigl|\langle{}Z,\xi\rangle{}\bigr|\leqslant\medfrac{\epsilon\sqrt{\Delta^2}}{6}\bigr]^2\\ &\leqslant 1-\Bigl[1-\bigl(\medfrac{54}{\epsilon}+\medfrac{8}{\sqrt{d}}\bigr)\Bigr]\Bigl[1-2\cdot\medfrac{10}{\epsilon\sqrt{d}}+\bigl(\medfrac{10}{\epsilon\sqrt{d}}\bigr)^2\Bigr]\\ &\leqslant 1-\Bigl[1-\bigl(\medfrac{54}{\epsilon}+\medfrac{8}{\sqrt{d}}\bigr)\Bigr]\Bigl[1-\medfrac{20}{\epsilon\sqrt{d}}\Bigr]\\ &\leqslant 1- \Bigl[1-\bigl(\medfrac{54}{\epsilon}+\medfrac{8}{\sqrt{d}}\bigr)-\medfrac{20}{\epsilon\sqrt{d}}\Bigr]\\ &=\medfrac{54}{\epsilon}+\medfrac{8}{\sqrt{d}}+\medfrac{20}{\epsilon\sqrt{d}} \end{align*} []
which finishes the proof.

The following is the core result on separability as we can use it to see that points which have ‘small’ mutual distance belong to the same Gaussian with high probability.

Theorem

(Separation Theorem) Let $\mu_1$, $\mu_2\in\mathbb{R}^d$ and put $\Delta:=\|\mu_1-\mu_2\|$. Let $\epsilon_1 \gt 18$ and $\epsilon_2 \gt 54$ be constant and assume that there is $d_0\geqslant1$ such that $\sqrt{\Delta^2+2d}-\sqrt{2d} \gt \epsilon_1+\epsilon_2$ holds for $d\geqslant d_0$. Let $X_i\sim\mathcal{N}(\mu_i,1,\mathbb{R}^d)$ and $S_i:=\{x_i^{\scriptscriptstyle(1)},\dots,x_i^{\scriptscriptstyle(n)}\}$ be samples of $X_i$ for $i=1,2$ such that $S_1\cap S_2=\emptyset$. Let $x,y\in S_1\cup S_2$. Then

[$] \liminf_{d\rightarrow\infty}\;\P\bigl[x,\,y \text{ come from same Gaussian}\:\big|\:|\|x-y\|-\sqrt{2d}| \lt \epsilon_1 \bigr]\geqslant\medfrac{1-18/\epsilon_1}{1+54/\epsilon_2} [$]
holds.

On the basis of our prior experiments, see Figure, and in view of Theorem and Corollary we expect that the mutual distances will accumulate around the values $\sqrt{2d}$ and $\sqrt{\Delta^2+2d}$. Our assumptions imply $\sqrt{2d}+\epsilon_1 \lt \sqrt{\Delta^2+2d}-\epsilon_2$ which guarantees that $\Bbar(\sqrt{2d},\epsilon_1)$ and $\Bbar(\sqrt{\Delta^2+2d},\epsilon_2)$ have empty intersection, i.e., there is some space between the two ‘bumps’ sketched in Figure below.

To keep notation short let us abbreviate $x\sim y$ for the case that $x$ and $y$ come from the same Gaussian, i.e., if $x,\,y\in S_1$ or $x,\,y\in S_2$. Consequently, $x\not\sim y$ means $x\in S_1, y\in S_2$ or $x\in S_2,\,y\in S_1$. We use Bayes Theorem to compute the conditional probability

[$] \P\bigl[x\sim y\:\big|\:\bigl|\|x-y\|-\sqrt{2d}\bigr| \lt \epsilon_1\bigr] = \frac{\P\bigl[\bigl|\|x-y\|-\sqrt{2d}\bigr| \lt \epsilon_1 \:\big|\:x\sim y\bigr]\cdot\P[x\sim y]}{\P\bigl[\bigl|\|x-y\|-\sqrt{2d}\bigr| \lt \epsilon_1\bigr]}=:(\circ) [$]
and continue with the denominator as follows

[] \begin{align*} \P\bigl[\bigl|\|x-y\|-\sqrt{2d}\bigr| \lt \epsilon_1\bigr] & = \P\bigl[\bigl|\|x-y\|-\sqrt{2d}\bigr| \lt \epsilon_1\:\big|\:x\sim y\bigr]\cdot\P[x\sim y]\\ & + \P\bigl[\bigl|\|x-y\|-\sqrt{2d}\bigr| \lt \epsilon_1\:\big|\:x\not\sim y\bigr]\cdot\P[x\not\sim y]\\ & \leqslant 1\cdot\medfrac{1}{2}+\bigl(1-\P\bigl[\bigl|\|x-y\|-\sqrt{2d}\bigr|\geqslant\epsilon_1\:\big|\:x\not\sim y\bigr]\bigr)\cdot\medfrac{1}{2}\\ & \leqslant\medfrac{1}{2}\cdot\Bigl(1+1-\P\bigl[\bigl|\|x-y\|-\sqrt{\Delta^2+2d}\bigr| \lt \epsilon_2\:\big|\:x\not\sim y\bigr]\Bigr)\\ & \leqslant\medfrac{1}{2}\cdot\Bigl(1+\P\bigl[\bigl|\|x-y\|-\sqrt{\Delta^2+2d}\bigr|\geqslant\epsilon_2\:\big|\:x\not\sim y\bigr]\Bigr)\\ & \leqslant\medfrac{1}{2}\cdot\Bigl(1+\medfrac{54}{\epsilon_2}+\medfrac{8}{\sqrt{d}}+\medfrac{20}{\epsilon_2\sqrt{d}}\Bigr)\\ \end{align*} []
where we employed $\P[x\not\sim y]=\medfrac{1}{2}$, the fact that $\Bbar(\sqrt{2d},\epsilon_1)\cap\Bbar(\sqrt{\Delta^2+2d},\epsilon_2)=\emptyset$ and the estimate from Theorem. Using $\P[x\sim y] =1/2$ and the estimate from Theorem to treat the numerator of $(\circ)$ we get

[$] $$\label{SEP-EQ-1} \P\bigl[x\sim y\;\big|\;\bigl|\|x-y\|-\sqrt{2d}\bigr| \lt \epsilon_1\bigr] \geqslant \frac{1-\frac{18}{\epsilon_1}-\frac{8}{\sqrt{d}}}{1+\frac{54}{\epsilon_2}+\frac{8}{\sqrt{d}}+\frac{20}{\epsilon_2\sqrt{d}}}$$ [$]
and letting $d\rightarrow\infty$ finishes the proof.

Notice that in order to apply Theorem we need that $\delta=\sqrt{\Delta^2+2d}-\sqrt{2d}\geqslant\epsilon_1+\epsilon_2 \gt 72$ holds. Here, $\delta=\delta(d)$ can for example be large and bounded or even tend to infinity. If the latter is the case, we may in \eqref{SEP-EQ-1} consider $\epsilon_2\rightarrow\infty$ as well. We state concrete examples for this below.

Corollary

Let $\epsilon_1 \gt 18$ be constant, $\epsilon_2=d^{\alpha}$ and $\Delta=2d^{1/4+\alpha}$ with $\alpha \gt 0$. Then the assumptions of Theorem are met and we have

[$] \liminf_{d\rightarrow\infty}\;\P\bigl[x,\,y \text{ come from same Gaussian}\:\big|\:|\|x-y\|-\sqrt{2d}| \lt \epsilon_1 \bigr]\geqslant1-\medfrac{18}{\epsilon_1}. [$]

We first consider the case $\alpha\geqslant1/4$. Then by Lemma(i) we get that $\delta\geqslant d^{1/2} \gt \epsilon_1+d^{1/4}$ holds for large $d$. We may thus proceed as in the proof of the previous theorem and at its end we see, since $\epsilon_2\rightarrow\infty$ for $d\rightarrow\infty$, that the limit inferior is bounded from below by $1-18/\epsilon_1$.

Let now $\alpha \lt 1/4$. Then we apply Lemma(ii) and get that $\delta\geqslant (2^2/4)d^{2\alpha} \gt \epsilon_1+d^{\alpha}$ for large $d$. From this point on we can proceed as in the first part.

We conclude this chapter by running the separation algorithm suggested by our previous results with the parameters outlined in Corollary. That is, we consider two $d$-dimensional Gaussians whose centers have distance $\Delta=\Delta(d)$ and sample from each of them 100 points. Then we pick one data point at random and label its 100 nearest neighbors with $0$, the rest with $1$. Finally we check how many of the points with the same label came from the same Gaussian. The charts below show the rate of correctly classified points for different choices of $\Delta$.

We leave it as Problem to verify the above and we mention that for $\Delta=2\sqrt{d}$ in experiments the rate of correctly classified points turned out to be one for all dimensions. Finally let us look at the the distribution of mutual distances in a case where $\Delta$ is (too) small.

The pictures in Figure show the distribution of mutual distances between 200 points sampled from two different Gaussians in $\mathbb{R}^{1000}$. In the left picture the distance between their means is 25 and in the right picture it is 30. In the experiment that lead to the right picture our algorithm still correctly classified 98% of the points, whereas in the experiment underlying the left picture we only got 85% right. Notice that the threshold identified in Corollary is $2d^{1/4}=20$.

## General references

Wegner, Sven-Ake (2024). "Lecture Notes on High-Dimensional Data". arXiv:2101.05841 [math.FA].