Skip to main content
PLOS Computational Biology logoLink to PLOS Computational Biology
. 2020 Jan 21;16(1):e1007606. doi: 10.1371/journal.pcbi.1007606

Learning spatiotemporal signals using a recurrent spiking network that discretizes time

Amadeus Maes 1, Mauricio Barahona 2, Claudia Clopath 1,*
Editor: Blake A Richards3
PMCID: PMC7028299  PMID: 31961853

Abstract

Learning to produce spatiotemporal sequences is a common task that the brain has to solve. The same neurons may be used to produce different sequential behaviours. The way the brain learns and encodes such tasks remains unknown as current computational models do not typically use realistic biologically-plausible learning. Here, we propose a model where a spiking recurrent network of excitatory and inhibitory spiking neurons drives a read-out layer: the dynamics of the driver recurrent network is trained to encode time which is then mapped through the read-out neurons to encode another dimension, such as space or a phase. Different spatiotemporal patterns can be learned and encoded through the synaptic weights to the read-out neurons that follow common Hebbian learning rules. We demonstrate that the model is able to learn spatiotemporal dynamics on time scales that are behaviourally relevant and we show that the learned sequences are robustly replayed during a regime of spontaneous activity.

Author summary

The brain has the ability to learn flexible behaviours on a wide range of time scales. Previous studies have successfully built spiking network models that learn a variety of computational tasks, yet often the learning involved is not biologically plausible. Here, we investigate a model that uses biological-plausible neurons and learning rules to learn a specific computational task: the learning of spatiotemporal sequences (i.e., the temporal evolution of an observable such as space, frequency or channel index). The model architecture facilitates the learning by separating the temporal information from the other dimension. The time component is encoded into a recurrent network that exhibits sequential dynamics on a behavioural time scale, and this network is then used as an engine to drive the read-out neurons that encode the spatial information (i.e., the second dimension). We demonstrate that the model can learn complex spatiotemporal spiking dynamics, such as the song of a bird, and replay the song robustly spontaneously.

Introduction

Neuronal networks perform flexible computations on a wide range of time scales. While individual neurons operate on the millisecond time scale, behaviour time scales typically span from a few milliseconds to hundreds of milliseconds and longer. Building functional models that bridge this time gap is of increasing interest [1], especially now that the activity of many neurons can be recorded simultaneously [2, 3]. Many tasks and behaviours in neuroscience consist of learning and producing flexible spatiotemporal sequences, e.g. a 2-dimensional pattern with time on the x-axis and any other observable on the y-axis which we denote here in general terms as the “spatial information”. For example, songbirds produce their songs through a specialized circuit: neurons in the HVC nucleus burst sparsely at very precise times to drive the robust nucleus of the arcopallium which in its turn drives motor neurons [4, 5]. For different motor tasks, sequential neuronal activity is recorded in various brain regions [610], and while the different tasks involve different sets of muscles, the underlying computation on a more fundamental level might be similar [11].

Theoretical and computational studies have shown that synaptic weights of recurrent networks can be set appropriately so that dynamics on a wide range of time scales is produced [1214]. In general, these synaptic weights are engineered to generate a range of interesting dynamics. In slow-switching dynamics, for instance, the wide range of time scales is produced by having stochastic transitions between clusters of neurons [15]. Another example is sequential dynamics, where longer time scales are obtained by clusters of neurons that activate each other in a sequence. This sequential dynamics can emerge by a specific connectivity in the excitatory neurons [16, 17] or in the inhibitory neurons [18, 19]. However, it is unclear how the brain learns these dynamics, as most of the current approaches use non biologically plausible ways to set or “train” the synaptic weights. For example, FORCE training [2022] or backpropagation through time [23] use non-local information either in space or in time to update weights. Such information is not available to the synaptic connection, which only has access to the presynaptic and postsynaptic variables at the current time.

Here, we propose to learn a spatiotemporal task over biologically relevant time scales using a spiking recurrent network driving a read-out layer where the neurons and synaptic plasticity rules are biologically plausible. Specifically, all synapses are plastic under typical spike-timing dependent Hebbian learning rules [12, 24]. Our model architecture decomposes the problem into two parts. First, we train a recurrent network to generate a sequential activity which serves as a temporal backbone so that it operates as a ‘neuronal clock’ driving the downstream learning. The sequential activity is generated by clusters of neurons activated one after the other: as clusters are highly recurrently connected, each cluster undergoes reverberating activity that lasts longer than neural time scale so that the sequential cluster activation is long enough to be behaviourally relevant. This construction allows us to bridge the neural and the behavioural time scales. Second, we use Hebbian learning to encode the target spatiotemporal dynamics in the read-out neurons. In this way, the recurrent network encodes time and the read-out neurons encode ‘space’. As discussed above, we use the term ‘space’ to denote a temporally-dependent observable, be it spatial position, or phase, or a time-dependent frequency, or a more abstract state-space. Similar to the liquid state-machine, where the activity in a recurrent network is linearly read-out by a set of neurons, we can learn different dynamics in parallel in different read-out populations [25]. We also show that learning in the recurrent network is stable during spontaneous activity and that the model is robust to synaptic failure.

Results

Model architecture

The model consists of two separate modules: a recurrent network and a read-out layer (Fig 1A). Learning happens in two stages. In the first stage, we learn the weights of the recurrent network so that the network exhibits a sequential dynamics. The ensuing recurrent neuronal network (RNN) effectively serves as a temporal backbone driving the learning of the downstream read-out layer. In the second stage, a target sequence is learned in the read-out layer.

Fig 1. Model architecture.

Fig 1

(A) The recurrent network consists of both inhibitory (in blue) and excitatory (in red) neurons. The connectivity is sparse in the recurrent network. The temporal backbone is established in the recurrent network after a learning phase. Inset: zoom of recurrent network showing the macroscopic recurrent structure after learning, here for 7 clusters. The excitatory neurons in the recurrent network project all-to-all to the read-out neurons. The read-out neurons are not interconnected. (B) All excitatory to excitatory connections are plastic under the voltage-based STDP rule (see Methods for details). The red lines are spikes of neuron j (top) and neuron i (bottom). When neurons j and i are very active together, they form bidirectional connections strengthening both Wij and Wji. Connections Wij are unidirectionally strengthened when neuron j fires before neuron i. (C) The incoming excitatory weights are L1 normalized in the recurrent network, i.e. the sum of all incoming excitatory weights is kept constant. (D) Potentiation of the plastic read-out synapses is linearly dependent on the weight. This gives weights a soft upper bound.

Architecture

The recurrent network is organized in C clusters of excitatory neurons and a central cluster of inhibitory neurons. All excitatory neurons follow adaptive exponential integrate-and-fire dynamics [26] while all inhibitory neurons follow a leaky integrate-and-fire dynamics. The inhibitory neurons in the RNN prevent pathological dynamics. The aim of this module is to discretize time into C sequential intervals, associated with each of the C clusters. This is achieved by learning the weights of the recurrent network. The neurons in the excitatory clusters then drive read-out neurons through all-to-all feedforward connections. The read-out neurons are not interconnected. The target sequence is learned via the weights between the driver RNN and the read-out neurons.

Plasticity

In previous models, the learning schemes are typically not biologically plausible because the plasticity depends on non-local information. Here, however, we use the voltage-based STDP plasticity rule in all the connections between excitatory neurons (Fig 1B). This is paired with weight normalization in the recurrent network (Fig 1C) and weight dependent potentiation in the read-out synapses (Fig 1D). Inhibitory plasticity [27] finds good parameters aiding the sequential dynamics (S5 Fig).

Learning scheme

During the first stage of learning, all neurons in each cluster receive the same input in a sequential manner. As a result of this learning stage, the recurrent spiking network displays a sequential dynamics of the C clusters of excitatory neurons. Neurons within each cluster spike over a time interval (while all neurons from other clusters are silent), with the activity switching clusters at points t = [t0, t1, …, tC] so that cluster i is active during time interval [ti−1, ti]. Thus, time is effectively discretized in the RNN.

During the second stage of learning, the read-out neurons receive input from a set of excitatory supervisor neurons. The discretization of time enables Hebbian plasticity to form strong connections from the neurons in the relevant time bin to the read-out neurons. For instance, if we want to learn a signal which is ‘on’ during [ti−1, ti] and ‘off’ otherwise, a supervisor neuron can activate the read-out neuron during that time interval so that connections from cluster i to the read-out neuron are potentiated through activity (who fires together, wires together). This means that, after learning, the read-out neuron will be activated when cluster i is activated. In general, the read-out layer learns a multivariate signal of time, i.e., the neurons in the read-out layer encode the D different dimensions of the target signal: tϕ(t) = [ϕ1(t), ϕ2(t), …, ϕD(t)].

A recurrent network that encodes discrete time

We give here further details of the first learning stage, where a recurrent network is trained to produce a sequential dynamics. To this end, we initialize the weight matrix so that each synaptic weight between two neurons is non-zero with probability p. The weights that are zero remain zero at all times, i.e. the topology is fixed. We set the initial values of the non-zero weights in the recurrent network such that the dynamics is irregular and asynchronous (i.e., a balanced network, see Methods for details).

We stimulate the C clusters with an external input in a sequential manner (Fig 2A): neurons in cluster i each receive external Poisson spike trains (rate of 18 kHz for 10 ms, assuming a large input population). After this, there is a time gap where no clusters receive input (5 ms). This is followed by a stimulation of cluster i + 1. This continues until the last cluster is reached and then it links back to the first cluster (i.e. a circular boundary condition). During the stimulation, neurons in the same cluster fire spikes together strengthening the intra-cluster connections bidirectionally through the voltage-based STDP rule [24, 28]. Additionally, there is a pre/post pairing between adjacent clusters. Neurons in cluster i + 1 fire after neurons in cluster i. The weights from cluster i to cluster i + 1 strengthen unidirectionally (Fig 2B). If the time gap between sequential stimulations is increased during the training phase, so that the gap becomes too long with respect to the STDP time window, then there is no pre/post pairing between clusters and the ensuing dynamics loses its sequential nature and becomes a slow-switching dynamics [12, 15] (S1 Fig). In slow-switching dynamics, clusters of neurons are active over long time scales, but both the length of activation and the switching between clusters is random. This is because the outgoing connections from cluster i to all other clusters are the same in a slow-switching network. To summarize, a connectivity structure emerges through biophysically plausible potentiation by sequentially stimulating the clusters of excitatory neurons in the recurrent network. When the gap between activation intervals is sufficiently small compared to the STDP window, the connectivity structure is such that intra-cluster weights and the weights from successive clusters ii + 1 are strong.

Fig 2. Learning a sequential dynamics stably under plasticity.

Fig 2

(A) The excitatory neurons receive sequential clustered inputs. Excitatory neurons are grouped in 30 disjoint clusters of 80 neurons each. (7 clusters shown in the cartoon for simplicity) (B) The weight matrix after training (only the first five clusters shown) exhibits the learned connectivity structure, e.g., neurons within cluster 1 are highly interconnected and also project to neurons in cluster 2, same for cluster 2 to cluster 3, etc. The spectrum of the full weight matrix after training shows most eigenvalues in a circle in the complex plane (as in a random graph) with two other eigenvalues signifying the balancing of the network, and a series of dominant eigenvalues in pairs that encode the feedforward embedding. (C) Raster plot of the total network consisting of 2400 excitatory (in red) and 600 inhibitory (in blue) neurons. After learning, the spontaneous dynamics exhibits a stable periodic trajectory ‘going around the clock’. The excitatory clusters discretize time (see zoom) and the network has an overall period of about 450 ms.

After the synaptic weights have converged, the external sequential input is shut-down and spontaneous dynamics is simulated so that external excitatory Poisson spike trains without spatial or temporal structure drive the RNN. Under such random drive, the sequence of clusters reactivates spontaneously and ensures that both the intra-cluster and the connections from cluster i to cluster i + 1 remain strong. In general, the interaction between plasticity, connectivity and spontaneous dynamics can degrade the learned connectivity and lead to unstable dynamics [29]. To test the stability of the learned connectivity, we track the changes in the off-diagonal weights (i.e. the connections from cluster i to cluster i + 1). After the external sequential input is shut-down, we copy the weight matrix and freeze the weights of this copy. We run the dynamics of the recurrent network using the copied frozen weights and apply plastic changes to the original weight matrix. This means that we effectively decouple the plasticity from the dynamics. Indeed, when the dynamics is sequential, the off-diagonal structure is reinforced. When the off-diagonal structure is removed from the frozen copied weight matrix, the dynamics is not sequential anymore. In this case, the off-diagonal structure degrades. We conclude that the connectivity pattern is therefore stable under spontaneous dynamics (S2 Fig).

We next studied how the spectrum of the recurrent weight matrix is linked to the sequential dynamics. In linear systems, the eigenvalues of the connectivity matrix determine the dynamics of the system. In a nonlinear spiking model, the relationship between connectivity and dynamics is less clear. The connectivity after learning can be seen as a low-dimensional perturbation of a random matrix. Such low-dimensional perturbations create outliers in the spectrum [30] and change the dynamics [31]. Here, we have carried out a similar spectral analysis to that presented in [15] (see Fig 7 in the Methods and S2 Fig in the Supplementary material). The weight matrix has most of its eigenvalues in a circle in the complex plane (Fig 2B) with eigenvalues associated both with the balanced nature of the network, but, importantly, also with the sequential structure (Fig 2B). As the temporal backbone develops through learning (as seen in S2 Fig), it establishes a spectral structure in which the pairs of leading eigenvalues with large real parts have almost constant imaginary parts.

