HomeArticle

Robots copying fruit flies' "homework"? A Tsinghua University team uses the "wiring diagram" of the fruit fly brain to enable embodied intelligence to learn adaptive capabilities.

量子位2026-11-04 15:30
Focus the assistance of digital fruit flies on "adapting to changes"

Recently, the digital fruit fly has become a hit in the AI circle.

Some people access the "wiring diagram" of the fruit fly brain into *Minecraft* to control the character in the game, while others let virtual fruit flies use their forelegs to turn the steering wheel of a simulated car.

These seemingly whimsical attempts all rely on the real neural connection data of fruit flies behind the scenes.

The academic name of this "wiring diagram" is connectome. It records which neurons are connected to each other, the direction in which signals are transmitted, and how many synapses are contained in the connections.

Through microscopic imaging and reconstruction, researchers are able to map these connections and convert them into neural networks that can run on computers, allowing them to receive sensory information and participate in body control.

However, making digital fruit flies complete tasks is not sufficient to prove that the biological connection structure brings unique advantages. Under what conditions is this "wiring diagram" useful, and what kind of help can it bring to embodied intelligence?

A recent study by the Tsinghua University team focuses this question on "adapting to changes", systematically examines its control performance, traces the underlying neural pathway mechanism, and reveals the brain-inspired design principle for embodied intelligence to adapt to changes.

The team constructed the adult fruit fly connectome as a fixed neural network core, and let the digital fruit fly perform multi-dimensional control tasks in a simulation environment.

A key finding is that the advantages of the connectome emerge when control requirements change.

When the digital fruit fly travels at a constant speed on flat ground, the performance of the connectome controller is close to that of the multi-layer perceptron (MLP) as the control group. When obstacles appear underfoot, the target direction changes, and the speed command fluctuates, the connectome controller shows better cross-obstacle capability, smoother steering control and more accurate speed tracking.

Surprisingly, this advantage also extends to different bodies and more complex environments.

The same set of fruit fly connection structures shows obvious advantages in bipedal, tripedal, quadrupedal and hexapod simulated bodies. When the embodied agent enters a more complex maze and needs to complete more turns, its advantage in success rate further expands.

This means that the connection structure of the fruit fly nervous system optimized by natural evolution may have transferable motion control robustness, which can provide reusable motion control capabilities for embodied agents of different morphologies.

The same body, adaptation tests in three spatial dimensions

Applying biological "wiring diagrams" to artificial intelligence is inseparable from the rapid development of connectomics and body simulation technology. NeuroMechFly v2 provides a simulation platform for closed-loop research of sensation and movement [1]; Flybody developed by teams including Google DeepMind allows the fine fruit fly body model to walk and fly driven by a learning controller [2]; BPU applies the larval connectome to image classification and chess move prediction.

The Tsinghua team adopted the adult fruit fly FlyWire connectome to construct a recurrent network core containing 138,584 neuron nodes and 3,732,460 directed connections. The model constructs weights according to connection relationships, synapse counts and predicted neurotransmitter types, which remain unchanged during training after normalization. The learnable sensory interface sends information such as body state into the network, and the motor interface converts network activity into control signals. The changes in body and environment caused by actions become the sensory input for the next step, thus forming a closed loop.

The researchers first kept the body of the digital fruit fly unchanged, combined the connectome controller with the basic gait generated by the central pattern generator, adjusted 42 leg joints and foot attachments, and continuously adjusted the movements according to the interaction feedback between the body and the ground. The test focused on the movement of the body in three-dimensional space: terrain undulation in the vertical dimension, left-right steering in the horizontal dimension, and speed change in the longitudinal dimension.

Vertical dimension: Crossing obstacles. The researchers set obstacles of multiple heights and compared the proportion of all feet successfully crossing. On flat ground, the performance of the connectome controller is close to that of the MLP with the same parameter quantity. After encountering obstacles, the connectome controller has a higher success rate of crossing.

Horizontal dimension: Adjusting direction. The researchers kept the body and terrain unchanged, and tested the target directions of 30°, 60° and 90° left and right respectively. The steering command of the connectome controller is smoother, the normalized command roughness is reduced by 29.9%, and the total variation of the command is reduced by 44.6%.

Longitudinal dimension: Tracking speed. The researchers kept the body, traveling direction and terrain unchanged, and let the fruit fly follow segmented acceleration/deceleration and sinusoidal periodic variable speed commands. The connectome controller shows smaller tracking errors in both indicators of acceleration/deceleration slope and periodic variable speed amplitude.

The three groups of experiments jointly show that: In the same body, the advantages of the connectome emerge as control requirements change, supporting more effective terrain response, direction adjustment and speed regulation.

Change to another body and step into a more complex maze

In the next step, researchers connected the same set of fruit fly connectome to embodied agents of different morphologies. After the body shape, action space and dynamics change, the connectome core remains fixed, and only the sensory and motor interfaces are re-learned for the new body. In the flat ground walking task, the average forward speed of the connectome controller reaches 1.94 m/s, which is much higher than 0.68 m/s of MLP, and the path is also more direct.

