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
- 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), andtrain_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.
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).
To facilitate neural circuit interpretation, we maintain a list of cell types with known, experimentally tested functions. This example notebook uses the list to query receptive fields. The list is a quick look-up of literature, not a stipulation of neural function.
- Everyone has edit access — please help make the list more comprehensive and correct, and check that the publications you care about are cited correctly. Handle with care.
- When adding multiple entries to one cell (e.g. several papers per cell type), separate them with
;(semicolon + space) for programmatic access.
- Pre-processed connectomics data and pre-processing scripts are at connectome_data_prep: adjacency matrices in
scipy.sparse(.npz), metadata in.csv. - Dataset requests, feature requests, feedback: open an issue, or email
yy432atcam.ac.uk:). - Want to contribute code? See CONTRIBUTING.md.