Hippocampal circuits in the brain enable two distinct cognitive functions: the construction of spatial maps for navigation, and the storage of sequential episodic memories1-5. Although there have been advances in modelling spatial representations in the hippocampus6-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.
© 2025. The Author(s), under exclusive licence to Springer Nature Limited.