  The static synaptic connectivity of neuronal circuits stands in direct
contrast to the dynamics of their function. As in changing community
interactions, different neurons can participate actively in various
combinations to effect behaviors at different times. We introduce an
unsupervised approach to learn the dynamic affinities between neurons in live,
behaving animals, and to reveal which communities form among neurons at
different times. The inference occurs in two major steps. First, pairwise
non-linear affinities between neuronal traces from brain-wide calcium activity
are organized by non-negative tensor factorization (NTF). Each factor specifies
which groups of neurons are most likely interacting for an inferred interval in
time, and for which animals. Finally, a generative model that allows for
weighted community detection is applied to the functional motifs produced by
NTF to reveal a dynamic functional connectome. Since time codes the different
experimental variables (e.g., application of chemical stimuli), this provides
an atlas of neural motifs active during separate stages of an experiment (e.g.,
stimulus application or spontaneous behaviors). Results from our analysis are
experimentally validated, confirming that our method is able to robustly
predict causal interactions between neurons to generate behavior. Code is
available at https://github.com/dyballa/dynamic-connectomes.
