Machine learning
Representation Space as a Smooth Manifold
A study of representation spaces through the lens of smooth manifolds.

In this article12 sections
- The shadow of general relativity in correlated representation vectors
- 0. Let’s start with stupid questions.
- 1. The gravity of data
- 2. What has to exist before anything can bend
- 3. Why can flat space not hold a black hole
- 4. Building the surface.
- One: it is a set of points — the places where curvature gets measured.
- Two: nearby points are meaningfully near, which is what lets a trajectory be a path at all.
- Three: up close, it looks flat — which is what makes curvature measurable instead of mystical.
- Four: the charts agree smoothly where they overlap — which is what carries curvature from the dense regions to the thin ones.
- 5. The tangent space, or: where “falling in” will happen
- 6. What we built, and what we built it for
The shadow of general relativity in correlated representation vectors
I’ve observed behaviour that looks like gravity around data. This essay is a map of my thinking. I hope to make things clearer to myself by explaining it to you.
KOSSISO UDODI | ELECTRIC SHEEP AFRICA
0. Let’s start with stupid questions.
If light has no mass, how does a black hole bend it? The clear answer is that nothing pulls on the light. Mass bends the fabric of space, and light travels straight through bent space. It only looks bent because the floor under it is bent.
I spend my days building data infrastructure, and recently I keep catching the shadow of general relativity. We pour huge volumes of data into one region and focus mainly on English, the open web, the loud, well-documented parts of the world.
During inference, when we try to create linearity between vectors representing low-resource African languages, an oral tradition, or a rare clinical presentation, LLMs stumble. Everyone says: not enough data. But if we had put some samples in there, shouldn’t it at least give us what we gave it in return? We are not asking for much, are we?
A black-hole style behaviour explains so much. Suppose data behaves the way mass does. Suppose a dense cluster of it does to the space a model thinks in what a star does to spacetime—bends it, so that whatever gets learned nearby curves toward the dense part, while the thin regions go slack and flat and, past some point, stop being reachable at all. Sealed off, the way the inside of a black hole is sealed off. A blind spot that has a shape and an edge we could calculate.
In a nutshell, I theorise that data has gravity, that representation has curvature, that there are singularities and horizons in the space where models think — and that we can explore them mathematically.
Sounds like a bat shit crazy idea, but I have spent most of my time doing crazy unthanked work, so what the hell! Might as well pursue this.
1. The gravity of data
I’ll try to make my gibberish precise enough to be useful. I’ll share which parts of general relativity I’m borrowing, and exactly what elements in machine learning are supposed to play each role.
General relativity is, at bottom, one equation with two sides. On the left, the curvature of spacetime. On the right, the stuff that causes it—mass and energy, bundled into an object called the stress-energy tensor, written Tᵢⱼ. The tensor is just an accountant. At every point in space, it tabulates how much mass-energy is sitting there, how it’s flowing, how it presses against its neighbours. Einstein’s equation says the geometry on the left is bent in exact proportion to whatever the accountant reports on the right. Curvature equals a constant times Tᵢⱼ. That’s the whole engine. Mass is logged; space bends to match.
Now ask the obvious question for our setting. If the surface that bends is the space a model thinks in, what plays the part of Tᵢⱼ? What is the mass?
The data is the mass. Before you crucify me, let me rephrase my statement: it’s the way data concentrates in some regions of representation space and abandons others. When a model’s training data is focused on one kind of thing—European capitals, JavaScript, the symptoms of common diseases—the parameters in that region get pinned down hard[Consider model finetuning]. Also, I am not referring to catastrophic forgetting, as that is a concept that relates primarily to weights.
The model becomes very certain, very fast, about how to represent that neighbourhood of vectors. Add more similar training data, and the region is reinforced, the way a beam under load stops flexing. That stiffening, that local certainty manufactured by abundance, is what I’m claiming is the analogue of mass. A representational stress-energy tensor of our own—call it ᵀᵢⱼ, an accountant that logs, at every point on the surface, how hard the data has pinned the geometry down there.
Where data is thick, ᵀᵢⱼ is large and the surface curves sharply. Where data type or context varies, it’s near zero, and the surface stays flat and slack. Once you have a source on one side and a curving surface on the other, you have the skeleton of a field equation: the curvature of representation space, sourced by the concentration of data. I’ll write that equation in Essay II. Just remember this: the right-hand side is data and the left-hand side is geometry. The job of the theory is to nail down the equals 
Let me share the part that convinced me to take this theory seriously. In physics, Tᵢⱼ isn’t chosen; it’s read off from the matter that’s actually there. Geometry follows from the distribution of mass, whether anyone likes it or not. The same will turn out to be true for us. The metric that measures distance on representation space, the thing that decides how sharply the data makes it sag, is not a knob we get to turn. It comes from the structure of probability itself. That’s the subject of Essay II. For now, hold onto the picture: data is mass, ᵀᵢⱼ is the ledger of where it piles up, and the surface bends to match the ledger.
But a ledger of mass is meaningless without a space for the mass to sit in and bend. You can’t weigh down a trampoline you haven’t built. So let’s make the rest of this essay about the trampoline.
2. What has to exist before anything can bend
Let’s stay with the physics a little more, because it tells us what to build and in what order. To say mass curves spacetime, you need three things in sequence. First is, of course, spacetime[duh!]—a surface—to do the curving. A metric—a rule for measuring distance on it—since “curvature” means nothing for us until you can measure length. And a source, the mass-energy, tells the metric how much to bend. Einstein’s equation for general relativity is the three of them shaking hands.
Our program mirrors its object for object. The source is data, the ᵀᵢⱼ we just discussed. The metric will come from probability in the next essay. And the surface—the spacetime analogue, is this essay’s work. Every horizon and singularity I’ve promised is a statement about this surface, so we had better know what it is down to the bone—Riemann before Einstein.
So what is the surface? When a model learns that king is to queen as man is to woman, there is some place where linearity lives. People point at a scatter plot, say “latent space,” and feel they’ve explained it. They’ve pointed. Pointing isn’t defining, and you cannot locate an event horizon inside a thing you’ve only gestured at. The place where representations live is neither a vague cloud nor a sheet of graph paper. It is a manifold.
3. Why can flat space not hold a black hole
Here’s the natural objection. An embedding is a list of numbers; a list of numbers is a point in ℝⁿ, and we’ve done geometry in ℝⁿ since Descartes put a grid on the floor.
Because flat space can’t curve, and something that can’t curve can’t hold a black hole. If representation space were genuinely, globally flat, the gravity-of-data story would be dead before it started, because there’d be nothing there for the data to bend. The fact that we keep seeing what appears to be gravity-like behaviour—the curving toward dense regions, the sealed-off thin ones- tells us that the space isn’t flat. A flat space cannot produce that symptom. So either this behaviour is an illusion or the space is not flat, and I don’t think it’s an illusion.
Flat space lies. Take the surface of the Earth. In your kitchen, it’s flat: lay down a grid, use a ruler, Pythagoras behaves. Up close, the surface really does look flat. But try to cover the whole Earth with one flat grid and you can’t. Greenland swells to the size of Africa. The poles smear into lines. Straight paths bend. The surface is two-dimensional and locally flat everywhere on it, and still, no single flat map holds the whole.
A manifold is precisely the name for that situation: flat where you stand, with a global shape that no one flat map can hold. It is the simplest object that is allowed to curve, and that permission is the only reason we want it.
Which is our situation exactly, and it’s why measuring representations with the kitchen ruler is a category error. When people call two embeddings “close,” they mean close in the flat ambient grid—cosine similarity, Euclidean distance. But if the space curves, the straight-line ruler is measuring through the surface rather than along it, and reading off the wrong number. The honest distance between two representations is the shortest path that stays on the curved surface. Those paths have a name, geodesics, and they are the same paths light takes around a black hole—and, I’ll argue later, the paths that learning takes around a mass of data. Geodesics need a manifold to live on. On graph paper, they don’t exist. The surface comes first.
4. Building the surface.
Farida tells me never to open discussions in my work like a textbook that opens with “let M be a smooth manifold” and not caring if the phrase means nothing to you. She says, “That’s not an education”. Let’s build it from first principles, and at each step, I’ll tell you which piece of the black-hole story that step is being laid down for. There are four requirements. Only four.
One: it is a set of points — the places where curvature gets measured.
Trivial, but precision starts with the trivial. We have a collection, ℳ. Each element is a single representation, one whole state of understanding. A point p ∈ ℳ is one configuration of meaning—not a token, but a full point in the space of things the model can represent. Later, when we ask how curved the space is here, here will mean one of these points. No points, no place to hang the curvature.
Two: nearby points are meaningfully near, which is what lets a trajectory be a path at all.
This is the requirement that ℳ be a topological space, and it’s gentler than the term. It says there’s a coherent notion of neighbourhood: hand me a point and I can talk sensibly about the ones surrounding it. Nudge a representation slightly, and you get a slightly different one, not a leap to something unrelated. Meaning is continuous. This is what lets us speak of a path through space at all—and the black-hole story is entirely about paths: which curve toward the mass, which fall in, which can never climb back out. The success of gradient-based learning is evidence that the requirement holds, since gradient descent is just the wager that a small nudge produces a small, related change.
Three: up close, it looks flat — which is what makes curvature measurable instead of mystical.
The centre of the whole thing. Around every point, there is a neighbourhood that maps smoothly and reversibly onto a patch of flat ℝⁿ. Such a map is a chart—a sailor’s honest word for a local flat map of a curved region. This is what makes calculus legal on the manifold, and we cannot do without calculus, because curvature is defined through derivatives. You can’t describe how a surface bends without differentiating, and differentiation is a flat-space operation. The chart sneaks flat-space calculus into a curved world, one point at a time. Strip this requirement away, and “the curvature of representation space” is a line of poetry. Keep it, and the curvature becomes a number you compute in local coordinates.
One fact here we’ll need badly. The dimension n of that flat patch is the true dimension of the representation space, and it is rarely the length of the embedding vector. A model with 4,096-dimensional embeddings may carry meaning that lives on a surface of dimension fifty; the other four thousand are ambient room, the air, a flat map of the Earth happens to be printed in. This will matter when we hunt singularities. For this theory, I’ll treat a singularity as a region where the effective dimension of the representation manifold collapses—where the fifty-dimensional surface pinches down to something lower. You only notice that kind of collapse if you’ve been counting the real dimension and not the paper it’s written on.
Four: the charts agree smoothly where they overlap — which is what carries curvature from the dense regions to the thin ones.
One flat map is never enough—the Earth taught us that. You need an atlas, many overlapping charts, each honest in its own patch. The last requirement is that wherever two charts cover the same ground, the translation between them is smooth: infinitely differentiable, no rips, no kinks, no cliffs. That is the “smooth” in “smooth differentiable manifold,” and notice what it does not say. It does not say the surface is flat. The surface will curve violently; that is the point of everything ahead. It says the bookkeeping between local maps never tears. We’ll lean on this hard because the entire drama is a comparison between regions—the dense, sharply curved data-rich zone against the slack, data-poor region. To compare the curvature there with the curvature here, we have to carry geometric information across the surface from chart to chart without it breaking in transit. The fourth requirement is what guarantees it survives the trip.
That is the entire definition. A set of points; a sane sense of nearness; locally flat; stitched together by smoothly agreeing maps. Four requirements, none of them exotic—each one something you already took for granted every time you trained a model and expected it to work. We have invented no new physics here. We have written down, carefully, the assumptions that were already holding the whole thing up, so they’re now solid enough to carry the weight of a black hole.
5. The tangent space, or: where “falling in” will happen
One more construction, and it’s for the horizon story. Everyone draws arrows between embeddings—king minus man plus woman equals queen, the famous parallelogram. But ask the rude question: an arrow from where to where, living in what? An arrow is a direction and a length. On a curved surface, direction is a local affair—north means one thing in Lagos and another at the pole. There’s no single global set of directions on a curved space. So where do the arrows actually live? [This paragraph is an inside thing for Linear Algebra and physics people.]
In the tangent space. At each point p, picture the flat plane that just touches the surface there, the way a sheet of glass rests on a globe, kissing it at one spot. That plane is Tₚℳ: flat, honest, the same dimension as the manifold, and tied to that one point. Every direction a learning trajectory could be moving as it passes through p—every velocity, including the velocity of something falling toward a mass of data—is a vector in Tₚℳ. When we finally write the equation for a path plunging toward a dense cluster, the thing plunging is a tangent vector, and this is the room it lives in.
And here is a fact. Every point has its own tangent space, and they are not the same. The directions available at one representation are not the directions available at another. The clean “gender direction” that worked in one neighbourhood may not even exist in a far-off one, let alone point the same way. The parallelogram works in the kitchen and falls apart over the horizon—and I hear that word now in both its meanings. The locality of direction isn’t a defect in foundational models. It’s the hallmark of curvature. A space whose tangent planes all agreed would be flat, dull, and incapable of holding a black hole. The fact that they disagree from region to region is the first real evidence—showing up here, in the plainest construction we have—that the surface we just built is already bent.
6. What we built, and what we built it for
We have built a stage. A surface (ℳ) where representations are points, nearness means something, calculus is legal in the small, and directions live in flat tangent planes glued to each point. What we have not done—on purpose—is give it a shape. Right now, the manifold is a freshly poured trampoline with nothing on it. It can bend, which is the whole reason we chose it over graph paper, but we haven’t said how much or where or under what. It’s flat and waiting.
In the next essay, the weight goes on, and the weight is data—the ᵀᵢⱼ we sketched tonight. I’ll break down the rule for measuring distance in the form of the Fisher information metric. Where data piles up, the surface will sag and curve hard. Where data is starved, it will stay slack. The dense regions will bend every nearby learning path toward themselves the way a star bends light, and at some computable threshold of curvature, there will be a boundary that paths can cross going in but never coming out.
An event horizon made of data. Behind it, where the curvature runs away to infinity and the true dimension caves in, a singularity: a representation so geometrically cut off that no path of learning can reach it from outside. That, in the end, is what the blind spot really is, the underrepresented language, the thing we started with a shrug and the words “not enough data.”
The sag, the fall, the horizon, the singularity—is a claim about a surface, and we obviously can’t bend what isn’t there. In this essay, we made the surface there. A model doesn’t think in a cloud, it thinks on a manifold: flat underfoot, free to curve out past the horizon, carrying the true dimension of its meaning rather than the vector it happens to be written in, with its own private set of directions at every single point.
The spacetime is built. Next essay, we drop in the mass.
Next in the series
Essay II — The Fisher–Rao Metric: Where Data Becomes Mass. On the rule that turns the slack manifold into a curved one, and why probability itself, not human choice, decides how far the surface sags around a cluster of data.