The first whole-brain connectome-driven simulation of a fruit fly in a physics-based biomechanical body. 138,639 spiking neurons. Compound-eye vision. Olfaction. Gustation. Flight. All from the real connectome.
A complete virtual fruit fly where every behavior emerges from the connectome — no hardcoded rules, no if-else chains for actions.
138,639 Leaky Integrate-and-Fire neurons running on GPU (PyTorch) at 0.1ms resolution. Connectivity from FlyWire v783 — the most complete Drosophila connectome.
NeuroMechFly v2 with 6 articulated legs, contact sensors, adhesion pads, and compound eyes. Physics simulated by MuJoCo at 10kHz.
750 ommatidia per eye with a full motion detection cascade (T1-T5 neurons). Looming detection via LC4 triggers escape through the Giant Fiber.
~2,600 olfactory receptor neurons with bilateral gradient sensing. The fly navigates toward food and away from danger using real antenna geometry.
Tarsal taste detection through leg contact. Sugar triggers proboscis extension; bitter compounds trigger avoidance. Proboscis extends via a dynamic hinge joint.
Giant Fiber activation triggers takeoff. The fly lifts off, hovers, steers via descending neurons, and lands with a controlled descent. 3D forces applied to the thorax.
Brain and body run at different timescales and communicate through descending neurons, just like the real fly.
All behaviors arise from connectome-driven neural activity. The brain-body bridge translates descending neuron firing rates into locomotion modes.
| Behavior | Neural Pathway | Trigger |
|---|---|---|
| Walking | DN rates → CPG modulation | Default locomotion (tripod/tetrapod gait) |
| Escape Flight | LC4 → Giant Fiber → DNs → xfrc_applied | Looming object (expanding retinal image) |
| Chemotaxis | ORN → PN → KC → MBON → DN turn | Odor gradient (bilateral antenna comparison) |
| Feeding | GRN → SEZ → MN9 → proboscis extension | Tarsal contact with sugar zone |
| Aversion | Bitter GRN → SEZ → avoidance motor | Tarsal contact with bitter zone |
| Grooming | AMMC → antennal MN → leg sweep | Antennal mechanosensory activation |
| Courtship Song | P1 → pIP10 → vPR → wing MN | P1 neuron activation (male → female signal) |
| Tactile Escape | Mechanoreceptor → ascending IN → DN | Sudden high contact force (>35 N) |
The compound eye vision system implements the biological motion detection cascade found in the Drosophila optic lobe.
750 ommatidia
per eye
Luminance →
contrast
Temporal
derivative
Directional
motion energy
Looming →
escape
Get the simulation running in under 5 minutes.
The project includes benchmarks comparing four GPU/CPU frameworks for simulating the same 138K-neuron network.
| Framework | Backend | Status |
|---|---|---|
| Brian2 | C++ standalone (multi-core CPU) | Ready |
| Brian2CUDA | CUDA standalone (GPU) | Ready |
| PyTorch | Sparse CUDA (GPU) | Ready — used in embodied simulation |
| NEST GPU | Custom CUDA kernel (user_m1) | Ready |
This is an open research project. Whether you're a neuroscientist, roboticist, ML engineer, or student — you're welcome to contribute.
Auditory (Johnston's organ), hygrosensation, thermosensation, gravity sensing
Identify and validate specific neural circuits in the FlyWire connectome
Compare simulated behaviors against real Drosophila experimental data
GPU optimization, multi-GPU support, neuromorphic hardware ports (Loihi, SpiNNaker)
Implement mushroom body plasticity, associative learning, habituation
Better real-time monitors, VR integration, data dashboards, 3D neural activity maps
Detailed documentation of the complete system, from neural model to biomechanics.
Full technical paper covering architecture, sensory systems, virtual flight, and emergent behaviors.
Artículo técnico completo que cubre la arquitectura, sistemas sensoriales, vuelo virtual y comportamientos emergentes.