Fig 7. Spectral analysis of reduced linear model.

Fig 7

(A) Cartoon of a simplified linearised rate model with three nodes x1, x2, x3 corresponding to three clusters of excitatory neurons with recurrent strength δ connected to a central cluster of inhibitory neurons x4. The cyclic connections are stronger clockwise than anticlockwise since ϵ > 1. (B) The spectrum shows a conjugate complex eigenvalue pair with large real part (2δϵ − 1)/2 and an imaginary part ±3(ϵ-1)/2 which grows linearly with the asymmetry of the clockwise/anticlockwise strength (ϵ − 1). This pair of eigenvalues dominates the dynamics as their real parts are close to 1 and leads to the periodic behaviour corresponding to propagation around the cycle x1x2x3x1….

A simplified analysis of a reduced weight matrix (where nodes are associated with groups of neurons) shows that the imaginary parts of the dominant eigenvalues depend linearly on the strength of the weights from cluster i to cluster i + 1 (see Methods, Fig 7). Hence for this simplified linearised rate model, this results in an oscillatory dynamics where the imaginary part determines the frequency by which the pattern of activation returns due to the periodic excitation pattern. As shown in [15], these properties of the linear system carry over to the nonlinear spiking model, i.e., the imaginary parts of the eigenvalues with large real parts determine the time scales of the sequential activity (S2 Fig).

Under spontaneous activity, each cluster is active for about 15 ms, due to the recurrent connectivity within the cluster. A large adaptation current counteracts the recurrent reverberating activity to turn off the activity reliably. Therefore, as each cluster is spontaneously active in a sequence, the sequence length reaches behavioural time scales (Fig 2C). In summary, the network exhibits sequential dynamics, serving as a temporal backbone where time is discretized over behavioural time scales.

Learning a non-Markovian sequence

After the sequential temporal backbone is learnt via the RNN, we can then learn a spatiotemporal sequence via the read-out neurons. To achieve this, during the second stage of training, the read-out neurons receive additional input from supervisor neurons and from interneurons (Fig 3A). The supervisor neurons receive an external Poisson input with rate modulated by the target sequence to be learned (Fig 3B).

Fig 3. Learning a non-Markovian sequence via the read-out neurons.

Fig 3

(A) Excitatory neurons in the recurrent network are all-to-all connected to the read-out neurons. The read-out neurons receive additional excitatory input from the supervisor neurons and inhibitory input from interneurons. The supervisor neurons receive spike trains that are drawn from a Poisson process with a rate determined by the target sequence. The read-out synapses are plastic under the voltage-based STDP rule. (B) The rate of the input signal to the supervisor neurons A, B and C. The supervisor sequence is ABCBA where each letter represents a 75 ms external stimulation of 10 kHz of the respective supervisor neuron. (C) After learning, the supervisor input and plasticity are turned off. The read-out neurons are now solely driven by the recurrent network. (D) The read-out weight matrix WRE after 12 seconds of learning. (E) Under spontaneous activity, the spikes of recurrent network (top) and read-out (bottom) neurons. Excitatory neurons in the recurrent network reliably drive sequence replays. (F) The target rate (top) and the rate of the read-out neurons (bottom) computed using a one sequence replay and normalized to [0, 1]. The spikes of the read-out neurons are convolved with a Gaussian kernel with a width of ∼ 12 ms.

As a first example, consider a target sequence composed of states A, B, C activated in the following deterministic order: ABCBA. This is a non-Markovian state sequence because the transition from state B to the next state (A or C) requires knowledge about the previous state [32], a non trivial task that requires information to be stored about previous network states, potentially over long time periods. Previous studies have proposed various solutions for this task [32, 33]. However, separating the problem of sequence learning in two stages solves this in a natural way.

The recurrent network trained in the first stage (Fig 2) is used to encode time. The underlying assumption is that a starting signal activates both the first cluster of the recurrent network and the external input to the supervisor neurons, which activate the read-out neurons.

After the training period, the interneurons and supervisor neurons stop firing (Fig 3C) and the target sequence is stored in the read-out weight matrix (Fig 3D). During spontaneous activity, clusters in the RNN reactivate in a sequential manner driving the learned sequence in the read-out neurons. Hence the spike sequence of the read-out neurons is a noisy version of the target signal (Fig 3E). Learning the same target signal several times results in slightly different read-out spike sequences each time (S3 Fig). The firing rates of neurons in the read-out corresponds to the target sequence (Fig 3F). In summary, our results show that the model is able to learn simple but non-trivial spatiotemporal signals that are non-Markovian.

Learning sequences in parallel

We next wondered how multiple spatiotemporal signals can be learned. We hypothesized that, once the temporal backbone is established, multiple spatiotemporal sequences can easily be learned in parallel. As an example, we learn two sequences: ABCBA and DEDED. Here, D and E denote two additional read-out neurons (Fig 4A). We assume that the model observes each sequence alternately for 2 seconds at a time (Fig 4B), although in principle it could also been shown simultaneously. After learning, the target sequences are encoded in the read-out weight matrix (Fig 4C). In a regime of spontaneous dynamics the learned sequences can be replayed (Fig 4D). An external inhibitory current to the read-out neurons can control which sequence is replayed. We conclude that multiple sequences can be learned in parallel. Each separate sequence requires a separate set of read-out neurons. As such, the number of read-out neurons required increases linearly with the number of target sequences.

Fig 4. Learning sequences in parallel.

Fig 4

(A) The recurrent network projects to two sets of neurons. (B) Two different sequences, ABCBA and DEDED, are learned by alternating between them and presenting each for 2 seconds at a time. (C) The read-out weight matrix after 24 seconds of learning. (D) Raster plot of spontaneous sequence reactivations, where an external inhibitory current is assumed to control which sequence is replayed.

Properties of the model: Scaling, robustness and temporal variability

We investigate several scaling properties of the network. We first assess how the sequential dynamics in the RNN depends on the cluster size by increasing the number of excitatory neurons in each cluster (NC), preserving the ratio of excitatory to inhibitory neurons (NE/NI). To preserve the magnitude of the currents in the network, the sparseness of the connectivity (p) also varies with NC such that pNC is constant. The same training protocols are used for each network configuration as described in the Methods. For a fixed number of clusters C, the mean period of the sequential dynamics exhibited by the RNN is largely independent of cluster size NC (Fig 5A). If we fix the number of neurons in the RNN, and in this way change the number of clusters C, the mean period of the sequential dynamics decreases with increasing cluster size NC. We conclude that the sequential dynamics is preserved over a wide range of network configurations. The time scales in the dynamics depend on the number of clusters and network size.

Fig 5. Scaling, robustness and time variability of the model.

Fig 5

(A) Change of the mean period of the sequential dynamics as the number of clusters grows with: (i) the total number of excitatory neurons kept constant (red line); (ii) the total number of neurons increasing with cluster size (blue line). Error bar shows a standard deviation. (B) Dynamics with varying level of external excitatory input for four different cluster sizes and NE = 2400. The external input can modulate the period of the sequential dynamics by ∼ 10%. (C) Recall performance of the learned sequence ABCBA for varying cluster sizes and NE = 30NC under synapse deletion (computed over 20 repeats). The learning time depends on the cluster size: Δt = 960s/NC. (D) The ABCBA sequence is learned with a network of 120 excitatory neurons connected in one large chain and read-out neurons with maximum synaptic read-out strength increased to WmaxAE=75pF. The network is driven by a low external input (rextEE=2.75kHz). When, at t = 500 ms a single synapse is deleted, the dynamics breaks down and parts of the sequence are randomly activated by the external input. Top: spike raster of the excitatory neurons of the RNN. Bottom: spike raster of the read-out neurons. (E) (Left) Histogram of the variability of the period of the sequential activity of the RNN over 79 trials (Right) The standard deviation of the cluster activation time, σt, increases as the square root of μt, the mean time of cluster activation: σt=0.213μt (root mean squared error = 0.223 ms).

Another way to modulate the period of the sequential dynamics is to change the unstructured Poisson input to the RNN during spontaneous dynamics (after the first stage of learning). When the rate of the external excitatory input is increased/decreased, the mean period of the sequential dynamics in the RNN decreases/increases (Fig 5B). These results suggest that the network could learn even if the supervisor signal changes in length at each presentation, assuming that both the supervisor and external Poisson input are modulated by the same mechanism.

We next looked at the robustness of the learning of our model under random perturbations and network size. In this context, we consider the effect of cluster size and the deletion of synapses in the read-out layer after learning. We learn the simple ABCBA sequence (Fig 3) in the read-out neurons using a RNN with a fixed number of clusters C but varying the cluster size NC. The total learning time (Δt) is varied with the cluster size, NC Δt, because smaller clusters learn slower, since smaller clusters need larger read-out synaptic strengths to drive the same read-out neuron. We also eliminate an increasing number of synapses in the read-out layer. Performance is quantified as the number of spikes elicited by the read-out neurons after deletion of read-out synapses normalized by the number of spikes elicited before deletion. Networks with larger clusters show a more robust performance under noise (Fig 5C and S4 Fig). These results show that, not surprisingly, larger clusters drive read-out neurons more robustly and learn faster.

We then tested the limits of time discretization in our model. To that end, we hardcoded a recurrent network with clusters as small as one neuron. In that extreme case, our network becomes a synfire chain with a single neuron in every layer [34]. In this case, randomly removing a synapse in the network will break the sequential dynamics (Fig 5D). Hence, although a spatiotemporal signal can be learned in the read-out neurons, the signal is not stable under a perturbation of the synfire chain. In summary, the choice of cluster size is a trade-off between network size on the one hand and robustness on the other hand. Large clusters: (i) require a large network to produce sequential dynamics with the same period; (ii) are less prone to a failure of the sequential dynamics; (iii) can learn a spatiotemporal signal faster; and (iv) drive the read-out neurons more robustly.

We have also characterized the variability in the duration of the sequential activity, i.e., the period of the RNN. Since the neural activity does not move through the successive clusters with the same speed in each reactivation, we wondered how the variance in the period of our RNN network compared to Weber’s law. Weber’s law predicts that the standard deviation of reactions in a timing task grows linearly with time [35, 36]. Because time in our RNN is discretized by clusters of neurons that activate each other sequentially, the variability increases over time as in a standard Markov chain diffusive process. Hence the variability of the duration T is expected to grow as T rather than linearly. This is indeed what our network displays (Fig 5E). Here, we scaled the network up and increased the period of the recurrent network by increasing the network size (80 excitatory clusters of 80 neurons each, see Methods for details).

Learning a complex sequence

In the non-Markovian target sequence ABCBA, the states have the same duration and the same amplitude (Fig 3B). To test whether we could learn more complex sequences, the model was trained using a spatiotemporal signal with components of varying durations and amplitudes. As an example, we use a ‘spatio’-temporal signal consisting of a 600 ms meadowlark song (Fig 6A). The spectrogram of the sound is normalized and used as the time-varying and amplitude-varying rate of the external Poisson input to the supervisor neurons. Each read-out and supervisor neuron encodes a different frequency range, hence in this example our ‘space’ dimension is frequency.

Fig 6. Learning a complex sequence.

Fig 6

(A) Target sequence (top). The amplitude shows the rate of the Poisson input to the supervisor neurons and is normalized between 0 and 10 kHz. Rate of read-out neurons for one sample reactivation after learning 6 seconds (bottom). 45 read-out neurons encode the different frequencies in the song. Neuron i encodes a frequency interval of [684 + 171i, 855 + 171i]Hz. (B) The read-out weight matrix after learning 6 seconds. (C) Sequence replays showing the spike trains of both the recurrent network neurons (top, excitatory neurons in red and inhibitory neurons in blue), and the read-out neurons (bottom).

We first trained a RNN of 6400 excitatory neurons (Fig 5E, see Methods) in order to discretize the time interval spanning the full duration of the song. We then trained the read-out layer. The learned read-out weight matrix reflects the structure of the target sequence (Fig 6B). Under spontaneous activity, the supervisor neurons and interneurons stop firing and the recurrent network drives song replays (Fig 6C). The learned spatiotemporal signal broadly follows the target sequence (Fig 6A). The model performs worse when the target dynamics has time-variations that are faster than or of the same order as the time discretization in the RNN. Thus, we conclude that the model can learn interesting spiking dynamics up to a resolution of time features limited by the time discretization in the recurrent network.

Discussion

