  Cognitive problem-solving benefits from cognitive maps aiding navigation and
planning. Previous studies revealed that cognitive maps for physical space
navigation involve hippocampal (HC) allocentric codes, while cognitive maps for
abstract task space engage medial prefrontal cortex (mPFC) task-specific codes.
Solving challenging cognitive tasks requires integrating these two types of
maps. This is exemplified by spatial alternation tasks in multi-corridor
settings, where animals like rodents are rewarded upon executing an alternation
pattern in maze corridors. Existing studies demonstrated the HC - mPFC
circuit's engagement in spatial alternation tasks and that its disruption
impairs task performance. Yet, a comprehensive theory explaining how this
circuit integrates task-related and spatial information is lacking. We advance
a novel hierarchical active inference model clarifying how the HC - mPFC
circuit enables the resolution of spatial alternation tasks, by merging
physical and task-space cognitive maps. Through a series of simulations, we
demonstrate that the model's dual layers acquire effective cognitive maps for
navigation within physical (HC map) and task (mPFC map) spaces, using a
biologically-inspired approach: a clone-structured cognitive graph. The model
solves spatial alternation tasks through reciprocal interactions between the
two layers. Importantly, disrupting inter-layer communication impairs difficult
decisions, consistent with empirical findings. The same model showcases the
ability to switch between multiple alternation rules. However, inhibiting
message transmission between the two layers results in perseverative behavior,
consistent with empirical findings. In summary, our model provides a
mechanistic account of how the HC - mPFC circuit supports spatial alternation
tasks and how its disruption impairs task performance.
