mini-module no-code try-without-ai ml-fundamentals ~20 min

The Curse of Dimensionality Der Fluch der Dimensionalität

High-dimensional space does not behave like the space you can draw on paper. Three puzzles to convince you. Hochdimensionaler Raum verhält sich nicht wie der Raum, den du auf Papier zeichnen kannst. Drei Rätsel als Beweis.

What the curse actually isWas der Fluch eigentlich ist

When Richard Bellman coined the phrase "curse of dimensionality" in 1957, he was describing a specific problem in dynamic programming. The name stuck because it captures something more general: as the number of dimensions grows, the geometry of space changes in ways that break nearly every intuition you have built from living in three dimensions.

Als Richard Bellman 1957 den Begriff „Fluch der Dimensionalität“ prägte, beschrieb er ein bestimmtes Problem der dynamischen Programmierung. Der Name blieb, weil er etwas Allgemeineres trifft. Mit wachsender Dimensionszahl verändert sich die Geometrie des Raums. Sie bricht dabei fast jede Intuition, die du aus dem Leben in drei Dimensionen mitbringst.

This is not a metaphor. The mathematics is exact. The effects are counterintuitive in a specific, measurable, reproducible way. The three puzzles below are not trick questions, they have correct numerical answers. Try to guess before you look.

Das ist keine Metapher. Die Mathematik ist exakt. Die Effekte sind auf eine genau messbare und wiederholbare Weise kontraintuitiv. Die drei Rätsel unten sind keine Fangfragen. Sie haben korrekte numerische Antworten. Rate zuerst, bevor du nachsiehst.

Puzzle 1, the vanishing sphereRätsel 1: die verschwindende Kugel

Take a d-dimensional cube with side length 2. Place a d-dimensional sphere of radius 1 inside it, touching all faces. In 2D this is a circle inside a square, taking up 78% of the area. In 3D a ball inside a cube takes up 52%. What happens as d grows?

Nimm einen d-dimensionalen Würfel mit Seitenlänge 2. Leg eine d-dimensionale Kugel mit Radius 1 hinein, die alle Seiten berührt. In 2D ist das ein Kreis in einem Quadrat, und er nimmt 78 % der Fläche ein. In 3D nimmt eine Kugel im Würfel 52 % ein. Was passiert, wenn d wächst?

V_sphere(d) / V_cube(d) = π^(d/2) / (2^d · Γ(d/2 + 1))
π^(d/2)the numerator of the sphere volume formula, grows with dder Zähler der Kugelvolumenformel, wächst mit d
2^dthe cube volume (side = 2), grows exponentially with ddas Würfelvolumen (Seite = 2), wächst exponentiell mit d
Γ(d/2 + 1)the gamma function, grows faster than exponential, ensuring the ratio collapses to zerodie Gammafunktion, wächst schneller als exponentiell und drückt das Verhältnis auf null
Your estimateDeine Schätzung
Consider a 1000-dimensional cube and the sphere inscribed inside it. What percentage of the cube's volume does the sphere occupy? Betrachte einen 1000-dimensionalen Würfel und die Kugel darin. Welchen Prozentsatz des Würfelvolumens nimmt die Kugel ein?
Tip: In d=2 it is 78%. In d=3 it is 52%. Enter a number between 0 and 100. Tipp: Bei d=2 sind es 78 %. Bei d=3 sind es 52 %. Gib eine Zahl zwischen 0 und 100 ein.
%
Sphere/cube volume ratio as dimensions growVerhältnis von Kugel- zu Würfelvolumen bei wachsender Dimension

Puzzle 2, everything is on the surfaceRätsel 2: alles liegt an der Oberfläche

Take a sphere of radius 1 in d dimensions. Now consider a thin shell just inside the surface, the region between radius 0.995 and radius 1 (thickness 0.5% of the radius). What fraction of the sphere's volume is inside this shell?

Nimm eine Kugel mit Radius 1 in d Dimensionen. Betrachte nun eine dünne Schale direkt unter der Oberfläche. Gemeint ist der Bereich zwischen Radius 0,995 und Radius 1. Die Schale ist also 0,5 % des Radius dick. Welcher Bruchteil des Kugelvolumens liegt in dieser Schale?

