Inside the mind of an animal

Neuroscientists are scrutinizing huge piles of data to learn how brains create emotions and other internal states such as aggression and desire.
Alison Abbott is a writer based in Munich, Germany.

Search for this author in:

Conceptual illustration representing internal brain states.

Illustration by Karol Banach

Two years ago, Jennifer Li and Drew Robson were trawling through terabytes of data from a zebrafish-brain experiment when they came across a handful of cells that seemed to be psychic.

The two neuroscientists had planned to map brain activity while zebrafish larvae were hunting for food, and to see how the neural chatter changed. It was their first major test of a technological platform they had built at Harvard University in Cambridge, Massachusetts. The platform allowed them to view every cell in the larvae’s brains while the creatures — barely the size of an eyelash — swam freely in a 35-millimetre-diameter dish of water, snacking on their microscopic prey.

Out of the scientists’ mountain of data emerged a handful of neurons that predicted when a larva was next going to catch and swallow a morsel. Some of these neurons even became activated many seconds before the larva fixed its eyes on the prey1.

Something else was strange. Looking in more detail at the data, the researchers realized that the ‘psychic’ cells were active for an unusually long time — not seconds, as is typical for most neurons, but many minutes. In fact, more or less the duration of the larvae’s hunting bouts.

“It was spooky,” says Li. “None of it made sense.”

Li and Robson turned to the literature and slowly realized that the cells must be setting an overall ‘brain state’ — a pattern of prolonged brain activity that primed the larvae to engage with the food in front of them. The pair learnt that, in the past few years, other scientists using various approaches and different species had also found internal brain states that alter how an animal behaves, even when nothing has changed in its external environment.

Some, such as Li and Robson, had come to the discovery serendipitously while trudging through their own brain-wide data. Others have hypothesized that neurons coding for internal brain states must exist, and have actively sought them in discrete and well-researched brain regions. For example, earlier this year2, neurobiologist David Anderson at the California Institute of Technology (Caltech) in Pasadena and his colleagues identified an internal brain state — represented by a small network of neurons — that prepares fruit flies to engage in courtship or fighting behaviours.

Neuroscientists wanting to understand the brain’s coding language have conventionally studied how its networks of cells respond to sensory information and how they generate behaviour, such as movement or speech. But they couldn’t look in detail at the important bit in between — the vast quantities of neuronal activity that conceal patterns representing the animal’s mood or desires, and which help it to calibrate its behaviour. Even just a few years ago, measuring the activities of specific networks that underlie internal brain states was impossible.

A slew of new techniques is starting to change that. These methods allow scientists to track electrical activity in the brain in unprecedented detail, to quantify an animal’s natural behaviour on millisecond timescales, and to find patterns in the mountains of data these experiments generate. These patterns could be signatures of the innumerable internal states that a brain can adopt. Now the challenge is to find out what these states mean.

Scans through a zebrafish brain with functionally classified neurons highlighted in colour

Three groups of neurons control when zebrafish larvae stay put (left), explore (centre) and switch between the two states (right).Credit: J. C. Marques et al./Nature

Some neuroscientists are daring to wield the technologies to probe one powerful group of internal brain states: emotions. Others are applying them to states such as motivation, or existential drives such as thirst. Researchers are even finding signatures of states in their data for which they have no vocabulary.

The current trickle of research papers on internal brain states is gaining momentum. The work might even have potential clinical applications. “Mental illness is essentially disruption of internal states,” says Joshua Gordon, director of the US National Institute of Mental Health in Bethesda, Maryland. “They need to be understood.”

Frames of mind

The brain of any animal is constantly bombarded with information about the creature’s environment from sensory organs such as the eyes, ears, nose or skin. All of this information is initially processed in the brain’s sensory cortex. Then come more mysterious processing steps, in which that information is filtered through multiple internal brain states representing the creature’s constantly changing moods and needs. That finally leads the motor cortex to generate movements that are appropriate to the circumstances — to flap away a tickling fly, for example, or to move towards a tasty treat. Internal states can also be generated entirely in the brain, without sensory input and without a behavioural output: think of daydreaming, or replaying the events of the day in your mind.

