Original: Unsupervised Discovery of Dynamic Neural Circuits
Revised: Unsupervised Discovery of Dynamic Neural Circuits

Original: Anonymous Author(s)

Original: AfﬁliationAddress email

Original: Abstract
Revised: Abstract

Original: What can we learn about the functional organization of cortical microcircuits fromlarge-scale recordings of neural activity?
Revised: What can we learn about the functional organization of cortical microcircuits from large-scale recordings of neural activity?

Original: To obtain an explicit and interpretablemodel of time-dependent functional connections between neurons and to establishthe dynamics of the cortical information ﬂow, we develop ‘ dynamic neural relationalinference’ (dNRI).
Revised: To obtain an explicit and interpretable model of time-dependent functional connections between neurons and to establish the dynamics of the cortical information ﬂow, we develop ‘ dynamic neural relational inference’ (dNRI).

Original: We study both synthetic and real-world neural spiking data anddemonstrate that the developed method is able to uncover the dynamic relationsbetween neurons more reliably than existing baselines.
Revised: We study both synthetic and real-world neural spiking data and demonstrate that the developed method is able to uncover the dynamic relations between neurons more reliably than existing baselines

Original:  Introduction
Revised:  Introduction

Original: Extraction of latent temporal dynamics in complex networks is important to understand their functional connectivity and to predict their behavior.
Revised: Extraction of latent temporal dynamics in complex networks is important to understand their functional connectivity and to predict their behavior.

Original: Recently, various machine learning methods wereused to encode/decode the behavior from recorded activity of large neuronal populations [2, 3].
Revised: Recently, various machine learning methods were used to encode/decode the behavior from recorded activity of large neuronal populations [2, 3].

Original: However, in these mostly ‘static’ brain models the temporal dynamics of the ﬁring activity as well asinteractions between different neurons are often neglected.
Revised: However, in these mostly ‘static’ brain models the temporal dynamics of the ﬁring activity as well as interactions between different neurons are often neglected.

Original: It is expected, however, that the dynamicinteractions in neural networks might be the key to understanding the brain computations.
Revised: It is expected, however, that the dynamic interactions in neural networks might be the key to understanding the brain computations.

Original: Addressingthis, several methods have been proposed to uncover low-dimensional latent representations of neuralnetwork activity and its dynamics, including dimensionality reduction-based techniques such asprincipal components analysis [1] and tensor components analysis [14], pattern extraction techniquesbased on matrix factorization such as ConvNMF [11] and SeqNMF [7], and autoencoder models suchas LFADS [9].
Revised: Addressing this, several methods have been proposed to uncover low-dimensional latent representations of neural network activity and its dynamics, including dimensionality reduction-based techniques such as principal components analysis [1] and tensor components analysis [14], pattern extraction techniques based on matrix factorization such as ConvNMF [11] and SeqNMF [7], and autoencoder models such as LFADS [9].

Original: However, temporal correlations between individual neurons in the network are oftenonly modeled implicitly, hindering reconstruction of functional connectivity of the neural circuits.
Revised: However, temporal correlations between individual neurons in the network are often only modeled implicitly, hindering reconstruction of functional connectivity of the neural circuits.

Original: In contrast to these implicit techniques, here, we develop an extension to Neural Relational Inference [6], which we call Dynamic Neural Relational Inference (dNRI).
Revised: In contrast to these implicit techniques, here, we develop an extension to Neural Relational Inference [6], which we call ‘dynamic Neural Relational Inference’ (dNRI).

Original: Speciﬁcally, we develop anew model to extract rapid dynamic changes of network activity in the form of a time-dependentadjacency matrix.
Revised: Speciﬁcally, we develop a new model to extract rapid dynamic changes of network activity in the form of a time-dependent adjacency matrix.

Original: We aim at extracting rapid (tens of milliseconds) correlations between recordedneurons that capture their functional relations across the network.
Revised: We aim at extracting rapid (tens of milliseconds) correlations between recorded neurons that capture their functional relations across the network.

Original: Moreover, our method enables the tracking of the temporal evolution of this functional connectivityover the span of a trial.
Revised: Moreover, our method enables the tracking of the temporal evolution of this functional connectivity over the span of a trial.

