Abstract
The ability to store and manipulate information is a hallmark of computational systems. Whereas computers are carefully engineered to represent and perform mathematical operations on structured data, neurobiological systems adapt to perform analogous functions without needing to be explicitly engineered. Recent efforts have made progress in modelling the representation and recall of information in neural systems. However, precisely how neural systems learn to modify these representations remains far from understood. Here, we demonstrate that a recurrent neural network (RNN) can learn to modify its representation of complex information using only examples, and we explain the associated learning mechanism with new theory. Specifically, we drive an RNN with examples of translated, linearly transformed or pre-bifurcated time series from a chaotic Lorenz system, alongside an additional control signal that changes value for each example. By training the network to replicate the Lorenz inputs, it learns to autonomously evolve about a Lorenz-shaped manifold. Additionally, it learns to continuously interpolate and extrapolate the translation, transformation and bifurcation of this representation far beyond the training data by changing the control signal. Furthermore, we demonstrate that RNNs can infer the bifurcation structure of normal forms and period doubling routes to chaos, and extrapolate non-dynamical, kinematic trajectories. Finally, we provide a mechanism for how these computations are learned, and replicate our main results using a Wilson–Cowan reservoir. Together, our results provide a simple but powerful mechanism by which an RNN can learn to manipulate internal representations of complex information, enabling the principled study and precise design of RNNs.
This is a preview of subscription content, access via your institution
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$29.99 /Â 30Â days
cancel any time
Subscribe to this journal
Receive 12 digital issues and online access to articles
$119.00 per year
only $9.92 per issue
Buy this article
- Purchase on Springer Link
- Instant access to full article PDF
Prices may be subject to local taxes which are calculated during checkout
Similar content being viewed by others
Data availability
All data generated or analysed during this study can be found in the associated code.
Code availability
The code used to generate and analyse the data, and to produce the figures in the main text and the Supplementary Information, is available on CodeOcean at https://codeocean.com/capsule/2107188/tree/v1 (ref. 53).
References
von Neumann, J. First draft of a report on the EDVAC. IEEE Ann. History Comput. 15, 27–75 (1993).
Alglave, J. et al. The semantics of power and ARM multiprocessor machine code. In Proc. 4th Workshop on Declarative Aspects of Multicore Programming—DAMP ’09, 13 (ACM Press, 2008).
Zhang, Z., Jiao, Y.-Y. & Sun, Q.-Q. Developmental maturation of excitation and inhibition balance in principal neurons across four layers of somatosensory cortex. Neuroscience 174, 10–25 (2011).
Faulkner, R. L. et al. Development of hippocampal mossy fiber synaptic outputs by new neurons in the adult brain. Proc. Natl Acad. Sci. USA 105, 14157–14162 (2008).
Dunn, F. A. & Wong, R. O. L. Diverse strategies engaged in establishing stereotypic wiring patterns among neurons sharing a common input at the visual system’s first synapse. J. Neurosci. 32, 10306–10317 (2012).
Craik, F. I. & Bialystok, E. Cognition through the lifespan: mechanisms of change. Trends Cogn. Sci. 10, 131–138 (2006).
Tacchetti, A., Isik, L. & Poggio, T. A. Invariant recognition shapes neural representations of visual input. Annu. Rev. Vis. Sci. 4, 403–422 (2018).
Moser, E. I., Kropff, E. & Moser, M.-B. Place cells, grid cells and the brain’s spatial representation system. Annu. Rev. Neurosci. 31, 69–89 (2008).
Ifft, P. J., Shokur, S., Li, Z., Lebedev, M. A. & Nicolelis, M. A. L. A brain–machine interface enables bimanual arm movements in monkeys. Sci. Transl. Med. 5, 210ra154 (2013).
Sainath, T. N. et al. Deep convolutional neural networks for large-scale speech tasks. Neural Netw. 64, 39–48 (2015).
Jarrell, T. A. et al. The connectome of a decision-making neural network. Science 337, 437–444 (2012).
Lee, J. & Tashev, I. High-level feature representation using recurrent neural network for speech emotion recognition. In Proc. Annual Conference of the International Speech Communication Association, INTERSPEECH, Vol. 2015, January 1537–1540 (ISCA, 2015).
Wang, J., Narain, D., Hosseini, E. A. & Jazayeri, M. Flexible timing by temporal scaling of cortical responses. Nat. Neurosci. 21, 102–110 (2018).
Weber, M., Maia, P. D. & Kutz, J. N. Estimating memory deterioration rates following neurodegeneration and traumatic brain injuries in a Hopfield network model. Front. Neurosci 11, 623 (2017).
Burak, Y. & Fiete, I. R. Accurate path integration in continuous attractor network models of grid cells. PLoS Comput. Biol. 5, e1000291 (2009).
Yoon, K. et al. Specific evidence of low-dimensional continuous attractor dynamics in grid cells. Nat. Neurosci. 16, 1077–1084 (2013).
Kumar, S., Dasgupta, I., Cohen, J. D., Daw, N. D. & Griffiths, T. L. Meta-learning of compositional task distributions in humans and machines. Preprint at https://arxiv.org/pdf/2010.02317.pdf (2020).
Schweighofer, N. & Doya, K. Meta-learning in reinforcement learning. Neural Netw. 16, 5–9 (2003).
Santiago, R. A. Context discerning multifunction networks: reformulating fixed weight neural networks. In 2004 IEEE International Joint Conference on Neural Networks Vol. 1, 189–194 (IEEE, 2004).
Feldkamp, L. A., Puskorius, G. & Moore, P. Adaptive behavior from fixed weight networks. Inform. Sci. 98, 217–235 (1997).
Hegarty, M. Mechanical reasoning by mental simulation. Trends Cogn. Sci. 8, 280–285 (2004).
Kubricht, J. R., Holyoak, K. J. & Lu, H. Intuitive physics: current research and controversies. Trends Cogn. Sci. 21, 749–759 (2017).
Pfeiffer, B. E. & Foster, D. J. Hippocampal place-cell sequences depict future paths to remembered goals. Nature 497, 74–79 (2013).
Gold, J. I. & Shadlen, M. N. The neural basis of decision making. Annu. Rev. Neurosci. 30, 535–574 (2007).
Strogatz, S. H. Nonlinear Dynamics and Chaos 1st edn (Perseus Books, 1994).
Yang, J., Wang, L., Wang, Y. & Guo, T. A novel memristive Hopfield neural network with application in associative memory. Neurocomputing 227, 142–148 (2017).
Wu, S., Wong, K. Y. M., Fung, C. C. A., Mi, Y. & Zhang, W. Continuous attractor neural networks: candidate of a canonical model for neural information representation. F1000Res. 5, 156 (2016).
Eliasmith, C. & Anderson, C. H. Neural Engineering: Computation, Representation and Dynamics in Neurobiological Systems (MIT Press, 2003).
Bekolay, T. et al. Nengo: a Python tool for building large-scale functional brain models. Front. Neuroinf. 7, 48 (2014).
Graves, A. et al. Hybrid computing using a neural network with dynamic external memory. Nature 538, 471–476 (2016).
Carroll, J. M. Letter knowledge precipitates phoneme segmentation, but not phoneme invariance. J. Res. Reading 27, 212–225 (2004).
Fee, M. S. & Scharff, C. The songbird as a model for the generation and learning of complex sequential behaviors. ILAR J. 51, 362–377 (2010).
Donnay, G. F., Rankin, S. K., Lopez-Gonzalez, M., Jiradejvong, P. & Limb, C. J. Neural substrates of interactive musical improvisation: an FMRI study of trading fours in jazz. PLoS ONE 9, e88665 (2014).
Qiao, J., Li, F., Han, H. & Li, W. Growing echo-state network with multiple subreservoirs. IEEE Trans. Neural Netw. Learn. Syst. 28, 391–404 (2017).
Lorenz, E. N. Deterministic nonperiodic flow. J. Atmos. Sci. 20, 130–141 (1963).
Jaeger, H. The echo state approach to analysing and training recurrent neural networks—with an erratum note. GMD Rep. 1, 1–47 (2010).
Sussillo, D. & Abbott, L. Generating coherent patterns of activity from chaotic neural networks. Neuron 63, 544–557 (2009).
Tyukin, I. Y., Prokhorov, D. & Van Leeuwen, C. Adaptive classification of temporal signals in fixed-weight recurrent neural networks: an existence proof. Neural Comput. 20, 2564–2596 (2008).
Klos, C., Kossio, Y. F. K., Goedeke, S., Gilra, A. & Memmesheimer, R.-M. Dynamical learning of dynamics. Phys. Rev. Lett. 125, 088103 (2020).
Słowik, R. Inverses and determinants of Toeplitz–Hessenberg matrices. Taiwan. J. Math. 22, 901–908 (2018).
Nansai, S., Elara, M. R. & Iwase, M. Dynamic analysis and modeling of Jansen mechanism. Proc. Eng. 64, 1562–1571 (2013).
Seung, H. S. Learning continuous attractors in recurrent networks. In Advances in Neural Information Processing Systems 654–660 (MIT Press, 1998).
Rulkov, N. F., Sushchik, M. M., Tsimring, L. S. & Abarbanel, H. D. I. Generalized synchronization of chaos in directionally coupled chaotic systems. Phys. Rev. E 51, 980–994 (1995).
Ott, E., Grebogi, C. & Yorke, J. A. Controlling chaos. Phys. Rev. Lett. 64, 1196–1199 (1990).
Wilson, H. R. & Cowan, J. D. Excitatory and inhibitory interactions in localized populations of model neurons. Biophys. J. 12, 1–24 (1972).
Zurn, P., Bassett, D. S. & Rust, N. C. The citation diversity statement: a practice of transparency, a way of life. Trends Cogn. Sci. 24, 669–672 (2020).
Dworkin, J. D. et al. The extent and drivers of gender imbalance in neuroscience reference lists. Nat. Neurosci. 23, 918–926 (2020).
Maliniak, D., Powers, R. & Walter, B. F. The gender citation gap in international relations. Int. Organ. 67, 889–922 (2013).
Caplar, N., Tacchella, S. & Birrer, S. Quantitative evaluation of gender bias in astronomical publications from citation counts. Nat. Astron. 1, 0141 (2017).
Mitchell, S. M., Lange, S. & Brus, H. Gendered citation patterns in international relations journals. Int. Studies Perspect. 14, 485–492 (2013).
Dion, M. L., Sumner, J. L. & Mitchell, S. M. Gendered citation patterns across political science and social science methodology fields. Political Anal. 26, 312–327 (2018).
Zhou, D. et al. Gender diversity statement and code notebook v1.0 (2020); https://doi.org/10.5281/zenodo.3672110
Kim, J. Z., Lu, Z., Nozari, E., Pappas, G. J. & Bassett, D. S. Teaching recurrent neural networks to infer global temporal structure from local examples (2020); https://codeocean.com/capsule/2107188/tree/v1
Langer, G. & Parlitz, U. Modeling parameter dependence from time series. Phys. Rev. E 70, 056217 (2004).
Acknowledgements
We are thankful for the insightful feedback and comments from H. Ju and K. Wiley. We acknowledge support from the John D. and Catherine T. MacArthur Foundation, the Alfred P. Sloan Foundation, the ISI Foundation, the Paul Allen Foundation, the Army Research Laboratory (grant no. W911NF-10-2-0022), the Army Research Office (grants nos. Bassett-W911NF-14-1-0679, Grafton-W911NF-16-1-0474 and DCIST-W911NF-17-2-0181), the Office of Naval Research (ONR), the National Institute of Mental Health (grants nos. 2-R01-DC-009209-11, R01-MH112847, R01-MH107235 and R21-M MH-106799), the National Institute of Child Health and Human Development (grant no. 1R01HD086888-01), the National Institute of Neurological Disorders and Stroke (grant no. R01 NS099348) and the National Science Foundation (NSF; grants nos. DGE-1321851, NSF PHY-1554488 and BCS-1631550). The content is solely the responsibility of the authors and does not necessarily represent the official views of any of the funding agencies.
Author information
Authors and Affiliations
Contributions
J.Z.K. conceived the initial idea and developed the analyses in conversation with Z.L., E.N., G.J.P. and D.S.B. J.Z.K. and D.S.B. prepared the manuscript with feedback from Z.L., E.N. and G.J.P. All authors contributed to discussions and approved the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Peer review information Nature Machine Intelligence thanks Wilten Nicola and the other, anonymous, reviewer(s), for their contribution to the peer review of this work.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Supplementary Information
Supplemental Figs. 1–7, Table 1, derivations, discussion and Methods.
Rights and permissions
About this article
Cite this article
Kim, J.Z., Lu, Z., Nozari, E. et al. Teaching recurrent neural networks to infer global temporal structure from local examples. Nat Mach Intell 3, 316–323 (2021). https://doi.org/10.1038/s42256-021-00321-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1038/s42256-021-00321-2
This article is cited by
-
Heavy-tailed neuronal connectivity arises from Hebbian self-organization
Nature Physics (2024)
-
Emerging opportunities and challenges for the future of reservoir computing
Nature Communications (2024)
-
Extrapolating tipping points and simulating non-stationary dynamics of complex systems using efficient machine learning
Scientific Reports (2024)
-
Reconstructing computational system dynamics from neural data with recurrent neural networks
Nature Reviews Neuroscience (2023)
-
A neural machine code and programming framework for the reservoir computer
Nature Machine Intelligence (2023)