Abstract
Hippocampal circuits in the brain enable two distinct cognitive functions: the construction of spatial maps for navigation, and the storage of sequential episodic memories1,2,3,4,5. Although there have been advances in modelling spatial representations in the hippocampus6,7,8,9,10, we lack good models of its role in episodic memory. Here we present a neocortical–entorhinal–hippocampal network model that implements a high-capacity general associative memory, spatial memory and episodic memory. By factoring content storage from the dynamics of generating error-correcting stable states, the circuit (which we call vector hippocampal scaffolded heteroassociative memory (Vector-HaSH)) avoids the memory cliff of prior memory models11,12, and instead exhibits a graceful trade-off between number of stored items and recall detail. A pre-structured internal scaffold based on grid cell states is essential for constructing even non-spatial episodic memory: it enables high-capacity sequence memorization by abstracting the chaining problem into one of learning low-dimensional transitions. Vector-HaSH reproduces several hippocampal experiments on spatial mapping and context-based representations, and provides a circuit model of the ‘memory palaces’ used by memory athletes13. Thus, this work provides a unified understanding of the spatial mapping and associative and episodic memory roles of the hippocampus.
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
$32.99 / 30 days
cancel any time
Subscribe to this journal
Receive 51 print issues and online access
$199.00 per year
only $3.90 per issue
Buy this article
- Purchase on SpringerLink
- Instant access to the full article PDF.
USD 39.95
Prices may be subject to local taxes which are calculated during checkout







