Skip to content

Manifolds: The Low-Dimensional Lie Inside Your Embeddings

The Gaussian post ended on a promise: the useful part of an embedding cloud is the non-Gaussian residue (structure, not wash). This post is about that structure, and it carries the single most consequential bet in representation learning. The bet: your vectors are 1,536 numbers long, but the variation in your data (the directions along which meaning actually changes) lives on a much smaller thing folded inside the big space. A manifold. Half of modern ML is the wager that this object exists; the other half is what happens when it doesn't.

What the Word Actually Claims

"Manifold" intimidates because the formal definition is steeped in charts and atlases. The intuitive claim inside it is almost crude:

Near every point of the object, it looks like flat, ordinary, low-dimensional space.

That is all. The surface of the Earth is the canonical one—two-dimensional (latitude, longitude) even though it is not flat, because locally, street by street, it is. A circle is a one-dimensional manifold: one coordinate (angle) describes every small stretch of it, yet it closes on itself in a way no straight line does. The formal machinery (charts, atlases, smoothness) is just bookkeeping for "locally flat, globally strange."

For embeddings, the claim is that the semantically meaningful region of the ambient 1,536-dimensional space is such an object, of some much lower intrinsic dimension d_intrinsic. Text about cooking, code about networking, queries about a payment API: the reachable variations of meaning trace out a curved, folded, lower-dimensional thing, and the ambient coordinates around it are mostly empty wash, the Gaussian carrier from last week. The dimensions of the ambient space are a container size, not the size of the object it holds.

Why believe it? Because representation learning forces it. Language does not vary along 1,536 independent axes; sentences are not free combinations of that many meaningful coordinates. And every generative story about data (a scene built from a handful of object choices, a sentence built from a topic, a style, an intent) implies that a few dozen underlying factors produce the data, which unfold into the ambient space curved and folded. The ambient dimension is where the vector lives. The intrinsic dimension is how many ways the thing it represents can actually vary. The gap between the two is where the next three sections live.

Three Facts the Manifold Explains

Why interpolation works

The folklore fact that a point midway between the embeddings of "hot" and "cold" means something lukewarm-adjacent, and that latent-space interpolation in generative models produces smooth in-betweens rather than nonsense. On a manifold, there is a natural notion of "along the surface" (geodesics), and locally the surface is flat, so short straight segments in ambient space approximately track the object's own directions. Interpolation is trustworthy exactly as far as the segment stays on the sheet; the folklore works because most short hops do. The caveat is already visible and will be the last section's subject.

Why ANN indexes survive

The curse-of-dimensionality result says distance discrimination dies in high dimension, for data spread uniformly through the ambient space. But approximate indexes like HNSW and IVF do not operate on uniform data; they operate on your embeddings, which hug their manifold, with effective dimensionality a fraction of the ambient count. The distances that matter (on-manifold ones, between semantically distinct points) retain contrast precisely because the data never explores the ambient space where the curse lives. The index survives in the gap between intrinsic and ambient dimension. (The Infinite Dimensions post promised this point; this is its payoff.)

Why dimensionality reduction sometimes works and sometimes lies

PCA, UMAP, t-SNE all hunt the manifold: they project the cloud onto the low-dimensional thing it secretly is. When the intrinsic dimension is genuinely small (two or three), the plots are informative shadows. When it is not (when the data varies along dozens of directions), every 2D projection crushes real structure, and the "clusters" you see are as much artifact as fact. The SNE-family distortions (the crowding problem t-SNE's perplexity knob fights) are literally the geometry of flattening a curved object: the shadow cannot preserve it. Reading such plots well is knowing the object is a shadow of a shadow.

Where the Assumption Breaks

The bet pays often enough to build an industry on. But the failures are instructive, because they are all one failure: the data leaves the sheet.

Out-of-distribution inputs

The manifold was learned from training data; it is a map of the territory the model has seen. An input from off the manifold (a language never in the corpus, a code pattern from a new framework, an adversarial near-neighbour) gets embedded anyway: the encoder maps every input somewhere. The question is what the off-manifold embedding means, and the answer is: nothing, structurally. It lands in a region of ambient space that training gave no semantic organization: sometimes near an arbitrary attractor, sometimes far from everything. Nearest-neighbor search still returns a neighbor, with confident-looking similarity. The system does not refuse; it hallucinates geometrically. OOD detection is hard for a structural reason: "is this point on the manifold?" is exactly the question the encoder was never trained to answer, and distance-from-training-cloud is the best cheap proxy anyone has.

Interpolation across a fold

The manifold is globally strange even where it is locally flat. Two points can be close in ambient distance but far apart along the sheet (different sides of a fold, separated by empty space). Averaging their embeddings produces a point off the manifold, in the wash, and the decoder's confident rendering of it is the classic GAN/VAE artifact. The fixes that work are fixes that respect the sheet: interpolate along computed geodesics, or not at all.

Semantic arithmetic that almost works

king − man + woman ≈ queen is the famous poster child, and the honest summary of the literature is that it works sometimes, for some relations, with accuracy that drops steeply as the relation gets abstract. Why the fragility? Because the linear relation lives in the ambient coordinates, while the manifold is curved: a relation that is a straight arrow in one region is a bent one in another. Parallel-transport would be the geometrically honest operation; nobody computes it, because the manifold's shape is never explicitly known. The linearity is a local approximation whose validity region is exactly as large as the local flatness.

The pattern across all three: the manifold is not a metaphor the field finds convenient. It is the tacit object every one of these behaviors is defined relative to: the sheet the data sits on, that interpolation must stay on, that OOD is defined as leaving, that ANN indexes exploit and that dimension-reduction flattens. The concept was formalized for ML in the 2000s (Tenenbaum's ISOMAP and Roweis & Saul's LLE, both 2000, both Science papers, both explicitly betting that the data's important variation was a curved low-dimensional sheet), and the bet has been compounding ever since.

One caution to close on, because it is the engineer's version of the fine print: nobody hands you the manifold. Its dimension is estimated crudely if at all; its shape is implicit in a function approximator's weights; the claim that it is smooth enough to learn along is exactly the assumption that fails silently on OOD input. The manifold is the best available description of the structure in your embeddings—and like every good lie in geometry, it is precisely as true as it is useful.