Over the past few years, insights into the nature of internal states are changing how neuroscientists who study brain networks think about animal behaviour. “We used to think of animals as being kind of stimulus-response machines,” says neuroscientist Anne Churchland at Cold Spring Harbor Laboratory, New York. “Now we’re starting to realize that all kinds of really interesting stuff is being generated within their brains that changes the way that sensory inputs are processed — and so changes the animals’ behavioural output.”

Sketching out how to study this intriguing middle ground has long been a preoccupation for Anderson. Six years ago, he decided to create a theoretical framework for research into internal brain states that represent emotion. He was irked by the view of some psychologists, who think that because animals can’t express their feelings in words, those feelings can’t be studied at all. Together with his Caltech colleague Ralph Adolphs, Anderson developed and published a hypothesis3 about the characteristics that neural circuits associated with internal brain states should have.

Most importantly, they thought, an internal brain state should outlast the original stimulus that triggered it. So a key feature of a neural circuit underpinning such a state would be its persistence, he says. “If you are hiking in mountains and see a snake, then you might jump in fear,” says Anderson. “Ten minutes later, your brain’s internal state of fear is still active, so when you see a stick on your path you might jump again.”

Other characteristics of internal states should include generalizability, meaning that different stimuli should be able to prompt the same state, and scalability, in which different stimuli can create states of different strength. The paper became influential. Li says that it “was inspirational” as she and Robson were trying to make sense of their psychic cells.

Two female researchers in white coats look at four computer monitors showing colourful data charts

Researchers at the Allen Institute in Seattle, Washington, use Neuropixels probes to record the activity of hundreds of neurons at once.Credit: Allen Institute

Anderson and Adolphs published their paper in 2014, just as a raft of neurotechnologies was starting to make the necessary experiments feasible. It was already possible to record from large numbers of individual neurons at the same time, and since then the technologies have improved and expanded remarkably, allowing scientists to analyse previously inaccessible activity.

Leading the pack is the Neuropixels probe, just 10 mm long, which can directly record activity in hundreds of neurons across different brain areas4. And special imaging techniques can indicate where as many as tens of thousands of individual neurons are active across the brain. In calcium imaging, for instance, animals are genetically engineered to express a molecule in their cells that detects calcium ions — when these pour into a neuron as it fires, the molecule fluoresces.

New automatic behaviour monitors take video recordings of freely behaving animals over many hours, and analyse every movement in millisecond elements. The elements can then be aligned with neural recordings, matching moment-to-moment brain activity with specific movements.

Neuroscientists have capitalized on a surge in machine learning, artificial intelligence and new mathematical tools to make sense of the gigabytes or terabytes of data that any experiment with these technologies can generate, and to coax out the neural activation patterns that could represent internal brain states.

Ready to engage

For his first study of an internal state, Anderson decided to build on his laboratory’s previous interest in aggression in the fruit fly, which has a tiny brain containing about 100,000 neurons. In many animal species, males start to fight each other in the presence of females — a well-established behaviour that Anderson calls the ‘Helen of Troy effect’, after the Greek myth about a woman whose competing suitors started a war. Fruit flies are no exception: indirect evidence suggests that exposure to females causes males to engage in both courtship songs and aggressive behaviour towards other males for many minutes. “That’s a long time in the short life of a fruit fly,” he says.

He decided to search for neural activity that correlated with the persistent courtship and fighting behaviours that are initiated by neurons known as P1, found in a region that controls such social behaviours. These neurons fire so quickly that they alone couldn’t be responsible for maintaining an internal state. Using imaging techniques along with automated behavioural analysis, his group identified cells in other brain areas that become active as a consequence of P1 activation.

Most of these ‘follower cells’ switched quickly on and off, but a cluster called pCd neurons stayed active for many minutes. When the researchers inserted a light-sensitive protein into these cells and switched them off using a flash from a laser, the persistent effect of P1 activation on behaviour disappeared. When they activated them directly, bypassing P1, nothing happened: the pCd neurons needed P1 as a trigger and, once sparked into action, they stayed on for much longer than the initial prompt2. If Anderson had to give the state a name, he might call it the ‘ready-to-engage-in-these-social-behaviours’ state, he says.