Original: This means it can provide an interpretable approach to uncover hiddendynamical structure of brain information ﬂows and to reconstruct the underlying functional braincircuitry.
Revised: This means it can provide an interpretable approach to uncover hidden dynamical structure of brain information ﬂows and to reconstruct the underlying functional brain circuitry.

Original: We demonstrate the applicability of our method on both synthetic spiking data and datarecorded from the cortex of live and behaving mice.
Revised: We demonstrate the applicability of our method on both synthetic spiking data and data recorded from the cortex of live and behaving mice.

Original:  Dynamic Neural Relational Inference (dNRI)
Revised:  Dynamic Neural Relational Inference (dNRI)

Original: We are interested in recovering the dynamic ﬂow of information between neurons, i.e ., we want toestimate whether spiking of one neuron either excites or suppresses spiking of another neuron atvarious points in time.
Revised: We are interested in recovering the dynamic ﬂow of information between neurons, i.e ., we want to estimate whether spiking of one neuron either excites or suppresses spiking of another neuron at various points in time.

Original: To address this task, we assume spiking information for a set of neurons tobe available.
Revised: To address this task, we assume spiking information for a set of neurons to be available.

Original: We represent neural spiking information via matrices x ∈ { 0 , 1 } N × T , where N is thenumber of neurons recorded for T time bins and each entry represents the absence or presence ofa spike for a particular neuron i at a given time bin t .
Revised: We represent neural spiking information via matrices x ∈ { 0 , 1 } N × T , where N is the number of neurons recorded for T time bins and each entry represents the absence or presence of a spike for a particular neuron i at a given time bin t .

Original: The goal is to predict binary variables z ( t ) ij( called ‘edges’) for every pair ( i, j ) of neurons for every timestep t which indicate whether 
Revised: The goal is to predict binary variables z ( t ) ij (hereafter called ‘edges’) for every pair ( i, j ) of neurons for every timestep t which indicate whether the spiking activity of neuron i inﬂuences that of neuron j .

Revised: With the assumption that neurons i and j are connected, setting z ( t ) ij = 1 indicates that this connection is currently ‘active’ at time t .

Original: × ...  ...
Revised: × ...  ...

Original: × ×
Revised: × ×

Original: Encoder
Revised: Encoder

Original: Decoder
Revised: Decoder

Original: [Figure]
Revised: [Figure]

Original: Legend
Revised: Legend

Original: S o ft m a x
Revised: S o ft m a x

Original: LSTMCell
Revised: LSTMCell

Original: MLP
Revised: MLP

Original: Concat.
Revised: Concat.

Original: Node Representations ...
Revised: Node Representations ...

Original: Samplefrom dist.
Revised: Samplefrom dist.

Original: the spiking activity of neuron i inﬂuences that of neuron j .

Original: With the assumption that neurons i and jare connected, setting z ( t ) ij = 1 indicates that this connection is currently ‘active’ at time t .

Original: To model this problem, we follow the recently introduced NRI formulation [6] and learn a variationalauto-encoder (VAE) whose observed variables represent neural spiking patterns x and whose latentvariables z represent connections between neurons.
Revised: To model this problem, we follow the recently introduced NRI formulation [6] and learn a variational auto-encoder (VAE) whose observed variables represent neural spiking patterns x and whose latent variables z represent connections between neurons.

Original: See Fig.
Revised: See Fig.

Original: 1 for a depiction of the full model.
Revised: 1 for a depiction of the full model.

Original: Unlike
Revised: Unlike

Original: Kipf et al.
Revised: Kipf et al.

Original: [6], who focus on predicting static connectivity graphs, we model dynamic connectionsthat vary across time.
Revised: [6], who focus on predicting static connectivity graphs, we model dynamic connections that vary across time.

Original: Additionally, they optimize the evidence lower bound (ELBO), but we insteaduse the β -VAE formulation described by Higgins et al.
Revised: Additionally, they optimize the evidence lower bound (ELBO), but we instead use the β -VAE formulation described by Higgins et al.

Original: More formally, we optimize the followingvariational objective
Revised: More formally, we optimize the following variational objective

