
connectome_interpreter turns synaptic wiring diagrams into testable hypotheses about circuit function. It runs comfortably on a laptop or in Colab, including for whole-brain analyses on connectomes of ~140,000 neurons (preprint).
pip install connectome-interpreter
For the bleeding-edge version (recommended):
pip install git+https://github.com/YijieYin/connectome_interpreter.git
What's inside
- Effective connectivity — polysynaptic connectivity strength (same metric as in Seung 2024, Li et al. 2020, Hulse et al. 2021, Eschbach et al. 2020, Hoeller et al. 2025 etc.) between any two groups of neurons, with or without excitation/inhibition (
compress_paths, compress_paths_signed, effective_conn_from_paths, signed_effective_conn_from_paths).
- Path-finding — retrieve the actual subcircuit between sources and targets, group, filter, and plot (
find_paths_of_length, el_within_n_steps, group_paths, filter_paths, plot_paths).
- Differentiable connectome model — a simple firing-rate model layered onto the connectome, with per-cell-type slopes, biases, time constants, and divisive normalisation (
MultilayeredNetwork).
- Gradient methods — activation maximisation (find the input that activates a target), saliency and
get_gradients (find which inputs or intermediates matter for a stimulus), and train_model (fit parameters to data).
- Visualisation — interactive wiring diagrams, hex-eye and Mollweide receptive fields (Zhao et al. 2025), neuroglancer scenes (
plot_paths, hex_heatmap, plot_mollweide_projection, get_ngl_link).
- Resources — a community-curated table of fly cell types with experimentally tested functions, and bundled published odour-response datasets (
load_dataset).
Full documentation: connectome-interpreter.readthedocs.io.
Tutorial notebooks
A three-notebook tour using the FAFB/FlyWire connectome (Dorkenwald et al. 2024, Schlegel et al. 2024) — open in Colab, no local install needed:
- Linear methods — effective connectivity, path-finding, visual receptive fields.
- Modelling — running the differentiable model upon odour input.
- Gradient methods — activation maximisation, saliency, and training to experimental data.
Each notebook also loads BANC (Bates et al. 2025), maleCNS (Berg et al. 2025), hemibrain (Scheffer et al. 2020), and MANC (Cheong et al. 2025; Marin et al. 2024; Takemura et al. 2024) so you can swap connectomes by changing one variable.
A separate notebook covers the larval connectome (Winding et al. 2023; 3D viewer: catmaid).
Mapping known to unknown