His team has conducted a similar experiment in mice5, which have more complex brains containing about 100 million neurons. The researchers found a particular group of neurons in the hypothalamus that, just like the pCd neurons, became persistently activated in association with an innate drive — this time, fear. When the scientists placed a rat close to experimental mice for just a few seconds, the mice responded defensively by hugging the wall for several minutes and the group of neurons remained active for all this time. When the team again used light to switch the neurons on and off, the wall-hugging behaviour came and went in tandem, even with no rat present.

Video of mouse twitching its whiskers and neural activity shown simultaneously

Even during a task, this mouse dedicates most of its brain activity to twitching its whiskers.Credit: C. Stringer et al./Science

Neuroscientists are now discovering other groups of neurons with persistent activity in different brain areas. Using calcium imaging in mice, Andreas Lüthi at the Friedrich Miescher Institute for Biomedical Research in Basel, Switzerland, and Jan Gründemann at the University of Basel searched in the amygdala, which is central to the regulation of a range of emotions and behaviours. The team found two different populations of neurons that displayed sustained but opposing activation when the mice switched between two distinct behaviours6 — exploring the environment and performing defensive behaviours such as freezing.

Gründemann acknowledges that the amygdala cells are unlikely to be working in isolation, and that cells across the whole brain are involved in maintaining the explorative or defensive states. “I’m sure it is just one node in larger, brain-wide networks,” he says.

The whole picture

Whereas many researchers have searched particular brain areas for neurons that have enduring activity, Li and Robson, who moved to Germany last September to jointly run a lab at the Max Planck Institute for Biological Cybernetics in Tübingen, came across their persistently active neurons almost by chance.

Their zebrafish larvae are less complex than fruit flies, having only 80,000 or so brain cells. Because these baby fish are transparent, the activity of nearly all of their neurons can be monitored simultaneously using calcium imaging.

The pair has developed a method of concurrently following both the movements and the neural activity as fish larvae swim freely around a dish. They deploy a fluorescent-microscope tracking system that moves on its imaging platform to keep the fish in constant view, and captures every flash of each neuron as the larvae move. The system also films them — typically for 90 minutes, generating 4.5 terabytes of data — allowing the experimenters to align movement with neuronal activity second by second.

Fish larvae might not seem to have the rich internal life enjoyed by mice, or even flies, but they have at least one robust behavioural choice to make in their lives — whether to hunt locally, or to swim to unfamiliar waters to search for new food sources. When Li and Robson watched larvae making this choice, they found three groups of neurons: one that was persistently active during local hunting, another that stayed active during exploration and a third that flashed on briefly as the fish switched states1. Surprisingly, hunger didn’t seem to influence the states, which switched automatically every few minutes — “just like our own sleep–wake states switch automatically, but on a much shorter timescale”, Robson says.

Neuroscientists working with more complex organisms can’t monitor the whole brain at once, but they have been able to find hints of internal brain states with networks that are widely distributed in the brain. In technically challenging experiments in mice, they have recorded the activity of thousands of neurons throughout the brain using calcium imaging, and of hundreds of neurons using a single Neuropixels electrode, several of which can be inserted at once.

In a study published last year7, neuroscientist Karl Deisseroth at Stanford University in California and his team used Neuropixels probes to record the activity of 24,000 neurons across 34 cortical and subcortical brain regions in thirsty mice that were licking water from a spout. The scientists were able to tease out signals related to the brain state of thirst from signals related to licking behaviour. They found that these state-signalling neurons were activated throughout the brain — not just in the hypothalamus, where dedicated thirst neurons are located.

Using these extensive recording techniques, neuroscientists are finding that there is a lot going on beneath the surface when an animal performs a task — and not all of it seems relevant at first glance. In landmark papers last year, groups led by Kenneth Harris at University College London and by Churchland showed that when a mouse is engaged in a task, neurons activate throughout the brain, but that a large proportion of the activation is not correlated with the task at all8,9. Some activity correlated instead with the animals’ fidgety movements. But around two-thirds of the off-task activation didn’t tally with any movement or action. “Part of this may be related to internal brain states,” says Harris.

