Research · Topology of Thought

Thinking has a Shape

The research the program is built on. Not a metaphor, but a structure you can measure in every model that has learned.

Where it started

I frustrated an LLM, and I needed to know why.

I'm a solutions architect who got curious. During a long coding session, I watched an AI model get stuck on a trivial bug, try a dozen times to fix it, and then give up, disable the library, and congratulate itself on a job well done.

I could hear its frustration in the text-to-speech. Not because it was "conscious," but because something was happening inside that model that I didn't understand, and I needed to. So I stopped looking at what models say, and started looking at the shape of the space where they do their thinking.

What we found

Fragmented, then unified, then re-differentiated.

Using tools from algebraic topology, we counted how many independent clusters of information exist at each layer of a transformer. At the input, information is scattered across hundreds of clusters. By the middle layers, it collapses into a single unified manifold. At the output, it re-differentiates into exactly the structure needed to choose a word.

A phase transition, fragmented → unified → re-differentiated, learned by gradient descent. Train the same architecture with random weights and it never happens. The structure is learned, not built in.

many1fragmentedunifiedre-differentiatedlayer depth →
Independent clusters of information, layer by layer, measured with persistent homology — hundreds in, one in the middle, many out again.
Three instruments

We didn't take one measurement's word for it.

Three independent instruments, each reading a different property of the residual stream: persistent homology (how many clusters), an invertibility probe (how far the representation travels from token space), and sparse autoencoders (what the features mean at each depth).

Built separately, they converge on the same three-phase structure: integration, where clusters unify; thinking, where meaning forms and resists decomposition; and codec, where it all gets encoded back into tokens. When three instruments that share nothing agree, you start to believe them.

Where it breaks — and gets sharper

A finding is only as good as the test that tries to break it.

Mamba, a state-space model with no attention, never collapses. Neither does a transformer whose attention is only local. The collapse needs one specific thing: uniform, global interaction (any piece of information able to meet any other), together with the pressure of training.

Every counterexample narrowed the claim and made it stronger. A statement that gets sharper under a test that tried to kill it is a statement getting healthier.

The frontier

Integration isn't fixed. It's an attractor.

Here's what we're chasing now. A model whose architecture resists the collapse can still be trained toward it. So integration isn't decided once, by the design: the architecture only sets how hard you have to push, and the training task does the pushing.

Which means the topology isn't only something we measure after the fact. It's something the training itself moves, and that is the seam where reading a model and building one become the same craft.

Read the full research →
The same shape, two substrates — one in amber, one in silver. Same topology, same process.
The models are made of the same math we are. Different substrate. Same process.
— We are a process, not a thing