When body changes are combined with complex environments, the advantages of the connectome further emerge. Researchers compared the fruit fly connectome, MLP, Transformer, LSTM, GRU and two types of reservoir controllers in the maze. In both Medium and Large mazes, the adult connectome controller achieved the highest average success rate among the seven methods.

Taking the Medium maze as an example, the success rate increased from 44.1% of MLP to 64.2%, an increase of 20.1 percentage points. For complex routes requiring 6–7 turns, the success rate increased from 20.4% to 50.6%, and the advantage expanded to about 30 percentage points. At the same time, the proportion of physical failures in this maze evaluation decreased from 15.1% to 9.2%.

Two legs, three legs, four legs and six legs

How wide a range of body changes can the same set of fruit fly connectome adapt to?

The researchers further tested four simulated bodies: bipedal, tripedal, quadrupedal and hexapod robots. The tests were extended from normal conditions to lateral thrust, low friction, 80-millisecond action delay, partial observation loss, and 60-second long-time operation, to investigate the performance of different bodies in disturbance and continuous control.

All four bodies obtained obvious performance gains. The bipedal robot has the largest body change and the most obvious advantage in adapting to changes; the hexapod robot has the morphology closest to the fruit fly, and its absolute performance is also the best.

Behind the adaptability, a common sensorimotor mechanism emerges

Why can the connectome help agents adapt to changes? Researchers further traced inside the network and found that echoing sensorimotor mechanisms emerged behind different tasks. The researchers did not pre-specify which neurons should play a leading role in the task, but in the process of learning and closed-loop interaction, mechanosensory and ascending neurons naturally become important groups affecting control output, and participate in action regulation through descending pathways. The functions related to embodied control in the biological connection structure are spontaneously utilized in artificial tasks.

This organization runs through obstacle crossing, steering and speed change: when crossing obstacles, the influence of the mechanosensory pathway on the control output is significantly stronger than that of the random network. When steering, mechanosensory and ascending related groups play roles on different time scales. When changing speed, ascending and mechanosensory pathways jointly participate in the response to acceleration and deceleration commands.

Path intervention further verified these functional contributions. For example, cutting off the connection from ascending neurons to descending neurons increases the average heading error by 3.52°, which is about three times that of the matched control intervention. Blocking mechanosensory signals or restricting the ascending group from receiving changing speed targets also affect the cross-obstacle control output and variable speed response respectively.

At the same time, the connectome controllers in the three types of tasks all show lower local policy sensitivity, that is, the change of control output caused by small disturbances is smaller. The spontaneous recruitment of task-related pathways and more stable control responses jointly provide a mechanistic explanation for the adaptive advantages of the connectome.

Finding the design principle of intelligent self-evolution from the fruit fly brain

Focusing on the learning and memory mechanism of fruit flies, the team continues to explore how to improve the continuous learning and adaptive capabilities of artificial intelligence: from the active forgetting and parallel modular mechanism in the 2023 *Nature Machine Intelligence* cover article [3], to the adaptive differentiation and integration mechanism of dynamic changes revealed in the 2026 *Patterns* cover article [4], to the newly proposed brain-inspired hierarchical modular framework [5], which gradually transforms biological learning principles into methods for artificial intelligence to cope with dynamic experiences.

This study further extends this line to measured neural connection structure and embodied control. The study found that the advantages of the fruit fly connectome emerge when terrain, motion requirements and body change, accompanied by the spontaneous recruitment of task-related sensorimotor pathways. This indicates that the evolutionarily formed neural connection structure can become a reusable prior to help different bodies achieve effective control.

From learning and memory mechanisms to neural connection structures, from dynamic data streams to interactions between the body and the environment, these works all point to one goal: to endow artificial intelligence with the ability to continuously adapt to changes. In the future, further combining biological structure priors with continuous learning mechanisms is expected to promote agents to accumulate experience and adjust behaviors in more complex environments, and expand the application boundary of brain-inspired intelligence.

References

[1]NeuroMechFly v2: Simulating Embodied Sensorimotor Control in Adult Drosophila. Nature Methods, 2024.

[2]Whole-Body Physics Simulation of Fruit Fly Locomotion. Nature, 2025.

[3]Incorporating Neuro-Inspired Adaptability for Continual Learning in Artificial Intelligence. Nature Machine Intelligence (Cover Article), 2023.

[4]Spacing Effect Improves Generalization in Biological and Artificial Systems. Patterns (Cover Article), 2026.

[5]Brain-Inspired Hierarchical Modularity for General Continual Learning. arXiv:2609.25146, 2026.

Paper Title: A Drosophila connectome prior enables adaptable embodied control

Research Team: Department of Psychology and Cognitive Sciences, School of Biomedical Engineering, School of Life Sciences and IDG/McGovern Institute for Brain Research, Tsinghua University. The authors are Yu Siyu (first author), Zhou Kanglei, Yan Hongwei, Wang Xinyi, Song Sen, Hong Bo, Wang Liyuan (corresponding author).

Project Homepage: https://thu-neuroml.github.io/FlyControl

Code Link: https://github.com/THU-NeuroML/FlyControl

Paper Link: https://www.researchsquare.com/article/rs-11557476/v1

This article is from the WeChat official account "QbitAI", Author: Fruit Fly Connectome, published with authorization from 36Kr.