Abstract
Episodic memory, the ability to rapidly learn and explicitly remember past events and experiences, plays a critical role in children's academic learning and knowledge acquisition. The formation of lasting memories relies on the brain's ability to dynamically organize its activity. How these neural configurations unfold moment-by-moment across encoding and offline phases remains poorly understood. To probe these dynamics, we applied a novel Bayesian Switching Dynamic Systems approach, a hidden Markov model with automatic state detection, to fMRI data from children performing scene encoding followed by an offline post-encoding rest. We identified four distinct brain states during encoding with unique activation modes between visual, medial temporal lobe, and frontoparietal and default mode network nodes. An "active-encoding" state with integrated visual-hippocampal and frontoparietal activity dominated encoding and predicted individual memory performance, while an inactive state negatively predicted performance. State transition dynamics revealed that flexible shifts into the active-encoding state enhanced memory formation, whereas transitions toward inactive states impaired it, demonstrating that memory success depends on dynamic neural flexibility. Critically, encoding states spontaneously reemerged during post-encoding rest. A "default-mode" state characterized by enhanced default mode network activity showed sustained maintenance during rest and robustly predicted memory outcomes, an effect specific to post-encoding, not pre-encoding rest. These findings establish that episodic memory emerges from coordinated brain state sequences bridging online encoding with offline consolidation, providing a computational framework for how moment-to-moment neural dynamics support memory formation in children. This work has broad implications for optimizing educational interventions and understanding developmental disorders affecting learning and memory.