Shell fraction = 1 − (1 − t)^d
tshell thickness as a fraction of radius (here t = 0.005)Schalendicke als Bruchteil des Radius (hier t = 0,005)
dnumber of dimensions, as d grows, (1−t)^d shrinks to zero, so the shell approaches 100%Anzahl der Dimensionen: wächst d, so geht (1-t)^d gegen null, und die Schale geht gegen 100 %
Your estimateDeine Schätzung
In a 1000-dimensional sphere, what percentage of the volume lies within a shell of thickness 0.5% of the radius (between r = 0.995 and r = 1)? In einer 1000-dimensionalen Kugel: Welcher Prozentsatz des Volumens liegt in einer Schale, die 0,5 % des Radius dick ist (zwischen r = 0,995 und r = 1)?
Tip: In d=3 it is about 1.5%. Enter a number between 0 and 100. Tipp: Bei d=3 sind es etwa 1,5 %. Gib eine Zahl zwischen 0 und 100 ein.
%
Shell fraction as dimensions grow (t = 0.5%)Schalenanteil bei wachsender Dimension (t = 0,5 %)

Puzzle 3, all vectors are perpendicularRätsel 3: alle Vektoren stehen senkrecht

Pick two points at random on the surface of a d-dimensional unit sphere. Draw vectors from the origin to each point. What is the probability that the angle between these two vectors is between 89° and 91°, within one degree of a right angle?

Wähle zwei zufällige Punkte auf der Oberfläche einer d-dimensionalen Einheitskugel. Zieh vom Ursprung einen Vektor zu jedem Punkt. Mit welcher Wahrscheinlichkeit liegt der Winkel zwischen diesen Vektoren zwischen 89° und 91°? Das ist höchstens ein Grad vom rechten Winkel entfernt.

In 3D, two random vectors are almost never near-perpendicular. Angles are spread across the full range. The probability of landing exactly between 89° and 91° is tiny, roughly 1.75%.

In 3D sind zwei zufällige Vektoren fast nie nahezu senkrecht. Die Winkel verteilen sich über den gesamten Bereich. Genau zwischen 89° und 91° zu landen ist sehr unwahrscheinlich, nämlich ungefähr 1,75 %.

Your estimateDeine Schätzung
In a 1000-dimensional sphere, what is the probability (as a value between 0 and 1) that two random vectors from the origin to the surface form an angle between 89° and 91°? In einer 1000-dimensionalen Kugel: Mit welcher Wahrscheinlichkeit bilden zwei zufällige Vektoren vom Ursprung zur Oberfläche einen Winkel zwischen 89° und 91°? Gib den Wert zwischen 0 und 1 an.
Tip: In d=3 it is about 0.017. Enter a number between 0 and 1. Tipp: Bei d=3 sind es etwa 0,017. Gib eine Zahl zwischen 0 und 1 ein.
Probability of near-perpendicular angle (89°–91°) vs dimensionsWahrscheinlichkeit für nahezu rechtwinklige Vektoren (89°–91°) nach Dimension

Did the tips help? Haben die Tipps geholfen?

Probably not much. That is the point. N-dimensional geometry is not intuitive, no matter how good a mental picture you start from, the numbers come out wrong. The intuition you built in 2D and 3D actively misleads you in high dimensions. This is not a failure of imagination. It is a mathematical fact.

Wahrscheinlich nicht viel. Genau das ist der Punkt. Geometrie in n Dimensionen ist nicht intuitiv. Egal, von welchem mentalen Bild du ausgehst, die Zahlen kommen anders heraus. Die Intuition aus 2D und 3D führt dich in hohen Dimensionen aktiv in die Irre. Das ist kein Versagen der Vorstellungskraft. Es ist eine mathematische Tatsache.

What to do about itWas du dagegen tun kannst

Two strategies exist. The first is to reduce the dimensions before applying any model. The second is to use algorithms that are specifically designed to work well in high dimensions, where the neighbourhood concept is replaced by something more robust.

Es gibt zwei Strategien. Die erste reduziert die Dimensionen, bevor überhaupt ein Modell darauf läuft. Die zweite nutzt Algorithmen, die eigens für hohe Dimensionen gebaut sind. Dort ersetzt etwas Robusteres den Begriff der Nachbarschaft.

Dimensionality reductionDimensionsreduktion

