Is the Brain a Computer?
Part One
Imagine trying to follow a conversation that is hard to follow. A friend is telling you a story, but you are not sure whether it is a joke, a complaint, or a confession. Each sentence moves you forward through a space of possible interpretations. This is one of many mental navigation tasks that we all go through when we reason, remember or daydream.
Navigation may be more than an analogy here. When we learn new things, our brains appear to build maps of their associations. Brain regions such as the medial temporal lobe, long known for their role in spatial navigation, are also engaged when we mentally navigate through memories, concepts, and imagined possibilities. But why store memories this way? It seems very different from how a laptop stores information, and it may even introduce new forms of confusion.
Maybe this is just how evolution set us up: maps are more powerful than lists. You can navigate them, find shortcuts, and generalize from one region to another. But a map is only useful if you can locate yourself within it. In physical space, doing so requires the brain to maintain two frames of reference simultaneously: where things are relative to the body, and where the body sits in the world independent of its current orientation. These are called egocentric and allocentric frames of reference. This can be a challenging transformation. Walking in a strong crosswind, one may angle their body into the wind while their actual path across the ground moves in another direction. The brain can track both signals separately, but knowing the true direction of travel requires converting them into a common frame of reference.
This is a general problem for animals. A fly in flight may be pointing one way while moving partly sideways, so it needs to perform the same transformation. Remarkably, because the fly brain has now been mapped at synaptic resolution, we can see exactly how its brain does it. The answer appears to involve phasor arithmetic, the mathematics associated with Euler’s formula, implemented in the connections between fewer than fifty neurons.
This example, which I will return to in detail, may help illuminate why the question of whether the brain is a computer is worthwhile. It has generated sophisticated debates among scientists and philosophers. Yet, in public discourse, people often get stuck on the image of a laptop, with a central processor, stored instructions, and symbols being moved around in memory. Let’s clear that up right away: that architecture is certainly not what brains are doing. But rejecting the brain-as-digital-computer does not answer the question of whether the brain is some type of computer.
Computation, in the broad sense, is a process that transforms inputs into outputs according to some rule. One useful question is whether neurons and circuits carry out identifiable transformations on their inputs while representing something relevant to the world they inhabit. At the level of single neurons, local circuits, neural populations, and large-scale networks, the answer is almost certainly yes.
This post will move through the brain at different scales, using examples that are common in computational neuroscience. We will start with single neurons and then move to small circuits, where we return to the fly example, discussing how the wiring of a small circuit appears to add and rotate directions. Finally, we will move to mammals, where internal maps suggest that the same basic logic may support memory and planning. The goal, in the end, is for you to have enough material to help make up your own mind as to whether you think the brain is a computer.
At the level of single neurons
TL;DR: Neurons are far more than simple switches. Each one weighs thousands of incoming signals before deciding whether to fire. The dendrites, the tree-like branches that receive those signals, turn out to be surprisingly powerful computational devices in their own right, capable of solving problems that computer scientists once thought required an entire network.
Neurons are complex machines in their own right. They are thought to communicate through spikes, brief electrical pulses that they generate. In sensory organs, spike rates may be directly related to physical attributes of the world: a neuron may fire more as the physical intensity increases. This is what is often meant by a neuron encoding or representing the stimulus. Turning the physical attribute of the stimulus into a voltage change is known as transduction (see Figure below).
Deeper into the brain, synaptic inputs arrive as small currents, and the receiving neuron integrates them into charge that raises its voltage. When the voltage rises sufficiently, it can cause a spike, but whether that happens or not depends on the strength, timing, and location of inputs across its dendritic tree. The mathematics of spike generation itself, how ion channels open and close to drive the membrane through the characteristic rise and fall of a spike, earned Hodgkin and Huxley a Nobel Prize in 1963 and remains one of the most beautiful models in neuroscience.
From synaptic integration and spiking emerges a surprisingly rich computational repertoire. A neuron can implement basic logic operations. Two inputs arriving simultaneously can summate more effectively than inputs arriving apart, making the neuron a coincidence detector, an AND gate. In other instances, either of two independent inputs can drive firing on its own, making the neuron an OR gate.
Having dendrites that can generate their own spikes (active dendrites) expands the computational repertoire of single neurons and, in humans, is thought to enable non-linear operations that have been classically thought to be beyond the capacity of single neurons. Specifically, having active dendrites allows a neuron to implement exclusive OR, or XOR, a linearly non-separable classification problem.
From Larkum 2022 Partly based on Gidon et al.
At the level of microcircuits
TL;DR: When neurons wire together into circuits, the computations they can perform expand dramatically. A handful of connected cells can extract edges from a visual scene, track where your eyes are pointing, or adjust sensitivity on the fly depending on context. In these instances, the circuit architecture can specify the computation.
When neurons are connected into circuits, the computational repertoire expands further. The circuit receives one kind of signal and transforms it into another, and the nature of the transformation starts to rely heavily on the pattern of connectivity rather than the properties of individual neurons.
The retina provides a clean entry point. Retinal ganglion cells typically represent the world in luminance differences: excitatory drive in a central region and inhibitory drive from a surrounding annulus. A uniform field produces little response because center and surround largely cancel, but edges may drive strong responses. Formally, this is spatial differentiation and the result is a representation of contrast. Local retinal wiring turns one variable into its spatial derivative.
Circuits can also perform integration. A single neuron is a leaky integrator, which means it accumulates input but drifts back toward rest as fast as charge dissipates across its membrane, so it cannot perform true integration. True integration requires continued excitatory drive, or recurrent connectivity that counteracts the leak of single neurons. The oculomotor system is one of the clearest examples in neuroscience: moving the eyes requires a velocity command specifying how fast they should move, but holding them at the new position requires converting that velocity signal into a position signal specifying where they should remain. Brainstem integrator circuits perform this transformation. The calculus language here is quite real: position is the time integral of velocity, and the circuit computes exactly that.
Figure 1 of Seung et al. Signals in the Oculomotor System and the Architecture of a Recurrent Network Model. (A) Schematic of eye position and neural activity versus time in the oculomotor system.(B) Network model of the integrator based on recurrent excitation. All integrator neurons receive feedforward input from vestibular, excitatory burst, and inhibitory burst neurons. To make the diagram compact, only 5 integrator neurons are shown, but 15 were actually used in the simulations. Signals from the burst and integrator neurons are relayed by the motor neurons to the oculomotor plant, to produce eye position.
Circuits perform algebraic operations too. Gain modulation is a form of multiplication where one input scales the magnitude of another. A contextual signal can scale the response to a sensory input up or down depending on the animal’s behavioral state, attention, or expectation. In computational terms this is multiplicative gain control, one variable setting the gain applied to another, and it is found in many different domains. Our lab found it, for example, when studying how contextual signals from the thalamus can gate working memory representations in the prefrontal cortex. You can read the relevant piece here.
Divisive normalization is among the most thoroughly characterized computations in systems neuroscience. A neuron’s response to its preferred input is divided by the pooled activity of a surrounding population, mediated by inhibitory interneurons. The effect is to represent input across a wider dynamic range. It has been identified in visual cortex, auditory cortex, and olfactory systems, and appears to be a canonical computation the brain uses broadly.
The fly circuit: vector arithmetic
TL;DR: A fly’s brain solves a navigation problem that requires combining different directions into a common reference frame, and it does so using the same mathematics electrical engineers use to add wave signals. The key insight is that direction can be represented as the phase of a wave pattern distributed across neurons, and combining two such patterns produces a new pattern whose phase gives the correct answer. The wiring of the circuit was predicted mathematically and then confirmed directly by the connectome.
To understand what the fly circuit does, it helps to first review a piece of mathematics.
When you add two sinusoidal signals of the same frequency, the result is another sinusoid at that frequency, but with a new amplitude and phase. Tracking those two quantities directly with sines and cosines quickly becomes algebraically cumbersome. The reason is that a sinusoid is not fully described by a single number. At a given frequency, it has two key parameters: how large it is, and where it sits in its cycle.
Complex numbers are built for exactly this kind of problem: they provide a single algebraic object with two independent components. There is also a geometric picture that makes this concrete. A sinusoidal signal can be viewed as the shadow of a point rotating around a circle: the cosine gives the horizontal position of the point, and the sine gives its vertical position. The rotating point can be represented as an arrow whose angle encodes phase and whose length encodes amplitude. That arrow is a phasor.
Euler’s formula, e^(iθ) = cos(θ) + i·sin(θ), is the bridge between these descriptions. It says that a complex exponential contains both the cosine and sine components of a rotating signal. The angle θ encodes phase, and the magnitude of the complex number encodes amplitude. Multiplying by e^(iφ) rotates the arrow by φ, which corresponds to shifting the phase of the signal by φ. What would otherwise require trigonometric identities becomes simple multiplication.
This is why phasors are useful. Adding sinusoidal signals of the same frequency becomes equivalent to adding arrows in the complex plane. The resulting arrow gives the amplitude and phase of the combined signal directly. Electrical engineers love phasors for exactly this reason.
Figure from this nice tutorial
How is this relevant to the brain? Consider a ring of neurons, each with a preferred direction around the ring. If their activity forms a sinusoidal bump, with one neuron at the peak and activity falling off smoothly toward a trough on the opposite side, the pattern of activity across the population is itself a spatial sinusoid. The phase of this pattern, meaning the position of its peak around the ring, encodes a direction. The amplitude encodes the strength or confidence of the signal. This population-level sinusoidal pattern may be interpreted as a phasor: a direction represented as the phase of a sinusoid across a ring of neurons.
This idea was developed over years by the drosophila community. For example, in 2015, the Jayaraman lab found that neurons in the ellipsoid body are physically arranged in a ring, and as the fly changes its heading, a localized bump of activity moves around that ring. The bump is maintained by operations described in earlier sections: divisive normalization keeps the bump sharp and bounded, and winner-take-all dynamics, implemented through mutual inhibition, prevent multiple competing bumps from forming simultaneously. The bump persists in darkness without external input, which is the defining signature of a ring attractor, and snaps to the correct position when landmarks reappear. A ring attractor describes a robustly stable system that settles into one of a family of stable states and holds it.
From Figure 2 of Seelig and Jayaraman 2015. Activity bump moving around the ring that relies on the fly’s heading relative to landmarks rather than the landmarks themselves.
In 2022, Lyu, Abbott, and Maimon showed that the fan-shaped body downstream performs phasor addition on these types of representations. To compute allocentric traveling direction, the circuit must perform an egocentric-to-allocentric coordinate transformation by rotating, scaling, and adding four vectors related to the fly’s body-axis-referenced traveling direction. Direction is an inherently two-dimensional quantity: it has both a magnitude and an angle, which is efficiently represented by 2-dimensional vectors. The sinusoidal format of the neural signals does so via amplitude encoding vector length and its phase encoding direction. The fan-shaped body sums four such profiles, and because each can be understood as a phasor, their sum is a new sinusoidal profile whose phase encodes exactly the allocentric traveling direction that vector addition predicts. Neural circuits appear to perform vector arithmetic in a format that complex numbers describe naturally.
Illustration based on Lyu, Abbot and Maimon. Panel A shows the fly’s heading (H, pointing up) and its egocentric travel direction (T_ego, the green arrow at +45° relative to heading). The four dashed axes at +45°, +135°, -135°, -45° are the four PFN population axes onto which the travel vector gets projected. Panel B shows the decomposition. The egocentric travel vector is broken into four components (L1 through L4) along those four axes. Each component is then encoded as a sinusoidal activity pattern across the fan-shaped body columns, with the amplitude of each sinusoid proportional to the projection of the travel vector onto that axis. This is the phasor representation: each sinusoid’s amplitude is the vector length, its phase is fixed by the axis direction. Panel C shows that the h∆B neurons sum the four sinusoids to produce a single resultant sinusoid, and the peak of that resultant encodes the allocentric traveling direction T_allo on the world-referenced compass.
How was this figured out? The first step was functional: neural imaging via two-photon microscopy showed both sides of the computation simultaneously. Four input populations, each corresponding to one of the directional components, displayed sinusoidal activity profiles with amplitudes that varied according to the fly’s egocentric traveling direction. A separate population of output neurons displayed a new sinusoidal profile whose phase tracked the allocentric traveling direction. The inputs and output looked like phasors. The question was whether the wiring between them implements the arithmetic correctly.
A computational model made a specific prediction. The four input populations project from the protocerebral bridge, a bar-shaped upstream structure organized into columns where the heading direction signal is represented, into the fan-shaped body. Each population’s projection pattern determines where its sinusoidal peak lands across the fan-shaped body columns. When the output neurons sum the four profiles, the result depends critically on the relative positions of those peaks. Only one arrangement of peaks produces the correct allocentric direction. A different wiring pattern, placing any peak even slightly off, would point the output in the wrong direction. The model therefore predicted a specific set of anatomical offsets.
The hemibrain connectome, published in 2020 and analyzed in detail for the central complex in 2021, made it possible to check the actual wiring directly. The phase offsets in the anatomy matched what the computation required. The synaptic wiring is the computation, and the connectome was the proof.
From fly circuits to mammalian maps
TL;DR: In mammals, the brain may be using similar mathematics to the fly to build maps beyond physical space, extending to memories, concepts, and relationships. The same neural machinery that helps you find your way through a building may also help you find your way through a conversation. Exactly how our brains do it is one of the most interesting open questions in neuroscience right now.
The fly circuit is a powerful example because the computation is unusually clear. In the mammalian navigation system, the same mathematical logic may be at play. However, without the connectome, it must be inferred.
Mammals appear to have similar ingredients for navigation. Head direction cells, found in the anterodorsal thalamus and postsubiculum, fire when an animal faces a particular direction, and the population as a whole represents heading as a circular variable. These circuits have long been modeled as ring attractors, and the fly heading system gives a physically visible version of exactly that idea. Whether mammals implement the same attractor dynamics through analogous wiring is less completely resolved, but the computational motif appears conserved.
Grid cells in the medial entorhinal cortex add a second layer of organization. Each grid cell fires at multiple locations arranged in a repeating triangular lattice across space. Different cells within a module share the same spacing and orientation but have patterns shifted relative to one another. That shift is an important detail, because it means that the animal’s position can be represented as a phase within a repeating spatial pattern. Movement through the world becomes movement through phase, which is directly analogous to how the fly heading signal works: direction encoded as the position of a bump around a ring, updated continuously by self-motion.
The brain uses multiple grid scales, with different grid modules having different spatial periodicities. Combining phases across modules with different spacings can identify a unique location, much as overlapping rulers with different tick intervals narrow down a measurement. The hippocampus then may use this periodic infrastructure. Place cells, which fire in more localized regions, can be generated by combining grid cell inputs with different phases and spacings, each individually ambiguous but their combination selective. This gives the hippocampus a way to turn periodic coordinates into specific places, and helps explain how the same circuit that supports navigation also supports memory: a place is a set of associations.
In predictive map accounts, grid-like representations are treated as low-dimensional basis functions for predicting future states. The same mathematical logic, periodic structure, phase, and basis functions, extends from spatial navigation toward memory and planning. In a sense, many cognitive operations can be formulated as navigating through some sort of mental space that may rely on similar machinery to spatial navigation.
Indeed, human participants learning new conceptual relationships show hexagonal grid-like signals in entorhinal and prefrontal regions, and hippocampal theta oscillations track the semantic and temporal distances between memories during recall. Spatially periodic signals appear in both hippocampus and entorhinal cortex during navigation of abstract object spaces, with the hippocampal periodicity synchronized to the entorhinal signal in a manner consistent with a hierarchical transformation. These findings and related ones, suggest that the mathematical logic of representing relationships as phases in a periodic code and updating those phases to navigate between them, may extend from physical space into the space of meanings, associations, and predictions that the opening of this piece described. The conversation you were trying to follow may be navigated, at least in part, by some of the same machinery that helps you navigate the room you were sitting in.
Figure 1 of Park et al. Cognitive Maps in Everyday Decision Making. (A) Examples of zero-shot inferences in physical space, transitions between objects, and family trees. Representing abstract relationships as a cognitive map allows novel direct inferences that do not only rely on previously experienced associations. Black, experienced relationships; red, inferred relationships.(B) Bilateral ROIs generated independently from probabilistic maps. (C and D) Two hypotheses concerning how the brain could represent and flexibly switch between dimensions that characterize the same entities to guide inferences. (C) The brain could construct two separate maps for representing each 1D hierarchy learned on a separate day, and distinct regions could encode the 1D rank difference in the task-relevant dimension (D) and the 1D rank difference in the task-irrelevant dimension (I). (D) Alternatively, the brain could construct a unified map consisting of two dimensions and encode the inferred Euclidean distance (E) over the 2D representation
The fly gave us a beautiful transformation via the very wiring of its brain. Does our mental navigation rely as heavily on our connectome or on other features that may be more flexible? This is an open question and as connectomics make further progress in mammalian brains, we will be able to learn more.
So is the brain a computer?
Not if by computer we mean a laptop: a device with a central processor, stored instructions, and a clean separation between hardware and software.
But if computation means transforming inputs into outputs according to rules, while operating over representations that matter for perception, action, memory, and planning, then the answer looks different. Describing the brain computationally also lets us see deep links between things that otherwise appear unrelated. Who would have guessed that the machinery we use to navigate physical space might also help organize knowledge more generally? And that part of this machinery may be described using Euler’s formula seems both beautiful and strange.
Yet the hard philosophical question is not whether neural activity can be described with mathematics. Rivers and pendulums can be described with mathematics too. The harder question is whether the variables inside the system represent something for the organism, or whether that is a description we impose from outside on a physical process that simply runs. There is a reasonable answer to this. The fly’s fan-shaped body does not merely correlate with allocentric direction: disrupting it specifically impairs navigation while leaving other functions intact, and the signal is consumed by downstream circuits in ways that are sensitive to its content. A pendulum’s motion does not causally organize anything downstream based on what it means. That kind of functional organization, where a signal is used by the rest of the system in a content-sensitive way, is the strongest available criterion for genuine representation, and it is one the examples here appear to meet. Whether that criterion is sufficient, or whether genuine representation requires something more, is where serious people disagree. In essence, that debate is why the question is worthwhile.
So what do you think? Is the brain a computer?
Acknowledgement: I would like to thank Ana Lund for helpful comments.
If you found this piece useful, please consider subscribing and sharing it with someone who might appreciate it.













