Fruit Fly Lab

Methods and validation

What runs, where the numbers come from, how the engine was checked against the published model, and what this lab cannot tell you.

What is real here, and what is not

ElementStatusSource
Wiring between 138,639 neurons (15.1 million connections, synapse counts and sign)measuredFlyWire v783 electron-microscopy reconstruction of one female fly (Dorkenwald et al. 2024), packaged by Shiu et al.
Position of every neuron in the 3D brainmeasuredCell-body coordinates from Schlegel et al. 2024
Cell types, neurotransmitters, Shiu namesannotatedSchlegel et al. 2024 (transmitters are predicted from EM); names from Shiu et al. 2024
Full-brain activity (“Full brain · replay”)replayedThis lab's engine, computed ahead of time over all 138,639 neurons
Activity after your own changes (“Run live”)liveSame engine, running in your browser on the live subgraph
The fly's body and its proboscis jointsmeasured anatomyflybody (Vaxenburg et al. 2025, Apache-2.0), built from confocal scans
MN9 firing → proboscis angleillustrativeOur mapping. No published work connects this brain model to this body model.
Real-fly outcomes on the scorecardmeasuredQuoted from Shiu et al. 2024, Fig. 2 and Supplementary Tables

The model

A leaky integrate-and-fire network with one unit per neuron, exactly as published by Shiu et al. (Nature 2024):

dv/dt = (v₀ − v + g) / τ_m        (frozen while refractory)
dg/dt = −g / τ                   (frozen while refractory)
spike when v > v_th; then v = v_reset, g = 0, refractory for t_rfc
each presynaptic spike adds w = (signed synapse count) × w_syn to g, after a delay t_dly
stimulated neurons receive Poisson kicks of w_syn × 250 at rate r_poi

Validation against the published model

This lab runs its own fast engine (a numpy port, and a JavaScript port for the browser). Before anything else was built, it was checked against the unmodified reference code from the paper, run with brian2 on the same data and the same sugar stimulus.

One detail mattered. brian2 discards synaptic input that arrives while a neuron is in its refractory period. A first version of the engine kept it, and ran MN9 18% hot. We found the rule by replaying a recorded brian2 spike train through a two-neuron circuit and matching it spike for spike, then fixed the engine. After the fix, all 20 of the 20 most active neurons agree.

The live subgraph

Running 138,639 neurons for one simulated second takes about 3 seconds on a desktop CPU, too slow for a phone. The live mode runs the ~1,100 neurons that fire in any of the precomputed conditions (sugar, bitter, both, and every single-neuron silencing). Neurons outside that set never fired in those conditions, so they send no input. For changes you make that recruit new neurons, live mode is an approximation.

Limits

Components

Each part of the experiment is a swappable component with a small interface: an organism (a wiring diagram and cell annotations), a brain model (spiking for the fly, graded for the worm), a wiring choice (real or a degree-preserving shuffle), a stimulus (which neurons are driven, and how hard), and a body readout (which neuron moves which joint). Parameters can be edited in the lab and each shows its published source.

Credits and licenses

Connectome: FlyWire consortium, Dorkenwald et al. 2024 (CC BY 4.0). Model and packaged connectivity: Shiu et al. 2024 (MIT). Cell annotations: Schlegel et al. 2024 (FlyWire terms, CC BY-NC; this site is non-commercial). Body: flybody (Apache-2.0). Worm: Varshney et al. 2011 (CC BY) and Kunert et al. 2014. The broader question this lab asks is the one in Jonas & Kording 2017. No affiliation with or endorsement by any of these groups is implied.