The curse of dimensionality, from the distance side
What it is
As dimensions grow, the distance from a point to its nearest neighbour and to its farthest neighbour converge. The *contrast* between near and far — the thing every distance-based method relies on — decays towards zero, and nearly all of a high-dimensional ball's volume sits in a thin shell at its surface.
Why it matters
It is the reason k-nearest-neighbours, k-means, DBSCAN, LOF and every kernel method stop working on wide data long before they run out of memory. They do not error; they return answers in which 'nearest' has stopped meaning anything.
In the real world: Why similarity search over thousands of product attributes gets worse, not better, as columns are added.
Visual example
Curse of dimensionalityRelative distance contrast (max - min) / min over 2,000 Gaussian points, against dimension. Past about d = 50, every point is roughly equidistant.
The same effect, by volume
Fraction of a unit ball within 10% of its surface = 1 - 0.9**d
d = 2 -> 0.19 d = 10 -> 0.65
d = 50 -> 0.995 d = 100 -> 1.000
So nearly every point is at nearly the maximum radius: all far, all equally far
Why this matters
Dimensionality reduction is not mainly about disk space. It is about moving data back into a regime where the word 'nearby' has content, which is a precondition for everything in the next two modules.
Common misconception
Wrong idea: high dimensions just make things slower.
Correct idea: they make distance uninformative. Speed you can buy; a metric in which the nearest point is 3% closer than the farthest one cannot be rescued with more compute.
import numpy as np
rng = np.random.default_rng(0)
for d in (2, 10, 100, 1000):
X = rng.standard_normal((2000, d))
q = rng.standard_normal(d)
dist = np.linalg.norm(X - q, axis=1)
contrast = (dist.max() - dist.min()) / dist.min()
print(f"d={d:>5} nearest={dist.min():7.2f} "
f"farthest={dist.max():7.2f} contrast={contrast:5.2f}")
# Volume: the fraction of a unit ball within 10% of its surface is 1 - 0.9**d.
[(d, round(1 - 0.9 ** d, 3)) for d in (2, 10, 50, 100)]Reading a high-dimensional nearest-neighbour result as meaningful because the code ran and the numbers differed. At d = 500 the nearest and farthest points in a sample are within a few percent of each other, so the ranking is dominated by sampling noise. Reduce dimensions, or use a metric that is not Euclidean, before trusting a neighbourhood.