
Building minds in code: AI-based ‘digital twins’ of mouse brains open new frontiers in neuroscience
Much like a pilot might practise flight manoeuvres in a simulator, researchers may soon be able to conduct complex neuroscience experiments within a hyper-realistic digital model of a mouse brain. In a groundbreaking study, a team led by Stanford Medicine has developed an artificial intelligence (AI) system that acts as a “digital twin” of the mouse brain’s visual cortex – the region responsible for processing visual information.
This innovation brings us closer to a future in which scientists can explore brain function more safely, efficiently, and in far greater detail than ever before. By simulating how the brain reacts to real-world visual stimuli, these digital replicas allow researchers to investigate cognition and perception without invasive procedures.
A Digital Mirror of the Brain
To create the digital twin, the AI model was trained using vast datasets capturing the activity of real neurons in the visual cortex of mice as they watched clips from feature films. The model, informed by these data, was then able to accurately predict how tens of thousands of neurons would respond to entirely new images and videos.
“If you build a model of the brain and it’s very accurate, that means you can do a lot more experiments,” said Professor Andreas Tolias, PhD, from Stanford Medicine’s Department of Ophthalmology and senior author of the study, published in Nature on 9 April. “The ones that are the most promising you can then test in the real brain.”
Eric Wang, PhD, a medical student at Baylor College of Medicine, served as the lead author of the study.
Generalising Beyond the Known
This new model stands apart from earlier AI simulations of the brain, which were limited to predicting responses to stimuli similar to those in their training datasets. In contrast, the new model has demonstrated an ability to extrapolate and respond accurately to a much wider range of novel inputs. It can even infer physical characteristics of individual neurons, such as their anatomical locations and types.
The model belongs to a new class of AI systems known as foundation models — algorithms trained on extensive datasets that can then apply what they’ve learned to novel scenarios. ChatGPT, for example, is a language-based foundation model. In this case, the model applied foundational principles of neuroscience to visual processing.
“In many ways, the seed of intelligence is the ability to generalise robustly,” said Tolias. “The ultimate goal — the holy grail — is to generalise to scenarios outside your training distribution.”
Lights, Camera, Neural Action
Training the digital twin began with an ambitious experiment: recording over 900 minutes of neural activity from eight mice watching high-energy human films such as Mad Max. These action-packed movies were chosen deliberately. Mice have low-resolution vision — similar to the human peripheral visual field — and are primarily sensitive to movement rather than detail or colour.
“It’s very hard to sample a realistic movie for mice, because nobody makes Hollywood movies for mice,” Tolias quipped. “Mice like movement, which strongly activates their visual system, so we showed them movies that have a lot of action.”
As the mice watched, high-resolution recordings tracked the responses of their visual cortex, while cameras simultaneously monitored their eye movements and behaviours. This data was then used to build a foundational model, which, with a small amount of additional data, could be tailored to create a unique digital twin for any individual mouse.
Simulating the Brain in Silico
Once built, these digital brains responded to fresh images and videos with a high degree of accuracy, closely mirroring the behaviour of their real-world counterparts. This level of precision, according to Tolias, was due to the model being “trained on such large datasets.”
What is particularly remarkable is that the model, trained solely on functional data (neural activity), was also able to generalise to structural data. For one mouse, the AI model accurately predicted the anatomical locations, cell types, and synaptic connections between thousands of neurons in its visual cortex.
To validate these predictions, researchers compared the digital model against high-resolution electron microscopy images from the same mouse’s brain. These data were part of the MICrONS project — an ambitious effort to map the structure and function of the mouse visual cortex in unparalleled detail. The MICrONS findings were published simultaneously in Nature.
An Infinite Laboratory
The implications of this technology are profound. Because a digital twin can outlive the biological organism it models, researchers could theoretically run millions of experiments on a single virtual mouse. This approach could drastically reduce the time, cost, and ethical concerns associated with traditional animal research.
“We’re trying to open the black box, so to speak, to understand the brain at the level of individual neurons or populations of neurons and how they work together to encode information,” Tolias explained.
Already, these AI models are providing new insights. In another related study published simultaneously in Nature, researchers used a digital twin to uncover the mechanisms by which neurons in the visual cortex form connections. While it was previously known that neurons with similar properties tend to form connections, the digital model revealed a more nuanced rule.
The digital twin showed that neurons preferentially connect with others that respond to the same visual stimulus — such as the colour blue — over those located in the same spatial region of the visual field.
“It’s like someone selecting friends based on what they like and not where they are,” Tolias said. “We learned this more precise rule of how the brain is organised.”
What Comes Next?
Looking ahead, the team plans to expand this modelling approach to other areas of the brain and to other species, including non-human primates with more complex cognitive functions.
“Eventually, I believe it will be possible to build digital twins of at least parts of the human brain,” said Tolias. “This is just the tip of the iceberg.”
The project represents a collaborative effort involving researchers from Stanford Medicine, the University of Göttingen, and the Allen Institute for Brain Science.
Funding was provided by multiple institutions, including the Intelligence Advanced Research Projects Activity (IARPA), the National Science Foundation (NeuroNex grant), the National Institute of Mental Health, the National Institute of Neurological Disorders and Stroke (grant U19MH114830), the National Eye Institute (grant R01 EY026927 and Core Grant for Vision Research T32-EY-002520-37), the European Research Council, and the Deutsche Forschungsgemeinschaft.
As digital replicas of brains become more advanced, researchers hope that this technology will not only shed light on the mysteries of perception and learning but also pave the way for new therapeutic approaches to brain-related conditions — all while reducing reliance on live animal testing.




