Abstract
Our ability to generalize abstract rules to new situations is a cognitive hallmark, yet its neural basis is unclear. We identified a thalamocortical circuit essential for this process in mice. During a cross-modal rule transfer task, medial prefrontal cortex (mPFC) neurons encoded task rules across sensory modalities to enable generalization. Crucially, mediodorsal thalamus (MD) projections to mPFC were causally required: Inhibiting this pathway destabilized mPFC representations and impaired rule transfer, whereas enhancing it improved performance. Without MD input, mPFC recruited distinct populations for each task, losing cross-context stability. Direct mPFC excitation impaired generalization, underscoring the specificity of thalamic regulation. Thus, the MD stabilizes mPFC activity for flexible rule transfer-a mechanism with implications for cognitive disorders and artificial intelligence.