Data are spread uniformly in the unit hypercube . A nearest-neighbour method uses a small cube around each point that contains 1% of the data. What edge length must that cube have for , and , and what does this say about local methods in high dimensions?
Foundations, Curse of dimensionality
Level L2 Elementary. Length Medium. Nature Th+Mat Both.
What's being asked
Whether you can turn the vague phrase “curse of dimensionality” into a concrete calculation and draw the right conclusion.
Key idea
A cube with edge length inside has volume , so it holds a fraction of uniform data. To hold a fraction we need . As grows this tends to 1, so a “local” neighbourhood stops being local.
Steps
- Set up the equation. A cube of edge has volume . Setting gives .
- Plug in . For : . For : . For : .
- Interpret. In 10 dimensions, to catch just 1% of the data you must cover 63% of the range of every feature. The “nearest” neighbours are far away, so averaging them is no longer a local estimate, and the bias of k-NN grows.
- Give a second view. The fraction of the cube within 0.05 of its boundary is . This is 0.1 for , about 0.65 for and about 0.99997 for . Almost every point is near an edge, where prediction becomes extrapolation.
- State the consequence. To keep the same density of samples, must grow exponentially with : if points are enough in one dimension, you need about . Remedies are feature selection, dimensionality reduction, and models with strong built-in structure. Real data usually lie near a low-dimensional curved surface (a manifold), which is why learning still works.
Common mistakes
- Writing or instead of .
- Concluding that learning in high dimensions is hopeless. The calculation assumes uniform data, and real data are far from uniform.
- Leaving out the practical symptom: distances concentrate, so the nearest and the farthest neighbour end up at almost the same distance.
How long your answer should be
3–4 minutes: the formula, the three numbers, then two sentences of interpretation.
Last checked on 4 December 2026.
Read this
Previous in Foundations: What is -fold cross-validation, how do the bias and the computation cost of the error estimate change with , and why are and the usual choices?
Next in Foundations: What is pool-based active learning, and if a three-class classifier outputs predicted probabilities , and for unlabelled points , and , which point do least-confidence and margin sampling query first?