Why Brains and AI Both Build a Torus: Nina Miolane on the Geometry of Intelligence

Open on YouTube ↗
Overview

How does the on-or-off electrical firing of neurons give rise to everything we see, hear, feel, and decide? Mathematician and machine learning researcher Nina Miolane, who runs the Geometric Intelligence Lab at UC Santa Barbara, argues that the answer may lie in geometry. In conversation with science historian Claire Isabel Webb at The Interval in San Francisco, Miolane described her lab's goal of building "a mathematical theory of intelligence." The lab's working belief is that unifying principles, expressible as equations, describe how intelligent systems operate in the world, whether those systems are brains or machines.

21 min read

Webb framed the talk as a counterpoint to current debates about whether AI is conscious or has crossed some threshold, debates she said run into trouble because there is no consensus on how to define that threshold. She asked the audience to listen for the conceptual shifts in Miolane's account, which departs from the familiar metaphors of "the brain is a computer" and "the computer is a brain."

Recording technology has outpaced theory

Miolane opened with a recording, made by UCSB colleagues, of the visual cortex of a living mouse. Rapid flashes of light across the image mark individual neurons firing. Current technology, she said, can image hundreds of thousands of neurons in a living brain, sometimes up to a million.

This progress exposes what she sees as a key tension in neuroscience: the technology has outpaced theoretical understanding. Researchers can watch the living brain almost in real time, but they do not know how neural firing encodes subjective experience. To Miolane, the patterns at first look disorganized and almost random. Yet somewhere in them is encoded everything we perceive, along with our capacity to plan, act, and interact with the world. Her lab's central question is which approach, which tools, and which mathematics can make sense of data this complex.

Edgar Adrian and the first clue

Neuroscientists have been asking how electrical activity encodes experience for more than a century, so Miolane stepped back to what she called the first clue: the work of Edgar Adrian, who received the Nobel Prize in 1932.

Adrian was puzzled that neurons use a binary code. A neuron is either firing or not, and the voltage of a firing is almost always the same. Subjective experience, however, feels continuous. We can tell how loud a sound is, how red a red is, how intense a touch is. How could an on/off signal carry that?

Adrian worked with a frog's leg containing neurons known to fire when the muscle was stretched. He recorded from those neurons while attaching different weights to the end of the muscle, around 5, 10, and 25 grams. The magnitude of each spike stayed the same, but the number of spikes changed. With a small weight the neuron fired once; with a larger load it fired five to ten times. The firing rate, the number of spikes per unit of time (Miolane gave the example of per 10 milliseconds), is a continuous variable, and it encoded a continuous quantity: the intensity of the weight.

The single-neuron doctrine and its limits

According to Miolane, Adrian's discovery launched a long research program in which scientists examined individual neurons and asked what each one codes for. She traced several Nobel-winning results from it. Hubel and Wiesel found neurons in the visual cortex that respond to a vertical bar in the visual field, such as the edge of a window. Later researchers studying the brain's navigation system found place cells, which increase their firing whenever an animal is at a specific location.

Pushing the same logic further, researchers more recently found a neuron that fired "like crazy" whenever Jennifer Aniston appeared, regardless of her clothing or haircut. It responded even to a drawing of her or to her written name. Miolane called the "Jennifer Aniston neuron" one of her favorite findings because it is so strange. She also said it illustrates the limits of what she calls the single-neuron doctrine.

She gave two limitations. First, the human brain has about 80 billion neurons, so cataloging each one's function would take a very long time. Second, many neurons are not as interpretable as the famous examples. Some code for several things at once, such as the color red and curvy lines, which produces an explosion of possibilities for anyone trying to catalog them. For these reasons, her lab and others have moved toward population coding: asking what a group of neurons, perhaps a thousand of them, encodes together.

Turning firing rates into points in space

To show how population analysis works, Miolane presented a simplified brain in which three neurons (blue, red, and yellow) each have an oscillating firing rate recorded over time. The conceptual shift her lab brings, she said, is a new way to visualize that same data.