Original: [Equation]
Revised: [Equation]

Original: This objective consists of three major components, which we will describe subsequently.
Revised: This objective consists of three major components, which we will describe subsequently.

Original: Encoder.
Revised: Encoder.

Original: The encoder q φ takes an entire neural spike train x as input and produces q φ ( z | x ) , whichis an approximate posterior probability distribution for each connection variable.
Revised: The encoder q φ takes an entire neural spike train x as input and produces q φ ( z | x ) , which is an approximate posterior probability distribution for each connection variable.

Original: The encoder henceestimates the probability of a neuron i being connected to neuron j at time t .
Revised: The encoder hence estimates the probability of a neuron i being connected to neuron j at time t .

Original: We use long-short-termmemory (LSTM) unit-based deep nets parameterized by φ as our encoder.
Revised: We use long-short-termmemory (LSTM) unit-based deep nets parameterized by φ as our encoder.

Original: q φ is then used to samplelikely interaction patterns which are used by the decoder.
Revised: q φ is then used to sample likely interaction patterns which are used by the decoder.

Original: Because the latent variables z are discrete,the process of sampling from their distribution is non-differentiable.
Revised: Because the latent variables z are discrete, the process of sampling from their distribution is non-differentiable.

Original: Consequently, we follow priorwork and sample instead from the concrete distribution [8, 5], which approximates discrete samplingin a differentiable manner and enables to backpropagate gradients from the decoder reconstruction allthe way to the encoder parameters φ .
Revised: Consequently, we follow prior work and sample instead from the concrete distribution [8, 5], which approximates discrete sampling in a differentiable manner and enables to backpropagate gradients from the decoder reconstruction all the way to the encoder parameters φ .

Original: Decoder.
Revised: Decoder.

Original: The decoder p θ ( x | z ) models the probability of reconstructing the input spike train givena sampled set of edges from the approximate posterior.
Revised: The decoder p θ ( x | z ) models the probability of reconstructing the input spike train given a sampled set of edges from the approximate posterior.

Original: For this we also use an LSTM unit-baseddeep net and refer to its parameters as θ .
Revised: For this we also use an LSTM unit-based deep net and refer to its parameters via θ .

Original: A separate recurrent neural net (RNN) is used to modeleach neuron.
Revised: A separate recurrent neural net (RNN) is used to model each neuron.

Original: To represent the inﬂuence of the predicted edges, these RNNs take as input a maskedversion of the predicted spiking probability for every neuron from the current time step, where themask for each neuron is derived from the sampled edges.
Revised: To represent the inﬂuence of the predicted edges, these RNNs take as input a masked version of the predicted spiking probability for every neuron from the current time step, where the mask for each neuron is derived from the sampled edges.

Original: Prior.
Revised: Prior.

Original: The choice of the prior p ( z ) is used to encourage sparsity of the modeled edges.
Revised: The choice of the prior p ( z ) is used to encourage sparsity of the modeled edges.

Original: Because wewant edge predictions to be independent of each other, we use an independent Bernoulli prior p ( z ) =(cid:81)
Revised: Because we want edge predictions to be independent of each other, we use an independent Bernoulli prior p ( z ) = (cid:81)

Original: Tt =1 (cid:81) i (cid:54)
Revised: Tt =1 (cid:81) i (cid:54)

Original: =
Revised: =

Original: j p ( z ( t ) i,j ) for each latent variable.
Revised: j p ( z ( t ) i,j ) for each latent variable.

Original: Setting the probability of no edge ( i.e ., p θ ( z ( t ) i,j = 0) )larger than 0 .
Revised: Setting the probability of no edge ( i.e ., p θ ( z ( t ) i,j = 0) ) larger than 0 .

Original: 5 reduces prediction of spurious edges.
Revised: 5 reduces prediction of spurious edges.

Original: On synthetic data, we found that using a valueof 0 .
Revised: On synthetic data, we found that using a value of 0 .

Original: 8 worked well for our experiments.
Revised: 8 worked well for our experiments.

