A small experiment in how a nervous system produces movement. This lab turns measured fly connections into simulated activity. Send in visual input, follow it toward motor neurons, and test how changing the circuit changes the response. The body uses illustrative flight forces.

Take the five-minute tour →

# Give the circuit a body.

Watch the fly see, respond, take off, and change what it sees next.

Loading the flight circuit…

Visual environment
Circuit intervention
Visual input on Motor output connected

Changing an environment or circuit setting starts a new run.

Ready to run 0.00 / 12.00 s
Camera view
Preparing anatomy and connectivity…
Flybody anatomy · green: lift · amber: thrust · grid: 2 au
Playback
Loading
Review recorded time0.00 s
Height above floor 0.00 au
Horizontal speed 0.00 au/s
Wing power command 0.0 %
Assumed yaw command 0.00

## Inside the loop

Activity · log color
Visual Brain DNs VNC Motor
Inspect any population
Loading

All links are measured. The list highlights readouts; it does not imply direct connections between each row.

## What the fly sees

Geometric visual proxy
Left drive 0.00 Right drive 0.00

Expansion and bearing drive LC4 / LPLC2. Values show the last applied 20 ms input step; the view shows the current pose. Pixels and individual ommatidia are not simulated.

## From input to movement

Visual drive Wing motor activity Altitude

Each trace has its own labeled scale. These are model seconds and arbitrary arena units (au), without physiological calibration.

## What happened

1. Start the experiment to watch the sequence.

Try silencing wing power to separate a jump from powered flight.

How neural activity becomes movement

### Measured wiring → assumed forces

The arena extends the original graph with wing motor units and their input paths. Every edge comes from MaleCNS. All populations use the same signed rate equation, with ten 2 ms neural updates per 20 ms body step.

Readout | Body adapter
--- | ---
TTMn | Mean activity ≥ 0.008 triggers a 4.2 au/s upward launch from the floor, with a 1 s refractory period.
DLMn + DVMn | Power = tanh(mean activity / 0.018). Lift and forward thrust grow with this command.
b2 MN, right − left | Yaw command = tanh(difference / 0.008). Its sign and scale are illustrative.

hDVM neurons drive haltere muscles and are not used for wing lift. The body does not receive target position directly.

### What this experiment can show

You can trace a complete sensory → circuit → motor → movement → sensory feedback loop and test the consequences of model interventions. It does not establish that a living fly would take the same trajectory or successfully evade an obstacle.

Gravity, drag, launch thresholds, muscle-to-force gains, and turning rules are unfitted. The visual target is kinematic and exerts no contact force. Arena boundaries are simple constraints. Wingbeats are slowed display motion, not simulated muscle contractions.

Assumed lift strength 1.0×

Changing a setting resets the run, making comparisons reproducible. Arena and circuit-experiment settings are independent.

Flybody source anatomy ↗ · Motor circuit anatomy ↗ · Geometry attribution

A connectome-driven demonstration of embodiment. The body uses simplified forces. Flybody supplies the anatomical mesh; its MuJoCo dynamics and trained flight controller are not running here.

# From sight to motor circuits.

Inject visual input. Follow the signal. Change the circuit.

Loading the MaleCNS graph…

## Visual input

01
Stimulus

Abstract drive into LC4 and LPLC2, after visual feature extraction.

Input populations
Input strength 1.0 Connection gain 3.0
Reading graph
Model assumptions
Propagation model
Glutamate effect

ACh excites. GABA and histamine inhibit. Unknown and modulatory outputs are omitted in signed mode. Receptor-specific effects are unavailable.

## Activity propagation

Interactive subnetwork · real directed connectivity

t = 0 ms
Visual Central brain Descending Nerve cord Motor
Preparing the real connectivity graph…
Activity 10⁻⁶ 1○ population→ connection Schematic layout
Model time in milliseconds
0 150 300 450 600 model ms

The whole extracted graph is simulated. Strong connections are drawn for readability.