We have proposed here a neuronal network architecture based on biophysically plausible neurons and plasticity rules in order to learn spatiotemporal signals. The architecture is formed by two modules. The first module provides a temporal backbone that discretizes time, implemented by a recurrent network where excitatory neurons are trained into clusters that become sequentially active due to strong inter-cluster and cluster i to cluster i + 1 weights. All of the excitatory clusters are connected to a central cluster of inhibitory neurons. As previously shown for randomly switching clustered dynamics [12], the ongoing spontaneous activity does not degrade the connectivity patterns: the set of plasticity rules and sequential dynamics reinforce each other. This stable sequential dynamics provides a downstream linear decoder with the possibility to read out time at behavioural time scales. The second module is a set of read-out neurons that encode another dimension of a signal, which we generically denote as ‘space’ but can correspond to any time-varying observable, e.g., spatial coordinates, frequency, discrete states, etc. The read-out neurons learn spike sequences in a supervised manner, and the supervisor sequence is encoded into the read-out weight matrix. Bringing together elements from different studies [18, 22, 32, 37], our model exploits a clock-like dynamics encoded in the RNN to learn a mapping to read-out neurons so as to perform the computational task of learning and replaying spatiotemporal sequences. We illustrated the application of our scheme on a simple non-Markovian state transition sequence, a combination of two such simple sequences, and a time series with more complex dynamics from bird singing.

Other studies have focused on the classification of spatiotemporal signals. The tempotron classifies a spatiotemporal pattern by either producing a spike or not [38]. More recent studies on sequential working memory propose similar model architectures that enable the use of Hebbian plasticity [39]. For example, spatiotemporal input patterns can be encoded in a set of feedforward synapses using STDP-type rules [40, 41]. Combining these approaches with our model might be an interesting line of future research.

The dynamics of the recurrent network spans three time scales: (i) individual neurons fire at the millisecond time scale; (ii) clusters of neurons fire at the “tick of the clock”, τc, i.e., the time scale that determines the time discretization of our temporal backbone; and (iii) the slowest time scale is at the level of the entire network, i.e. the period of the sequential activity, τp, achieved over the cascade of sequential activations of the clusters (see Fig 5A). The time scales τc and τp are dependent on several model parameters: the cluster and network size, the average connection strengths within the clusters, and adaptation. Smaller cluster sizes lead to a smaller τc when the network size is fixed and conversely τp increases with network size when the cluster size is fixed.

The recurrent network is the “engine” that, once established, drives read-out dynamics. Our model can learn different read-out synapses in parallel (Fig 4) and is robust to synapse failure (Fig 5C). This robustness is a consequence of the clustered organization of the recurrent network. Previously proposed models are also robust to similar levels of noise [22, 42]. While an exact comparison is hard to draw, we have shown that it is possible to retain robustness while moving towards a more biological learning rule. The development of a clustered organization in the RNN allows a large drive for the read-out neurons while keeping the individual synaptic strengths reasonably small. If the clusters become small, larger read-out synaptic strengths are required, and the dynamics become less robust. Indeed, the sequential dynamics is especially fragile in the limit where every cluster has exactly one neuron. Furthermore, we show that learning is faster with more neurons per cluster since relatively small changes in the synapses are sufficient to learn the target. This is consistent with the intuitive idea that some redundancy in the network can lead to an increased learning speed [43].

In its current form, the target pattern needs to be presented repeatedly to the network and does not support one-shot learning through a single supervisor presentation. Although increasing the cluster size NC can reduce the number of presentations, the size of the clusters would need to be impractically large for one-shot learning. Alternatively, increasing the learning rate of the plastic read-out weights could be a way to reduce the number of target presentations to just one [42]. However, it is unclear at present whether such high learning rates are supported by experiments [44].

Taken together, our numerical simulations suggest ways to scale our network. An optimal network configuration can be chosen given the temporal length of the target sequence, and requirements on the temporal precision and robustness. For example, we have shown that a network with NE = 6400 and NC = 200 can be chosen for a 400 ms target sequence that can be learned fast with good temporal precision and a robust replay. If the network configuration and size are fixed, this severely constrains the sequences that can be learned and how they are replayed.

In this paper, we use local Hebbian learning to produce a sequential dynamics in the recurrent network. This is in contrast with previous studies, where often a recursive least squares method is used to train the weights of the recurrent network [20, 22, 36, 45]. Hardcoding a weight structure into the recurrent network has been shown to result in a similar sequential dynamics [16, 17, 46]. Studies that do incorporate realistic plasticity rules are mostly focusing on purely feedforward synfire chains [4749], generating sequential dynamics. In this regard, the contribution of our work is to use the sequential dynamics as a key element to learning spatiotemporal spiking patterns. The ubiquity of sequential dynamics in various brain regions [5052] and the architecture of the songbird system [53] was an inspiration for the proposed separation of temporal and spatial information in our setup. As we have shown, this separation enables the use of a local Hebbian plasticity rule in the read-out synapses. Our model would therefore predict that perturbing the sequential activity should lead to learning impairments. Further perturbation experiments can test this idea and shed light on the mechanisms of sequential learning [54].

Previous studies have discussed whether sequences are learned and executed serially or hierarchically [55]. Our recurrent network has a serial organization. When the sequential activity breaks down halfway, the remaining clusters are not activated further. A hierarchical structure would avoid such complete breakdowns at the cost of a more complicated hardware to control the system. Sequences that are chunked in sub-sequences can be learned separately and chained together. When there are errors in early sub-sequences this will less likely affect the later sub-sequences. A hierarchical organization might also improve the capacity of the network. In our proposed serial organization, the number of spatiotemporal patterns that can be stored is equal to the number of read-out neurons. A hierarchical system could be one way to extract general patterns and reduce the number of necessary read-out neurons. Evidence for hierarchical structures is found throughout the literature [5658]. The basal ganglia is for example thought to play an important role in shaping and controlling action sequences [5961]. Another reason why a hierarchical organization seems beneficial is inherent to the sequential dynamics. The time-variability of the sequential activity grows by approximately t (see Fig 5E). While on a time scale of a few hundreds of milliseconds, this does not pose a problem, for longer target sequences this variability would exceed the plasticity time constants. The presented model could thus serve as an elementary building block of a more complex hierarchy.

In summary, we have demonstrated that a clustered network organization can be a powerful substrate for learning, moving biological learning systems closer to machine learning performance. Specifically, the model dissociates temporal and spatial information and therefore can make use of Hebbian plasticity to learn spatiotemporal sequences over behavioural time scales. More general, the backbone as a clustered connectivity might encode any variable x and enable downstream read-out neurons to learn and compute any function of this variable, ϕ(x).

Materials and methods

Neuron and synapse models

Excitatory neurons are modelled with the adaptive exponential integrate-and-fire model [26]. A classical integrate-and-fire model is used for the inhibitory neurons. All excitatory to excitatory recurrent synapses are plastic under the voltage-based STDP rule [24]. This enables the creation of neuronal clusters and a feedforward structure. Normalization and weight bounds are used to introduce competition and keep the recurrent network stable. Synapses from inhibitory to excitatory neurons in the recurrent network are also plastic under a local plasticity rule [27]. In general, it prevents runaway dynamics and allows for an automatic search of good parameters (S5 Fig). The connections from the recurrent network to the read-out neurons are plastic under the same voltage-based STDP rule. However, potentiation of read-out synapses is linearly dependent on the strength of the synapses. There is no normalization here to allow a continuous weight distribution. The dynamics was chosen based on previous models, with parameters for the dynamics and plasticity to a large extent conserved [12]. More simple integrate-and-fire dynamics should lead to the same qualitative results, given that the parameters are appropriately changed.

Network dynamics

Recurrent network

A network with NE excitatory (E) and NI inhibitory (I) neurons is homogeneously recurrently connected with connection probability p. Our network is balanced in terms of inhibition and excitation, so that it displays irregular and asynchronous spiking. This is signalled by the coefficient of variation (CV) of the inter-spike intervals of the neurons being CV ∼ 1, thus indicating Poisson-like spiking [62]. In our construction, we initialise the weights of the network near the balanced state by scaling the weights of the balanced RNN in Ref. [12] by the square root of the relative network size (note that this is the reason why some parameters in the table are not round numbers; we never fine-tuned parameters). We then verify that the scaled parameters indeed lead to irregular dynamics. The spiking dynamics is slightly more regular on average, with a mean CV ∼ 0.8 for excitatory neurons and a mean CV ∼ 0.9 for inhibitory neurons.

Read-out neurons

The NE excitatory neurons from the recurrent network are all-to-all connected to NR excitatory read-out (R) neurons. This weight matrix is denoted by WRE and it is where the learned sequence is stored. To help learning, there are two additional types of neurons in the read-out network. During learning, the read-out neurons receive supervisory input from NR excitatory supervisor (S) neurons. The connection from supervisor neurons to read-out neurons is one-to-one and fixed, wRS. Also during learning, NR interneurons (H) are one-to-one and bidirectionally connected to the read-out neurons with fixed connection strengths, wRH and wHR (see Table 1 for the recurrent network and read-out parameters). The E to E, I to E and the E to R connections are plastic.

Table 1. Initialization of network.
Constant Value Description
NE 2400 Number of recurrent E neurons
NI 600 Number of recurrent I neurons
p 0.2 Recurrent network connection probability
w0EE 2.83 pF Initial E to E synaptic strength
wIE 1.96 pF E to I synaptic strength
w0EI 62.87 pF Initial I to E synaptic strength
wII 20.91 pF I to I synaptic strength
w0RE 0 pF Initial E to R synaptic strength
wRS 200 pF S to R synaptic strength
wRH 200 pF H to R synaptic strength
wHR 200 pF R to H synaptic strength

Membrane potential dynamics

There are two different regimes, one for each part of the model. Excitatory neurons in the recurrent network have a high adaptation current while excitatory neurons in the read-out network have no adaptation. This is to allow for a wide range of firing rates in the read-out network, while spiking is more restricted in the recurrent network. Differences in the refractory period are there for the same reason, but are not crucial. The membrane potential of the excitatory neurons (VE) in the recurrent network has the following dynamics:

dVEdt=1τE(ELE-VE+ΔTEexp(VE-VTEΔTE))+gEEEE-VEC+gEIEI-VEC-aEC (1)

where τE is the membrane time constant, ELE is the reversal potential, ΔTE is the slope of the exponential, C is the capacitance, gEE, gEI are synaptic input from excitatory and inhibitory neurons respectively and EE, EI are the excitatory and inhibitory reversal potentials respectively. When the membrane potential diverges and exceeds 20 mV, the neuron fires a spike and the membrane potential is reset to Vr. This reset potential is the same for all neurons in the model. There is an absolute refractory period of τabs. The parameter VTE is adaptive for excitatory neurons and set to VT + AT after a spike, relaxing back to VT with time constant τT:

τTdVTEdt=VT-VTE. (2)

The adaptation current aE for recurrent excitatory neurons follows:

τadaEdt=-aE. (3)

where τa is the time constant for the adaptation current (see also S6 Fig). The adaptation current is increased with a constant β when the neuron spikes. The membrane potential of the read-out (VR) neurons has no adaptation current:

dVRdt=1τE(ELE-VR+ΔTEexp(VR-VTRΔTE))+gREEE-VRC+gRSEE-VRC+gRHEI-VRC (4)

where τE, ELE, ΔTE, EE, EI and C are as defined before. gRE is the excitatory input from the recurrent network. gRS is the excitatory input from the supervisor neuron (supervisor input only non-zero during learning, when the target sequence is repeatedly presented). gRH is the inhibitory input from the interneuron (only non-zero during learning, to have a gradual learning in the read-out synapses). The absolute refractory period is τabsR. The threshold VTR follows the same dynamics as VTE, with the same parameters. The membrane potential of the supervisor neurons (VS) has no inhibitory input and no adaptation current:

dVSdt=1τE(ELE-VS+ΔTEexp(VS-VTSΔTE))+gSEEE-VSC (5)

where the constant parameters are defined as before and gSE is the external excitatory input from the target sequence. The absolute refractory period is τabsS. The threshold VTS follows again the same dynamics as VTE, with the same parameters. The membrane potential of the inhibitory neurons (VI) in the recurrent network has the following dynamics:

dVIdt=ELI-VIτI+gIEEE-VIC+gIIEI-VIC. (6)

where τI is the inhibitory membrane time constant, ELI is the inhibitory reversal potential and EE, EI are the excitatory and inhibitory resting potentials respectively. gEE and gEI are synaptic input from recurrent excitatory and inhibitory neurons respectively. Inhibitory neurons spike when the membrane potential crosses the threshold VT, which is non-adaptive. After this, there is an absolute refractory period of τabs. There is no adaptation current. The membrane potential of the interneurons (VH) follow the same dynamics and has the same parameters, but there is no inhibitory input:

dVHdt=ELI-VHτI+gHEEE-VHC (7)

where the excitatory input gHE comes from both the read-out neuron it is attached to and external input. After the threshold VT is crossed, the interneuron spikes and an absolute refractory period of τabsH follows. The interneurons inhibit the read-out neurons stronger when they receive strong inputs from the read-out neurons. This slows the potentiation of the read-out synapses down and keeps the synapses from potentiating exponentially (see Table 2 for the parameters of the membrane dynamics).

Table 2. Neuronal membrane dynamics parameters.
Constant Value Description
τE 20 ms E membrane potential time constant
τI 20 ms I membrane potential time constant
τabs 5 ms Refractory period of E and I neurons
τabsR 1 ms R neurons refractory period
τabsS 1 ms S neurons refractory period
τabsH 1 ms H neurons refractory period
EE 0 mV Excitatory reversal potential
EI −75 mV Inhibitory reversal potential
ELE −70 mV Excitatory resting potential
ELI −62 mV Inhibitory resting potential
Vr −60 mV Reset potential (for all neurons the same)
C 300 pF Capacitance
ΔTE 2 mV Exponential slope
τT 30 ms Adaptive threshold time constant
VT −52 mV Membrane potential threshold
AT 10 mV Adaptive threshold increase constant
τa 100 ms Adaptation current time constant
β 1000 pA Adaptation current increase constant in RNN