Original: For the real data, however, we found that using a strongno-edge probability prevented the model from picking up the relatively sparse connections, so weused a uniform prior for the experiments on real-world spiking data reported below.
Revised: For the real data, however, we found that using a strong no-edge probability prevented the model from picking up the relatively sparse connections, so we used a uniform prior for the experiments on real-world spiking data reported below.

Original: To train the parameters θ and φ of the decoder and encoder, we proceed as follows: for each spiketrain in the current minibatch, the encoder ﬁrst predicts the approximate posterior q φ ( z | x ) for eachlatent variable.
Revised: To train the parameters θ and φ of the decoder and encoder, we proceed as follows: for each spike train in the current minibatch, the encoder ﬁrst predicts the approximate posterior q φ ( z | x ) for each latent variable.

Original: We then sample from this distribution as discussed previously.
Revised: We then sample from this distribution as discussed previously.

Original: Given these samples ˆ z ,we then predict spiking activity using the decoder p θ ( x | ˆ z ) .
Revised: Given these samples ˆ z , we then predict spiking activity using the decoder p θ ( x | ˆ z ) .

Original: For training, we use ground-truth spikesas the decoder input; during testing, predictions for each time step are fed as input into the next step.
Revised: For training, we use ground-truth spikes as the decoder input; during testing, predictions for each time step are fed as input into the next step.

Original:  Experiments
Revised:  Experiments

Original: We demonstrate the efﬁcacy of dNRI using two types of data: the ﬁrst are three synthetic datasetsconsisting of 12 simulated neurons with baseline spiking rates each sampled from the interval 
Revised: We demonstrate the efﬁcacy of dNRI using two types of data: the ﬁrst are three synthetic datasets consisting of 12 simulated neurons with baseline spiking rates each sampled from the interval [0 . 1 , 0 . 3] .

Revised: Additional spikes are generated as follows: time is divided into four phases, with each phase containing 10 randomly sampled neuron pairs ( i, j ) which indicate that whenever neuron i

Original: GT dNRI
Revised: GT dNRI

Original: GLM
Revised: GLM

Original: TCA seqNMF
Revised: TCA seqNMF

Original: P h
Revised: P h

Original: a s e
Revised: a s e

Original: P h
Revised: P h

Original: a s e
Revised: a s e

Original: P h
Revised: P h

Original: a s e
Revised: a s e

Original: P h
Revised: P h

Original: a s e
Revised: a s e

Original: [Table]
Revised: [Table]

Original: Additional spikesare generated as follows: time is divided into four phases, with eachphase containing 10 randomly sampled neuron pairs ( i, j ) which indicate that whenever neuron ispikes at time t , neuron j will spike at time t + 1 with probability 1 , 0 . 8 or 0 . 6 (hereafter referred toas ‘edge probability’).
Revised: spikes at time t , neuron j will spike at time t + 1 with probability 1 , 0 . 8 or 0 . 6 (hereafter referred to as ‘edge probability’).

Original: The second type of data consists of spiking activity of 24 neurons which arebinned at 20 ms and recorded from a primary somatosensory cortex of a mouse actively navigatingin a tactile virtual reality while motorized walls were moved towards and away from the animalsnout [13, 12].
Revised: The second type of data consists of spiking activity of 24 neurons which are binned at 20 ms and recorded from a primary somatosensory cortex of a mouse actively navigating in a tactile virtual reality while motorized walls were moved towards and away from the animal snout [13, 12].

Original: We compare the proposed approach on the synthetic data to four baselines using thefollowing metrics: their ability to ﬁnd the underlying edges (measured via F1) and on the normalizedreconstruction error of neural spiking, computed as (cid:107) ˆ x − x (cid:107) F / (cid:107) x (cid:107) F where x is the original spikingdata, ˆ x is the predicted reconstruction and (cid:107) · (cid:107) F denotes the Frobenius-norm.
Revised: We compare the proposed approach on the synthetic data to four baselines using the following metrics: their ability to ﬁnd the underlying edges (measured via F1) and on the normalized reconstruction error of neural spiking, computed as (cid:107) ˆ x − x (cid:107) F / (cid:107) x (cid:107) F where x is the original spiking data, ˆ x is the predicted reconstruction and (cid:107) · (cid:107) F denotes the Frobenius-norm.

