Magic Tools

🪰 Column · Rebuilding a fly brain

Digital Fruit Fly Lab

In 2024 scientists finished the first complete wiring diagram of an adult fruit fly brain: 139,255 neurons and 54.5 million synapses. Put a neuron model on top of that map, plug it into a physics-simulated body, and a 'digital fly' can forage, groom and escape inside a computer. This column brings it to your browser — play first, then understand.

No sensory input at all: the 139k-neuron brain model switches between resting, walking, backing up and grooming on its own (recorded on a Mac mini)

How much fits in a poppy-seed-sized brain

139,255
neurons
whole adult female brain, FlyWire v783
54.5M
synapses between proofread neurons
≈130 million detected in total
33
person-years of proofreading
labs plus citizen scientists worldwide
7.4
synapses per µm³
mammalian cortex: under 1

How a digital fly is assembled

  1. 1

    Wiring diagram (connectome)

    Slice one fly brain into thousands of ultra-thin sections, image each with an electron microscope, let AI trace every neurite and humans fix the errors. The result: who connects to whom, and with how many synapses.

  2. 2

    Neuron model (LIF)

    Each neuron becomes a 'leaky integrate-and-fire' unit: inputs add up until a threshold, then it spikes. Connection strength is just the synapse count — no training at all, only the wiring.

  3. 3

    Physics body (NeuroMechFly)

    An anatomically modelled fly body running in the MuJoCo physics engine: jointed legs with sticky feet and wings beating at 218 Hz.

  4. 4

    Brain–body loop

    The brain reads the body's senses (taste, vision) and descending-neuron spikes drive the gait. We sync them every 15 ms — that's the 'digital fly'.

Try it in your browser

From worm to human: how far brain mapping has come

SpeciesNeuronsComplete wiring diagram
C. elegans (worm)≈300mapped 1986
Fruit fly larva≈3,000mapped 2023
Adult fruit fly139,255mapped 2024 — this column
Mouse≈70 milliononly 1 mm³ of cortex mapped
Human≈86 billionnowhere near

Compute is another wall: on a Mac mini M4, one second of fly brain time takes about 12.6 s; with noise and whole-brain monitoring it runs 18–24× slower than real time.

Column articles

FAQ

Was a fruit fly brain really 'uploaded' to a computer?

'Upload' overstates it. What was copied is a wiring diagram: which of 139,255 neurons connect to which. With a simple neuron model on top, it does respond sensibly to stimuli — Shiu et al. (Nature, 2024) used it to predict feeding and grooming circuits that were then confirmed experimentally. But it contains none of that fly's memories, neuromodulators or body chemistry. When we reproduced it, we also found the original model fires no spikes at all without input.

Why a fruit fly?

Its brain is small enough (0.0175 mm³ of neuropil) yet complex enough to learn, navigate and court, with over a century of genetics and behavior research behind it. It's currently the only flying animal whose whole brain has been mapped and can be checked against a large body of experiments.

Can I download the fruit fly brain and run it myself?

Yes. FlyWire's Codex (codex.flywire.ai) offers CSV downloads of the v783 connectome under CC BY-NC 4.0 (attribution, non-commercial), and the whole-brain LIF model from Shiu 2024 is open on GitHub (philshiu/Drosophila_brain_model). A normal computer is enough: on a Mac mini M4, Brian2 simulates 0.1 s of brain time in about 1.26 s.

Is the fly in the browser controlled by the real brain?

Not quite, and we want to be clear about it. Walking and flight in the online sandbox are driven by CPG oscillators and a stabilizing controller on real physics, not by the whole-brain model — 139k neurons don't run in a browser yet. The brain-driven behaviors (sugar feeding, visual escape, spontaneous activity) are recordings we computed on a Mac mini, shown on the Play page.

How far are we from copying a human brain?

Very far. A human brain has about 86 billion neurons — over 600,000 times a fly's — and for mammals only a single cubic millimetre of mouse cortex has been mapped. Even for the fly, current models use the wiring alone; real electrical properties, neuromodulation and plasticity are mostly simplified or missing.

Data & citations

  • Dorkenwald et al. 2024, Neuronal wiring diagram of an adult brain. Nature. doi:10.1038/s41586-024-07558-y
  • Schlegel et al. 2024, Whole-brain annotation and multi-connectome cell typing of Drosophila. Nature. doi:10.1038/s41586-024-07686-5
  • Shiu et al. 2024, A Drosophila computational brain model reveals sensorimotor processing. Nature. code
  • Body & physics: NeuroMechFly / flygym · flybody (Apache-2.0) · Eon fly-brain
  • FlyWire connectome data used under CC BY-NC 4.0 (attribution, non-commercial); this column is non-commercial educational content.