Synaptic dynamics

The synaptic conductance of a neuron i is time dependent, it is a convolution of a kernel with the total input to the neuron i:

giXY(t)=KY(t)*(WextXsi,extX+jWijXYsjY(t)). (8)

where X and Y denote two different neuron types in the model (E, I, R, S or H). K is the difference of exponentials kernel:

KY(t)=e-t/τdY-e-t/τrYτdY-τrY,

with a decay time τd and a rise time τr dependent only on whether the neuron is excitatory or inhibitory. There is no external inhibitory input to the supervisor and inter- neurons. During spontaneous activity, there is no external inhibitory input to the recurrent network and a fixed excitatory input rate. The external input to the interneurons has a fixed rate during learning as well. The external input to the supervisor neurons is dependent on the specific learning task. There is no external input to the read-out neurons. The externally incoming spike trains sextX are generated from a Poisson process with rates rextX. The externally generated spike trains enter the network through synapses WextX (see Table 3 for the parameters of the synaptic dynamics).

Table 3. Synaptic dynamics parameters.
Constant Value Description
τdE 6 ms E decay time constant
τrE 1 ms E rise time constant
τdI 2 ms I rise time constant
τrI 0.5 ms I rise time constant
WextE 1.6 pF External input synaptic strength to E neurons
rextE 4.5 kHz Rate of external input to E neurons
WextI 1.52 pF External input synaptic strength to I neurons
rextI 2.25 kHz Rate of external input to I neurons
WextS 1.6 pF External input synaptic strength to S neurons
WextH 1.6 pF External input synaptic strength to H neurons
rextH 1.0 kHz Rate of external input to H neurons

Plasticity

Excitatory plasticity

The voltage-based STDP rule is used [24]. The synaptic weight from excitatory neuron j to excitatory neuron i is changed according to the following differential equation:

dWijdt=-ALTDsj(t)R(ui(t)-θLTD)+ALTPxj(t)R(Vi(t)-θLTP)R(vi(t)-θLTD). (9)

Here, ALTD and ALTP are the amplitude of depression and potentiation respectively. θLTD and θLTP are the voltage thresholds to recruit depression and potentiation respectively, as R(.) denotes the linear-rectifying function (R(x) = 0 if x < 0 and else R(x) = x). Vi is the postsynaptic membrane potential, ui and vi are low-pass filtered versions of Vi, with respectively time constants τu and τv (see also S6 Fig):

τuduidt=Vi-ui (10)
τvdvidt=Vi-vi (11)

where sj is the presynaptic spike train and xj is the low-pass filtered version of sj with time constant τx:

τxdxjdt=sj-xj. (12)

Here the time constant τx is dependent on whether learning happens inside (E to E) or outside (E to R) the recurrent network. sj(t) = 1 if neuron j spikes at time t and zero otherwise. Competition between synapses in the recurrent network is enforced by a hard L1 normalization every 20 ms, keeping the sum of all weights onto a neuron constant: ∑j Wij = K. E to E weights have a lower and upper bound [WminEE,WmaxEE]. The minimum and maximum strengths are important parameters and determine the position of the dominant eigenvalues of W. Potentiation of the read-out synapses is weight dependent. Assuming that stronger synapses are harder to potentiate [63], ALTP reduces linearly with WRE:

ALTP=AWmaxRE-WREWmaxRE-WminRE. (13)

The maximum LTP amplitude A is reached when WRE=WminRE (see Table 4 for the parameters of the excitatory plasticity rule).

Table 4. Excitatory plasticity parameters.
Constant Value Description
ALTD 0.0014 pA mV−2 LTD amplitude
A 0.0008 pA mV−1 LTP amplitude (in RNN: ALTP = A)
θLTD −70 mV LTD threshold
θLTP −49 mV LTP threshold
τu 10 ms Time constant of low pass filtered postsynaptic membrane potential (LTD)
τv 7 ms Time constant of low pass filtered postsynaptic membrane potential (LTP)
τxEE 3.5 ms Time constant of low pass filtered presynaptic spike train in recurrent network
τxRE 5 ms Time constant of low pass filtered presynaptic spike train for read-out synapses
WminEE 1.45 pF Minimum E to E weight
WmaxEE 32.68 pF Maximum E to E weight
WminRE 0 pF Minimum E to R weight
WmaxRE 25 pF Maximum E to R weight

Inhibitory plasticity

Inhibitory plasticity acts as a homeostatic mechanism, previously shown to prevent runaway dynamics [12, 13, 27]. Here, it allows to automatically find good parameters (see also S5 Fig). Excitatory neurons that fire with a higher frequency will receive more inhibition. The I to E weights are changed when the presynaptic inhibitory neuron or the postsynaptic excitatory neuron fires [27]:

dWijdt=Ainh(yiE(t)-2r0τy)sjI(t)+AinhyjI(t)siE(t) (14)

where r0 is a constant target rate for the postsynaptic excitatory neuron. sE and sI are the spike trains of the postsynaptic E and presynaptic I neuron respectively. The spike trains are low pass filtered with time constant τy to obtain yE and yI (as in Eq 12). Table 5 shows parameter values for the inhibitory plasticity rule. The I to E synapses have a lower and upper bound [WminEI,WmaxEI].

Table 5. Inhibitory plasticity parameters.
Constant Value Description
Ainh 10−5 AHz Amplitude of inhibitory plasticity
r0 3 Hz Target firing rate
τy 20 ms Time constant of low pass filtered spike train
WminEI 48.7 pF Minimum I to E weight
WmaxEI 243 pF Maximum I to E weight

Learning protocol

Learning happens in two stages. First a sequential dynamics is learned in the RNN. Once this temporal backbone is established connections to read-out neurons can be learned. Read-out neurons are not interconnected and can learn in parallel.

Recurrent network

The network is divided in 30 disjoint clusters of 80 neurons. The clusters are sequentially stimulated for a time duration of 60 minutes by a large external current where externally incoming spikes are drawn from a Poisson process with rate 18 kHz. This high input rate does not originate from a single external neuron but rather assumes a large external input population. Each cluster is stimulated for 10 ms and in between cluster stimulations there are 5 ms gaps (see also S6 Fig for different gaps). During excitatory stimulation of a cluster, all other clusters receive an external inhibitory input with rate 4.5 kHz and external input weight WextI=2.4pF. There is a periodic boundary condition, i.e. after the last cluster is activated, the first cluster is activated again. After the sequential stimulation, the network is spontaneously active for 60 minutes. The connectivity stabilizes during the spontaneous dynamics. Learning in scaled versions of this network happens in exactly the same way (Fig 5A). The recurrent weight matrix of the large network (80 clusters of 80 neurons, Figs 5E and 6) is learned using the same protocol. The recurrent weight matrix reaches a stable structure after three hours of sequential stimulation followed by three hours of spontaneous dynamics. Parameters that change for the scaled up version are summarized in Table 6. For randomly switching dynamics, a similar protocol is followed (S1 Fig). The weight matrix used to plot the spectrum of the recurrent network in Fig 2 and S2 Fig is:

W=(WEE-WEIWIE-WII).
Table 6. Parameters for the large recurrent network (all the other parameters are the same as the smaller network).
Constant Value Description
NE 6400 Number of recurrent E neurons
NI 1600 Number of recurrent I neurons
w0EE 1.73 pF baseline E to E synaptic strength
wIE 1.20 pF E to I synaptic strength
w0EI 40 pF Initial I to E synaptic strength
wII 12.80 pF I to I synaptic strength
WminEE 1.27 pF Minimum E to E weight
WmaxEE 30.5 pF Maximum E to E weight
WminEI 40 pF Minimum I to E weight
WmaxEI 200 pF Maximum I to E weight
WmaxRE 15 pF Maximum E to R weight

Read-out network

During learning of the read-out synapses, external input drives the supervisor and interneurons. The rate of the external Poisson input to the supervisor neurons reflects the sequence that has to be learned. The rate is normalized to be between 0 kHz and 10 kHz. During learning, WRE changes. After learning, the external input to the supervisor and inter- neurons is turned off and both stop firing. The read-out neurons are now solely driven by the recurrent network. Plasticity is frozen in the read-out synapses after learning. With plasticity on during spontaneous dynamics, the read-out synapses would continue to potentiate because of the coactivation of clusters in the recurrent network and read-out neurons. This would lead to read-out synapses that are all saturated at the upper weight bound.

Simulations