Original: Each dataset isseparated into train, validation, and test splits, with dNRI models being trained on the train split andhyperparameters being tuned using performance on the validation split.
Revised: Each dataset is separated into train, validation, and test splits, with dNRI models being trained on the train split and hyperparameters being tuned using performance on the validation split.

Original: Test set results are [-presented.
-]
Revised: Test set results are [-presented.
-]presented.

Original: We use the following baselines: Tensor Component Analysis (TCA) [14] is a PCA extension thatfactorizes the data into time, trial, and neuron components. 
Revised: We use the following baselines: Tensor Component Analysis (TCA) [14] is a PCA extension that factorizes the data into time, trial, and neuron components. We ﬁrst convolve input data with a

Original: To predict edges from learned factors, wetake the outer product ofeach neuron factor with itself and then convolve them with  each of the othertwo factors.
Revised: Gaussian ﬁlter. After running TCA, we take the outer product of neuron factors with themselves to ﬁnd neurons that spike close to each other. Predicted edges are then obtained by multiplying this result by the time and trial components to get predictions at each time step.

Original: SeqNMF [7] is an extension of non-negative matrix factorization that produces a matrixfactor representing neural activity for some ﬁxed length of time and a vector factor representing time.
Revised: SeqNMF [7] is an extension of non-negative matrix factorization that produces a matrix factor representing neural activity for some ﬁxed length of time and a vector factor representing time.

Original: To predict edges from learned factors, we take the outer products of all columns of the neuron factorand them convolve them with the time factor.
Revised: To predict edges from learned factors, we take the outer products of all columns of the neuron factor, which produces edge matrices whose values are large for neurons that spike in sequence. We multiply these by their corresponding time factors to get predictions per time step, and sum the contributions from each factor to obtain ﬁnal edges.

Original: Static (d)NRI employs a static graph dNRI modelwhere the outputs of the encoder edge LSTM are averaged across time before computing the ﬁnaledge probabilities.
Revised: Static (d)NRI employs a static graph dNRI model where the outputs of the encoder edge LSTM are averaged across time before computing the ﬁnal edge probabilities.

Original: These probabilities are then used for all time bins.
Revised: These probabilities are then used for all time bins.

Original: GLM consists of a Bernoulligeneralized linear model [10] per neuron, using all neuron spiking history as covariates.
Revised: GLM consists of a Bernoulli generalized linear model [10] per neuron, using all neuron spiking history as covariates.

Revised: Note that not all baselines were originally developed for this task, yet we think they are applicable.

Original: Synthetic Data Results.
Revised: Synthetic Data Results.

Original: The computed metrics for all of the synthetic datasets for all models arereported in Tab. 1.
Revised: The computed metrics for all of the synthetic datasets for all models are reported in Tab. 1.

Original: None of the baselines are able to recover the dynamic connections reliably.
Revised: None of the baselines are able to recover the dynamic connections reliably.

Original: Incontrast, dNRI is able to recover these interactions to a high degree of accuracy.
Revised: In contrast, dNRI is able to recover these interactions to a high degree of accuracy.

Original: Also note the beneﬁtsof dynamically estimating adjacency as opposed to a static interaction.
Revised: Also note the beneﬁts of dynamically estimating adjacency as opposed to a static interaction.

Original: Moreover, this performance ismaintained when the edge spiking probability becomes smaller.
Revised: Moreover, this performance is maintained when the edge spiking probability becomes smaller.

Original: Many of the baselines outperformdNRI at reconstructing the original spiking activity, but this is a consequence of the difference intraining objectives or inference procedures.
Revised: Many of the baselines outperform dNRI at reconstructing the original spiking activity, but this is a consequence of the difference in training objectives or inference procedures.

Original: Fig.
Revised: Fig.

Original: 2 visualizes the edge predictions made by dNRI.
Revised: 2 visualizes the edge predictions made by dNRI.

Original: Mouse Cortical Recording Data Results.
Revised: Mouse Cortical Recording Data Results.

