ElemedexA pocket encyclopedia of AI architectures

Glossary (TM) › Minimal mathematics

TM037

Curse of dimensionality

Also: distance concentration

In Spanish: Maldición de la dimensionalidad

The family of problems that arise when data have many dimensions: the examples needed grow exponentially and distances stop discriminating.

Richard Bellman coined the phrase in the late 1950s while working on dynamic programming (Bellman, 1957): tabulating a function of d variables, with n values per variable, takes nᵈ cells. In machine learning the curse has several faces beyond the geometric strangeness of high-dimensional spaces.

Data. Covering the space at the same density takes ever more examples. Langley and Sage (1997) showed that, to reach a given level of performance, an instance-based learner needs a number of cases that grows exponentially with the number of attributes (Witten et al., 2017, p. 331); this is why nearest neighbors is so vulnerable to irrelevant attributes (2017, p. 289).

Distances. With many independent coordinates, distances concentrate. Tiny example: between two random points in the unit cube, the squared distance has mean d/6 and standard deviation ≈ 0.2·√d; its relative spread falls as 1/√d, from 84% at d = 2 to 4% at d = 768. Beyer and colleagues (1999) showed that, under broad conditions, the nearest and the farthest neighbor become almost equidistant, and "the nearest" loses its meaning. In practice, before clustering 384-dimensional embeddings, Alammar & Grootendorst (2024) reduce them to 5 dimensions and use cosine similarity: Euclidean methods struggle in high dimensions (2024, pp. 140–142).

The way out is that natural data do not fill the space: what counts is their intrinsic dimension, not the apparent one (see manifold hypothesis).

A philosophical angle. The curse complicates a common criticism, that networks "only interpolate." In high dimensions almost no test case falls inside the convex hull of the training data: measured over pixels, nearly everything would be extrapolation. Buckner (2024) concludes that interpolation and extrapolation are relative to the features and the distance metric one chooses, and that this choice must be justified (2024, pp. 222–224).

Sources

  • Alammar, J., & Grootendorst, M. (2024). Hands-on large language models: Language understanding and generation. O’Reilly Media. §
  • Buckner, C. J. (2024). From deep learning to rational machines: What the history of philosophy can teach us about the future of artificial intelligence. Oxford University Press. https://doi.org/10.1093/oso/9780197653302.001.0001 §
  • Witten, I. H., Frank, E., Hall, M. A., & Pal, C. J. (2017). Data mining: Practical machine learning tools and techniques (4th ed.). Morgan Kaufmann. https://doi.org/10.1016/C2015-0-02071-8 §