Abstract
When faced with a novel situation, humans often spend substantial periods of time contemplating possible futures. For such planning to be rational, the benefits to behavior must compensate for the time spent thinking. Here we capture these features of human behavior by developing a neural network model where planning itself is controlled by prefrontal cortex. This model consists of a meta-reinforcement learning agent augmented with the ability to plan by sampling imagined action sequences from its own policy, which we call ‘rollouts’. The agent learns to plan when planning is beneficial, explaining empirical variability in human thinking times. Additionally, the patterns of policy rollouts employed by the artificial agent closely resemble patterns of rodent hippocampal replays recently recorded during spatial navigation. Our work provides a new theory of how the brain could implement planning through prefrontal-hippocampal interactions, where hippocampal replays are triggered by – and adaptively affect – prefrontal dynamics.
Introduction
When faced with complex tasks, humans do not merely react; we pause to deliberate. This "thinking time" is highly variable—ranging from instant action to seconds of contemplation. From a rational perspective, such delays are only justifiable if the resulting behavioral improvement outweighs the opportunity cost of lost time. In neuroscience, a parallel phenomenon is observed in the hippocampus, where "replays"—sequences of neural activity representing past or future paths—occur while an animal is stationary.
Despite these observations, two major questions remained: what unified neural mechanism determines when and how the brain chooses to plan, and how do these hippocampal replays functionally interact with the prefrontal cortex (PFC) to adapt behavior in real-time without slow synaptic updates? This paper introduces a meta-reinforcement learning model where "thinking" is an adaptive choice, explaining both human decision-making variability and the functional role of hippocampal replays.
Methods
The researchers developed a meta-reinforcement learning agent based on a Recurrent Neural Network (RNN) utilizing 100 Gated Recurrent Units.
The Rollout Mechanism
The agent's action space was expanded beyond physical movement (up, down, left, right) to include a "plan" action. Choosing to plan triggers a "rollout"—a mental simulation of up to 8 steps using an internal world model learned by the agent. To simulate real-world costs, physical actions were assigned a duration of 400ms, while mental rollouts took only 120ms. Given a fixed episode duration of 20 seconds, the agent had to learn to balance "thinking" versus "doing" to maximize rewards.
Hidden State Optimization
A core theoretical contribution is the demonstration that these rollouts allow the RNN to perform "hidden state optimization." Feedback from a rollout nudges the RNN's internal activity (its hidden state) in a direction that approximates a policy gradient update. This improves the policy "on the fly" without requiring changes to synaptic weights.
Datasets
The model was validated against three sources:
- Human Behavioral Data: 94 participants in a 4x4 maze navigation task with hidden goals.
- Rodent Electrophysiology: Tetrode recordings from the hippocampus of 3 rats navigating a similar dynamic maze.
- Synthetic Data: 5 independent RL agents trained on millions of simulated environments.
Results
Planning as a Learned Behavior
The agent discovered through meta-learning that planning is most beneficial when the policy is uncertain or the goal is distant, mirroring human behavioral patterns. The model accurately predicted that humans spend more time thinking at the start of a trial and when further from the goal (Pearson correlation $r \approx 0.186$).
Functional Role of Replays
The model suggests hippocampal replays are inputs to the PFC that refine the current plan. Successful rollouts (hitting a goal) upregulate the replayed action, while unsuccessful ones (hitting a wall) downregulate it. This reconciles conflicting rodent data: successful replays correlate with subsequent moves, while unsuccessful ones push the animal away from the replayed path.
Performance and Biological Fidelity
Forcing rollouts monotonically improved agent performance, reducing steps to the goal in novel environments. Furthermore, the spatial statistics of the model's rollouts—avoiding walls and over-representing goal locations—matched those of rodent hippocampal replays. In both model and rat data, the first action of a successful replay agreed with the next physical action significantly more often than in unsuccessful replays ($p < 0.001$).
Discussion
While the model provides a powerful framework for understanding planning, it has limitations. The 4x4 grid is relatively simple; future work should explore more complex, hierarchical environments. Additionally, the model uses a fixed 8-step planning horizon, whereas humans likely vary planning depth based on task difficulty. Finally, while the model treats the PFC as a single RNN, biological planning involves a complex loop between the PFC, hippocampus, and basal ganglia. Future iterations could employ modular architectures to better reflect this biological complexity.
Summary updated