Original: In analysis of the real-world data, we focus on a choiceperiod between 400ms from the start of the trial, when the animal starts to sense the approachingwall, and 950ms, when the animal is making a decision to change the run direction to avoid theapproaching wall.
Revised: In analysis of the real-world data, we focus on a choice period between 400ms from the start of the trial, when the animal starts to sense the approaching wall, and 950ms, when the animal is making a decision to change the run direction to avoid the approaching wall.

Original: We present the results on this data in Fig.
Revised: We present the results on this data in Fig.

Original: 3 focusing on several frames thatcorrespond to the last stage of sensory information processing when the animal has almost made achoice and is preparing for motor action.
Revised: 3 focusing on several frames that correspond to the last stage of sensory information processing when the animal has almost made a choice and is preparing for motor action.

Original: Neurons are ordered with respect to their cortical depth andassigned to speciﬁc cortical layers.
Revised: Neurons are ordered with respect to their cortical depth and [Figure] assigned to speciﬁc cortical layers.

Original: While the overall population spiking activity is relatively dense,signiﬁcant correlations revealed by dNRI are sparse.
Revised: While the overall population spiking activity is relatively dense, signiﬁcant correlations revealed by dNRI are sparse.

Original: This is expected, as we are focusing only onrapid correlations to reveal putative monosynaptic connections.
Revised: This is expected, as we are focusing only on rapid correlations to reveal putative monosynaptic connections.

Original: Correlations are also transient, with a[Figure] typical lifetime on the order of 90ms.
Revised: Correlations are also transient, with a typical lifetime on the order of 90ms.

Original: In Fig.
Revised: In Fig.

Original: 3, we highlight several neuron pairs to exemplify the[Figure] power of our representation: dNRI results infer transient information ﬂow from L2/3 to L5B neurons(red curve) as well as communications within deep L5A and L5B (blue and green curves), as they arestrongest outputs of the somatosensory barrel columns.
Revised: 3, we highlight several neuron pairs to exemplify the power of our representation: dNRI results infer transient information ﬂow from L2/3 to L5B neurons (red curve) as well as communications within deep L5A and L5B (blue and green curves), as they are strongest outputs of the somatosensory barrel columns.

Original: As expected from the analysis of syntheticdata trials, neither SeqNMF, GLM, nor TCA are able to capture fast transient features revealed bydNRI.
Revised: Similar to the analysis of synthetic data trials, neither SeqNMF, GLM, nor TCA are able to capture fast transient features revealed by dNRI.

Original: [Figure] 
Revised: [Figure] Fig.

Revised: 4 displays the cross-correlations between the neuron pair whose predicted edges are highlighted in red in Fig.

Revised: The use of crosscorrelations is a standard method of analysis used to discover putative monosynaptic connections between neurons.

Original: [Figure]
Revised: The results in Fig.

Original: We develop a method to explicitly extract time-dependent functional relations from large-scale neural
Revised: 4 indicates the presence of such a connection; however, this sort of analysis does not provide any information regarding when this connection is being actively used in the network.

Original: [Figure]
Revised: As displayed in Fig.

Original: spiking data recordings of cortical networks. Using simulated data of  spiking activity where ground
Revised: 3, the dNRI model was not only able to successfully detect the presence of this connection, but it also predicts when this connection is active. In other words, dNRI allows for additional analyses of neural spiking data that are not possible when using a static analysis technique.

Original:  [Figure]
Revised:  Conclusions

Revised: We develop a method to explicitly extract time-dependent functional relations from large-scale neural spiking data recordings of cortical networks.

Original:  truthinformation is available,  we demonstrate that the proposed approach is able to recover the[Figure] implanted interactions more accurately than baselines which model relations implicitly.
Revised: Using simulated data of spiking activity where ground truth is available, and real data, we demonstrate that the proposed approach is able to recover the implanted interactions more accurately than baselines which model relations implicitly

Original: [Figure]
Revised: Acknowledgments: This work is supported in part by NSF under Grant No. 1718221 and MRI #1725729, UIUC, Samsung, 3M, Cisco Systems Inc. (Gift Award CG 1377144) and Adobe. We thank NVIDIA for providing GPUs used for this work and Cisco for access to the Arcetri cluster.