SleepMaMi: A Universal Sleep Foundation Model for Integrating Macro- and Micro-structures
Abstract
While the shift toward unified foundation models has revolutionized many deep learning domains, sleep medicine remains largely restricted to task-specific models that focus on localized micro-structure features. These approaches often neglect the rich, multi-modal context of Polysomnography (PSG) and fail to capture the global macro-structure of a full night's sleep. To address this, we introduce SleepMaMi, a Sleep Foundation Model engineered to master both hour-long sleep architectures and fine-grained signal morphologies. Our framework utilizes a hierarchical dual-encoder design: a Macro-Encoder to model full-night temporal dependencies and a Micro-Encoder to capture short-term characteristics from biosignals. Macro-Encoder is trained via Demographic-Guided Contrastive Learning, which aligns overnight sleep patterns with objective subject metadata, such as age and sex, to refine global representations. Micro-Encoder is optimized via a hybrid Masked Autoencoder (MAE) and multi-modal contrastive objective. Pre-trained on a massive corpus of >20,000 PSG recordings (158K hours), SleepMaMi outperforms or matches existing foundation models across a diverse suite of downstream tasks, demonstrating superior generalizability and label-efficient adaptation for clinical sleep analysis.
Lay Summary
Every night, our bodies generate a rich symphony of signals—including brain waves, heart rhythms, and breathing patterns. While doctor-scored sleep tests are the gold standard for diagnosing sleep disorders, analyzing them is incredibly time-consuming. Traditional AI tools try to help, but they often suffer from tunnel vision, focusing only on a few seconds of data at a time while missing the bigger picture of a full night's rest. To fix this, we created SleepMaMi, an advanced AI model that looks at sleep from both a microscope and a telescope. It simultaneously studies tiny, second-by-second changes and hour-long sleep patterns. By training SleepMaMi on over 20,000 sleep recordings, it learned how healthy sleep naturally changes with age, sex, and body type. SleepMaMi can catch breathing disruptions instantly and even help predict long-term health risks, marking a major step toward smarter, personalized health tracking.