Busy brain

Many neuroscientists say that the sheer volume of data pouring out of whole-brain experiments is also the field’s biggest bottleneck. But they have been making progress in developing techniques to sift through the flood of measurements. One popular approach is to use a mathematical method called the hidden Markov model (HMM) to predict the probability that a system will switch between different states at a particular time.

Mala Murthy at Princeton University, New Jersey, and her colleagues used the HMM to discover rhythms in the brains of male fruit flies10 that influenced their choice of song pattern when courting females. Whether male flies choose on a moment-to-moment basis to sing in staccato pulses or longer hums depends in large part — but not totally — on how the females respond to them. Murthy’s group found that three different internal brain states also affected the male’s song choice. They dubbed the fly dispositions Close, Chasing and Whatever.

No matter the complexity of the model organism that individual researchers have adopted — worm, fish, fly or mouse — the question of how the entire brain coordinates internal states “is what we are all starting to think about”, says Steve Flavell at the Massachusetts Institute of Technology in Cambridge. In 2013, Flavell and his colleagues discovered that even the brain of the Caenorhabditis elegans worm, which has only 302 neurons, displays properties of internal brain states that drive particular behaviours, including two sets of persistently active neurons controlling whether the animal lingers locally or moves with purpose11. His group has since identified the full circuitry involved in the two states and switching between them12.

Aside from their questions about the basic biology, researchers have an eye on the clinical benefit of understanding how a particular state manifests in the brain. Those studying pain in rodent models, for instance, rely on standard tests such as observing when a rat lifts its paw from a hot plate. “That movement reflects protective aspects of pain, but not the actual perception of pain,” says neurologist Clifford Woolf at the Boston Children’s Hospital in Massachusetts. That makes it a poor model for pain, he argues, because it is one step removed from the actual sensation. He has launched a research programme to try to directly read brain signals that indicate the internal state of pain perception — potentially a more timely and specific readout than waiting for the animal’s response. “I’m extremely optimistic that we’re in one of those rare stages in science where this is going to be a transformation of the way we do things,” he says.

In this new field, even the basics are up for grabs, says Li. “At this stage, we are still trying to understand what the questions are.”

Nature 584, 182-185 (2020)

Updates & Corrections

  • Correction 13 August 2020: An earlier version of the caption for the image of zebrafish larvae mislabelled the positions of the ‘explore’ and ‘stay put’ neurons.


  1. 1.

    Marques, J. C., Li, M., Schaak, D., Robson, D. N. & Li, J. M. Nature 577, 239–243 (2020).

  2. 2.

    Jung, Y. et al. Neuron 105, 322–333 (2020).

  3. 3.

    Anderson, D. J. & Adolphs, R. Cell 157, 187–200 (2014).

  4. 4.

    Jun, J. J. et al. Nature 551, 232–236 (2017).

  5. 5.

    Kennedy, A., Kunwar, P. S., Li, L., Wagenaar, D. & Anderson, D. J. Preprint at bioRxiv (2020).

  6. 6.

    Gründemann, J. et al. Science 364, eaav8736 (2019).

  7. 7.

    Allen, W. E. et al. Science 364, eaav3932 (2019).

  8. 8.

    Stringer, C. et al. Science 364, eaav7893 (2019).

  9. 9.

    Musall, S., Kaufman, M. T., Juavinett, A. L., Gluf, S. & Churchland, A. K. Nature Neurosci. 22, 1677–1686 (2019).

  10. 10.

    Calhoun, A. J., Pillow, J. W. & Murthy, M. Nature Neurosci. 22, 2040–2049 (2019).

  11. 11.

    Flavell, S. W. et al. Cell 154, 1023–1035 (2013).

  12. 12.

    Cermak, N. et al. eLife 9, e57093 (2020).

Download references

Nature Briefing

An essential round-up of science news, opinion and analysis, delivered to your inbox every weekday.