Abstract
The hippocampus is critical for memory, imagination and constructive reasoning. Recent models have suggested that its neuronal responses can be well explained by state spaces that model the transitions between experiences. Here we use simulations and hippocampal recordings to reconcile these views. We show that if state spaces are constructed compositionally from existing building blocks, or primitives, hippocampal responses can be interpreted as compositional memories, binding these primitives together. Critically, this enables agents to behave optimally in new environments with no new learning, inferring behavior directly from the composition. We predict a role for hippocampal replay in building and consolidating these compositional memories. We test these predictions in two datasets by showing that replay events from newly discovered landmarks induce and strengthen new remote firing fields. When the landmark is moved, replay builds a new firing field at the same vector to the new location. Together, these findings provide a framework for reasoning about compositional memories and demonstrate that such memories are formed in hippocampal replay.
Introduction
Traditional models of the hippocampus often categorize it as either a memory system for specific episodes or a "state space" used for Reinforcement Learning (RL). However, standard RL models struggle with flexibility, typically requiring extensive experience to learn the transitions and values of a new environment. In contrast, humans and animals can often behave optimally in a new space almost immediately.
Bakermans et al. propose that the hippocampus acts as a compositional engine, addressing the "missing link" between slow state-space learning and rapid reasoning. By assembling new experiences from a library of reusable "building blocks," the hippocampus can predict future behavior in novel environments without needing to learn every transition from scratch.
Methods: Compositional Modeling and Replay
The researchers developed a model where hippocampal "place cells" are formed by the outer product of cortical inputs. These inputs are "primitives"—reusable building blocks such as grid cells (representing spatial coordinates) and object-vector cells (OVCs, representing distance and direction to landmarks).
To test this model, the authors simulated "offline replay" as a mechanism for credit assignment. In this framework, replay does not merely strengthen old memories; it path-integrates landmark information to "stitch" together a map of a new environment while the agent is stationary. They validated these predictions using Bayesian decoding on two primary rodent datasets:
- Pfeiffer & Foster (2013): Rodents performing a "home-away" task, focusing on how representations change relative to a primary landmark.
- Duvelle et al. (2021): Rodents in a four-room maze with dynamic structural obstacles (locked doors), allowing observation of how new barriers are incorporated into the hippocampal map.
Key Insights: The Hippocampus as a Compositional Engine
The core proposal is that the hippocampus achieves "zero-shot" behavior by composing existing cortical primitives into novel relational maps. Because building blocks like reward-vector cells already carry behavioral meaning (e.g., "move toward this"), a hippocampal map built from these blocks possesses a built-in policy from its inception.
Replay acts as the architect of these compositional memories. When an animal discovers a new landmark, replay events propagate that information across the map, creating new firing fields at remote locations before the animal even visits them. This allows the brain to infer optimal navigation policies before physical exploration.
Key Results
- Zero-Shot Superiority: In simulations, compositional agents achieved near-perfect navigation accuracy in brand-new environments, while traditional agents failed until they gained significant experience.
- Replay Predicts Map Changes: Rodent data confirmed that changes in hippocampal rate maps (the emergence of new place fields) were precisely aligned with locations replayed during sharp-wave ripples at a landmark.
- Vector Consistency: When a landmark's location changed, a subpopulation of hippocampal neurons lost their old firing fields and gained new ones at the exact same vector relative to the new location, proving the representation is compositional and reusable.
Discussion and Future Work
While this framework provides a powerful explanation for rapid reasoning, several questions remain. The model assumes that cortical primitives (grid cells, OVCs) already exist, but does not explain their initial development. Additionally, the model relies on path integration, which is prone to noise over long distances; the biological mechanisms for error correction during repeated replay require further study. Finally, future research must determine if this compositional framework scales to more abstract features of experience, such as social hierarchies or complex task rules.
Reference: Bakermans, J. J. W., et al. (2025). Constructing future behavior in the hippocampal formation through composition and replay. Nature Neuroscience, 28, 1061–1072.
Summary updated