Why Brains and AI Both Build a Torus: Nina Miolane on the Geometry of Intelligence
The Long Now FoundationHow 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.
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.
So, we're after building what we call a mathematical theory of intelligence. We believe that there are unifying principles, mathematical equations that can describe how intelligent systems, both brains, but also machines, how these intelligent systems operate in the world.
Hi everyone. Thank you so much for coming. I'm Claire. Oh, when Nina's speaking, I invite you to keep in mind conceptual shifts in her speech. That's different from what you have heard about what the brain is. The brain is a computer, the computer is a brain. So many discussions right now are on evaluating if AI is conscious or not conscious. Does it cross a certain threshold? And of course, we run into all sorts of trouble because how we construct that threshold, there's no consensus. And Nina starts from the other way around, and we're so pleased to have her. Thanks, Nina.
Thank you, Claire. This is where it all begins. This is the brain of a mouse. More particularly, it's a recording from my colleagues at UCSB of the visual cortex of a living mouse. And on this recording, you might detect these flashing lights, this burst of light, fast flashes. These are firing neurons.
And so, what this is showing is that now we have access to incredible technology that allows us to image the living brain and the neurons firing within it. And that's just an example. We have new technology today that allows us to image hundreds of thousands of neurons, sometimes up to 1 million neurons in the living brain.
So, that's extremely exciting, but it also highlights a key tension in neuroscience right now, which is that technology has outpaced our theoretical understanding. Sure, we can watch what is happening in the living brain in almost real time, but we do not know how the firing of these neurons encodes our subjective experience.
If we look at these patterns, honestly, at least to me, at first they seem quite disorganized. They seem almost random. Where is the structure there? And yet, somehow, in this randomness, is encoded everything we see, everything we hear, everything we feel, touch, even our decision-making, our capacity of planning and acting and interacting in this world is encoded in the firing patterns of these neurons. How is that possible? And how can we even begin to make sense of the complexity of this data? What is the right approach? What are the right tools, the right mathematics?
This is the question that animates my lab. But it's also a question that has animated neuroscientists for quite some time, and even before we had such incredible recordings. Scientists were asking, how do neurons, how does the electrical activity of neurons encode the subjective experience?
And because neuroscientists have thought about that for over a century, for a moment we're going to take a step back in time and look at the neuroscientist that discovered the first clue to answer this question. The first clue to answer how do the firing patterns of neurons encode our subjective experience. That researcher is Edgar Adrian, and he got the Nobel Prize in 1932 for that discovery.
And Edgar Adrian was interested in how neurons encode our subjective experience, but he was particularly puzzled by one thing, which is that neurons have a binary code. In other words, the neuron is either on or off. Either it's firing, it's on, or it is not firing, it's off. The magnitude of the firing, the voltage of the firing is almost always the same. So, really it's a binary code, either the neuron is on or the neuron is off.
And that was very, very puzzling for Edgar Adrian because that seemed to be completely contradictory with subjective experience. Because our experience of the world, at least to us, feels very continuous in some sense. You can tell the loudness of a sound, the redness of the red, the intensity of a touch. So, how is it possible that a binary code, a neuron that's either on or off, encodes this continuous subjective experience?
And Edgar Adrian found an answer to this question. He took the leg of a deceased frog, which is what you see here. And in this leg, there were neurons that were known to fire when the muscle was being stretched. And so, he recorded from those neurons when he was putting different weights at the extremity of this muscle. And he was asking the question, how will this neuron behave if I put more weight? If I put 5 g, 10 g, 25 g.
And what he saw is that the magnitude of the firing of the neuron didn't change, but the number of times the neuron was spiking, that was changing. So, that's what you see on the column here. At the top is when he was attaching a small weight, say 5 g. And the neuron was firing once. And at the bottom is when he was attaching a bigger load, say 25 g. And in that case, the neuron was firing five to 10 times.
So, the number of times the neuron is firing, or the firing rate, we code the number of times per say 10 milliseconds, that firing rate is a continuous variable that is encoding a continuous experience, here the intensity of the weight that was attached to the leg of the deceased frog. And that was an extraordinary discovery, and it also unleashed a program in neuroscience that lasted over a decade.
And in this program, researchers were looking at individual neurons and asking the question, what is this neuron coding for? And what is that neuron coding for? So, for example, a little bit after Adrian, Hubel and Wiesel got the Nobel Prize for the discovery of a neuron in the visual cortex that would react every time I have a vertical bar in my visual field. So, for example, the sides of those windows here are vertical bars, and I would have a neuron in visual cortex that fires every time I look at the vertical bar. That got the Nobel Prize.
And then a bit later, other neuroscientists were recording from another part of the brain, a part that encodes navigation or sense of place. And there they found neurons that fire, that have an increased firing rate, every time I'm in a specific location in space. So, every time I'm here, I have some neurons in my brain that fire to encode the fact that I'm currently right here in this room. These are place cells and also got the Nobel Prize.
And then other researchers made another kind of peculiar discovery by pushing this logic. Back to the visual cortex, a bit more recently, researchers discovered that there was one neuron that was firing every time Jennifer Aniston was mentioned. So, yes, the actress. They found a neuron in visual cortex that would fire like crazy every time there would be a picture of Jennifer Aniston. Doesn't matter the clothing, doesn't matter the haircut. It could be a drawing of Jennifer Aniston. It could be the words Jennifer Aniston. That neuron will fire like crazy. They called it the Jennifer Aniston neuron.
And it's one of my favorite findings because I think it's really weird and interesting, but the Jennifer Aniston neuron also highlights one of the limitations of this research program. This research program is what we called the single neuron doctrine, because it's a program that looks at individual neurons and asks, what is this neuron firing for? What is that neuron firing for?
But this program has limitations. First, there are 80 billion neurons in the human brain. So, if we want to catalog what each neuron does, we're going to be here for a very long time. And also, a lot of those neurons are not as interpretable as the ones I've just mentioned. There are neurons that code for Jennifer Aniston, but there are also neurons that code for many things at once. Maybe a neuron that codes for the color red and also curvy lines. And so, it's an explosion of possibilities if we want to catalog what each neuron is coding for in the human brain.
And so, these limitations have brought my lab and other labs around the world to kind of move away from the single neuron doctrine and to embrace what we call the analysis of population coding. So, we don't analyze one neuron at a time, but rather we ask what does this group of neurons, this group of a thousand neurons, code together. And what my lab is doing in particular is to write a mathematical theory of intelligence. We believe in mathematical equations that can describe the geometric patterns that you find when you look at the collective activity of a thousand neurons.
And I'm going to show you how that works. So, this is a simplified representation of the brain. We have just a few neurons to make it simple, and we're going to focus in particular on three neurons, the blue, the red, and the yellow. These neurons are firing, and on the top right we record their firing rates. So, you can see that neuron one has a firing rate that oscillates, neuron two has a firing rate that oscillates, and same for neuron three.
Now, the conceptual shift and what our lab is bringing to the table is basically to propose a new way of visualizing the same data. We have these three time series of the firing rates of those three neurons, and we're going to represent it differently. We're going to represent it in the 3D space that you see on the bottom right there.
So, we take a point in time. At a point in time, neuron one has a given firing rate, neuron two has a given firing rate, neuron three has a given firing rate. These are three coordinates that we can plot in the 3D space. So, in this 3D space on the bottom right, every dimension represents the firing rate of one neuron. The X axis is the firing rate of neuron one, the Y axis is the firing rate of neuron two, and the Z axis is the firing rate of neuron three. And so, one point in this space represents the collective activity of the three neurons at a time t.
And as time unfolds, well, you see the point is moving in this 3D space, the black point. And so, what's striking in this animation, this is just a simulation, is that in that case, the geometric pattern of activity that is described is a perfect torus. That's a donut shape.
Now, that's just an animation, that's a simulation, that's not real data, but I'm going to show you now real data. So, that is what you get if you record from a brain circuit in a mouse brain, if you record from a brain circuit that encodes space, that encodes where the mouse thinks it is at a given point in time.
Researchers recorded from 150 neurons, and they plotted the collective activity of these 150 neurons as a point in a 150 dimensional space. On the previous slide, I was showing you three neurons, therefore a 3D space. But researchers recorded from many more than three neurons. In that case, they recorded from 150 neurons, and so the collective activity is one point in 150 dimensions. For us to see, they projected that down to 3D, and that is what they found. This is a torus.
Now, this is real data, and the electrical activity of 150 neurons organizes itself on a torus. And when you think about it, that's very, very profound because they recorded from 150 neurons, meaning that point in this 150 dimensional space could have gone anywhere, could have explored all the 150 dimensions of this crazy high dimensional space, and yet there are such strong structures that constrain that point to live in the 2 dimensional surface of a torus. Even if in the 150 dimensional space, we have this 2 dimensional torus that here we see in 3D.
And so, this type of structure is really where the work of my lab begins because we're not content to just observe the geometry of the electric patterns of the collective activity of neurons, we want to know why they are there.
So, to give you an analogy, I'm a physicist by training, and in physics, Kepler was the first to discover that the trajectory of planets around the sun was elliptical. That was a beautiful and perfect geometric discovery, but he didn't explain why the trajectories of planets around the sun were elliptical. He reported it. So, that's what we're doing now. We're reporting the electrical activity of neurons is a torus in that case.
What Newton did is deriving laws that explain why the trajectories of planets are elliptical around the sun. That's a direct consequence of Newton's laws of motion and theory of gravitation. And that's what my lab is after, finding the equations that can explain why we see such beautiful and symmetric patterns when we plot the geometry of the electrical activity of neurons.
So, we're after building what we call a mathematical theory of intelligence. We believe that there are unifying principles, mathematical equations that can describe how intelligent systems, both brains, but also machines, how these intelligent systems operate in the world. So, I hope that we get to touch on this today in our conversation.
Thanks, Nina. That was fascinating. Can you talk about artificial systems and, let's say, human systems, biological and non-biological? You're actually working on creating intelligent systems and then noticing the mathematical similarities, as opposed to, let's create an AI that is exactly like a human mind, but just made out of a different material. Tell us why you did that and why it's important.
Thank you for that question. Yeah, it might seem weird maybe at first to think that we can find unifying principles across biological intelligence and artificial intelligence because biological neural networks and artificial neural networks do have fundamental differences, right? Biological neural networks are made out of biological neurons, living matter, squishy stuff, it's the wetware of the brain, and artificial neural networks are made out of silicon. It's the hardware of the computer. So, how could it be that these systems that seem very different can obey the same equation?
And so, we think of it not at the level of the substrate, not at the level of the biological neuron versus the artificial neuron, but really at a higher level, which is the level of computation, the level of the algorithm. The substrate might be different, but the equation that's implemented by the substrate is the same.
And so, that's why we are training AI algorithms to solve the same task as the biological system, because we first wanted to, well, test that hypothesis, that hypothesis that there are common algorithms, common equations that govern intelligence. So, we trained AI to solve tasks that we know the brain is solving, for example, to solve the task that leads to that torus, which is a task of spatial navigation.
What leads to that torus is when you ask a biological brain to predict where it thinks it is in 3D space. That torus is encoding 2D space. A point on that torus corresponds to a point where the intelligent agent currently is in 2D space. So, we wanted to see what happens if we trained an AI to predict its position in 2D space. From what? From similar input that is currently given to a brain.
So, the way the brain does that is it takes in self-motion cues, its velocities, it takes in its current estimate of position, and it outputs its next estimate of position. So, what if we trained an AI to take in self-motion cues, its velocity, and predict where it is in 2D space?
And if you do that, and we've done it, and others have done it even before us, and then you crack open the artificial neural network, and you print the activity of the artificial neurons, you do get that torus. And this works across different initializations, it's not that one time it worked, it works over and over again. And so, that's kind of a confirmation of this hypothesis that there are universal laws that regulate how both biological brains and artificial brains operate.
It's very, very profound because if you think about it, biological neural networks have evolved over millions of years with the process of evolution. And then the AI that we built in the lab is trained in a few minutes using the process of gradient descent of a loss function. Different. And somehow, even if the two training mechanisms or the two evolution mechanisms are also completely different, somehow they converge to the same solution.
That's true across initialization and architecture for the AI. For the biological neural network, it also holds across species. So these tori have been observed in mice, in rats, to some extent in monkeys, and to some extent in humans. So there seems to be something very,
very universal about the computation, even in that case of estimating one's position in 2D space.
Wonderful. I hadn't realized that we can describe a wing as something that animals use to alight, or actually humans, kind of with Bernoulli. There's convergent evolution in the sense that a pterodactyl and a bat come from really different evolutionary lineages, and then they end up functionally doing something very similar. Can you talk about how you're using algorithms to describe intelligence in particular, and specifically why it's a better way than trying to usher along like the development, let's say, of a wing, but instead use the algorithm to give another kind of materiality, the mathematical principles to perform the function in the world, even though they can be completely different things.
Yeah, so why do we think the algorithm has such great power? And maybe I can talk a little bit about what the algorithm is, because this torus, as I said, we observe it in different species, we observe it when we train different AI. But this torus is just the starting point of my lab, and the goal of our lab is to write the mathematical equations that explain why we do find these tori everywhere. So what's the algorithm that's behind it?
And so this torus encodes space, but it has a periodic structure, right? You can go around one of the circles, or like that. So it's a very periodic structure. And somehow this periodic structure encodes 2D space. So for example, the 2D space of this room, that's not periodic at all. And so that's the clue of what the algorithm is. What both brains and AI in that case do is that they encode space with kind of a Fourier decomposition of space.
So you might know Fourier from signal processing. Sound engineers do know that much better than I do, but basically if you have a sound, you can decompose it into sine waves of different frequencies. And now these sine waves are periodic. The periodicity corresponds to the frequency. And so that's a little bit what is happening at the level of the algorithm, is that space is being decomposed into some type of Fourier decomposition in both brains and machines, and then computations are done in this Fourier space before being decoded again.
So to your question, why is that an optimal solution? Well, it's very interesting because both brains and machines converge to it. But why it's an optimal solution is because in Fourier you can decide to take only a few frequencies, and you're still going to have a pretty good approximation of the signal. So maybe this frequency appears with a high magnitude, and this frequency with a high magnitude, and then the rest doesn't have such a high magnitude in the decomposition of your signal. If you take the first two, if you truncate after the first two, you still have a really good representation of the signal. So I think it's a very efficient and smart way of encoding space in this case.
And perhaps time. So, you know, you've mentioned a 150-dimensional space, 2D space represented in this three-dimensional object that's on a flat screen. And as humans we're three-dimensional, I hope. And we move through time, we're aware of time. Do you think that artificial minds, non-biological minds, in taking this all in, experience time in a particular way? Especially because we can actually control our experience of time. Like dreaming, time falls away. Reading a book, you can time travel back to Dracula. And time is stretchy, too. And you have episodic memory, but you don't remember big chunks of stuff, but it's really tied to emotions. So within the same framework that you're describing mathematically, how might a non-biological mind, let's say, perceive time in a different or similar way?
Yeah, thank you. That's a very interesting question. So, we haven't done the experiment of how biological networks or artificial networks experience time, but we have done the experiments of how they experience space. And it turns out that space can be a bit stretchy, too. So, if you allow me, I'll speculate the answer to your question.
So, what we've done in these artificial neural networks is that we have introduced in the 2D space that they seek to represent a reward. A location of interest. In the real world, that might represent, you know, food for the animal, or the presence of a friend, or the presence of something you care a lot about at this particular location in space. And when we do so, we see that the AI wants to basically have a better resolution to represent space at the location where we put the reward, where we put the thing of interest. And so what's going to happen is that in order to have a better resolution to describe this point in space, it's going to allocate more neurons to do the Fourier decomposition of that point in space. And we're going to be able to see that in the geometry of the collective firing pattern. Because what happens is that this torus is going to deform to provide more resolution to the point in space that the AI is interested in.
And so that's some experiments we've done on the AI. But on the biological side, neuroscientists have done similar experiments, and that is also what they see. If you introduce food in the environment, you're going to have these neurons, the place cells and the grid cells, that call them, that kind of reorganize their firing patterns to provide a better resolution at that position in space to make sure that when you go to that position in space, you don't make an error in predicting your position. So again, convergence between what we see in the AI system and what neuroscientists have observed in real biological systems. So that's an example of space that can be stretchy.
It's actually very interesting because there is a cool analogy with general relativity. So if you allow me, again, general relativity was one of my favorite topics when I was in grad school, and it's actually a really interesting theory because it's also a theory of geometry. So, I don't know what you thought when you looked at the title of tonight's event, but the geometry of intelligence, why geometry? How is it a good idea to use this field of mathematics to describe the brain? Well, actually using geometry to describe natural phenomena is not new at all. Geometry has a very long history of successful models in physics.
And general relativity is a prime example of that. So Einstein used geometry, Riemannian geometry, to describe the geometry of space-time. Of four-dimensional space-time. Four-dimensional space-time curves when there are massive objects. So for example, next to planets, or next to black holes. And what general relativity does is a geometric theory of gravitation that explains how much space-time curves around planets and black holes. And actually geometry has been so successful in physics that Albert Einstein called it the most ancient branch of physics.
So if geometry as a mathematical field is a language that's precise enough to describe the universe around us, now it's not so crazy to think that it's going to be precise enough to describe the universe inside us. And so we're using the same mathematics that physicists have used to describe general relativity, but we use them to describe geometric patterns like the torus that we've been talking about.
Okay, you know, because you mentioned general relativity, I want to talk about LIGO really quick. Large Interferometer Gravitational Wave Observatory, and one is in Prosser, Eastern Washington. To me, it's a really good example of a scientific experiment that is trying to prove a theory that already exists, that there can be these supermassive black holes in space, they collide, they warp space-time, and sometimes they're in the direction of the observer, us, and these machines are sensitive enough to, I think, 1/100 of the diameter of a proton. And I think that they're even more sensitive. I hope they're more sensitive now.
CERN is the same in terms of the Higgs boson. This is a mathematical thing that happens and we're going to build this particle accelerator to get the experimental results. It seems to me, though, that the Geometric Intelligence Lab is doing something differently. The theory is catching up to the technology as opposed to trying to prove any specific physics or mathematical theory.
Yes, that's true. So we do have to catch up to the recordings and the data that this amazing technology has provided us. But then a theory is only useful if it can make new predictions. Otherwise, it's just a good story. If there are machine learning researchers in the room, you might know that you develop your model on the training set. But how good it does on the training set is not meaningful. We want to know how good it does on the test set, which is a data set that it has never seen before.
And so it'll be the same with theory of science. Sure, you want your theory to be able to explain recordings that we already have, the geometric patterns that you already see, but to determine if it's a good theory, you want it to make predictions on topics that have never been observed before and then convince your neuroscientist colleagues to do those experiments to see if the theory holds.
And so what we've been doing with this Fourier decomposition approach is to explain this torus, but our theory also makes predictions that go beyond this torus, which is the torus of spatial navigation. We also make predictions of what we think different systems, say in visual cortex, are going to encode, or more precisely the type of geometry that we think we're going to see there. So in that sense it's a little bit like the history of physics. Now we are at the stage where we are making predictions and we're about to confirm them with our colleagues. Yeah.
Wow. Amazing. Let's go back to Jennifer Aniston. Great haircut, right? The Jennifer Aniston — Thanks. — that you mentioned is emblematic of a particular methodology of neuroscience, which is trying to get MRIs or electrophysiology, yeah, machines to go more resolution, more resolution, more resolution. Like if you've seen early daguerreotypes, right? And then you see your iPhone. The latter has obviously many, many orders of magnitude better resolution.
And behind that is two things. One is that the progression of science is linear, that there's this teleological determination that we're going to discover the next thing and we're going to discover the next thing and we're going to discover the next thing. And also that discovering individual things is going to help us discover the collective thing. And this is also, I think, a problem in quantum mechanics. So you're really looking at the holistic picture of intelligence and the brain and consciousness. And I guess I'm just wondering, who are you convincing? Like your colleagues to not be like, "Okay, let's find, you know, the Nina neuron which is firing right now." How do you ask them to work the other way, instead of top-down, bottom-up?
Yeah, I'm not trying to ask them to work the other way. I'll convince them to do the same thing. I think both approaches have value. So it is interesting to find what this group of neurons is coding for. It is interesting that there is a Jennifer Aniston neuron. I think it's a complementary approach to the approach that we are taking. And actually we do use a lot of their findings.
So for example, to build this torus, this torus comes from these particular neurons that those researchers had discovered before, the grid cell neurons. So grid cell neurons are neurons that fire in periodic patterns when I move through this 2D room. One grid cell neuron forms a grid over space and it's going to fire a lot every time I cross one of the edges or corners of that grid. And so because the neurons they discovered have these periodic patterns, then when we plot them together in this 150-dimensional space, that's why we see the torus. So I think both approaches are kind of helping each other. We definitely, yeah, owe them a lot.
All right, let's talk about the future. Okay, so something we're really interested in at the institute is studying consciousness. You're an expert in the concept of intelligence across different kinds of systems, describing them mathematically. Could you use the same tools to, let's say, measure or create an algorithm for consciousness? And I mean, please speculate, right? How would you go from one to the other? And maybe you can define the difference between the two, how you see it.
Yeah, thank you. That's a very important question. So intelligence and consciousness are two different aspects of, say, the human mind. The way I define intelligence is the capacity of a system to perceive its environment and then take actions that maximize its chances of success at the given task. And so that's fairly different from consciousness. But we believe that the geometric technique that we develop can give us a handle on the study of consciousness. And in fact, we start to have some hint that this geometric approach can work for the study of consciousness.
So for example, talking about another type of geometric pattern that we see. In animals, there is another circuit called the head direction circuit. So that's a group of neurons that encode where my head is pointing at right now in the external reference frame of this room. If I turn my head, then another group of neurons is going to fire. So these are the head direction neurons. If you plot them together with the geometric approach, it's a thousand-dimensional space, you're going to see a ring, which is quite striking because the orientation of my head, it's an angle, an angle is a position along a circle, which is a type of ring.
And the researchers that have discovered this ring in the head direction circuit actually did two other really cool experiments in that they recorded from the same circuit during sleep. And during two phases of sleep, the REM sleep and the non-REM sleep. So REM, rapid eye movement, will be a phase of sleep where usually you dream a lot, or at least the dream is more intense. And the non-REM is a phase of sleep where you can say you're a bit less conscious, you're dreaming less. And so even though their study was not about consciousness, somehow it is poking at the question of consciousness. And so we can ask, how does this ring change when the animal was in different states of consciousness? Awake, asleep but dreaming a lot potentially, and then asleep and potentially not dreaming too much.
And what was really exciting is that between the state of awakeness and the state of REM sleep, so dreaming a lot, the geometry of the ring was basically unchanged. What changed was kind of the trajectory that the neural activity was taking along the ring. It was far more random in the dream phase, kind of a random walk. But then in the non-REM phase, the geometry of the ring kind of exploded. Exploded maybe is a strong word, but at least it stopped being a ring and it became kind of a two-dimensional cone. So the dimension changed and it became kind of way less structured, a bit more chaotic if you wish. And so even though we're not directly studying consciousness, by plotting the geometric pattern of neural activity through different states of consciousness, we start having some quantitative elements about what consciousness might or might not be. And as we saw, that's the starting point that we need to start writing mathematical equations.
So there's a triangulation of intelligences. There's you, your brain, your mind. There are the AI models that you are manipulating and shaping, but also it's whatever the conglomeration of that is after each iteration that you're finding, you're changing it. So you're both learning from each other. Let's just imagine a projected future in which your process just iterates over and over and over again. So much of being human, I mean, we were talking in the car about love.
Being... yeah, falling in love. And a lot of neuroscientists relate consciousness to affect. Think about Damasio. Wouldn't AI, let's say... I don't mean the opposite, organically. Let's say be aware of regrets or falling in love or grief, or what is the desire? Could an AI mind learn entangled with your mind?
Yeah, that's a really hard question. I don't know about the AI part, but already for the biological brain, trying to image this notion of affect, love, regret, or everything you want to study, it's already really hard. Like how can we detect, how can we decode from the geometric patterns of neural activity what this animal or what this being is feeling right now? It's really hard, but again, we do have some hints.
So, there is a study that I really like and that somehow gets at regret. And it's also about the navigation system, so it's on brand with the torus that we've been talking about. So this study, they have an animal moving through a maze during, say, the first day of the experiment. And this maze is quite complicated and sometimes it has junctions. And if the animal goes right, it's going to find food. And if the animal goes left, it's going to get lost and never find food. And so, when the animal moves through this maze, the point moves on the 2D torus encoding the position where the animal thinks it is during the day.
And what's really exciting is that at night, there is a phenomenon called replay, where the animal basically replays what it has been doing during the day. And we know that because there is a point of electrical activity that moves along the surface of the torus. And so, from that, we can decode not the actual position of the animal, because the animal is sleeping, so it's not moving, but the point on the torus is moving, meaning the animal is dreaming of where it is in space. And so, we can decode the position on the torus back to a position in 2D space.
And if you do that, researchers have found that the animal is replaying going through the maze. The positions on the torus map to locations on the maze. And what they found, and that ties to the question of regret, is that every time an animal made the wrong choice, like went left and didn't get the food, that's a situation it's going to replay even more, and it's going to play what would have happened if it had taken the other path. So, it's not exactly an encoding of regret, but we can find correlates of this affect that you're talking about in the activity of the mind, in that case during sleep.
Here's to not regretting anything. All right, thank you, Nina, so much.
Thank you.
Okay, we're going to take three questions.
Thank you. So, the question is, can we repeat why the torus? Why the torus could be in that case a good encoding of space? So, what does this torus represent? Every point on the torus corresponds to a 2D location of the animal, or say myself, in this 2D room. It's very weird. I would have expected to see maybe a 2D plane, because the 2D environment, the 2D room, is a 2D plane. So, why not find a 2D plane in the electrical activity of the neurons? And so, why the torus?
There are kind of two explanations that you can see. First, if you look at the neurons, the 150 neurons we are talking about that together form this torus, the firing map of one of those neurons is periodic. It has basically the shape of a grid. And so, because all of these neurons have periodic firing maps, it makes sense that the geometric activity that they're going to describe is a torus.
But then, it leads to the next question: why would those neurons have periodic firing maps? And that's the question that we have answered with the latest work from my lab that we're about to publish. Why is it optimal? It's optimal because encoding space with a Fourier decomposition is the most efficient thing that we can think of. So, this periodicity comes from the fact that the brain and AI are decomposing the 2D space via some type of Fourier decomposition. And the neurons are the basis vectors of that Fourier decomposition, and they are periodic. So, that's the answer we gave, and that's why the firing maps are periodic and that's why they lead to that torus.
And something really cool about that torus: I know we've been talking about position in 2D space, which might seem a little bit mundane, but actually the torus, you see it in other parts of the brain. So, for example, if you task animals to navigate an abstract space, that's not only X and Y of this 2D room, but maybe it's a space defined by different odors or different sounds, then they're going to encode that more abstract space also with a torus. You have tori in parts of the visual system. You have tori, or grid cells, that have been found in humans encoding abstract spaces. So, we're talking about navigating 2D space to kind of anchor things, but it's actually even more profound than that, because you find these geometric patterns when you navigate more complex spaces.
Great. Oh no, there's competing stuff. Let's get you.
Yes, so the question is, we see this beautiful structure when one animal is navigating 2D space, and also the space is pretty sterile. There is nothing in it. And so, the question is, how does this model hold up when we move towards more complex tasks? Maybe in the case of humans, if there are other agents in the room, how does it encode social behavior? Is it going to hold up?
So it's interesting that you talk about social behavior, because we've done that experiment in an AI, where we introduce another agent in the room. And now we model the fact that the AI, or the agent, is going to also predict the location of the second agent. So, kind of a social interaction: let's say they're competing for food, I want to know where my opponent is going to be. And so, you can train an AI to predict both its position in space and the position of another agent in space. And what happens is that the torus, this time, kind of explodes.
So, the question is, why? Can we maybe separate the neurons and try to find back some part of the perfect geometric patterns that we had in the single-agent case? We don't know yet. For that, we're at the exploration phase, in that we have looked at the geometric activity, but for that, we don't have the equation. Yeah.
Thanks. Okay, one more. Go ahead.
So, the question is about efficiency. Right now with AI, we're building giant data centers. We are feeding them more and more data and more and more compute. And this is in sharp contradiction with what the brain is doing. The brain basically operates with the power of a light bulb. So, what is it that we are doing wrong with AI? And maybe, if I might continue your question, could this type of research give us insight into how we should build AI so that it's more efficient?
And yeah, that's actually kind of a second panel of what my lab is doing. Once we have geometric principles that seem to emerge in both brains and machines, but these are relatively simple AI systems, then we ask, can we take those principles and embed them in novel AI technology? And what we find is that if we take a giant artificial neural network with billions of parameters, it's going to converge to geometric representations. But if you take a smaller artificial neural network, it's not going to do as well until you embed those geometric principles a priori. And so, part of what my lab is doing is kind of AI for small data sets, or small AI for small data sets, where we build new architectures that respect geometric principles so that they work in those more challenging data regimes. Yeah.
Yeah. Okay, let's give another round of applause for Nina's fascinating...
Article published