The code used for the training and simulation of the recurrent network is built on top of the code from [12] in Julia. The code used for learning spatiotemporal sequences using read-out neurons is written in Matlab. Forward Euler discretization with a time step of 0.1 ms is used. The code is available online on ModelDB (http://modeldb.yale.edu/257609).

Linear rate model: Spectral analysis

A linear rate model can give insight into the dynamics of a large nonlinear structured spiking network [15]. The dynamics of a simplified rate model with the same feedforward structure as in the RNN is as follows:

dxdt=-x+Ax+ξ (15)

where x is a multidimensional variable consisting of the rates of all excitatory and inhibitory clusters, A is the weight matrix, and ξ is white noise. The matrix A is a coarse-grained version of the weight matrix of the recurrent network in Fig 2B averaged over each cluster. In order to obtain analytical expressions, we consider a network with 3 excitatory clusters and 1 inhibitory cluster. The connectivity of this model can be parametrized as:

A=[δ1ϵ-kwϵδ1-kw1ϵδ-kww3w3w3-kw] (16)

where δ > 0, w = δ + ϵ + 1, ϵ > 1 guarantees sequential dynamics, and k > 1 guarantees a balanced network.

The Schur decomposition A = UTUT gives eigenvalues and Schur vectors ui:

T=[-w(k-1)3w(k+13)00000000δ-ϵ+12-32(ϵ-1)0032(ϵ-1)δ-ϵ+12] (17)
u1=12[1111],u2=123[111-3],u3=12[-1010],u4=16[-12-10]. (18)

The first mode u1 decays fast and uniformly over the four neuronal groups. The second mode u2 decays more slowly, and indicates the interplay between excitatory groups (x1, x2, x3) and the inhibitory group x4. The eigenspace associated with the pair {u3, u4} has complex conjugate eigenvalues and is localized on the three excitatory groups. An increase of activity in one excitatory group is coupled with decreased activities in the other groups. If the real part δ-ϵ+12<1 then these modes are linearly stable but if the real part becomes closer to one means a slower decay of this mode. Importantly, the imaginary part of the eigenvalues is ±3(ϵ-1)/2; hence it grows linearly with the strength of the feedforward structure (ϵ − 1) (Fig 7A). This leads to oscillatory behavior, which determines the time scale of the sequential switching.

Supporting information

S1 Fig. Randomly switching dynamics.

The recurrent network is stimulated with external input that is spatially clustered, but temporally uncorrelated. Each cluster is stimulated for 50 ms, with 50 ms gaps in between stimulations. The rate of external stimulation is 18 kHz during training. This is repeated for 20 minutes after which the network stabilizes during 20 minutes of spontaneous activity. (A) A diagonal structure is learned in the recurrent weight matrix. Since there are no temporal correlations in the external input, there is no off-diagonal structure. (B) The spectrum shows an eigenvalue gap. This indicates the emergence of a slower time scale. The leading eigenvalues do not have an imaginary part, pointing at the absence of feedforward structure and thus there is no sequential dynamics. (C) Under a regime of spontaneous dynamics (i.e. uncorrelated Poisson inputs), the clusters are randomly reactivated.

(TIF)

S2 Fig. The connectivity structure is stable under spontaneous dynamics.

(A) After 60 minutes of training, the network stabilizes during spontaneous activity. During the first 30 minutes of spontaneous dynamics, the connectivity still changes. More specifically, the imaginary parts of the leading eigenvalues increase. This leads to a higher switching frequency and as such a smaller period in the sequential activity. After around 30 minutes, a fixed point is reached. The first row shows spike trains at different times, for one second of spontaneous activity. The second row shows the spectra of the weight matrix at those times. (B) After 60 minutes of sequential stimulation, we test reinforcement and degradation of the learned connectivity by decoupling the plasticity from the dynamics. We plot the evolution of the off-diagonal weights during spontaneous dynamics in two separate cases: (i) we run the dynamics of the network using a frozen copy of the learned weight matrix and apply plastic changes that result from the dynamics to the original weight matrix (blue curve); (ii) we run the dynamics of the network using a frozen copy of the learned weight matrix where the off-diagonal structure was removed and apply plastic changes that result from the dynamics to the original weight matrix (red curve). We can see that in the former, the learned connectivity is reinforced and in the latter, the learned connectivity degrades. Off-diagonal weights (the y-axis) are quantified by averaging over the weights in the 80 by 80 blocks in the lower diagonal, for the 30 different clusters. The curves are the means over the 30 clusters and the error bars one standard deviation.

(TIF)

S3 Fig. Noisy learning.

The sequence ABCBA is relearned four times for 12 seconds each. Before relearning, the read-out weight matrix WRE was always reset. When active, read-out neurons fire two spikes on average +/− one spike. This variability is a consequence of the noisy learning process.

(TIF)

S4 Fig. Details of some network properties.

(A) Duration that a cluster is activated as a function of network size (B) Raster plot of sequential dynamics for NE = 1200 and NC = 40, after training. We observe that by reducing the cluster size, the irregularities in the sequential dynamics are increased (compare with Fig 2). (C) Two raster plots showing two different levels of robustness (summary plot in Fig 5C). In both cases, at t = 1s (purple arrow), 40 read-out synapses are deleted for each cluster. Left panel: NC = 120, each read-out neuron fires two spikes before deletion and one spike after deletion resulting in ∼ 50% performance. Right panel: NC = 200, each read-out neuron fires two spikes before deletion and one or two spikes after deletion resulting in a higher performance (∼ 80%).

(TIF)

S5 Fig. The role of inhibition.

(A) Inhibitory neurons are necessary to prevent pathological excitatory activity. (B) The weights projecting from the inhibitory neurons to the excitatory neurons without inhibitory plasticity are random (left panel). The weights projecting from the inhibitory neurons to the excitatory neurons with inhibitory plasticity show some structure (right panel). (C) The full spectrum of the recurrent weight matrix after learning without inhibitory plasticity. (D) Without inhibitory plasticity, the sequential dynamics shows irregularities. The inhibitory plasticity allows for better parameters to be found to stabilize the sequential dynamics in the recurrent network.

(TIF)

S6 Fig. Sensitivity to parameters.

The periods of the sequential dynamics are computed after one hour of external stimulation and one hour of spontaneous dynamics. Only one parameter at a time is changed. (A) The adaptation time constant is varied. (B) The time gap between external sequential stimulations is varied. (C) The time constants of the voltage-based STDP rule are varied. The lines are guides to the eye and the error bars indicate one standard deviation.

(TIF)

Data Availability

All code is available from the modelDB database at the URL http://modeldb.yale.edu/257609.

Funding Statement

This work has been funded by EPSRC (EP/N014529/1) (to MB) and by BBSRC (BB/N013956/1 and BB/N019008/1), Wellcome Trust (200790/Z/16/Z), the Simons Foundation (564408), and the EPSRC (EP/R035806/1) (to CC). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

References

  • 1. Abbott LF, DePasquale B, Memmesheimer RM. Building functional networks of spiking model neurons. Nature Neuroscience. 2016;19(3):350–355. 10.1038/nn.4241 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2. Jun JJ, Steinmetz NA, Siegle JH, Denman DJ, Bauza M, Barbarits B, et al. Fully integrated silicon probes for high-density recording of neural activity. Nature. 2017;551(7679):232–236. 10.1038/nature24636 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3. Maass W. Searching for principles of brain computation. Current Opinion in Behavioral Sciences. 2016;11:81–92. 10.1016/j.cobeha.2016.06.003 [DOI] [Google Scholar]
  • 4. Hahnloser RHR, Kozhevnikov AA, Fee MS. An ultra-sparse code underlies the generation of neural sequences in a songbird. Nature. 2002;419(6902):65–70. 10.1038/nature00974 [DOI] [PubMed] [Google Scholar]
  • 5. Leonardo A, Fee MS. Ensemble Coding of Vocal Control in Birdsong. Journal of Neuroscience. 2005;25(3):652–661. 10.1523/JNEUROSCI.3036-04.2005 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6. Pastalkova E, Itskov V, Amarasingham A, Buzsáki G. Internally generated cell assembly sequences in the rat hippocampus. Science. 2008;321(5894):1322–1327. 10.1126/science.1159775 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7. Itskov V, Curto C, Pastalkova E, Buzsaki G. Cell Assembly Sequences Arising from Spike Threshold Adaptation Keep Track of Time in the Hippocampus. Journal of Neuroscience. 2011;31(8):2828–2834. 10.1523/JNEUROSCI.3773-10.2011 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8. Harvey CD, Coen P, Tank DW. Choice-specific sequences in parietal cortex during a virtual-navigation decision task. Nature. 2012;484(7392):62–68. 10.1038/nature10918 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9. Peters AJ, Chen SX, Komiyama T. Emergence of reproducible spatiotemporal activity during motor learning. Nature. 2014;510(7504):263–267. 10.1038/nature13235 [DOI] [PubMed] [Google Scholar]
  • 10. Adler A, Zhao R, Shin ME, Yasuda R, Gan WB. Somatostatin-Expressing Interneurons Enable and Maintain Learning-Dependent Sequential Activation of Pyramidal Neurons. Neuron. 2019;102(1):202–216.e7. 10.1016/j.neuron.2019.01.036 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11. Rhodes BJ, Bullock D, Verwey WB, Averbeck BB, Page MPA. Learning and production of movement sequences: Behavioral, neurophysiological, and modeling perspectives. Human Movement Science. 2004;23(5):699–746. 10.1016/j.humov.2004.10.008 [DOI] [PubMed] [Google Scholar]
  • 12. Litwin-Kumar A, Doiron B. Formation and maintenance of neuronal assemblies through synaptic plasticity. Nature Communications. 2014;5(5319):1–12. [DOI] [PubMed] [Google Scholar]
  • 13. Zenke F, Agnes EJ, Gerstner W. Diverse synaptic plasticity mechanisms orchestrated to form and retrieve memories in spiking neural networks. Nature Communications. 2015;6(6922):1–13. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Tully PJ, Lindén H, Hennig MH, Lansner A. Spike-Based Bayesian-Hebbian Learning of Temporal Sequences. PLoS Computational Biology. 2016;12(5). 10.1371/journal.pcbi.1004954 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15. Schaub MT, Billeh YN, Anastassiou CA, Koch C, Barahona M. Emergence of Slow-Switching Assemblies in Structured Neuronal Networks. PLoS Computational Biology. 2015;11(7):1–28. 10.1371/journal.pcbi.1004196 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16. Chenkov N, Sprekeler H, Kempter R. Memory replay in balanced recurrent networks. PLoS Computational Biology. 2017;13(1):e1005359 10.1371/journal.pcbi.1005359 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17. Setareh H, Deger M, Gerstner W. Excitable neuronal assemblies with adaptation as a building block of brain circuits for velocity-controlled signal propagation. PLoS Computational Biology. 2018;14(7):e1006216 10.1371/journal.pcbi.1006216 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18. Murray JM, Escola GS. Learning multiple variable-speed sequences in striatum via cortical tutoring. eLife. 2017;6:e26084 10.7554/eLife.26084 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19. Billeh YN, Schaub MT. Feedforward architectures driven by inhibitory interactions. Journal of Computational Neuroscience. 2018;44(1):63–74. 10.1007/s10827-017-0669-1 [DOI] [PubMed] [Google Scholar]
  • 20. Sussillo D, Abbott LF. Generating Coherent Patterns of Activity from Chaotic Neural Networks. Neuron. 2009;63(4):544–557. 10.1016/j.neuron.2009.07.018 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21. Laje R, Buonomano DV. Robust timing and motor patterns by taming chaos in recurrent neural networks. Nature neuroscience. 2013;16(7):925–33. 10.1038/nn.3405 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22. Nicola W, Clopath C. Supervised learning in spiking neural networks with FORCE training. Nature Communications. 2017;8(1):1–15. 10.1038/s41467-017-01827-3 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23. Werbos PJ. Backpropagation Through Time: What It Does and How to Do It. Proceedings of the IEEE. 1990;78(10):1550–1560. 10.1109/5.58337 [DOI] [Google Scholar]
  • 24. Clopath C, Büsing L, Vasilaki E, Gerstner W. Connectivity reflects coding: A model of voltage-based STDP with homeostasis. Nature Neuroscience. 2010;13(3):344–352. 10.1038/nn.2479 [DOI] [PubMed] [Google Scholar]
  • 25. Jaeger H, Maass W, Principe J. Special issue on echo state networks and liquid state machines. Neural Networks. 2007;20(3):287–289. 10.1016/j.neunet.2007.04.001 [DOI] [Google Scholar]
  • 26. Brette R, Gerstner W. Adaptive exponential integrate-and-fire model as an effective description of neuronal activity. Journal of Neurophysiology. 2005;94(5):3637–3642. 10.1152/jn.00686.2005 [DOI] [PubMed] [Google Scholar]
  • 27. Vogels TP, Sprekeler H, Zenke F, Clopath C, Gerstner W. Inhibitory Plasticity Balances Excitation and Inhibition in Sensory Pathways and Memory Networks. Science. 2011;334(December 2011):1569–1573. 10.1126/science.1211095 [DOI] [PubMed] [Google Scholar]
  • 28. Ko H, Cossell L, Baragli C, Antolik J, Clopath C, Hofer SB, et al. The emergence of functional microcircuits in visual cortex. Nature. 2013;496(7443):96–100. 10.1038/nature12015 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29. Morrison A, Aertsen A, Diesmann M. Spike-timing dependent plasticity in balanced random networks. Neural Computation. 2007;19:1437–1467. 10.1162/neco.2007.19.6.1437 [DOI] [PubMed] [Google Scholar]
  • 30. Tao T. Outliers in the spectrum of iid matrices with bounded rank perturbations. Probability Theory and Related Fields. 2013;155(1-2):231–263. 10.1007/s00440-011-0397-9 [DOI] [Google Scholar]
  • 31. Mastrogiuseppe F, Ostojic S. Linking Connectivity, Dynamics, and Computations in Low-Rank Recurrent Neural Networks. Neuron. 2018;99(3):609–623.e29. 10.1016/j.neuron.2018.07.003 [DOI] [PubMed] [Google Scholar]
  • 32. Brea J, Senn W, Pfister JP. Matching Recall and Storage in Sequence Learning with Spiking Neural Networks. Journal of Neuroscience. 2013;33(23):9565–9575. 10.1523/JNEUROSCI.4098-12.2013 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33. Maass W, Markram H. Synapses as dynamic memory buffers. Neural Networks. 2002;15(2):155–161. 10.1016/s0893-6080(01)00144-7 [DOI] [PubMed] [Google Scholar]
  • 34. Abeles M. Corticonics: Neural circuits of the cerebral cortex. Cambridge University Press; 1991. [Google Scholar]
  • 35. Gibbon J. Scalar expectancy theory and Weber’s law in animal timing. Psychological Review. 1977;84(3):279–325. 10.1037/0033-295X.84.3.279 [DOI] [Google Scholar]
  • 36. Hardy NF, Buonomano D. Encoding Time in Feedforward Trajectories of a Recurrent Neural Network Model. Neural Computation. 2018;30(2):378–396. 10.1162/neco_a_01041 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37. Gilra A, Gerstner W. Predicting non-linear dynamics by stable local learning in a recurrent spiking neural network. Elife. 2017;6(e28295):1–38. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38. Gütig R, Sompolinsky H. The tempotron: A neuron that learns spike timing-based decisions. Nature Neuroscience. 2006;9(3):420–428. 10.1038/nn1643 [DOI] [PubMed] [Google Scholar]
  • 39. Manohar SG, Zokaei N, Fallon SJ, Vogels TP, Husain M. Neural mechanisms of attending to items in working memory. Neuroscience and Biobehavioral Reviews. 2019;101:1–12. 10.1016/j.neubiorev.2019.03.017 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40. Park Y, Choi W, Paik SB. Symmetry of learning rate in synaptic plasticity modulates formation of flexible and stable memories. Scientific Reports. 2017;7(1):1–12. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41. Lee H, Choi W, Park Y, Paik SB. Distinct role of flexible and stable encoding in sequential working memory. Neural Networks. 2019;121:419–429. 10.1016/j.neunet.2019.09.034 [DOI] [PubMed] [Google Scholar]
  • 42. Nicola W, Clopath C. A diversity of interneurons and Hebbian plasticity facilitate rapid compressible learning in the hippocampus. Nature Neuroscience. 2019;22(7):1168–1181. 10.1038/s41593-019-0415-2 [DOI] [PubMed] [Google Scholar]
  • 43. Raman DV, Rotondo AP, O’Leary T. Fundamental bounds on learning performance in neural circuits In: Proceedings of the National Academy of Sciences of the United States of America. vol. 116; 2019. p. 10537–10546. Available from: 10.1073/pnas.1813416116. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44. Sjöström PJ, Turrigiano GG, Nelson SB. Rate, timing, and cooperativity jointly determine cortical synaptic plasticity. Neuron. 2001;32(6):1149–1164. 10.1016/s0896-6273(01)00542-6 [DOI] [PubMed] [Google Scholar]
  • 45. Rajan K, Harvey CD, Tank DW. Recurrent Network Models of Sequence Generation and Memory. Neuron. 2016;90(1):128–142. 10.1016/j.neuron.2016.02.009 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46. Spreizer S, Aertsen A, Kumar A. From space to time: Spatial inhomogeneities lead to the emergence of spatiotemporal sequences in spiking neuronal networks. PLoS computational biology. 2019;15(10):e1007432 10.1371/journal.pcbi.1007432 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47. Fiete IR, Senn W, Wang CZH, Hahnloser RHR. Spike-Time-Dependent Plasticity and Heterosynaptic Competition Organize Networks to Produce Long Scale-Free Sequences of Neural Activity. Neuron. 2010;65(4):563–576. 10.1016/j.neuron.2010.02.003 [DOI] [PubMed] [Google Scholar]
  • 48. Waddington A, de Kamps M, Cohen N. Triphasic spike-timing-dependent plasticity organizes networks to produce robust sequences of neural activity. Frontiers in Computational Neuroscience. 2012;6:1–14. 10.3389/fncom.2012.00088 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49. Zheng P, Triesch J. Robust development of synfire chains from multiple plasticity mechanisms. Frontiers in Computational Neuroscience. 2014;8:1–10. 10.3389/fncom.2014.00066 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50. Ikegaya Y, Aaron G, Cossart R, Aronov D, Lampl I, Ferster D, et al. Synfire Chains and Cortical Songs: Temporal Modules of Cortical Activity. Science. 2004;304(5670):559–564. 10.1126/science.1093173 [DOI] [PubMed] [Google Scholar]
  • 51. Jin DZ, Fujii N, Graybiel AM. Neural representation of time in cortico-basal ganglia circuits. Proceedings of the National Academy of Sciences of the United States of America. 2009;106(45):19156–19161. 10.1073/pnas.0909881106 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52. Mackevicius EL, Bahle AH, Williams AH, Gu S, Denisenko NI, Goldman MS, et al. Unsupervised discovery of temporal sequences in high-dimensional datasets, with applications to neuroscience. eLife. 2019;8:e38471 10.7554/eLife.38471 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 53. Fee MS, Scharff C. The Songbird as a Model for the Generation of Complex Behaviors. ILAR journal. 2010;51(4):362–377. 10.1093/ilar.51.4.362 [DOI] [PubMed] [Google Scholar]
  • 54. Hemberger M, Shein-Idelson M, Pammer L, Laurent G. Reliable Sequential Activation of Neural Assemblies by Single Pyramidal Cells in a Three-Layered Cortex. Neuron. 2019;104(2):353–369.e5. 10.1016/j.neuron.2019.07.017 [DOI] [PubMed] [Google Scholar]
  • 55. Lashley KS. The Problem of Serial Order in Behavior. Cerebral Mechanisms in Behavior. 1951;21:112–146. [Google Scholar]
  • 56. Sakai K, Kitaguchi K, Hikosaka O. Chunking during human visuomotor sequence learning. Experimental Brain Research. 2003;152(2):229–242. 10.1007/s00221-003-1548-8 [DOI] [PubMed] [Google Scholar]
  • 57. Glaze CM, Troyer TW. Temporal Structure in Zebra Finch Song: Implications for Motor Coding. Journal of Neuroscience. 2006;26(3):991–1005. 10.1523/JNEUROSCI.3387-05.2006 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 58. Okubo TS, Mackevicius EL, Payne HL, Lynch GF, Fee MS. Growth and splitting of neural sequences in songbird vocal development. Nature. 2015;528(7582):352–357. 10.1038/nature15741 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59. Tanji J. Sequential Organization of Multiple Movements: Involvement of Cortical Motor Areas. Annual Review of Neuroscience. 2001;24:631–651. 10.1146/annurev.neuro.24.1.631 [DOI] [PubMed] [Google Scholar]
  • 60. Jin X, Costa RM. Shaping action sequences in basal ganglia circuits. Current Opinion in Neurobiology. 2015;33:188–196. 10.1016/j.conb.2015.06.011 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 61. Geddes CE, Li H, Jin X. Optogenetic Editing Reveals the Hierarchical Organization of Learned Action Sequences. Cell. 2018;174(1):32–43.e15. 10.1016/j.cell.2018.06.012 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 62. Brunel N. Dynamics of Sparsely Connected Networks of Excitatory and Inhibitory Spiking Neurons. Journal of Computational Neuroscience. 2000;8(3):183–208. 10.1023/a:1008925309027 [DOI] [PubMed] [Google Scholar]
  • 63. Debanne D, Gähwiler BH, Thompson SM. Heterogeneity of Synaptic Plasticity at Unitary CA3–CA1 and CA3–CA3 Connections in Rat Hippocampal Slice Cultures. The Journal of Neuroscience. 1999;19(24):10664–10671. 10.1523/JNEUROSCI.19-24-10664.1999 [DOI] [PMC free article] [PubMed] [Google Scholar]
PLoS Comput Biol. doi: 10.1371/journal.pcbi.1007606.r001

Decision Letter 0

Kim T Blackwell, Blake A Richards

26 Aug 2019

Dear Dr Clopath,

Thank you very much for submitting your manuscript 'Learning spatiotemporal signals using a recurrent spiking network that discretizes time' for review by PLOS Computational Biology. Your manuscript has been fully evaluated by the PLOS Computational Biology editorial team and in this case also by independent peer reviewers. The reviewers appreciated the attention to an important problem, but raised some substantial concerns about the manuscript as it currently stands. While your manuscript cannot be accepted in its present form, we are willing to consider a revised version in which the issues raised by the reviewers have been adequately addressed. We cannot, of course, promise publication at that time. 

Both reviewers have identified questions of robustness as issues in the paper. The reviewers asked a number of questions this way, regarding matching of time constants to stimulus speed, importance of specific transmission delays, network size, synapse number, etc. It is important that you make clear how the model operates in a variety of regimes, per the reviewers' requests. Reviewer 1 has also given you a number of detailed comments on the writing you should attend to. And, we would also encourage you to fully address Reviewer 2's question about how this relates to other RNN models, including the more biologically plausible ones the reviewer cites.

Please note while forming your response, if your article is accepted, you may have the opportunity to make the peer review history publicly available. The record will include editor decision letters (with reviews) and your responses to reviewer comments. If eligible, we will contact you to opt in or out.

Your revisions should address the specific points made by each reviewer. Please return the revised version within the next 60 days. If you anticipate any delay in its return, we ask that you let us know the expected resubmission date by email at ploscompbiol@plos.org. Revised manuscripts received beyond 60 days may require evaluation and peer review similar to that applied to newly submitted manuscripts.

In addition, when you are ready to resubmit, please be prepared to provide the following:

(1) A detailed list of your responses to the review comments and the changes you have made in the manuscript. We require a file of this nature before your manuscript is passed back to the editors.

(2) A copy of your manuscript with the changes highlighted (encouraged). We encourage authors, if possible to show clearly where changes have been made to their manuscript e.g. by highlighting text.

(3) A striking still image to accompany your article (optional). If the image is judged to be suitable by the editors, it may be featured on our website and might be chosen as the issue image for that month. These square, high-quality images should be accompanied by a short caption. Please note as well that there should be no copyright restrictions on the use of the image, so that it can be published under the Open-Access license and be subject only to appropriate attribution.

Before you resubmit your manuscript, please consult our Submission Checklist to ensure your manuscript is formatted correctly for PLOS Computational Biology: http://www.ploscompbiol.org/static/checklist.action. Some key points to remember are:

- Figures uploaded separately as TIFF or EPS files (if you wish, your figures may remain in your main manuscript file in addition).

- Supporting Information uploaded as separate files, titled Dataset, Figure, Table, Text, Protocol, Audio, or Video.

- Funding information in the 'Financial Disclosure' box in the online system.

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email us at figures@plos.org.

To enhance the reproducibility of your results, we recommend that you deposit your laboratory protocols in protocols.io, where a protocol can be assigned its own identifier (DOI) such that it can be cited independently in the future. For instructions see here

We are sorry that we cannot be more positive about your manuscript at this stage, but if you have any concerns or questions, please do not hesitate to contact us.

Sincerely,

Blake A. Richards

Associate Editor

PLOS Computational Biology

Kim Blackwell

Deputy Editor

PLOS Computational Biology

A link appears below if there are any accompanying review attachments. If you believe any reviews to be missing, please contact ploscompbiol@plos.org immediately:

[LINK]

Reviewer's Responses to Questions

Comments to the Authors:

Please note here if the review is uploaded as an attachment.

Reviewer #1: Dear authors,

I originally wrote a review that was 28250 characters long, but PLOS only accepts reviews up to 20000 characters long. The only way to get to this length was to remove all praise, all encouragement, and all hedging words ("in my opinion", "Why would not you try" etc.), making the review sound angry! So please see this angry version below :) As the review is signed, I'll also send you, and separately the editor, a human-readable version by email (for some of the changes, it also has some additional rationale, and some ideas on how to make these changes). Thanks!