Similar content being viewed by others
Data availability
Data were collecting by running the codes available at https://github.com/FieteLab.
Code availability
Codes used to run the model and analyse data are available at https://github.com/FieteLab.
References
Scoville, WilliamBeecher & Milner, B. Loss of recent memory after bilateral hippocampal lesions. J. Neurol. Neurosurg. Psychiatry 20, 11 (1957).
O’Keefe, J. & Dostrovsky, J. The hippocampus as a spatial map. preliminary evidence from unit activity in the freely-moving rat. Brain Res. 34, 171–175 (1971).
Hafting, T., Fyhn, M., Molden, S., Moser, M.-B. & Moser, E. I. Microstructure of a spatial map in the entorhinal cortex. Nature 436, 801–806 (2005).
Solstad, T., Boccara, C. N., Kropff, E., Moser, May-Britt & Moser, E. I. Representation of geometric borders in the entorhinal cortex. Science 322, 1865–1868 (2008).
Lever, C., Burton, S., Jeewajee, A., O’Keefe, J. & Burgess, N. Boundary vector cells in the subiculum of the hippocampal formation. J. Neurosci. 29, 9771–9777 (2009).
Samsonovich, A. & McNaughton, B. L. Path integration and cognitive mapping in a continuous attractor neural network model. J. Neurosci. 17, 5900–5920 (1997).
Hasselmo, M. E. A model of episodic memory: mental time travel along encoded trajectories using grid cells. Neurobiol. Learn. Mem. 92, 559–573 (2009).
Burak, Y. & Fiete, I. R. Accurate path integration in continuous attractor network models of grid cells. PLoS Comput. Biol. 5, e1000291 (2009).
Stachenfeld, K. L., Botvinick, M. M. & Gershman, S. J. The hippocampus as a predictive map. Nat. Neurosci. 20, 1643–1653 (2017).
Agmon, H. & Burak, Y. A theory of joint attractor dynamics in the hippocampus and the entorhinal cortex accounts for artificial remapping and grid cell field-to-field variability. eLife 9, e56894 (2020).
Abu-Mostafa, Y. S. & St Jacques, J. Information capacity of the hopfield model. IEEE Trans. Inf. Theory 31, 461–464 (1985).
Gardner, E. The space of interactions in neural network models. J. Phys. A 21, 257–270 (1988).
Yates, F. A. The Art of Memory (Routledge & Kegan Paul, 1966).
Proust, M. À la Recherche du Temps Perdu (Grasset, 1913).
Reed, J. M. & Squire, L. R. Impaired recognition memory in patients with lesions limited to the hippocampal formation. Behav. Neurosci. 111, 667 (1997).
Zola, S. M. et al. Impaired recognition memory in monkeys after damage limited to the hippocampal region. J. Neurosci. 20, 451–463 (2000).
Manns, J. R., Hopkins, R. O., Reed, J. M., Kitchener, E. G. & Squire, L. R. Recognition memory and the human hippocampus. Neuron 37, 171–180 (2003).
Eichenbaum, H. On the integration of space, time, and memory. Neuron 95, 1007–1018 (2017).
Taube, J. S., Muller, R. U. & Ranck, J. B. Head-direction cells recorded from the postsubiculum in freely moving rats. i. description and quantitative analysis. J. Neurosci. 10, 420–435 (1990).
Lee, A. K. & Wilson, M. A. Memory of sequential experience in the hippocampus during slow wave sleep. Neuron 36, 1183–1194 (2002).
Fenton, AndréA. et al. Unmasking the CA1 ensemble place code by exposures to small and large environments: more place cells and multiple, irregularly arranged, and expanded place fields in the larger space. J. Neurosci. 28, 11250–11262 (2008).
Colgin, LauraLee et al. Frequency of gamma oscillations routes flow of information in the hippocampus. Nature 462, 353–357 (2009).
Stensola, H. et al. The entorhinal grid map is discretized. Nature 492, 72–78 (2012).
Buzsáki, György & Moser, E. I. Memory, navigation and theta rhythm in the hippocampal–entorhinal system. Nat. Neurosci. 16, 130–138 (2013).
Hopfield, J. J. Neurons with graded response have collective computational properties like those of two-state neurons. Proc. Natl Acad. Sci. USA 81, 3088–3092 (1984).
Marr, D., Willshaw, D. & McNaughton, B. Simple Memory: A Theory for Archicortex (Springer, 1991).
Skaggs, W., Knierim, J., Kudrimoti, H. & McNaughton, B. A model of the neural basis of the rat’s sense of direction. Adv. Neural Inf. Process. Syst. 7, 173–180 (1995).
Burgess, N., Recce, M. & O’Keefe, J. A model of hippocampal function. Neural Netw. 7, 1065–1081 (1994).
McClelland, J. L., McNaughton, B. L. & O’Reilly, R. C. Why there are complementary learning systems in the hippocampus and neocortex: insights from the successes and failures of connectionist models of learning and memory. Psychol. Rev. 102, 419 (1995).
Brun, V. H. et al. Place cells and place recognition maintained by direct entorhinal–hippocampal circuitry. Science 296, 2243–2246 (2002).
Hartley, T., Burgess, N., Lever, C., Cacucci, F. & O’keefe, J. Modeling place fields in terms of the cortical inputs to the hippocampus. Hippocampus 10, 369–379 (2000).
Sreenivasan, S. & Fiete, I. Grid cells generate an analog error-correcting code for singularly precise neural computation. Nat. Neurosci. 14, 1330–1337 (2011).
Yoon, Ki. Jung et al. Specific evidence of low-dimensional continuous attractor dynamics in grid cells. Nat. Neurosci. 16, 1077–1084 (2013).
Yoon, K., Lewallen, S., Kinkhabwala, A. A., Tank, D. W. & Fiete, I. R. Grid cell responses in 1D environments assessed as slices through a 2D lattice. Neuron 89, 1086–1099 (2016).
Solstad, T., Moser, E. I. & Einevoll, G. T. From grid cells to place cells: a mathematical model. Hippocampus 16, 1026–1031 (2006).
Trettel, S. G., Trimper, J. B., Hwaun, E., Fiete, I. R. & Colgin, L. L. Grid cell co-activity patterns during sleep reflect spatial overlap of grid fields during active behaviors. Nat. Neurosci. 22, 609–617 (2019).
Gardner, R. J. et al. Toroidal topology of population activity in grid cells. Nature 602, 123–128 (2022).
Gardner, R. J., Lu, L., Wernle, T., Moser, May-Britt & Moser, E. I. Correlation structure of grid cells is preserved during sleep. Nat. Neurosci. 22, 598–608 (2019).
O’Reilly, R. C., Bhattacharyya, R., Howard, M. D. & Ketz, N. Complementary learning systems. Cogn. Sci. 38, 1229–1248 (2014).
Hardcastle, K., Ganguli, S. & Giocomo, L. M. Environmental boundaries as an error correction mechanism for grid cells. Neuron 86, 827–839 (2015).
Dordek, Y., Soudry, D., Meir, R. & Derdikman, D. Extracting grid cell characteristics from place cell inputs using non-negative principal component analysis. eLife 5, e10094 (2016).
Keinath, A. T., Epstein, R. A. & Balasubramanian, V. Environmental deformations dynamically shift the grid cell spatial metric. eLife 7, e38169 (2018).
Ocko, S. A., Hardcastle, K., Giocomo, L. M. & Ganguli, S. Emergent elasticity in the neural code for space. Proc. Natl Acad. Sci. USA 115, E11798–E11806 (2018).
Chaudhuri, R. & Fiete, I. Bipartite expander hopfield networks as self-decoding high-capacity error correcting codes. Adv. Neural Inf. Process. Syst. 32, 4175 (2019).
Whittington, James C. R. et al. The Tolman–Eichenbaum machine: unifying space and relational memory through generalization in the hippocampal formation. Cell 183, 1249–1263 (2020).
Buzsáki, György & Tingley, D. Space and time: the hippocampus as a sequence generator. Trends Cogn. Sci. 22, 853–869 (2018).
Aronov, D., Nevers, R. & Tank, D. W. Mapping of a non-spatial dimension by the hippocampal–entorhinal circuit. Nature 543, 719–722 (2017).
Killian, N. J., Potter, S. M. & Buffalo, E. A. Saccade direction encoding in the primate entorhinal cortex during visual exploration. Proc. Natl Acad. Sci. USA 112, 15743–15748 (2015).
Constantinescu, A. O., O’Reilly, J. X. & Behrens, T. E. J. Organizing conceptual knowledge in humans with a gridlike code. Science 352, 1464–1468 (2016).
Neupane, S., Fiete, L. & Jazayeri, M. Mental navigation in the primate entorhinal cortex. Nature 630, 704–711 (2024).
Krotov, D. and Hopfield, J. Large associative memory problem in neurobiology and machine learning. Preprint at https://doi.org/10.48550/arXiv.2008.06996 (2020).
Witter, M. P., Doan, T. P., Jacobsen, B., Nilssen, E. S. & Ohara, S. Architecture of the entorhinal cortex a review of entorhinal anatomy in rodents with some comparative notes. Front. Syst. Neurosci. 11, 46 (2017).
Fiete, I. R., Burak, Y. & Brookings, T. What grid cells convey about rat location. J. Neurosci. 28, 6858–6871 (2008).
Sharma, S., Chandra, S. & Fiete, I. Content addressable memory without catastrophic forgetting by heteroassociation with a fixed scaffold. In 39th International Conference on Machine Learning 19658–19682 (PMLR, 2022).
Radhakrishnan, A., Belkin, M. & Uhler, C. Overparameterized neural networks implement associative memory. Proc. Natl Acad. Sci. USA 117, 27162–27170 (2020).
Kleinfeld, D. & Sompolinsky, H. Associative neural network model for the generation of temporal patterns. theory and application to central pattern generators. Biophys. J. 54, 1039–1051 (1988).
Fyhn, M., Hafting, T., Treves, A., Moser, May-Britt & Moser, E. I. Hippocampal remapping and grid realignment in entorhinal cortex. Nature 446, 190–194 (2007).
Huszár, R., Zhang, Y., Blockus, H. & Buzsáki, György Preconfigured dynamics in the hippocampus are guided by embryonic birthdate and rate of neurogenesis. Nat. Neurosci. 25, 1201–1212 (2022).
Bonnevie, T. et al. Grid cells require excitatory drive from the hippocampus. Nat. Neurosci. 16, 309–317 (2013).
Almog, N. et al. During hippocampal inactivation, grid cells maintain synchrony, even when the grid pattern is lost. eLife 8, e47147 (2019).
Hales, J. B. et al. Medial entorhinal cortex lesions only partially disrupt hippocampal place cells and hippocampus-dependent place memory. Cell Rep. 9, 893–901 (2014).
Wood, E. R., Dudchenko, P. A., Robitsek, R. J. & Eichenbaum, H. Hippocampal neurons encode information about different types of memory episodes occurring in the same location. Neuron 27, 623–633 (2000).
Grieves, R. M., Wood, E. R. & Dudchenko, P. A. Place cells on a maze encode routes rather than destinations. eLife 5, e15986 (2016).
Dombeck, D. A., Harvey, C. D., Tian, L., Looger, L. L. & Tank, D. W. Functional imaging of hippocampal place cells at cellular resolution during virtual navigation. Nat. Neurosci. 13, 1433–1440 (2010).
Nadel, L. & Moscovitch, M. Memory consolidation, retrograde amnesia and the hippocampal complex. Curr. Opin. Neurobiol. 7, 217–227 (1997).
Yadav, N., Toader, A. & Rajasethupathy, P. Thalamic and prefrontal contributions to an evolving memory. Neuron 112, 1045–1059 (2024).
Tsoi, SauYee et al. Telencephalic outputs from the medial entorhinal cortex are copied directly to the hippocampus. eLife 11, e73162 (2022).
Donato, F., Jacobsen, R. I., Moser, May-Britt & Moser, E. I. Stellate cells drive maturation of the entorhinal–hippocampal circuit. Science 355, eaai8178 (2017).
Benna, M. K. & Fusi, S. Place cells may simply be memory cells: Memory compression leads to spatial tuning and history dependence. Proc. Natl Acad. Sci. USA 118, e2018422118 (2021).
Teyler, T. J. & Rudy, J. W. The hippocampal indexing theory and episodic memory: updating the index. Hippocampus 17, 1158–1169 (2007).
Treves, A. & Rolls, E. T. Computational analysis of the role of the hippocampus in memory. Hippocampus 4, 374–391 (1994).
Alme, C. B. et al. Place cells in the hippocampus: eleven maps for eleven rooms. Proc. Natl Acad. Sci. USA 111, 18428–18435 (2014).
Yim, ManYi, Sadun, L. A., Fiete, I. R. & Taillefumier, T. Place-cell capacity and volatility with grid-like inputs. eLife 10, e62702 (2021).
Tapson, J. & van Schaik, A. Learning the pseudoinverse solution to network weights. Neural Netw. 45, 94–100 (2013).
O’Reilly, R. C. Six principles for biologically based computational models of cortical cognition. Trends Cogn. Sci. 2, 455–462 (1998).
Personnaz, L., Guyon, I. & Dreyfus, G. Information storage and retrieval in spin-glass like neural networks. J. Physique Lettres 46, 359–365 (1985).
Personnaz, L., Guyon, I. & Dreyfus, G. Collective computational properties of neural networks: new learning mechanisms. Phys. Rev. A 34, 4217 (1986).
Parisi, G. A memory which forgets. J. Phys. A 19, L617 (1986).
Fusi, S. & Abbott, L. F. Limits on the memory storage capacity of bounded synapses. Nat. Neurosci. 10, 485–493 (2007).
Tsodyks, M. V. & Feigel’man, M. V. The enhanced storage capacity in neural networks with low activity level. Europhysics Lett. 6, 101 (1988).
Dominguez, D., Koroutchev, K., Serrano, E. & Rodríguez, F. B. Information and topology in attractor neural networks. Neural Comput. 19, 956–973 (2007).
Markus, E. J. et al. Interactions between location and task affect the spatial and directional firing of hippocampal neurons. J. Neurosci. 15, 7079–7094 (1995).
Acknowledgements
This work was supported by ONR award N00014-19-1-2584, by NSF-CISE award IIS-2151077 under the Robust Intelligence programme, by the ARO-MURI award W911NF-23-1-0277, by the Simons Foundation SCGB programme 1181110, and the K. Lisa Yang ICoN Center.
Author information
Authors and Affiliations
Contributions
Conceptualization: S.C., S.S., R.C. and I.F. Funding acquisition: I.F. Writing: S.C., S.S. and I.F. Coding and analysis: S.C. and S.S.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests
Peer review
Peer review information
Nature thanks Dori Derdikman, Christian Machens and Cristina Savin for their contribution to the peer review of this work. Peer review reports are available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Extended data figures and tables
Extended Data Fig. 1 Critical number of hippocampal cells necessary to support all scaffold fixed points is asymptotically independent of the number of grid cells.
For a given number of modules, the critical number of hippocampal cells, \({N}_{h}^{* }\) increases slowly with the number of grid cells, but then asymptotically approaches a constant, as expected from the theoretical results in Sec. C.1.
Extended Data Fig. 2 Learning generalization approaches theoretical expectations with increasing Nh.
The number of generated fixed points approaches the maximal scaffold capacity for a very small number of learned patterns (see also Fig. 2f). As the number of hippocampal cells increases, the number of learning patterns necessary for complete generalization approaches the theoretical expectation of M × Kmax, as proved in SI Sec. C.4.
Extended Data Fig. 3 Hebbian learning between sensory layer and scaffold also produces memory continuum.
A memory continuum is obtained in Vector-HaSH even if the weights between the sensory and hippocampal layers are bi-directionally trained using Hebbian learning (instead of pseudoinverse learning, as in Fig. 3. This continuum is also asymptotically proportional to the theoretical bound on memory capacity (forest green dashed line indicative of slope of theoretical upper bound, vertical and horizontal position of dashed line is arbitrary). However, the proportionality constant is lower, with the gradual degradation of information recall occurring well before Nh. Vector-HaSH parameters identical to Fig. 3c with λ = {3, 4, 5}.
Supplementary information
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Chandra, S., Sharma, S., Chaudhuri, R. et al. Episodic and associative memory from spatial scaffolds in the hippocampus. Nature 638, 739–751 (2025). https://doi.org/10.1038/s41586-024-08392-y
Received:
Accepted:
Published:
Version of record:
Issue date:
DOI: https://doi.org/10.1038/s41586-024-08392-y
This article is cited by
-
The medial septum-hippocampus-lateral septum circuitry in spatial memory: linking healthy function to early Alzheimer’s disease and translational opportunities
Translational Neurodegeneration (2025)
-
Lost in Space and Thought: Navigating the Cognitive Map in Alzheimer’s Disease
Neuroscience Bulletin (2025)
-
Structural knowledge: from brain to artificial intelligence
Artificial Intelligence Review (2025)