At any moment, each of the three neurons has a firing rate. Those three numbers become coordinates in a 3D space, where the x-axis is neuron one's firing rate, the y-axis is neuron two's, and the z-axis is neuron three's. A single point therefore represents the collective activity of all three neurons at one time. As time passes, the point moves. In her animation, which she stressed was a simulation and not real data, the moving point traced a perfect torus, a donut shape.

A torus in real mouse data

She then showed real data. Researchers recorded 150 neurons from a mouse brain circuit that encodes where the mouse thinks it is. Their collective activity is a point in a 150-dimensional space. When the researchers projected it down to 3D so it could be seen, it formed a torus.

Miolane called this "very, very profound." With 150 neurons, the point could in principle wander through all 150 dimensions. Instead, strong structures constrain it to the two-dimensional surface of a torus embedded in that high-dimensional space.

From Kepler to Newton: explaining the shape

This kind of structure is where her lab's work begins. The goal is not only to observe the geometry but to explain why it appears. Miolane, a physicist by training, offered an analogy. Kepler discovered that planets move around the sun in ellipses, a beautiful geometric finding, but he reported it without explaining it. Newton derived laws of motion and gravitation from which elliptical orbits follow as a direct consequence. In Miolane's framing, neuroscience is currently at the Kepler stage, reporting that neural activity forms a torus. Her lab wants to reach the Newton stage by finding equations that explain why such symmetric patterns emerge.

The same torus in artificial networks

Webb asked why Miolane trains artificial systems and looks for mathematical similarities, instead of trying to build an AI that is simply a human mind made from another material.

Miolane acknowledged that the idea of shared principles might seem odd at first. Biological networks are made of living, "squishy" wetware, while artificial networks run on silicon. Her lab locates the commonality at a higher level, the level of computation or algorithm, not the substrate. The substrate may differ while the equation it implements stays the same.

To test this hypothesis, the lab trains AI on tasks the brain is known to solve, including the spatial navigation task associated with the torus. Each point on that torus corresponds to a location of the agent in 2D space. The brain takes in self-motion cues such as velocity, together with its current position estimate, and outputs its next position estimate. The lab trained an AI to do the same thing: take in velocity and predict its position in 2D space. When they opened up the trained network and plotted the activity of its artificial neurons, they found the torus. Miolane noted that others had done this before her lab. She emphasized that the result holds across different initializations and architectures, not just on one lucky run.

She called this very profound. Biological networks evolved over millions of years, while the lab's networks train in minutes by gradient descent on a loss function. Despite completely different optimization processes, the two converge on the same solution. On the biological side, she said, these tori have been observed in mice and rats, and to some extent in monkeys and humans. She takes this as a sign that something about the computation is very universal, even for a task as specific as estimating one's position in 2D space.

The algorithm underneath: a Fourier decomposition of space

Webb compared this to convergent evolution. Pterodactyls and bats come from very different lineages but ended up with functionally similar wings. She asked why describing intelligence at the level of the algorithm is so powerful.

Miolane said the torus is only her lab's starting point. The real aim is to write the equations explaining why tori appear everywhere. The clue is periodicity. A torus is periodic, because you can go around either of its circles and return to where you started. Yet it encodes the 2D space of a room, which is not periodic at all.

Her account is that both brains and AI encode space through a kind of Fourier decomposition. She used an analogy from signal processing: a sound can be broken into sine waves of different frequencies, and each sine wave is periodic. In a similar way, space is decomposed into periodic components in both brains and machines. Computation happens in this Fourier space, and the result is then decoded back.

As for why this is an optimal solution, she pointed to efficiency. In a Fourier decomposition, a few frequencies often carry most of the magnitude. Keeping only those and truncating the rest still gives a good approximation of the signal. She called it a "very efficient and smart way" of encoding space.

Stretchy space: rewards deform the torus

Webb then asked about time. Humans can stretch or collapse their experience of time through dreams, reading, and emotionally charged episodic memory. Might non-biological minds perceive time in similar or different ways?

Miolane said her lab has not run experiments on how networks experience time, but it has run them on space, and space turns out to be "stretchy" as well. She offered this as a speculative bridge to Webb's question.

