Spontaneous memory replay during sleep is crucial for cognition but challenging to capture because distinct sleep rhythms hinder the generalization of wake-trained electroencephalogram (EEG) decoders. To address this, we developed the Sleep Interpreter (SI), which uses neural contrastive learning to isolate shared semantic content from background rhythms. We collected a dataset of 135 participants undergoing targeted reactivation of 15 semantic categories, yielding approximately 1,000 h of overnight sleep and 400 h of wake EEG. During non-rapid eye movement (NREM) sleep, SI achieved high decoding accuracy for cue-evoked semantic responses, with accuracy peaking during slow oscillation and spindle coupling at 40.02% top-1 accuracy on unseen participants (chance 6.7%). We demonstrated SI generalizability in two independent nap experiments involving targeted and spontaneous reactivation, where decoded reactivations correlated with post-sleep memory performance. Finally, we implemented SI for real-time sleep staging and stage-specific NREM and REM decoding. The dataset and codebase are shared as open resources for future clinical applications.
Journal article
2026-04-17T00:00:00+00:00
EEG, contrastive learning, replay, sleep, slow oscillation