Illuminating discussion!
"One useful question is whether neurons and circuits carry out identifiable transformations on their inputs while representing something relevant to the world they inhabit. At the level of single neurons, local circuits, neural populations, and large-scale networks, the answer is almost certainly yes."
I am curious. Are there folks in the neuroscience community who would disagree that neurons and circuits carry out identifiable transformations and their functional organization not only correlates with aspects of the external world but has downstream causal relevance? If so, what explains the disagreements? And if not, then what's the whole "representation" theoretical debate really about? It seems to me that once we concede that functional organization captures some property of the external world and is causally relevant, debating whether this is "representation" or not seems rather superflous.
Michael, lovely piece and unusually honest. “What Might Cognition Be, If Not Computation?” is exactly the kind of question cognitive science has been circling for decades, and it still matters. I really liked that you named the “describable by math ≠ computing” trap yourself; that move saves the argument from the cheap version of this debate. And the fly example is beautiful, one of those rare cases where the levels really seem to close down to the wiring. “The synaptic wiring is the computation” is a great line.
Two thoughts/questions.
First, the definition of computation still feels broad enough that I start wondering about the pancreas: it also transforms inputs into outputs according to rules over variables that matter to the organism. So what exactly disqualifies it? I’m sure you have an answer, but making the cutoff explicit would strengthen the conclusion.
Second, regardinig representation: the fan-shaped body lesion indicates that the signal is necessary for function, but necessity alone may not be sufficient. A power supply is necessary for navigation too, and it doesn’t represent heading. The harder comparison might be van Gelder’s Watt governor rather than the pendulum: a system that causally organizes downstream behavior in a content-sensitive way yet which many would still resist calling representational.
The thing I’d most like to see you chase is that your strongest examples, the ring attractor and the integrator, are not merely input-output mappings. They hold state: the bump persists in darkness, the eye stays put. That sounds like memory/maintenance or more generally, state dynamics, rather than just an input >> output transformation. So maybe the intro framing slightly undersells your own best cases.
Looking forward to Part Two. I’m curious whether predictive processing will come in as support for the thesis or as a competing way of telling the story :)