## Inspect a population

02
Find cell type Select population

### Try an intervention

Silence both giant fiber populations and compare the motor response.

### Strongest outgoing links

## Read the response

### Motor response over time

Normalized activity · 0 to 1

Shading marks the stimulus window. Dashed curves show the intact circuit when populations are silenced.

### Motor populations

Peak across the full run

Population | Peak activity | Change
--- | --- | ---

A simplified computational twin. Real wiring, assumed dynamics. This interactive subnetwork differs quantitatively from the full CNS model. Input is applied to visual feature channels; this circuit-experiment tab does not simulate retina or movement. The arena tab adds a separate illustrative body. Activity is not measured firing rate or a probability of behavior.

MODEL & DATA

# Real wiring. Explicit assumptions.

This prototype tests how activity could spread through a measured fly CNS subnetwork. It is a connectome-constrained hypothesis generator, without physiological calibration. The arena couples an expanded subnetwork to a separate illustrative body adapter.

## What is represented

Each computational unit pools neurons with the same annotated cell type, side, and, for nerve cord cells, soma neuromere. Individual differences and retinotopic positions within a population are lost. The dataset is one male specimen.

We use Traced neurons with a named type from the official v1.0 flat files, then extract a visual-to-motor subnetwork. The preparation script processes the full connection table. The browser simulates the extracted populations, not the entire CNS.

### How the subnetwork was selected

Six rounds of unsigned propagation from LC4, LPLC2, T4a/b, and T5a/b rank connected populations. Anatomical group quotas retain visual, central, descending, cord, and motor populations. Strong directed path ancestors and existing bilateral counterparts are retained; DNp01 and DNg13 are explicitly included. All measured edges among the retained populations are used.

Incoming counts from the full raw graph remain in each target’s denominator. Cropping or silencing cannot artificially strengthen the surviving connections. Unrepresented inputs remain silent.

## The computational unit

rᵢ(t + Δt) = rᵢ(t) + α [ max(0, tanh(Iᵢ(t) + g Σⱼ Wᵢⱼ rⱼ(t))) − rᵢ(t) ]

Wᵢⱼ = sⱼ Cⱼᵢ / total_inputᵢ, where C is the observed synapse count and s is the assumed presynaptic sign. r is normalized population activity. I is external feature drive. g is connection gain.

α = 1 − exp(−Δt/τ). All populations update simultaneously from the previous state, with Δt = 2 ms and τ = 20 ms. Initial activity and baseline input are zero. These times are illustrative model parameters, not measured circuit latencies. Activity is bounded between 0 and 1.

### Why a rate model?

Pooling many neurons into one cell-type unit calls for a population-rate abstraction. A published whole-brain model used individual leaky integrate-and-fire neurons and transmitter predictions to study feeding and grooming. That work motivates this prototype; its experimental validation does not transfer to our different dataset, visual circuits, or equations.

Shiu et al., Nature (2024) ↗

## What the stimulus means

Looming: direct drive into LC4 and LPLC2. During the 60–240 ms stimulus window, LC4 receives A(0.35 + 0.65q), and LPLC2 receives Aq², with q progressing from 0 to 1. These are illustrative velocity/size feature proxies, not a fitted optical response.

Motion A/B: a constant pulse into T4a/T5a or T4b/T5b. The display illustrates the selected input; no image is processed by a retina. The model does not infer direction selectivity from the wiring.

No stimulus: no external input. A resting model must remain silent.

LC4 and LPLC2 are established visual inputs to the giant fiber pathway. DNg13 is a descending steering neuron. Motor units are identified using the dataset’s cb_motor and vnc_motor annotations, independently of their names.

Ache et al., Current Biology (2019) ↗
Yang et al., Cell (2024) ↗

## Limits that affect interpretation

