The most detailed brain wiring diagram yet: How 166,000 neurons govern the fruit fly’s behavior
A series of scientific papers maps the insect’s neural connections in unprecedented detail, opening new avenues for answering some of neuroscience’s biggest questions


For years, neuroscience has sought to understand what the mind is and where human behavior comes from. The philosopher René Descartes separated body and soul, placing humans above the “automaton” nature of animals and arguing that our will operates independently of the laws of mechanics. Yet he was also determined to identify the anatomical structure where the two converged, in order to explain how we command our bodies to run or drink a glass of water. Drawing on the limited anatomical knowledge of his time, he mistakenly concluded that this command center lay in “the innermost part of the brain”: the pineal gland.
Today, we know that the nervous system consists of multiple interconnected structures that integrate and process information from throughout the body. This organization is essentially the same in other vertebrates, including mammals, birds, fish, reptiles and amphibians, and remarkably similar in some invertebrates such as flies. The fruit fly’s nervous system resembles a vastly simplified version of our own. While the human brain contains around 86 billion neurons, the fruit fly’s brain and its equivalent of a spinal cord contain just 166,000 neurons.
That far smaller number has made the insect an ideal model for neuroscientists seeking to decipher the mechanisms behind behavior. Now, after nearly two decades of work, researchers have completed, for the first time, a map of the entire neural network, or connectome, of the fruit fly’s central nervous system. Published on Thursday in four papers in the journal Cell, the map includes millions of neural connections.
Over the past 20 years, studies of the fruit fly connectome have advanced steadily thanks to improvements in imaging technology and the efforts of major research teams. In 2020, scientists produced a map of half the brain of a female fruit fly, containing 25,000 neurons. In 2023, they published a complete brain consisting of 3,016 neurons linked by 548,000 connections. In 2024 came the first map of an adult brain, with 140,000 neurons and around 55 million connections. Only one major milestone remained: a complete map of the entire nervous system, including the nerve cord, brain and optic lobes, all 166,000 neurons.
Stuart Berg, one of the project’s leaders, says that completing the fruit fly’s connectome makes it possible to study behaviors such as walking, flying and even “singing,” all of which are ultimately driven by signals in the nerve cord outside the brain.
“Information about the fly’s environment is also transmitted from sensory neurons to the brain through it,” explains Berg, a scientist at the Howard Hughes Medical Institute’s Janelia Research Campus in the United States. “It is not simply a set of ‘wires’ transmitting information from input to output, but contains a significant fraction of the fly’s computational machinery.”
Gerry Rubin founded and directed the Janelia campus at a time when many neuroscientists considered mapping an entire brain almost impossible. With substantial resources at their disposal, researchers spent years first developing the imaging tools required to reveal the fly’s neural wiring in detail. The resulting diagram has uncovered the complete circuitry linking sensory perception (what the fly sees, smells, etc.) to its behavior.
“Tracking signals from the eye has shown that visual processing extends deeply into the brain, involving more than half of its neuron types,” Rubin, Janelia’s head of biology, tells EL PAÍS in reference to one of the studies published in Cell.
Decoding behavior
In the main study, the researchers identified for the first time the differences in neural connections that explain distinct behaviors in male and female fruit flies (Drosophila melanogaster). But not only that: they also identified different neuron types that express genes differently. In other words, they deciphered how instructions encoded in the DNA of certain male-specific neurons — specifically in two genes called fruitless and doublesex — translate into variations in courtship behavior that females do not perform. This is why the fruit fly has become such a powerful model for studying sexual dimorphism, from genes to behavior, through the intermediate role of neural circuits.
The researchers identified several hundred sex-specific cell types, accounting for 4.8% of neurons in the male brain and 2.4% in the female brain. Despite representing a relatively small proportion of all neurons, these cells can have a significant impact on brain function. In addition, a further 9% of male neurons take part in connections that differ between the sexes.
The team found that these differences are concentrated deep within the neural wiring diagram, and that “distinct behaviors arise from higher-order processing centers that influence decision-making, and not [only] from differences in what flies perceive, such as differing sensitivity to certain odors,” Berg explains.
Albert Cardona, a researcher at the renowned Laboratory of Molecular Biology in Cambridge, who was not involved in the study but led the first complete mapping of an animal brain, that of a fruit fly larva, in 2023, sums up the significance of the finding: “The fruitless gene was expressed in 10% of all neurons in both the male and female brain, but in different ways,.That ultimately causes neurons to connect differently, and the circuits differ between the sexes.
This, he says, is what begins to explain why male and female flies behave differently. As Cardona explains, “in courtship the male vibrates a wing to ‘sing’ to the female, and this makes it possible to understand how the motor system controls that behavior and how it differs from the female, which has the same genome but a different brain and does not display this behavior.”
Another of the papers, which presents a complete map of the fly’s gustatory system, from taste neurons distributed throughout the body to the motor neurons that drive feeding, shows how neurons carrying attractive signals and those carrying aversive signals connect to circuits that regulate feeding, locomotion, hormone release and courtship.
“This map could help scientists understand how internal states, independent of immediate external stimuli, can shape taste-based decisions,” says Rubin.
Cajal’s immeasurable legacy
When Spanish scientist Santiago Ramón y Cajal produced the first detailed descriptions of how neurons are organized in the human brain, he relied on little more than an optical microscope and immense patience. The result, after countless hours spent examining specimens that would have been indecipherable to almost anyone else, earned him the Nobel Prize in 1906, shared with Camillo Golgi, the inventor of the silver chromate staining technique that made it possible to distinguish individual neurons, the reazione nera (“black reaction”). Through perseverance, creativity and insight, Cajal arrived at what became known as the “neuron doctrine”: the idea that neurons are the fundamental units of the nervous system, a principle that underpins everything that has followed in modern neuroscience.
The Janelia researchers, led by Harald Hess, another of the lead authors of the study, spent years refining and expanding a pioneering high-resolution imaging technique known as focused ion beam scanning electron microscopy (FIB-SEM), allowing them to obtain ever sharper and more detailed images of individual neurons.
The result is a microscope worth around $1 million, one of fewer than 20 of its kind in the world. In fact, Hess and his team designed an adaptation that can be added to a Zeiss microscope originally developed for materials engineering but now used by biologists for neuroscience research.
Interpreting the resulting images has been greatly accelerated by advances in machine learning, but the human eye remains indispensable. “Our team of proofreaders, who refine the map, has developed extraordinary expertise in interpreting the images and training the next generation of machine-learning models,” Berg says.
It is not an easy task for an untrained eye because neurons display an astonishing variety of shapes and sizes. “With years of experience, our team has developed an exceptional intuition for identifying malformed neurons and knowing exactly where to correct them,” adds Berg.
Along the way, the researchers developed sophisticated software tools from scratch to build, analyze and share the connectomes they were producing. Algorithms and computers developed by a Google Research team assembled the images and performed the initial identification of neurons. But Rubin agrees that human review is one of the most labor-intensive parts of the process: “It required the equivalent of 44 people working for a year.”
Sign up for our weekly newsletter to get more English-language news coverage from EL PAÍS USA Edition







































