Try this circuit in your browser

Model card · experimental

A real circuit.
No CUDA required.

MaleCNS LC4 / LPLC2 / giant-fiber subgraph: 313 neurons, 20,607 directed edges and 79,112 reconstructed contacts. A 3.8 MB optional download with fixed source IDs and SHA256 verification.

Real anatomy, assumed dynamics. This model uses simplified LIF equations, artificial current inputs and an experimental GF rate readout. It is not a recovered biological brain or a demonstration of learned behavior.

Run on your laptop

Python · SDK 0.2 alpha
from flybrain import FlyBrain

brain = FlyBrain.load("male-cns-escape-v1", download=True)
brain.stimulate("looming_left", duration_ms=100)
brain.advance(duration_ms=100)
gf = brain.neurons.select(cell_type="DNp01")
print(brain.observe(gf, fields=["rates_hz"]).to_dict())

Install the SDK from GitHub using the quickstart. The converted model needs only the normal NumPy runtime. Subsequent loads can omit download=True and use the verified cache.

Change its output

brain.bind_readout({"flash": gf})
print(brain.action()["flash"])
brain.intervene.silence(gf)
brain.advance(duration_ms=100)

Use a named rate intensity in your own application. Silencing suppresses new spikes; rate history decays normally. Save/restore retains your custom mapping, active inputs and intervention.

What was measured

The model keeps source IDs, type and side annotations, tracing status, transmitter predictions and original contact counts. The recipe fixes all 313 cells and includes every source edge between selected cells. Effective weights are normalized from contact counts using an explicit gain and sign policy.

What was assumed

All LIF parameters, normalization, injected input currents and output scaling are modeling choices. The inputs bypass retinal optics. Other neural inputs, muscles, gap junctions and learning are absent. LC4-only and LPLC2-only responses differ under these parameters; no quantitative natural-escape claim is made.

CPU validation

Software tests cover conversion integrity, source counts, transient response, GF-edge ablation and checkpoint continuation. Five macOS arm64 runs of 1,000 ticks, including step and action reads, had a median of 0.1043 seconds per simulated second. This ~9.59× real-time result excludes loading and applies only to this small graph.

Source and license

Data: MaleCNS v1.0, FlyEM / HHMI Janelia, University of Cambridge, MRC Laboratory of Molecular Biology and Google Research. Original data and this selected/normalized derivative: CC BY 4.0. Selection and adaptation by flybrain-sdk contributors. SDK code is MIT.

Full model card, checksums and reproduction commands →

Machine-readable model catalog · Contribute a model