A connectome constrained deep mechanistic network (DMN) model of the fruit fly visual system in Pytorch as discovery tool for generating and testing hypotheses about neural computations with connectomes.
It's our official implementation of πConnectome-constrained deep mechanistic networks predict neural responses across the fly visual system at single-neuron resolution.
Besides pretrained models and analyses, the library includes abstractions and extension points for building DMNs and dynamic stimulus datasets in Pytorch.
To illustrate how we generate hypotheses about neural computations with DMNs we include two examples. The examples explore the connectome and how to provide custom stimuli to the models and explore their responses. Try our models inside our Google Colab notebooks:
All in between, touching results already described in the paper, will come soon.
- Optic flow task
- Flash responses
- Moving edge responses
- Naturalistic stimuli responses
- Maximally excitatory stimuli
- Predictions for unknown cell types
For installing the package locally, follow the steps below (assuming conda is installed):
- create a new conda environment
conda create --name flyvision -y
- activate the new conda environment
conda activate flyvision
- install python
conda install "python>=3.7.11,<3.10.0"
- clone the repository
git clone https://github.com/TuragaLab/flyvis.git
- navigate to the repo
cd flyvis
and install in developer modepip install -e .
- (run
pytest
to check if the installation works)
How useful is a connectome? We show that you can predict quite a bit about the neural activity of a circuit from just measurements of its connectivity.
We built a convolutional recurrent network of the fly visual system--on a hexagonal grid, matching the columnar structure of the optic lobe. Weights (connections + filter weights) come from the connectome: A deep neural network which precisely maps onto a real brain circuit!
Our connectome-constrained βdeep mechanistic networkβ (DMN) has 64 identified cell-types, 44K neurons + over 1 Mio. connections. We trained its free parameters (single-cell + synapse dynamics) on optic flow computation from naturalistic movie inputs.
Janne (@lappalainenj, [email protected]), Mason (@MasonMcGill)
@article{lappalainen2023connectome,
title={Connectome-constrained deep mechanistic networks predict neural
responses across the fly visual system at single-neuron resolution},
author={Lappalainen, Janne K and Tschopp, Fabian D and Prakhya, Sridhama and
McGill, Mason and Nern, Aljoscha and Shinomiya, Kazunori and Takemura, Shin-ya
and Gruntman, Eyal and Macke, Jakob H and Turaga, Srinivas C},
journal={bioRxiv},
year={2023}
}