A.

-------------

Your paper "Learning spatiotemporal signals using a recurrent spiking network that discretizes time" is an interesting and promising piece of work. You show that a simple architecture, consisting of a self-organizing recurrent network and an output layer, and trained through a form of 2-stage curriculum learning, can learn to reproduce complex temporal patterns that are much slower than the time scale at which individual neurons operate. This is a neat illustration of what a relatively simple model can do, and I believe it can become a foundation for a very interesting line of research!

The current version of the paper suffers from two weaknesses:

First, please revise your writing in several ways (see below for details)

Second, the paper introduces several special fine-tuned cases, and demonstrates that they work or don't work, but does not offer any conceptual sensitivity analysis. The paper will be stronger if you finish some (or ideally, all) of these lines of inquiry with proper sensitivity analyses. I recommend:

1) Based on Fig2D, show how the quality of final stimulus replay (or any other measure of "success" for this model and this type of learning) depends on the exact pairing between the stimulus phase speed (100 ms) and the adaptation current time constant tau_a (100 ms). From Fig2D it seems that the stimulus is reproduced by the network so well largely because the neurons are "hard-tuned" to inactivate at exactly the speed you are using for stimulus transitions. It is not necessarily a problem, but it is an important aspect of conceptualizing the model. You could keep the stimulus fixed, change tau_a, and plot the replay_quality(tau_a).

2) For the comparison of large and small networks, make your statements more clear. The two plots shown in Figure 4A are practically identical, yet you make statements about these two models (large and small) both in the figure caption, and in the text. If there are differences there, in terms of time required for training, and/or their robustness, please show these numbers on the figure.

3) The most interesting analysis, in my opinion, would be one to explore the "optimal" number of clusters (and thus, the size of each cluster), for a model of N neurons, given a certain level of stimulus complexity, and a certain amount of noise (or neuron silencing). If for a given pair of (complexity, noise) you can _predict_ the optimal network configuration, this would be a really interesting result, and it would make the paper more memorable, and impactful. Below I sketch how it can be done.

# Detailed comments

Page 1

"slow-switching dynamics [Schaub et al., 2015]" - Please clarify

Later in the same sentence: "and different types of sequential dynamics" - what are the options here? Can they be succinctly summarized?

"use non-local information either in space or in time" - explain these terms to non-computational readers

Page 2

"All synapses are plastic under typical Hebbian learning rules" - is STDP considered a typical Hebbian learning rule? Please be clear about whether you use a simple Hebbian potentiation, or a more fancy rule, such as STDP.

"Thus, the recurrent network encodes time and the read-out neurons encode ’space’." - I am not sure I can understand this sentence. Could you please restate it, making it more clear?

"Similar to the liquid state-machine" - remind the reader what a liquid state-machine is.

"Time is discretized in the recurrent spiking network by C clusters of excitatory neurons"

1) How time can be discretized by a cluster of neurons? Isn't time discretization a feature of your model, i.e. a step at which you perform your calculations? After re-reading the paper 2 times, I think I know what you mean, but I was very lost the first time I read it. Please clarify.

2) mention what general type of a model you use for your neurons. (something like a "differential equation with 10 global parameters and 7 hidden variables per neuron, and a hard reset for spiking") If there a short reference for your model, cite it

3) introduce the concept of clusters separately. At this point I was really confused whether those 'clusters' you mentioned were just a metaphor, or whether they were a defining feature of your network. I also wondered whether they arose naturally, through the dynamics of activation, or whether they were introduced in the network deliberately.

"This means that at each time only a subset of neurons spike, i.d. the neurons belonging to the same cluster."

1) What does "this" refer to? Please clarify.

2) Why does the previous sentence mean ("this means") that at each time only a subset of neurons spike? Why cannot all of them spike at once?

3) I don't know what "i.d." means, and I could not immediately google it, which may suggest that it is not a widely used abbreviation.

"At time t in [t_{i-1}; t_i] the read-out neurons are solely driven by the neurons in cluster i, with some additional background noise. This discretization enables Hebbian plasticity to bind the read-out neurons to the neurons active in the relevant time-bin." - this part is really unclear. Please rewrite and clarify.

"Here however, we use the voltage-based STDP plasticity rule at the excitatory to excitatory neurons" - is it true for all connections in the model, or only for some of them?

"In the first stage, a feedforward weight structure is embedded into the recurrent network." - what does the word "embedded" mean in this context? Does it just mean that you initialize the network with some feed-forward way, or does it have a deeper meeting? While reading, at this point I assumed that you were describing some peculiar initial state, but without going to the "Methods" section, I was not sure whether my guess was correct. Please try to explain: 1) why you are trying to do something, 2) what is it exactly that you're trying to do, 3) how you're doing it.

"The recurrent network is initialized as a balanced network with random connectivity."

1) You just said that you "embedded" some FF connectivity in it, and now you are saying the connectivity is random. At the first pass, it read as a contradiction.

2) Please clarify what "balanced" means in this context.

"To embed a feedforward structure, the network is stimulated in a sequential manner" - this return to a topic you abandoned 2 sentences ago makes it harder to stay on track.