In the artificial networks, the lab placed a reward, a location of interest, somewhere in the 2D environment. In the real world this might correspond to food, a friend, or anything an animal cares about at a particular spot. The AI then sought higher resolution around that location and allocated more neurons to the Fourier decomposition of that region. The effect is visible in the geometry, because the torus deforms to provide more resolution where the AI is interested. Miolane said neuroscientists have seen something similar in animals. When food is introduced into an environment, place cells and grid cells reorganize their firing to give better resolution at that position, so the animal is less likely to misjudge its location there. She described this as another convergence between AI and biology.

Why geometry: the general relativity parallel

Deformation of space led Miolane to general relativity, a favorite topic from her graduate school years and, she noted, a fundamentally geometric theory. She addressed the question the event's title might raise: why use geometry to describe the brain?

Her answer was that geometry has a long record of successful models in physics. Einstein used Riemannian geometry to describe four-dimensional spacetime, which curves around massive objects such as planets and black holes. General relativity is a geometric theory of gravitation that describes how much spacetime curves. Miolane said Einstein called geometry the most ancient branch of physics. If geometry is precise enough to describe the universe around us, she argued, it is not so crazy to think it could describe the universe inside us. Her lab uses the same mathematics physicists used for general relativity to describe patterns such as the torus.

Theory catching up with data, and the need for predictions

Webb brought up LIGO, the gravitational wave observatory with a site in eastern Washington. She described it as an experiment built to confirm an existing theory, one that predicted colliding massive black holes would warp spacetime in ways detectable by extraordinarily sensitive instruments. She mentioned a sensitivity of about 1/100 of a proton's diameter and added that she hoped it had since improved. She said CERN's search for the Higgs boson followed the same pattern: mathematics first, then a machine to test it. Miolane's lab, she suggested, works the other way around, with theory catching up to technology.

Miolane agreed that her lab must catch up with the data that recording technology has produced. But she added that a theory is only useful if it makes new predictions; otherwise, "it's just a good story." She drew on machine learning: performance on the training set is not meaningful, and what matters is performance on a test set the model has never seen. A good scientific theory should likewise explain existing recordings and also predict phenomena not yet observed, which neuroscientist colleagues can then test. Her lab's Fourier-based theory, she said, makes predictions beyond the spatial navigation torus, including what kinds of geometry should appear in systems such as the visual cortex. She described the lab as now at the stage of making predictions and about to confirm them with colleagues.

Complementing single-neuron research, not replacing it

Returning to the Jennifer Aniston neuron, Webb described a methodology in neuroscience that pursues ever higher resolution, like the leap from early daguerreotypes to iPhone photos. She said this approach assumes that science progresses linearly and that discovering individual components will reveal the collective picture, a problem she also sees in quantum mechanics. She asked how Miolane persuades colleagues not to hunt for "the Nina neuron."

Miolane said she is not trying to make them work the other way. She sees both approaches as valuable and complementary, and her lab relies heavily on single-neuron findings. The torus itself comes from grid cells, neurons that other researchers discovered. Each grid cell fires in a periodic pattern as an animal moves through a 2D space, forming a grid over the environment and firing strongly whenever the animal crosses particular points of that grid. Because these neurons are periodic, plotting them together in a 150-dimensional space produces the torus. "We definitely owe them a lot," she said.

Intelligence versus consciousness: a ring through wakefulness and sleep

Turning to the future, Webb asked whether the same tools could measure consciousness, or even produce an algorithm for it, and how Miolane distinguishes the two concepts.

Miolane defined intelligence as a system's capacity to perceive its environment and take actions that maximize its chances of success at a given task. She called this quite different from consciousness. Still, she believes the lab's geometric techniques can give a handle on consciousness, and she said there are early hints that they can.

Her example was the head direction circuit, a group of neurons that encodes where an animal's head is pointing relative to the room. When their activity is plotted in a roughly thousand-dimensional space, it forms a ring. Miolane found this striking, since head orientation is an angle and an angle is a position on a circle.

