# Curse of Dimensionality

*11 September 2017*

Curse of dimensionality usually refers to the fact that as the dimensionality of the data increases, it becomes exponentially more difficult to search, sample from the posterior, optimize, etc.

First, some some examples to illustrate the weirdness (or unintuitive nature) of a high-dimensional space.
Then, some examples of difficulties when working in a high-dimensional space.

## Weirdness of High-Dimensional Space

### Ball in a Cube

The volume of an -cube with sides of length is .
The volume of an -ball with a radius is .
If an -ball is inscribed inside an -cube, , i.e.
\begin{align}
\frac{V_{n, \text{ball}}}{V_{n, \text{cube}}} &= \frac{\frac{r^n \pi^{n / 2}}{\Gamma(n / 2 + 1)}}{s^n} \\
&= \frac{\pi^{n / 2}}{2^n \Gamma(n / 2 + 1)}
\end{align}
where is the Gamma function.
This increases for a bit but then decreases exponentially to zero.

### Balls in the Corners of a Cube

Consider an -cube with sides of length with the center at .
There are -cubes with sides of length with centers at .
Hence, we can inscribe -balls inside this small cubes, each with radius .
The distance from to the any of the ball centers is .
Hence we can inscribe a ball with the center at and radius without going in any of the other balls.

For , this means that the center ball has radius and touches the sides of the original cube.
For , the center ball bulges out of the original cube without going in any of the other balls.

### Orange Peel

Consider an -ball (an orange) with radius whose peel has thickness .
The volume of the peel is
\begin{align}
V_{\text{peel}} &= \frac{\pi^{n / 2}}{\Gamma(n / 2 + 1)} \left(r^n - (r - \epsilon)^n\right).
\end{align}
Hence the fraction of the peel volume divided by the whole orange is
\begin{align}
\frac{V_{\text{peel}}}{V_{\text{orange}}} &= \frac{\frac{\pi^{n / 2}}{\Gamma(n / 2 + 1)} \left(r^n - (r - \epsilon)^n\right)}{\frac{\pi^{n / 2}}{\Gamma(n / 2 + 1)} r^n} \\
&= \frac{r^n - (r - \epsilon)^n}{r^n} \\
&= 1 - \left(\frac{r - \epsilon}{r}\right)^n.
\end{align}
This quantity goes very quickly to one even for a very thin peel.

### Gaussian Thin Shell

According to this, for a zero-mean, -dimensional normal distribution with variance , the probability mass in the thin shell is .
This goes to one very quickly.

We can also see this by noting that the random variable corresponding to the length of the -dimensional normal random variable, is distributed according to the Chi distribution.
The median of this random variable is .
Its mean is .
Its variance is .
[Finish argument]
A slightly less precise way is to refer to the Central Limit Theorem.

### Typical Set

### Distance of Two Points

## Difficulties when Working in a High-Dimensional Space

### Rejection Sampling

### Importance Sampling

### Metropolis-Hastings

### Optimization

## How to Overcome the Curse of Dimensionality

[back]