"(rate of 18 kHz for 10 ms)." - you have not yet mentioned the time step of your calculations; it may be better to mention it at some point before this sentence, to put these numbers in perspective. But also, I am confused about this section, as in the very end of Methods section on page 14 you are saying that you worked with a time step of 0.1 ms. Would not 5 kHz be the highest possible frequency of spiking achievable in a model that is discretized at 10 kHz? How can you use 18 kHz then?

"During the stimulation, neurons in the same cluster fire spikes together, which will strengthen the intra-cluster connections bidirectionally through the voltage-based STDP rule"

1) This sentence and 2-3 sentences before it are intriguing, but at this point the reader does not yet know _why_ you do what you do. Is it the experiment already? Or are you trying to build a certain architecture using something like a curriculum learning, through inputs alone? Please make sure to describe what you are trying to achieve, and why you are trying to achieve it, before describing how you do it.

2) I always thought that the "canonical" STPD does not link neurons that spike together, but rather potentiates synapses connecting neurons that fire with a small delay of several ms. With 0.1 ms step and high-frequency stimulation, this difference could be very noticeable. Yet here you say that synchronous firing strengthened within-cluster connections bidirectionally. Is it because your STDP is symmetric? Or is it because neurons fire so much that they develop tight synfire chains within each cluster? Please clarify.

"When the time gap between sequential stimulations is increased during the training phase, there is no pre/post pairing between clusters anymore." - this sounds like the first true "Result", but I am still not sure what question you are trying to answer. Stating a question upfront would help a lot.

"This leads to slow-switching dynamics as opposed to sequential dynamics" - please clarify 1) what the word "this" refers to, and 2) what is the "slow-switching" dynamics, and how is it different from "sequential dynamics". You have a whole figure on it (Figure S1), so it would be really useful to define this term here, with a few references, and explain what this result means.

"The connectivity pattern is therefore stable" - from the Abstract, I remember that overall you found this result intersting. If it is true, please expand your writing a bit, and explain why this is an interesting statement. Were you concerned that the dynamics would degrade? Are there previous studies that suggest the risk of degradation? If so, reference these studies, and explain your motivation, to properly frame this result.

"The feedforward weight embedding changes the spectrum of the recurrent weight matrix." - This sounds like a beginning of a new thought, which clearly deserves a new paragraph. I would also strongly suggest that you start this paragraph with 2-3 sentences, explaining what is a spectrum of a recurrent weight matrix, and how to interpret it (with 1-2 references). Make it easier for non-mathy (or intermediate-mathy) people to relate to your work.

Figure 2C (The drawing with an ellipse): While I know the idea of spectral analysis, I don't work with it daily, and with my level of background, this panel is completely impenetrable for me. I don't know how to read it, and what it means. I think the paper would much improve if this section about eigenvalues, and the Figure 2, are better referenced, and better explained.

"Analysis of a simplified linear rate model shows that the imaginary parts linearly depend on the strength of the feedforward embedding" - can you please expand on that, including why you did it, how you did it, and what was the result? Ideally, frame it as a sequence of simple statements. There's a known method. Here's how it works. In our case, conceptually, we could have expected to see this or that (which would have meant this or that). In practice, we observed this. Some aspect of it was surprising (what exactly), so we ran this additional model (why and how). We observed this. Here's what it means.

"A large adaptation current counteracts the recurrent reverberating activity to turn the activity reliably off." - but so, does it mean that the temporal dynamics or your spontaneous activity was not due to training, but due to this "hard-coded" adaptation in individual neurons? (see my next paragraph)

Page 4

"Therefore, as each cluster is spontaneously active in a sequence, that leads to a sequence length that reaches behavioural time scales" - So, are you saying that to jump from one cluster to another (say, from i to i+1), the activation in the cluster i should have reached a certain threshold, but at the same time the adaptation was driving this activation down? Does it mean that with adaptation too fast or too strong, there would be no propagation one cluster to another, while with adaptation too slow or too weak, clusters would not have "switched off"? But if so, would not your model work only if the adaptation is precisely tuned to the time parameter of your stimulus? This may actually be my biggest question about this study, as whether this model generalizes well seems to hinge on it. If this architecture can work successfully only when adaptation at the level of individual cells is precisely tuned to the properties of the stimulus encoded by the entire network, this could be a strong limitation (in the spirit of non-local tuning). If however this architecture is robust, and can somehow tolerate a large range of adaptation properties, it would make it a good candidate for explaining encoding of temporal stimuli in the brain. The answer to this question is also tightly linked to some other questions raised in the paper: most importantly, the link between the number of clusters, the coding capacity of the network, and its robustness to noise (something I discuss more below). In order to relate to any analyses that play with the number of clusters in the network (in order to conceptually generalize them) the reader would need to know how these analyses would change if the adaptation time scale is not carefully pre-selected. If the quality of propagation is not too sensitive to the adaptation time, we need to know that. If, on the other extreme, the adaptation time sets the speed of this propagation, or needs to be strongly coordinated with some variables that set the speed of this propagation, we should know that as well, and keep it in mind, when interpreting any conceptual predictions from the model.

"simple yet non-markovian sequence" - please define what a markovian or non-markovian sequence means in this context, with a reference.

"This task is non-trivial and it is unclear how to solve this problem in a generic recurrent spiking network with local plasticity rules." - this sentence would benefit from a bit of stylistic re-write, and also it clearly asks for a reference or two.

"However, separating time and space solves this in a natural way." - very interesting, but also very unclear. It is the second time this theme is introduced, and I still don't understand it. If you feel strongly about it, please clarify what you mean, and try to explain to the reader why they should be excited about it (essentially, help them to understand how it may help them to conceptualize their own work later on).

"Our recurrent network (Fig 2) is used here, where the first cluster is activated at time t." - This sentence would benefit from a rewrite.

"Due to the voltage-based plasticity, synapses are potentiated from neurons in the recurrent network and read-out neurons that fire at the same time"

1) I am not sure you mentioned before that these synapses are special. Please introduce it better.

2) Please explain how this special "voltage-based plasticity" helps here, compared to "more standard" Hebbian plasticity the reader may be thinking about.

"To that end, we trained our recurrent network with clusters as small as one neuron." - Personally, I find this line of inquiry very interesting, as it speaks of brain architecture optimization, in terms of robustness to perturbation. However, you don't really explore this question, but look at one extreme case, and then make a prediction based on this extreme case: "In summary, the choice of cluster size is a trade-off between network size on the one hand and robustness on the other hand." I wonder whether a proper analysis of this relationship could be one of the main points of the paper, if run properly. What is the optimal number of clusters, for a stimulus of given complexity (say, a number of unique state transitions, or even just a number of states for a randomized sequence), and given amount of noise / perturbation?

Page 9

"These clusters are sequentially active by embedding a feedforward connectivity structure into the weights of the network." - the semantics is off here. If you think of it, clusters cannot be active by embedding. Please rewrite.

"The time scales tau_c and tau_p are dependent on the cluster and network size, the average connection strengths within

the clusters and adaptation. Smaller cluster sizes lead to a smaller tau_c and tau_p increases with network size when

the cluster size is fixed." - arguably you don't address it in the paper, but only hint at it. To put it in a slightly exaggerated way, there is no summary plot among your figures that would have cluster size as an X axis, and some time-related measure as an Y axis. Or, time-related measure as X, encoding quality as Y, and several (more than 2) cluster sizes as different lines. If you don't think these summary analyses belong here, please restate your statements as hypotheses. If however you'd like to keep them as statements, please run appropriate analyses, and visualize them in one of the figures (I would definitely advocate for this second approach!)

METHODS

Pages 10-11

"Membrane potential dynamics" - as I mentioned before, I am not quite sure how to classify your model, and this entire section does not contain any references. Your model seems to be simpler than HH, but more fancy than Izhikevich, and you are using a computationally expensive exp() function. The obvious question is: why? Would not integrate-and-fire be enough? Or a classic Izhikevich neuron? Are you using this model just because that was the first model you thought of, or do you NEED some of its properties to make your model work? I don't necessarily suggest that you run a simulation with different types of neurons, but if you know that you had to reach this level of complexity, perhaps because of some prior pilot experiments, I would really want you to write about that. And even if you use this model just because it was a reasonable "first choice", I would like to know about it, to avoid second-guessing.

To rephrase, I would be grateful if you put your model in a context (with some references), and commented on your choice for the level of complexity in modeling your neurons. A few choices that jump at me as I read these section are your attention to refractory periods and adaptation currents. Would it be fair to say that these are important for your model? Can you explain (or at least speculate), how and why? Any background for these choices would be very helpful.

Similarly, where you use different models for different neurons ("only non-zero during learnig" etc.), it would be nice to get an idea for your rationale. Why was it helpful to make different neurons different?

Page 12

"Plasticity": my general feedback for this statement is similar to that for membrane potential dynamics: can you please use several sentences to hint why you settled on this level of complexity for the dW/dt equation, and how you have arrived at your constant? Not in deep detail, but conceptually? What were your criteria? Say, for each neuron you use 5 different proxies for its activity: V, s, u, v, and x. Why do you need all five? Why 3 (V, s, filtered_s) would not be enough? Similarly, why u and v use two just slightly different taus? Is it to create an asymmetric waveform over time, or is it just a result of manual tweaking? I realize that it would be counter-productive to "justify" any of these micro-choices, but it would be very useful to have some basic understanding of what you were trying to achieve, and how you figured whether you achieved it.

"Heaviside function" - please remind the reader the definition of this function, in brackets

Reviewer #2: The manuscript by Maes, Barahona, and Clopath proposes a computational model that learns to produce spatiotemporal signals using a recurrent network model with Hebbian plasticity rules. Authors show that the model learns high-dimensional read-out spiking sequences on a behavioral time scale, with biologically plausible voltage-based STDP rules, and then claim that the architecture separates time and space into two different parts and this allows learning to bind space to time.

I believe this type of model approach is quite important and helpful to provide a better understanding of underlying principles in experimental observations. While interesting and potentially relevant for the study of the gap between behavioral and neural timescales, a substantial portion of the model designs and simulation analyses need to be presented with much better explanation of “meaning”, to clarify the rationale behind the model choice and the goal of each test. A major issue is that it is not clear what exactly can be learned from these results, what kind of problem can be solved with the current model (but cannot be solved by previous ones), and to which experimental observations each simulation result is relevant. I believe that some major issues, including the above, need to be addressed before publication can be recommended.

Major issues

1. Authors need to discuss specifically what is the difference between the current model and the previous ones. For example, learning of spatio-temporal sequence with RNN has already been implemented in previous studies. For example, what is the difference and advantage of the current model compared with the model in Chenkov, Sprekeler & Kempter, PloS Comput Biol 2017?

If authors think that the current model uses more biologically plausible components, as mentioned in abstract “… current computational models do not typically use realistic biologically plausible learning.”, there are some model studies that use realistic, biologically plausible learning rules. For example, see Park, Choi & Paik, Scientific Reports (2017) and also Lee et al. bioRxiv 525220 (2019).

In addition, there are a number of successful models for the spike sequence learning (e.g. tempotron by Sompolinsky). Thus it will be helpful that authors discuss these previous approaches and compare them with the current model, to clarify what kind of novelty the current model has.

2. How can you control the timescale of temporal backbone in the RNN? Or is there any critical factor that can control it? It needs to be explained how this timescale changes in the model and how it is relevant to real biological mechanism to handle different behavioral timescales across tasks. In the current model, conversion from the neural timescale (ms) to behavioral timescale (hundred ms) seems to strongly depend on the transmission delay. How and how much the timescale can vary in the model? Can you explain how to make much longer backbones than the current ones? Also what happens if the supervisor signal length varies?

3. In the intro, authors mention that “… the recurrent network encodes time and the read-out neurons encode ’space’. ’Space’ can mean spatial position, but it can also mean frequency or a more abstract state space”. I think the word “space” here is confusing, or not the best choice. Authors mentioned (in discussion) that “a set of read-out neurons that encode multiple dimensions of a signal, which we also call space”. Does it mean the spatial structure of feedforward connectivity, or structure of input pattern (whatever the contents are..)? I understand that authors intended to express a generalized “spatio-temporal” information, but this needs to be better described to avoid confusion.

4. How much information can be learned in the current network? i.e. what is the capacity of the current model network? Is it possible to train more than one non-Markov pattern in the same network? Is it biologically plausible, if your model uses a number of neurons only to learn one or just a couple of patterns?

5. What are the roles of inhibitory neurons and inhibitory plasticity? Is there any particular condition required for them, except for preventing runaways dynamics? A more detailed role of inhibitory population might be important in the model.

6. Can you try any test to show the robustness of the model? For example, how many synapses can be destroyed without losing the trained information? I guess destroying RNN-readout connections might be critical. Then, is there any evidence that this system is relatively robust than others?

**********

Have all data underlying the figures and results presented in the manuscript been provided?

Large-scale datasets should be made available via a public repository as described in the PLOS Computational Biology data availability policy, and numerical data that underlies graphs or summary statistics should be provided in spreadsheet form as supporting information.

Reviewer #1: No: The authors promise to provide it after acceptance?

Reviewer #2: Yes

**********

PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: Yes: Arseny S. Khakhalin

Reviewer #2: No