The researchers who found this ring also recorded the same circuit during sleep, in both REM sleep, when dreaming is typically more intense, and non-REM sleep, when one is arguably less conscious and dreams less. Their study was not about consciousness, Miolane noted, but it touches on the question. Between waking and REM sleep, the ring's geometry was essentially unchanged. What changed was the path of neural activity along the ring, which became far more random during dreaming, something like a random walk. In non-REM sleep, the ring "exploded," a word Miolane then softened. It stopped being a ring and became something like a two-dimensional cone, less structured and more chaotic, with a different dimension. By tracking geometry across states of consciousness, she said, researchers begin to get quantitative elements about what consciousness might or might not be. That is the starting point needed for writing equations.

Affect and regret: what replay reveals

Webb described a triangulation of intelligences, among Miolane's own mind, the AI models she shapes, and the evolving combination of the two. She raised love, grief, and regret, and mentioned neuroscientists such as Damasio who link consciousness to affect. She asked whether an AI mind, entangled with a human one, could come to know such things.

Miolane called it a very hard question. She said she did not know about the AI side, and that even in biological brains, decoding what a being feels from the geometry of neural activity is already very difficult. She did point to a study she likes that "somehow gets at regret."

In that study, an animal moves through a complex maze with junctions. At one junction, turning right leads to food and turning left leads to getting lost with no food. During the day, the animal's movement corresponds to a point moving on the 2D torus. At night, a phenomenon called replay occurs: while the animal is asleep and not moving, a point of activity still travels across the torus. Researchers can decode that point back into positions in the maze, which shows that the animal is replaying its route. They found that when the animal had made the wrong choice, it replayed that situation more often and also played out what would have happened if it had taken the other path. Miolane was careful to say this is not exactly an encoding of regret. It is, however, a neural correlate of the kind of affect Webb described.

Audience questions

The talk ended with three audience questions, which Miolane restated before answering.

Why a torus and not a plane? Since a room is a 2D plane, one might expect to find a plane in the neural activity. Miolane gave two layers of explanation. First, the roughly 150 neurons forming the torus each have a periodic, grid-like firing map, so a torus is what their combined activity naturally traces. The deeper question is why those neurons are periodic at all. She said her lab has answered this in its latest work, which is about to be published. Their answer is that encoding space with a Fourier decomposition is the most efficient approach they can think of. The neurons act as the basis vectors of that decomposition, and those basis vectors are periodic. She added that the torus is not limited to physical position. When animals are tasked with navigating abstract spaces defined by odors or sounds, they encode those spaces with a torus too. Tori appear in parts of the visual system, and grid cells encoding abstract spaces have been found in humans. Two-dimensional navigation, she said, is only an anchor for something more general.

Does the model hold up in complex, social settings? An audience member noted that these results come from a single animal in a sterile environment and asked about richer tasks such as social behavior. Miolane said her lab has tried this with AI. They added a second agent and trained the AI to predict both its own position and the other agent's, framed as competitors for food. In that case, the torus "quite explodes." Whether the neurons can be separated to recover parts of the clean single-agent geometry is something she said they do not yet know. For this problem, the lab is in an exploratory phase: they have looked at the geometry but do not have the equations.

What does this mean for AI efficiency? The questioner contrasted AI's giant data centers and ever-growing appetite for data and compute with a brain that runs on roughly the power of a light bulb. Miolane extended the question: could this research show how to build more efficient AI? She said this is a second strand of her lab's work. Once geometric principles emerge in both brains and relatively simple AI systems, the lab asks whether those principles can be built into new AI technology. What they find is that a giant network with billions of parameters will converge to geometric representations on its own, but a smaller network does not do as well unless the geometric principles are embedded from the start. Part of the lab's work is therefore "small AI for small data sets": new architectures that respect geometric principles so they work in more challenging, data-limited regimes.

The conversation ended there. Several threads remain open, including the lab's forthcoming publication on why grid-like periodicity is optimal, the untested predictions about geometry in the visual cortex, and the multi-agent case in which the torus breaks apart and no equation yet explains it.