PCA
Principal Component AnalysisHauptkomponentenanalyse Finds the directions of maximum variance and projects the data onto a lower-dimensional subspace. Linear, fast, interpretable. The classic starting point. Findet die Richtungen maximaler Varianz und projiziert die Daten auf einen niedrigdimensionalen Unterraum. Linear, schnell, interpretierbar. Der klassische Ausgangspunkt.
t-SNE
t-Distributed Stochastic Neighbour Embeddingt-Verteilte stochastische Nachbareinbettung Preserves local structure, points that are close in high dimensions stay close in 2D. Excellent for visualisation. Not suitable for downstream modelling. Erhält die lokale Struktur: Punkte, die in hohen Dimensionen nah beieinander liegen, bleiben auch in 2D nah. Hervorragend für die Visualisierung. Für die weitere Modellierung nicht geeignet.
UMAP
Uniform Manifold Approximation and ProjectionGleichmäßige Mannigfaltigkeitsapproximation und Projektion Faster than t-SNE, better at preserving global structure. Increasingly used as a first-look visualisation tool and sometimes as a preprocessing step. Schneller als t-SNE und erhält die globale Struktur besser. Wird zunehmend als Werkzeug für den ersten Blick genutzt, manchmal auch als Vorverarbeitungsschritt.
Autoencoders
Neural network compressionNeuronale Netzwerkkomprimierung A neural network trained to compress data to a bottleneck and reconstruct it. The bottleneck is the reduced representation. Nonlinear and powerful, but less interpretable. Ein neuronales Netz, das lernt, Daten auf einen Engpass zu komprimieren und wieder zu rekonstruieren. Dieser Engpass ist die reduzierte Darstellung. Nichtlinear und leistungsfähig, aber weniger interpretierbar.
A sculpture that reads NO from one angle and YES from another
The same object, different perspectives. Dimensionality reduction does the same to data, and faces the same risk.Dasselbe Objekt, verschiedene Perspektiven. Die Dimensionsreduktion macht dasselbe mit Daten, und sie birgt dieselbe Gefahr.

Reduction is not freeReduktion ist nicht kostenlos

The algorithms above make it sound straightforward: feed in 1000 dimensions, get out 2. But what you get out depends entirely on what those 2 dimensions are capturing, and there is no guarantee they capture what matters for your problem. Dimensionality reduction is itself a modelling decision, with its own assumptions, its own failure modes, and its own version of the bias-variance trade-off.

Die Algorithmen oben klingen unkompliziert: 1000 Dimensionen rein, 2 raus. Was herauskommt, hängt aber ganz davon ab, was diese 2 Dimensionen erfassen. Eine Garantie, dass sie das Wichtige für dein Problem erfassen, gibt es nicht. Die Dimensionsreduktion ist selbst eine Modellierungsentscheidung. Sie hat eigene Annahmen, eigene Fehlerquellen und eine eigene Version des Kompromisses zwischen Verzerrung und Varianz.

The sculpture above says "NO" from one angle and "YES" from another. Both views are truthful projections of the same object. Neither is the full story. Every dimensionality reduction technique makes a bet about which angle to look from, which directions of variation in the data are worth keeping and which are noise. PCA bets on linear variance. t-SNE bets on local proximity. An autoencoder bets on whatever the reconstruction loss rewards. These are not neutral choices.

Die Skulptur oben zeigt aus einem Blickwinkel „NEIN“ und aus einem anderen „JA“. Beide Ansichten sind ehrliche Projektionen desselben Objekts. Keine von beiden ist die ganze Geschichte. Jede Technik zur Dimensionsreduktion wettet darauf, aus welchem Winkel du schaust. Sie entscheidet, welche Variationsrichtungen in den Daten es wert sind, behalten zu werden, und welche nur Rauschen sind. PCA setzt auf lineare Varianz. t-SNE setzt auf lokale Nähe. Ein Autoencoder setzt auf das, was der Rekonstruktionsverlust belohnt. Neutral ist keine dieser Entscheidungen.

In practice this means: always verify that the reduced representation preserves what actually matters for your downstream task. A beautiful 2D visualisation that groups points in visually appealing clusters may be hiding the variation your classifier needs. The curse of dimensionality does not disappear when you reduce dimensions, you have simply traded one set of problems for another.

In der Praxis heißt das: Prüf immer, ob die reduzierte Darstellung das bewahrt, worauf es bei deiner Aufgabe ankommt. Eine hübsche 2D-Visualisierung mit schön gruppierten Clustern kann genau die Variation verbergen, die dein Klassifikator braucht. Der Fluch der Dimensionalität verschwindet nicht, wenn du Dimensionen reduzierst. Du hast dann nur einen Satz Probleme gegen einen anderen getauscht.

How KNN degrades as dimensions growWie KNN mit wachsenden Dimensionen abbaut

KNN depends on the idea that nearby points have similar outputs. In high dimensions, all points become approximately equidistant, so "nearest neighbour" loses its meaning. The chart below shows how much of the data range you must cover just to find K neighbours, as dimensions increase.

KNN beruht auf der Idee, dass nahe Punkte ähnliche Ausgaben haben. In hohen Dimensionen sind alle Punkte ungefähr gleich weit voneinander entfernt. Damit verliert „nächster Nachbar“ seine Bedeutung. Das Diagramm unten zeigt, wie viel des Datenbereichs du abdecken musst, um K Nachbarn zu finden, wenn die Dimensionen wachsen.

Required neighbourhood radius to cover 10% of data vs dimensionsBenötigter Nachbarschaftsradius für 10 % der Daten, nach Dimension
10 %