PLoS Comput Biol. doi: 10.1371/journal.pcbi.1007606.r003

Decision Letter 1

Kim T Blackwell, Blake A Richards

3 Dec 2019

Dear Dr Clopath,

Thank you very much for submitting your manuscript, 'Learning spatiotemporal signals using a recurrent spiking network that discretizes time', to PLOS Computational Biology. As with all papers submitted to the journal, yours was fully evaluated by the PLOS Computational Biology editorial team, and in this case, by independent peer reviewers. The reviewers appreciated the attention to an important topic but identified some aspects of the manuscript that should be improved. 

Specifically, both the reviewers were happy with the larger changes you made, but have some remaining smaller questions/concerns. These remaining issues can likely be addressed via discussion in the text rather than new data/results.

We would therefore like to ask you to modify the manuscript according to the review recommendations before we can consider your manuscript for acceptance. Your revisions should address the specific points made by each reviewer and we encourage you to respond to particular issues. 

Please note while forming your response, if your article is accepted, you may have the opportunity to make the peer review history publicly available. The record will include editor decision letters (with reviews) and your responses to reviewer comments. If eligible, we will contact you to opt in or out.raised.

In addition, when you are ready to resubmit, please be prepared to provide the following:

(1) A detailed list of your responses to the review comments and the changes you have made in the manuscript. We require a file of this nature before your manuscript is passed back to the editors.

(2) A copy of your manuscript with the changes highlighted (encouraged). We encourage authors, if possible to show clearly where changes have been made to their manuscript e.g. by highlighting text.

(3) A striking still image to accompany your article (optional). If the image is judged to be suitable by the editors, it may be featured on our website and might be chosen as the issue image for that month. These square, high-quality images should be accompanied by a short caption. Please note as well that there should be no copyright restrictions on the use of the image, so that it can be published under the Open-Access license and be subject only to appropriate attribution.

Before you resubmit your manuscript, please consult our Submission Checklist to ensure your manuscript is formatted correctly for PLOS Computational Biology: http://www.ploscompbiol.org/static/checklist.action. Some key points to remember are:

- Figures uploaded separately as TIFF or EPS files (if you wish, your figures may remain in your main manuscript file in addition).

- Supporting Information uploaded as separate files, titled 'Dataset', 'Figure', 'Table', 'Text', 'Protocol', 'Audio', or 'Video'.

- Funding information in the 'Financial Disclosure' box in the online system.

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com  PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email us at figures@plos.org.

We hope to receive your revised manuscript within the next 30 days. If you anticipate any delay in its return, we ask that you let us know the expected resubmission date by email at ploscompbiol@plos.org.

If you have any questions or concerns while you make these revisions, please let us know.

Sincerely,

Blake A. Richards

Associate Editor

PLOS Computational Biology

Kim Blackwell

Deputy Editor

PLOS Computational Biology

A link appears below if there are any accompanying review attachments. If you believe any reviews to be missing, please contact ploscompbiol@plos.org immediately:

[LINK]

Reviewer's Responses to Questions

Comments to the Authors:

Please note here if the review is uploaded as an attachment.

Reviewer #1: Overall, I am very happy with the edits, and I think the paper has become so much better with these additional analyses, and constructive rewrites! It is a pleasure to read; it provides a decent amount of background information, and answers most of the questions the readers might have.

My only concern is about the following two statements:

p 123: We set the initial values of the non-zero weights in the recurrent network such that the dynamics is irregular and asynchronous (i.e., a balanced network, see Methods for details).

p 408: The weights are initialized such that the network is balanced, i.e. it exhibits irregular asynchronous spiking dynamics.

As you can see, in the results you refer the reader to the Methods, but in the Methods, you essentially reiterate the same statement, and leave it at that. You don't describe why this network would be called "balanced" (I assume you could use a reference for that, as probably somebody used this word for chaotic before), you don't describe the criteria for "irregularity" (did you just observe it by eye, or have you automated it?), and you don't describe the actual process of "ensuring that it is balanced" (I'm guessing you just generated a network, tested it, and if it was bad, generated a different one - but it would be nice to state it). I would recommend that you add a sentence or two about that in the methods section (immediately following line 408).

Other than that, I'm happy with the paper, and recommend it for publication. Nice work!!

- Arseny

Reviewer #2: The authors have made a comprehensive and detailed revisions and addressed most of issues I raised. The revised manuscript is improved in some respects, particularly for the description of the robustness of the model and the modulation of the period of sequential dynamics. I have several questions and suggestions left, related to the capacity and of the model and its biological plausibility.

1. The authors show that the network can learn multiple patterns (Fig. 4). However, this model seems to require a number of readouts, which I don’t believe the optimal design of memory. For example, to memorize N patterns of the length L, how many readout neurons do you need? Can your model share the same readouts for pattern A and B? If not, is this biologically plausible model?

2. Because the network uses a voltage-based STDP, the pattern need to be trained multiple times in general (i.e. There is no one-shot learning mechanism in this model). Can you implement, or discuss any possible mechanism that address this issue? For example, synchronization between the temporal backbone and supervisor signal can make any changes of learning rate or efficiency?

3. In the current model, the RNN module that encodes time information and the readout module for spatial information are separated. Do you have a good explanation that this is biologically realistic design, or can you suggest any possible experiment for finding evidences of this structure in biological brain? Then, what do you think is the advantage of separated circuits for spatial and temporal information? What happens when the network learns a spatio-temporally correlated information?

4. Still I find the current model is very similar with previous models in some sense, except for some biological components. Can you better clarify the need of current model, with examples of tasks that cannot be performed with previous designs?

**********

Have all data underlying the figures and results presented in the manuscript been provided?

Large-scale datasets should be made available via a public repository as described in the PLOS Computational Biology data availability policy, and numerical data that underlies graphs or summary statistics should be provided in spreadsheet form as supporting information.

Reviewer #1: Yes

Reviewer #2: Yes

**********

PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: Yes: Arseny S. Khakhalin

Reviewer #2: No

PLoS Comput Biol. doi: 10.1371/journal.pcbi.1007606.r005

Decision Letter 2

Kim T Blackwell, Blake A Richards

13 Dec 2019

Dear Dr Clopath,

We are pleased to inform you that your manuscript 'Learning spatiotemporal signals using a recurrent spiking network that discretizes time' has been provisionally accepted for publication in PLOS Computational Biology.

Before your manuscript can be formally accepted you will need to complete some formatting changes, which you will receive in a follow up email. Please be aware that it may take several days for you to receive this email; during this time no action is required by you. Once you have received these formatting requests, please note that your manuscript will not be scheduled for publication until you have made the required changes.

In the meantime, please log into Editorial Manager at https://www.editorialmanager.com/pcompbiol/, click the "Update My Information" link at the top of the page, and update your user information to ensure an efficient production and billing process.

One of the goals of PLOS is to make science accessible to educators and the public. PLOS staff issue occasional press releases and make early versions of PLOS Computational Biology articles available to science writers and journalists. PLOS staff also collaborate with Communication and Public Information Offices and would be happy to work with the relevant people at your institution or funding agency. If your institution or funding agency is interested in promoting your findings, please ask them to coordinate their releases with PLOS (contact ploscompbiol@plos.org).

Thank you again for supporting Open Access publishing. We look forward to publishing your paper in PLOS Computational Biology.

Sincerely,

Blake A. Richards

Associate Editor

PLOS Computational Biology

Kim Blackwell

Deputy Editor

PLOS Computational Biology

PLoS Comput Biol. doi: 10.1371/journal.pcbi.1007606.r006

Acceptance letter

Kim T Blackwell, Blake A Richards

10 Jan 2020

PCOMPBIOL-D-19-01145R2

Learning spatiotemporal signals using a recurrent spiking network that discretizes time

Dear Dr Clopath,

I am pleased to inform you that your manuscript has been formally accepted for publication in PLOS Computational Biology. Your manuscript is now with our production department and you will be notified of the publication date in due course.

The corresponding author will soon be receiving a typeset proof for review, to ensure errors have not been introduced during production. Please review the PDF proof of your manuscript carefully, as this is the last chance to correct any errors. Please note that major changes, or those which affect the scientific understanding of the work, will likely cause delays to the publication date of your manuscript.

Soon after your final files are uploaded, unless you have opted out, the early version of your manuscript will be published online. The date of the early version will be your article's publication date. The final article will be published to the same URL, and all versions of the paper will be accessible to readers.

Thank you again for supporting PLOS Computational Biology and open-access publishing. We are looking forward to publishing your work!

With kind regards,

Sarah Hammond

PLOS Computational Biology | Carlyle House, Carlyle Road, Cambridge CB4 3DN | United Kingdom ploscompbiol@plos.org | Phone +44 (0) 1223-442824 | ploscompbiol.org | @PLOSCompBiol

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    S1 Fig. Randomly switching dynamics.

    The recurrent network is stimulated with external input that is spatially clustered, but temporally uncorrelated. Each cluster is stimulated for 50 ms, with 50 ms gaps in between stimulations. The rate of external stimulation is 18 kHz during training. This is repeated for 20 minutes after which the network stabilizes during 20 minutes of spontaneous activity. (A) A diagonal structure is learned in the recurrent weight matrix. Since there are no temporal correlations in the external input, there is no off-diagonal structure. (B) The spectrum shows an eigenvalue gap. This indicates the emergence of a slower time scale. The leading eigenvalues do not have an imaginary part, pointing at the absence of feedforward structure and thus there is no sequential dynamics. (C) Under a regime of spontaneous dynamics (i.e. uncorrelated Poisson inputs), the clusters are randomly reactivated.

    (TIF)

    S2 Fig. The connectivity structure is stable under spontaneous dynamics.

    (A) After 60 minutes of training, the network stabilizes during spontaneous activity. During the first 30 minutes of spontaneous dynamics, the connectivity still changes. More specifically, the imaginary parts of the leading eigenvalues increase. This leads to a higher switching frequency and as such a smaller period in the sequential activity. After around 30 minutes, a fixed point is reached. The first row shows spike trains at different times, for one second of spontaneous activity. The second row shows the spectra of the weight matrix at those times. (B) After 60 minutes of sequential stimulation, we test reinforcement and degradation of the learned connectivity by decoupling the plasticity from the dynamics. We plot the evolution of the off-diagonal weights during spontaneous dynamics in two separate cases: (i) we run the dynamics of the network using a frozen copy of the learned weight matrix and apply plastic changes that result from the dynamics to the original weight matrix (blue curve); (ii) we run the dynamics of the network using a frozen copy of the learned weight matrix where the off-diagonal structure was removed and apply plastic changes that result from the dynamics to the original weight matrix (red curve). We can see that in the former, the learned connectivity is reinforced and in the latter, the learned connectivity degrades. Off-diagonal weights (the y-axis) are quantified by averaging over the weights in the 80 by 80 blocks in the lower diagonal, for the 30 different clusters. The curves are the means over the 30 clusters and the error bars one standard deviation.

    (TIF)

    S3 Fig. Noisy learning.

    The sequence ABCBA is relearned four times for 12 seconds each. Before relearning, the read-out weight matrix WRE was always reset. When active, read-out neurons fire two spikes on average +/− one spike. This variability is a consequence of the noisy learning process.

    (TIF)

    S4 Fig. Details of some network properties.

    (A) Duration that a cluster is activated as a function of network size (B) Raster plot of sequential dynamics for NE = 1200 and NC = 40, after training. We observe that by reducing the cluster size, the irregularities in the sequential dynamics are increased (compare with Fig 2). (C) Two raster plots showing two different levels of robustness (summary plot in Fig 5C). In both cases, at t = 1s (purple arrow), 40 read-out synapses are deleted for each cluster. Left panel: NC = 120, each read-out neuron fires two spikes before deletion and one spike after deletion resulting in ∼ 50% performance. Right panel: NC = 200, each read-out neuron fires two spikes before deletion and one or two spikes after deletion resulting in a higher performance (∼ 80%).

    (TIF)

    S5 Fig. The role of inhibition.

    (A) Inhibitory neurons are necessary to prevent pathological excitatory activity. (B) The weights projecting from the inhibitory neurons to the excitatory neurons without inhibitory plasticity are random (left panel). The weights projecting from the inhibitory neurons to the excitatory neurons with inhibitory plasticity show some structure (right panel). (C) The full spectrum of the recurrent weight matrix after learning without inhibitory plasticity. (D) Without inhibitory plasticity, the sequential dynamics shows irregularities. The inhibitory plasticity allows for better parameters to be found to stabilize the sequential dynamics in the recurrent network.

    (TIF)

    S6 Fig. Sensitivity to parameters.

    The periods of the sequential dynamics are computed after one hour of external stimulation and one hour of spontaneous dynamics. Only one parameter at a time is changed. (A) The adaptation time constant is varied. (B) The time gap between external sequential stimulations is varied. (C) The time constants of the voltage-based STDP rule are varied. The lines are guides to the eye and the error bars indicate one standard deviation.

    (TIF)

    Attachment

    Submitted filename: response_letter_final.pdf

    Attachment

    Submitted filename: Response letter.pdf

    Data Availability Statement

    All code is available from the modelDB database at the URL http://modeldb.yale.edu/257609.


    Articles from PLoS Computational Biology are provided here courtesy of PLOS

    RESOURCES