- Synapse counts are structural evidence, not measured conductances.
- Acetylcholine is positive; GABA and histamine are negative. Glutamate is inhibitory by default, but its effect depends on receptors. The control tests alternative assumptions.
- Unknown and modulatory transmitter outputs have zero fast effect in signed mode. Unsigned mode sets every sign positive and shows only structural spread.
- Gap junctions are absent. This is especially relevant to the giant fiber escape circuit.
- Group-level paths can join different neurons within a type. They are not proof of a continuous single-neuron route.
- Silencing is a model intervention. A changed motor trace is not an experimentally established causal effect.
- The rate model omits spontaneous activity, adaptation, plasticity, neuromodulatory state, and muscle mechanics. The arena adds geometric visual feedback, without other sensory modalities.

### What would make it a stronger twin?

Use individual neurons with retinotopy, receptor-aware or experimentally fitted synaptic effects, and recordings for parameter fitting and held-out validation. Add gap junctions, a retina, then a neuromechanical body and sensory feedback. Validate simple visual experiments before interpreting behavior.

## The embodied arena

The arena simulates an expanded 526-population graph, representing 9,615 neurons and 14,713 directed links. It includes the original 414 populations plus DLM/DVM wing power and b2 steering motor units, their strongest presynaptic populations, strong input paths, and existing bilateral counterparts. Original incoming-synapse denominators are retained. The full-CNS comparison below belongs to the original circuit experiment.

A sphere’s position relative to the fly determines a geometric looming feature. Signed activity propagates through the real graph, then a declared heuristic maps motor activity to launch, lift, thrust, and yaw. Position and orientation feed back into the next sensory step. A moving target alone cannot push the fly. Closing vision or disconnecting motor output from rest prevents powered motion.

The displayed fly is decimated anatomy from Flybody (Vaxenburg et al., Nature 2025, Apache 2.0). This app uses its appearance, not its MuJoCo dynamics or trained controllers. A stronger next model would couple this neural interface to those dynamics and fit motor readouts against held-out behavior. NeuroMechFly / FlyGym is another research platform for embodied sensory feedback.

Download arena graph ↓ · Arena numerical checks ↓ · Equations and reproduction notes

## We also ran the full typed CNS

The sparse Python model ran the same looming input on 25,850 populations, representing 162,517 neurons and 6,742,293 directed population links. Cropping changes both motor amplitudes and rankings. These two models must not be treated as quantitatively interchangeable.

Population | Subnetwork peak | Full CNS peak | Full CNS: DNp01 silenced
--- | --- | --- | ---
TTMn · R / T2 | 0.03401 | 0.02491 | −99.1%
TTMn · L / T2 | 0.01589 | 0.01073 | −90.5%
hDVM MN · L / T3 | 0.02385 | 0.03854 | −3.2%
hDVM MN · R / T3 | 0.01999 | 0.03112 | −3.1%

DNg13 is silent in the cropped looming experiment but weakly active in the full model (peaks below 0.0004). The wider recurrent network can change a qualitative conclusion as well as response strength. The full-model results are recorded experiments; changing controls above runs the 414-population subnetwork.

All numbers use the default signed model: bilateral looming, input 1, gain 3, glutamate inhibitory. These are predictions from this model only; gap junctions and receptor-specific effects are not included.

Download all full-CNS population results ↓ · Full-CNS experiment settings & comparison ↓

## Reproduce and inspect

Directionality, zero-input silence, inhibitory effects, bounded activity, silencing, and structural reachability checks pass. Browser and Python subnetwork trajectories agree to within 1.2 × 10⁻¹⁶ absolute activity. The sparse Python implementation also matches the scalar reference on controlled circuits. These are numerical checks, not physiological validation. Browser visual testing was not performed.

Download code, graph & research notes ↓Download graph JSON ↓

Source files and SHA-256 checksums

Data: FlyEM at HHMI Janelia, Cambridge Drosophila Connectomics Group, MRC LMB, and Google Research. CC BY 4.0. This is an independent prototype, not an official Janelia simulator. Official downloads ↗