Learning Sequence Attractors in Recurrent Networks with Hidden Neurons
Abstract
The brain is targeted for processing temporal sequence information. It remains largely unclear how the brain learns to store and retrieve sequence memories. Here, we study how recurrent networks of binary neurons learn sequence attractors to store predefined pattern sequences and retrieve them robustly. We show that to store arbitrary pattern sequences, it is necessary for the network to include hidden neurons even though their role in displaying sequence memories is indirect. We develop a local learning algorithm to learn sequence attractors in the networks with hidden neurons. The algorithm is proven to converge and lead to sequence attractors. We demonstrate that the network model can store and retrieve sequences robustly on synthetic and real-world datasets. We hope that this study provides new insights in understanding sequence memory and temporal information processing in the brain.
keywords:
Recurrent networks , attractor networks , sequence memory , sequence attractors[a1]organization=School of Psychological and Cognitive Sciences, IDG/McGovern Institute for Brain Research, Be**g Key Laboratory of Behavior and Mental Health, Peking-Tsinghua Center for Life Sciences, Center of Quantitative Biology, Academy for Advanced Interdisciplinary Studies,
Peking University,country=China
1 Introduction
The brain is targeted for processing temporal sequence information. Taking visual recognition for example, the conventional setting of static image processing never happens in the brain. Starting from retina, visual inputs of an image arrive in the form of optical flow, which are transformed into spike trains of retinal ganglia cells, and then transmitted through LGN, V1, V2, V4 and higher cortical regions until the image is recognized. Along the whole pathway, the computations performed by the brain are in the form of temporal sequential processing, rather than being static. For another example, when we recall an episodic memory, a sequence of events represented by neuronal responses flows into our mind, and these events do not come in disorder or isolation, but are unfolded in time, as we experience “mental time travel” [Tulving,, 2002]. The hippocampus has been revealed to be essential for sequence memories by physiological and behavioral studies. In animals, sequences of neural activity patterns are observed in the hippocampus for memory replay and memory related tasks [Nádasdy et al.,, 1999; Lee and Wilson,, 2002; Foster and Wilson,, 2006; Pastalkova et al.,, 2008; Davidson et al.,, 2009; Pfeiffer and Foster,, 2013, 2015]. The discovery of time cells in hippocampus shows that the brain has specialized neurons encoding the temporal structure of events [Eichenbaum,, 2014]. Overall, the processing of temporal sequences is critical to the brain, but computational modeling study on this issue lags far behind that on static information processing.
Attractor neural networks are promising computational models for elucidating the mechanisms of the brain representing, memorizing and processing information [Amari,, 1972; Hopfield,, 1982; Amit,, 1989]. An attractor network is a type of recurrent networks, in which information is stored as stable states (attractors) of the network. Once stored, a memory can be retrieved robustly under the evolving of the network dynamics given noisy or incomplete cues. The experimental evidences have indicated that the brain employs attractor networks for memory related tasks [Khona and Fiete,, 2022]. By considering simplified neuron model and threshold dynamics, the classical Hopfield networks have successfully elucidated how recurrent networks learn to store static memory patterns [Hopfield,, 1982]. Recurrent networks of binary neurons can also generate pattern sequences by employing asymmetric weight connections [Amari,, 1972; Hopfield,, 1982; Kleinfeld,, 1986; Sompolinsky and Kanter,, 1986; Bressloff and Taylor,, 1992], to explain the sequential neural activities widely observed in the brain (e.g., in memory retrieval in the hippocampus). In this paper, we follow and extend the standard form of the recurrent networks of binary neurons and threshold dynamics, as this enables us to pursue theoretical analysis, and we investigate how the networks learn to store sequence attractors. By sequence attractor, it means the state of a recurrent network evolves in the order of the stored pattern sequence and being robust to noise.
We first show that, to store arbitrary pattern sequences, the recurrent networks which contains only visible binary neurons [Amari,, 1972; Hopfield,, 1982; Kleinfeld,, 1986; Sompolinsky and Kanter,, 1986; Bressloff and Taylor,, 1992] is inadequate in Section 3. Then we argue that it is necessary for the networks to include hidden neurons in Section 4. These neurons are not directly involved in expressing pattern sequences, but they are indispensable for the networks to store and retrieve arbitrary pattern sequences. We further develop a local learning algorithm to learn sequence attractors in the networks with hidden neurons in Section 5. The algorithm is proven to converge and lead to sequence attractors. We demonstrate that our network model can learn to store and retrieve pattern sequences robustly on synthetic and real-world datasets in Section 6.
2 Related Work and Our Contributions
Learning temporal sequences in recurrent networks has been studied previously in the field of computational neuroscience. These works employ different forms of recurrent networks and have different focuses of investigation. Specifically, [Amari,, 1972; Hopfield,, 1982; Kleinfeld,, 1986; Sompolinsky and Kanter,, 1986; Bressloff and Taylor,, 1992; Fiete et al.,, 2010] investigated recurrent networks of binary neurons and simple threshold dynamics. This approach takes advantages of simplified models that capture the essential features of neural dynamics and allows us to pursue theoretical analysis. [Brea et al.,, 2013; Tully et al.,, 2016] investigated recurrent networks of spiking neurons which are more biologically realistic but hard to analyze theoretically. [Laje and Buonomano,, 2013; Rajan et al.,, 2016; Gillett et al.,, 2020; Rajakumar et al.,, 2021] investigated recurrent networks of firing-rate neurons (e.g., sigmoid and linear-threshold), whose complexity is a trade-off between binary neurons and spiking neurons. More recently, [Karuvally et al.,, 2023; Chaudhry et al.,, 2023] employ modern Hopfield networks [Krotov and Hopfield,, 2016] and [Tang et al.,, 2023] employ predictive coding networks for modeling sequence memory.
In this paper, we study and extend the classical recurrent network model [Amari,, 1972; Hopfield,, 1982; Kleinfeld,, 1986; Sompolinsky and Kanter,, 1986], with the focus of theoretical analysis. Below summarizes the main contributions of our work in comparison to related work.
-
1.
We highlight the importance of hidden neurons in the recurrent networks of binary neurons for learning arbitrary pattern sequences. [Amari,, 1972; Hopfield,, 1982; Sompolinsky and Kanter,, 1986; Bressloff and Taylor,, 1992; Fiete et al.,, 2010] considered only visible neurons and hence the pattern sequences they can generate are limited. Although [Laje and Buonomano,, 2013; Brea et al.,, 2013; Rajakumar et al.,, 2021; Chaudhry et al.,, 2023; Tang et al.,, 2023] also employed hidden neurons in sequence learning, they are based on different network architectures or neuron models.
-
2.
We have clear theoretical characterization of sequences that can be generated by our networks (Theorem 1), a result which is lacking in all other related work. Despite that this conclusion comes from the analysis of the simple model we use, it lays foundation for future work to test it in biologically more realistic networks. Although [Chaudhry et al.,, 2023] also provided theoretical characterization of the network capacity, it is based on Rademacher (random and uniformly distributed) sequence patterns and several approximations.
-
3.
Our learning algorithm is proven to converge and lead to sequence attractors, while most previous work only provided empirical evidences on the effectiveness of their learning algorithms [Laje and Buonomano,, 2013; Brea et al.,, 2013; Rajan et al.,, 2016; Rajakumar et al.,, 2021]. Although [Amari,, 1972; Bressloff and Taylor,, 1992] gave provable results on sequence attractors, they did not include hidden neurons and hence the results only hold for a restricted class of sequences.
-
4.
Our learning algorithm only requires local information between neurons, which is believed to be biologically plausible. [Rajakumar et al.,, 2021] used backpropagation which is often criticized for its biologically implausibility as it requires gradient computation and has the weight transport problem [Lillicrap et al.,, 2020].
3 Limitation of Networks without Hidden Neurons
We first consider recurrent networks of visible binary neurons [Amari,, 1972; Hopfield,, 1982; Sompolinsky and Kanter,, 1986; Bressloff and Taylor,, 1992]. All the neurons are bidirectionally connected and their weight matrix is of which denotes the synaptic weight from the -th neuron to the -th neuron. Let be the states of the neurons at time . These states are synchronously updated according to the threshold dynamics, for ,
(1) |
where if and otherwise. The bias parameters are omitted here as they can be absorbed into the equation. Given a pair of successive network states and , the dynamics of the network can be unfolded in time and viewed as a feedforward network, in which each output neuron is a perceptron of the inputs.
Given a sequence in the form of , one can use a learning algorithm to adjust such that the evolution of the network state matches the pattern sequence. Although the networks can generate some sequences of maximal length [Muscinelli et al.,, 2017], they are fundamentally limited in the class of sequences that can be generated. Since each neuron can be regarded as a perceptron, the condition that sequence can be generated by the network is, for each , the dataset is linearly separable [LeCun,, 1986; Bressloff and Taylor,, 1992; Brea et al.,, 2013; Muscinelli et al.,, 2017].
For a simple example of sequences which cannot be generated by the networks, consider the sequence
with and . To generate this sequence, the first neuron of the network needs to map to , to , to and to . This map** is essentially the XOR operation which cannot be performed by a perceptron [Minsky and Papert,, 1969].
In Figure 1, we show additional examples of sequences that cannot be generated by the network. The sequences are synthetically constructed. We then test if the perceptron learning algorithm can learn the sequences. Since the algorithm converges if the linear separability condition is met [Minsky and Papert,, 1969], the divergence of the algorithm implies that the sequences cannot be generated by the networks.
4 Networks with Hidden Neurons
To overcome the limitation of networks with only visible neurons, we consider including a group of hidden neurons in the network. The visible and hidden neurons are bidirectionally connected, and there is no intra-connection within visible neurons or hidden neurons. Let be the weight matrix from visible neurons to hidden neurons, of which denotes the synaptic weight from the -th visible neuron to the -th hidden neuron, and be the weight matrix from hidden neurons to visible neurons, of which denotes the synaptic weight from the -th hidden neuron to the -th visible neuron. Let be the states of visible neurons and be the states of hidden neurons at time . These states are synchronously updated according to, for and ,
(2) | ||||
(3) |
where we omit the bias parameters as they can be absorbed into the equations. As illustrated in Figure 2, given a pair of successive network states and , the dynamics of the network can be unfolded in time and viewed as a feedforward network with a hidden layer of neurons.
The networks of hidden neurons can generate arbitrary sequences with Markov property and of length at least , as stated in Theorem 1. We provide a constructive proof based on an one-hot encoding by the hidden neurons in the Appendix.
5 Learning
To learn the weight matrices, one can first unfold the recurrent network with hidden neurons in time such that it becomes a feedforward network with a hidden layer, and the pairs of successive patterns in the sequence constitute the training examples, as illustrated in Figure 2. However, learning in the unfolded feedforward network is difficult since the backpropagation algorithm cannot be applied as the neurons are not differentiable.
We propose a new learning algorithm to learn the weight matrices in the unfolded feedforward networks, which draws inspirations from three ideas: feedback alignment [Lillicrap et al.,, 2016], target propagation [LeCun,, 1987; Bengio,, 2014; Litwin-Kumar et al.,, 2017] and three-factor rules [Frémaux and Gerstner,, 2016; Kuśmierz et al.,, 2017]. As in feedback alignment, it requires a random matrix , which is fixed during the learning process, to backpropagate signals. As in target propagation, it does not propagate errors but targets to create surrogate targets for the hidden neurons. Each weight parameter is updated by a three-factor rule, in which the presynaptic activation, the postsynaptic activation and an error term as neuromodulation are multiplied. The three-factor rule is similar to the one in [Bressloff and Taylor,, 1992] and known as margin perceptron in the machine learning literature [Collobert and Bengio,, 2004].
The algorithm works as follows. Given a pair of successive patterns and , for and in parallel,
-
1.
Update by
(4) (5) (6) -
2.
Update by
(7) (8) (9)
where denotes the entry of the fixed random matrix , is the Heaviside function ( if and otherwise), is the robustness hyperparameter and is the learning rate hyperparameter. and can be interpreted as the error terms for the hidden and the visible neurons, respectively. can be interpreted as the synaptic input from an external neuron. The above procedure is then repeated for each .
5.1 Analysis
In this section, we provide theoretical analysis of the algorithm. The proofs are left to the Appendix. First, we provide convergence guarantee of the algorithm.
Theorem 2.
Given the definitions in (4)(5)(7)(8), for all , and , if a solution exists such that and , then the algorithm (4)-(9) converges in finite steps given and are initialized to zero.
Next, we show the algorithm can reduce error for a single step of updating . The theorem can be trivially extended for and by a similar proof.
Theorem 3.
Given the definitions in (4)(5), let
(10) | ||||
(11) |
Then for sufficiently large .
To understand why reducing the errors and leads to sequence attractors, we present the following result.
Theorem 4.
Given the definitions in (7)(8), let such that . If and
(12) |
then
(13) |
Theorem 4 shows that when the errors are zero, given perturbed hidden neuron states , we have . The result can be trivially extended to show that given perturbed visible neuron states we have by a similar proof. Therefore, the network can generate sequence as an attractor. From Theorem 4, we can also see that acts as the robustness hyperparameter as it controls the level of perturbation for inequality (12) to hold.
To understand why the algorithm works despite that is a random matrix and fixed during learning, consider the following. If the update of converges, then for all . Therefore,
(14) | ||||
(15) | ||||
(16) |
The update of aims at making the condition hold, which is
(17) |
in matrix form when is substituted by (16). For large , a solution exists, that is, the pseudo-inverse of or the transpose of . The numerical result is shown in Figure 3. The phenomenon might be explained by the high-dimensional probability theory [Vershynin,, 2018].
5.2 Robustness Hyperparameter
Having a hyperparameter in the algorithm is not problematic in practice. One can simply set as we did for all the experiments in the next section and adjust the scale of initial weights and the learning rate. In margin perceptron, the margin learned is disproportional to the learning rate [Collobert and Bengio,, 2004]. The margin is defined as the reciprocal of the weight magnitude, which is related to the robustness hyperparameter, as shown in Theorem 4. Therefore, it can be interpreted that the robustness hyperparameter is automatically adjusted during learning.
6 Experiments
We ran experiments on synthetic and real-world sequence datasets for the networks with hidden neurons by the algorithm proposed in the previous section to learn sequence attractors. All the experiments were carried out in MATLAB and PyTorch. In all the experiments, each weight parameter of , and was sampled i.i.d. from Gaussian distribution with mean zero and variance , learning rate and robustness . In each experiment, we ran the algorithm for epochs. In each epoch, the algorithm ran on from the start to the end of each sequence. No noise was added during learning. Noise was added only at retrieval. We also provide additional experiments in the Appendix.
6.1 Toy Examples
To show the recurrent networks with hidden neurons can overcome the limitation of the networks without hidden neurons, we conducted experiments on the examples in Figure 1. We constructed a network of visible neurons and hidden neurons for each example. After learning, we tested the robustness of the networks in retrieval by adding two salt-and-pepper noises (flip** the states of two out of ten neurons) to the first pattern of a sequence and set it to be the initial network state.
The results are shown in Figure 4, from which we can see that the networks with hidden neurons can generate sequences which cannot be generated by the networks without hidden neurons and retrieve them robustly under moderate level of noise.
6.2 Random Sequences
We generated periodic sequences of random patterns . In each sequence, for except that for the periodicity. We set and varied period length . We sampled each independently from the uniform distribution of for and then resampled it if it is identical to a previous pattern. Finally, we set .
For each random sequence, we constructed a network with hidden neurons and applied the proposed learning algorithm. To evaluate the effectiveness of the learning algorithm, we compared learning only (with fixed during learning) and learning both and . Once the learning was done, we tested if the network can retrieve the sequence robustly given perturbed with salt-and-pepper noises as the initial network state . We define that the retrieval is successful if for some and all . We run trials for each or setting and count the successful retrievals.
In Figure 5 (a), we show the results with various period lengths for . In Figure 5 (b), we show the results with various numbers of hidden neurons for . We can see learning both and is more effective than learning only . However, in both cases, the algorithm failed for large , even if we increased the number of hidden neurons, which might be due to the suboptimality of the algorithm.
6.3 Real-World Sequences
We tested the networks with hidden neurons by our algorithm in learning real-world sequences on a silhouette sequence dataset (OU-ISIR gait database large population [Iwama et al.,, 2012]) and a handwriting sequence dataset (Moving MNIST [Srivastava et al.,, 2015]). The patterns in the sequences are rather correlated since adjacent image frames are similar. To adopt the datasets for the networks to learn, we converted the image intensity values to .
For the OU-ISIR gait dataset, we used a network with hidden neuron number to learn a single image sequence of length , in which each image has size . The images were flatten to vectors of size . For the Moving MNIST dataset, we used a network with hidden neuron number to learn image sequences of length , in which each image has size . The images were flatten to vectors of size . In Figure 6 and 7, we show the visualization results of the learned networks for robust retrieval, in which the first image of a sequence was corrupted and set to be the initial state of the network.
In Figure 8, we show the average errors and during the learning process, from which we can see that both errors reduce to zero smoothly. This result demonstrates that and can be cooperatively learned instead of conflicting with each other during learning.
7 Discussion and Conclusion
In this paper, we have investigated how recurrent networks of binary neurons learn sequence attractors to represent temporal sequence information. We showed that to store arbitrary sequence patterns, it is necessary for the networks to include hidden neurons. We developed a local learning algorithm and demonstrated that our model works well on synthetic and real-world datasets. Thus, our work provides a possible biologically plausible mechanism in elucidating sequence memory in the brain. In our model, hidden neurons are not directly involved in expressing pattern sequences. Instead, their contribution is on facilitating the storing and retrieving of pattern sequences. The indirect but indispensable role of hidden neurons may have a far-reaching implication to neural information processing.
Modern Hopfield networks also employ hidden neurons for sequence learning [Chaudhry et al.,, 2023]. In comparison, our approach is different in several aspects. First, our network model requires only the threshold activation function, while modern Hopfield networks require a polynomial or exponential activaton function for the hidden neurons. Second, the weights in our network model are learned from scratch in an online manner while modern Hopfield networks require to store the sequence patterns explicitly as the weights in a predefined manner. Third, our learning algorithm requires only local information between neurons, while modern Hopfield networks require the pseudo-inverse computation. Thus, our approach provides an alternative mechanism of sequence memory to modern Hopfield networks.
To pursue theoretical analysis, we have employed a very simple network model with binary neurons and threshold dynamics. From this simple model, we can get some insights into the neural mechanisms of sequence processing in the brain (as the classical Hopfield networks to static memories), but this simplification also incurs limitations. To fully validate our results, further researches with biologically more plausible models are needed, which include, for instances, biologically more realistic neuron models, synapses models, connection structures, learning rules and form of pattern sequences. Additionally, we look forward to seeing improvement of our learning algorithm for larger network capacity and robustness.
Acknowledgements
This work was supported by the Science and Technology Innovation 2030-Brain Science and Brain-inspired Intelligence Project (No. 2021ZD0200204).
References
- Amari, [1972] Amari, S.-I. (1972). Learning patterns and pattern sequences by self-organizing nets of threshold elements. IEEE Transactions on Computers.
- Amit, [1989] Amit, D. J. (1989). Modeling Brain Function: The World of Attractor Neural Networks. Cambridge University Press.
- Bengio, [2014] Bengio, Y. (2014). How auto-encoders could provide credit assignment in deep networks via target propagation. arXiv preprint arXiv:1407.7906.
- Brea et al., [2013] Brea, J., Senn, W., and Pfister, J.-P. (2013). Matching recall and storage in sequence learning with spiking neural networks. Journal of Neuroscience.
- Bressloff and Taylor, [1992] Bressloff, P. C. and Taylor, J. G. (1992). Perceptron-like learning in time-summating neural networks. Journal of Physics A: Mathematical and General.
- Chaudhry et al., [2023] Chaudhry, H. T., Zavatone-Veth, J. A., Krotov, D., and Pehlevan, C. (2023). Long sequence hopfield memory. Advances in Neural Information Processing Systems.
- Collobert and Bengio, [2004] Collobert, R. and Bengio, S. (2004). Links between perceptrons, mlps and svms. International Conference on Machine learning.
- Davidson et al., [2009] Davidson, T. J., Kloosterman, F., and Wilson, M. A. (2009). Hippocampal replay of extended experience. Neuron.
- Eichenbaum, [2014] Eichenbaum, H. (2014). Time cells in the hippocampus: a new dimension for map** memories. Nature Reviews Neuroscience.
- Fiete et al., [2010] Fiete, I. R., Senn, W., Wang, C. Z., and Hahnloser, R. H. (2010). Spike-time-dependent plasticity and heterosynaptic competition organize networks to produce long scale-free sequences of neural activity. Neuron.
- Foster and Wilson, [2006] Foster, D. J. and Wilson, M. A. (2006). Reverse replay of behavioural sequences in hippocampal place cells during the awake state. Nature.
- Frémaux and Gerstner, [2016] Frémaux, N. and Gerstner, W. (2016). Neuromodulated spike-timing-dependent plasticity, and theory of three-factor learning rules. Frontiers in Neural Circuits.
- Gardner, [1988] Gardner, E. (1988). The space of interactions in neural network models. Journal of Physics A: Mathematical and General.
- Gillett et al., [2020] Gillett, M., Pereira, U., and Brunel, N. (2020). Characteristics of sequential activity in networks with temporally asymmetric hebbian learning. Proceedings of the National Academy of Sciences.
- Hopfield, [1982] Hopfield, J. J. (1982). Neural networks and physical systems with emergent collective computational abilities. Proceedings of the National Academy of Sciences.
- Iwama et al., [2012] Iwama, H., Okumura, M., Makihara, Y., and Yagi, Y. (2012). The ou-isir gait database comprising the large population dataset and performance evaluation of gait recognition. IEEE Transactions on Information Forensics and Security.
- Karuvally et al., [2023] Karuvally, A., Sejnowski, T., and Siegelmann, H. T. (2023). General sequential episodic memory model. International Conference on Machine Learning.
- Khona and Fiete, [2022] Khona, M. and Fiete, I. R. (2022). Attractor and integrator networks in the brain. Nature Reviews Neuroscience.
- Kleinfeld, [1986] Kleinfeld, D. (1986). Sequential state generation by model neural networks. Proceedings of the National Academy of Sciences.
- Krotov and Hopfield, [2016] Krotov, D. and Hopfield, J. J. (2016). Dense associative memory for pattern recognition. Advances in Neural Information Processing Systems.
- Kuśmierz et al., [2017] Kuśmierz, Ł., Isomura, T., and Toyoizumi, T. (2017). Learning with three factors: modulating hebbian plasticity with errors. Current Opinion in Neurobiology.
- Laje and Buonomano, [2013] Laje, R. and Buonomano, D. V. (2013). Robust timing and motor patterns by taming chaos in recurrent neural networks. Nature Neuroscience.
- LeCun, [1986] LeCun, Y. (1986). Learning process in an asymmetric threshold network. Disordered Systems and Biological Organization.
- LeCun, [1987] LeCun, Y. (1987). Modeles connexionnistes de lapprentissage. PhD thesis, These de Doctorat, Universite Paris.
- Lee and Wilson, [2002] Lee, A. K. and Wilson, M. A. (2002). Memory of sequential experience in the hippocampus during slow wave sleep. Neuron.
- Lillicrap et al., [2016] Lillicrap, T. P., Cownden, D., Tweed, D. B., and Akerman, C. J. (2016). Random synaptic feedback weights support error backpropagation for deep learning. Nature Communications.
- Lillicrap et al., [2020] Lillicrap, T. P., Santoro, A., Marris, L., Akerman, C. J., and Hinton, G. (2020). Backpropagation and the brain. Nature Reviews Neuroscience.
- Litwin-Kumar et al., [2017] Litwin-Kumar, A., Harris, K. D., Axel, R., Sompolinsky, H., and Abbott, L. (2017). Optimal degrees of synaptic connectivity. Neuron.
- Minsky and Papert, [1969] Minsky, M. and Papert, S. A. (1969). Perceptrons. MIT Press.
- Muscinelli et al., [2017] Muscinelli, S. P., Gerstner, W., and Brea, J. (2017). Exponentially long orbits in hopfield neural networks. Neural Computation.
- Nádasdy et al., [1999] Nádasdy, Z., Hirase, H., Czurkó, A., Csicsvari, J., and Buzsáki, G. (1999). Replay and time compression of recurring spike sequences in the hippocampus. Journal of Neuroscience.
- Pastalkova et al., [2008] Pastalkova, E., Itskov, V., Amarasingham, A., and Buzsaki, G. (2008). Internally generated cell assembly sequences in the rat hippocampus. Science.
- Pfeiffer and Foster, [2013] Pfeiffer, B. E. and Foster, D. J. (2013). Hippocampal place-cell sequences depict future paths to remembered goals. Nature.
- Pfeiffer and Foster, [2015] Pfeiffer, B. E. and Foster, D. J. (2015). Autoassociative dynamics in the generation of sequences of hippocampal place cells. Science.
- Rajakumar et al., [2021] Rajakumar, A., Rinzel, J., and Chen, Z. S. (2021). Stimulus-driven and spontaneous dynamics in excitatory-inhibitory recurrent neural networks for sequence representation. Neural Computation.
- Rajan et al., [2016] Rajan, K., Harvey, C. D., and Tank, D. W. (2016). Recurrent network models of sequence generation and memory. Neuron.
- Sompolinsky and Kanter, [1986] Sompolinsky, H. and Kanter, I. (1986). Temporal association in asymmetric neural networks. Physical Review Letters.
- Srivastava et al., [2015] Srivastava, N., Mansimov, E., and Salakhudinov, R. (2015). Unsupervised learning of video representations using lstms. International Conference on Machine Learning.
- Tang et al., [2023] Tang, M., Barron, H., and Bogacz, R. (2023). Sequential memory with temporal predictive coding. Advances in Neural Information Processing Systems.
- Tully et al., [2016] Tully, P. J., Lindén, H., Hennig, M. H., and Lansner, A. (2016). Spike-based bayesian-hebbian learning of temporal sequences. PLoS Computational Biology.
- Tulving, [2002] Tulving, E. (2002). Episodic memory: From mind to brain. Annual Review of Psychology.
- Vershynin, [2018] Vershynin, R. (2018). High-Dimensional Probability: An Introduction with Applications in Data Science. Cambridge University Press.
Appendix A Proof of Theorem 1
We construct a network such that, given for , the hidden neurons provide an one-hot encoding of the successive pattern , which is then decoded to be .
Appendix B Proof of Theorem 2
Note that the update of (4)(5)(6) in Section 5 does not depend on . Therefore, we first prove the convergence of updating for and . The proof follows from [Gardner,, 1988]. Assume exists such that, for all and ,
(27) |
Define the -th update of with by
(28) |
for some and all in parallel. We assume zero-initialization, that is, for simplicity but the result holds if is sufficiently small. Let
(29) |
The Cauchy-Schwarz inequality, we have . Now we prove the convergence of updating by contradiction. Assuming the update of does not converge, we will show that as . First, we have
(30) |
due to (27) and therefore
(31) | ||||
(32) |
since we assumed . Next, we have
(33) | ||||
(34) | ||||
(35) | ||||
(36) |
since we assumed and therefore . Then, we have
(37) | ||||
(38) | ||||
(39) |
By Cauchy-Schwarz inequality, we have
(40) |
and therefore
(41) |
Also,
(42) | ||||
(43) | ||||
(44) | ||||
(45) | ||||
(46) |
due to (39) and . Note that for
(47) |
and
(48) |
Therefore,
(49) |
and
(50) |
as . We have,
(51) |
for some . This contradicts that . Thus, the updating converges.
Upon the convergence of updating , we can prove the convergence of if there exists such that for all and ,
(52) |
by a similar proof.
Appendix C Proof of Theorem 3
If , then and . If , then
(53) | ||||
(54) | ||||
(55) |
for sufficiently large given , and the property of Heaviside function.
Appendix D Proof of Theorem 4
If , then we have
(56) |
Next,
(57) | ||||
(58) | ||||
(59) | ||||
(60) | ||||
(61) | ||||
(62) |
since , which implies
(63) |
Appendix E Numerical Results for Figure 5 (a) and (b)
In the main paper, we only showed bar charts (Figure 5 (a) and (b)) of the results in Section 6.2. Here, for more information, we provide the numerical results for Figure 5 (a) in Table 1 and Figure 5 (b) in Table 2.
10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 120 | 130 | 140 | 150 | |
Learning only | 100 | 100 | 100 | 91 | 66 | 19 | 8 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Learning and | 100 | 100 | 100 | 100 | 100 | 99 | 88 | 52 | 20 | 1 | 0 | 0 | 0 | 0 | 0 |
100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | |
Learning only | 0 | 0 | 1 | 3 | 6 | 16 | 14 | 27 | 30 | 37 |
Learning and | 10 | 52 | 85 | 90 | 94 | 88 | 95 | 96 | 96 | 97 |
Appendix F Ablation Experiments: Joint Learning of and
To verify the effective of the proposed learning algorithm in Section 5, we show additional experimental results in which three methods for the networks of hidden units in learning the sequences in Section 5.3 are compared.
-
1.
Fixing and learning by the temporal asymmetric Hebbian algorithm
where
-
2.
Fixing and learning with the three-factor rule (7)(8)(9) in Section 5.
-
3.
Learning both and with the three-factor rule (4)(5)(6)(7)(8)(9) in Section 5.
The experimental settings are the same as in Section 6.3. The results are shown in Figure 1-5, from which we can see the algorithm proposed in Section 5 is indeed effective.
Appendix G Ablation Experiments: Sparsity
We provide some further ablation study of our algorithm on the effect of sparsity under the experimental settings of Section 6.2 in the main paper.
Figure 14: Sparse Random Projected Inputs
We compare our method (learning both and with the three-factor rule) with using fixed random whose elements are sampled i.i.d. from the standard Gaussian distribution and learning only with the three-factor rule. The sparse random projected inputs are defined as
where controls the sparsity level.
Figure 15: Sparse Random Projected Targets
We test different levels of sparsity in the random projected targets defined as
where controls the sparsity level.
From both sets of experiments, we do not find sparsity enlarges significantly the capacity of the networks in learning sequences as attractors.