The 3D view needs WebGPU or WebGL2.

input neuronsneurons read out

One engine for every fly brain model

All our demos run the same network: the FlyWire connectome, 138,639 neurons and 15,091,983 connections, with its wiring unchanged. What differs between a model that walks and one that plays Doom is what goes in, what comes out, and the timing of each neuron. This week we made the engine reflect that: one update rule for every model, in training and in the browser.

One update rule

For every neuron i, per time step:

u  = g_i · (Σ W⁺·z + (1 − s_i) · Σ W⁻·z) + d_i
a  = f(max(|u| − s_i · g_i · Σ|W⁻|·|z|, 0)) / |u|
z' = R_i · (keep_i · z + α_i · a · u)

W⁺ and W⁻ are the excitatory and inhibitory connections of the connectome, d_i is the drive from the senses, g_i a gain. The parameter s_i sets how inhibition acts: added to the input (0), or reducing only the strength of the excitation (1). α_i and keep_i are the neuron’s time constant: how fast it integrates and forgets. R_i is either a real scale or a rotation e^{iω_i}: with a rotation every neuron carries a phase; the rotation speed is shared by all neurons (Walk, Gaze) or by each cell type (Doom).

Everything that distinguishes the models became a setting of this formula. The compound eyes, the body sense and the neurons that are read connect the machine to it.

Bit-exact, same speed

Every model on this site gives the same output as before, to the last bit, on the CPU, in WebAssembly and on WebGPU. The site numbers reproduce exactly: the Doom arena run gives the same 200 rounds, the object tracker the same per-second hold rates. Measured in one page load, alternating old and new kernels, each step costs the same: Cursor 3.9 ms, Walk 5.7 ms, Doom 10.2 ms, Gaze 23.6 ms including reading the state back.

Activity with and without phase

Without the phase the engine computes activity only, bit for bit the same as the phase model with the phase at zero, at about half the compute (the recurrent step of Cursor: 2.8 ms without, 5.5 ms with phase on WebGPU).

Next

One loader, flycore.load, now opens the file of any model with WebGPU or a WebAssembly fallback. We will release the engine as open source.