REVIEW 4 major objections 5 minor 15 references
SleepMaMi is a foundation model that explicitly encodes both fine-grained signal morphology and whole-night sleep macro-architecture, and the paper reports it outperforms prior time-series and sleep foundation models on sleep staging, sleep
Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →
T0 review · deepseek-v4-flash
2026-08-03 03:31 UTC pith:5Z7TEEWF
load-bearing objection Solid engineering, but the macro-encoder's gains look like a demographic shortcut; the central claim of encoding sleep macro-structure needs a control. the 4 major comments →
SleepMaMi: A Universal Sleep Foundation Model for Integrating Macro- and Micro-structures
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
On the paper's own terms, the central discovery is that sleep representations improve when a foundation model is trained to be aware of sleep macro-structure, not just local signal micro-structure. The Micro-Encoder learns per-modality and cross-modal features through a hybrid of masked autoencoding and multi-modal contrastive learning, while the Macro-Encoder — a bi-directional Mamba (a linear-time state-space sequence architecture) — consumes the full sequence of epoch-level embeddings and is aligned by Demographic-Guided Contrastive Learning: soft-target contrastive loss over 90-minute intervals whose similarity weights come from a demographic distance based on z-scored age and BMI plus a
What carries the argument
The load-bearing machinery is the hierarchical dual-encoder and its Demographic-Guided Contrastive Learning (DGCL) objective. The Micro-Encoder uses a private-shared transformer with patch merging and a mixture-of-experts shared encoder; it is trained with a 50% masking ratio under a masked autoencoder (MAE) reconstruction loss plus a contrastive loss that treats different modalities within the same 30-second timeslot as positive pairs and uses temporal and representation negatives to disentangle modalities. The Macro-Encoder runs bi-directional Mamba layers (a linear-time state-space architecture) over the Micro-Encoder's epoch embeddings, partitioning each night into 90-minute ultradian-cy
Load-bearing premise
The load-bearing premise is that the scalar distance between two subjects' z-scored age and BMI plus a fixed sex penalty genuinely tracks how similar their full-night sleep macro-architectures are; if that mapping is wrong, DGCL aligns the Macro-Encoder to demographic grouping rather than to sleep structure.
What would settle it
Train the Macro-Encoder with permuted demographic labels (age, sex, BMI shuffled across subjects) while keeping everything else fixed. If the reported downstream gains persist, the DGCL objective is not causing them; if they vanish, demographic alignment is the active ingredient. Alternatively, compute the actual similarity of two subjects' sleep-stage sequences (e.g., dynamic time warping over stage proportions per cycle) and compare it to the Eq. (5) demographic distance: if similar demographics frequently correspond to dissimilar night profiles, the supervision signal is a weak proxy.
If this is right
- If correct, sleep foundation models no longer need to choose between local and global views: a single pretrained network can handle both one-second apnea-hypopnea segmentation and whole-night sleep staging, with the Macro-Encoder adding measured gains (e.g., 81.9% vs 79.8% staging accuracy, 8.40 vs 9.69 AHI MAE in the paper's Table 4).
- Objective demographic metadata (age, sex, BMI) can serve as a scalable, label-free supervision signal for long-sequence pretraining, sidestepping inter-scorer variability in expert sleep labels.
- The few-shot results imply large-scale pretraining with MAE + DGCL transfers to new hardware and populations with very little labeled data (52.5% accuracy from one training sample on an unseen dataset), making clinical deployment in data-poor settings more feasible.
- A macro-structure-aware foundation can support subject-level predictions such as disease risk, as demonstrated by Cox proportional-hazards C-indexes comparable to a specialized disease-prediction model, raising the prospect of PSG-based screening built on a single model.
Where Pith is reading between the lines
- Inference: The demographic distance in Eq. (5) is a hand-defined scalar; a likely extension is to replace it with a learned or higher-dimensional similarity (e.g., adding AHI, comorbidities, or aging trajectories), which could make DGCL capture clinical macro-architecture rather than just demographics.
- Inference: If the macro-encoder is the true source of gains, then the same DGCL technique should improve any sequence-level encoder for sleep (not just this architecture); this cross-architecture transfer is a natural testable consequence the paper does not run.
- Inference: DGCL embeds demographic attributes directly into the subject representation, so downstream tasks like disease prediction may inherit demographic biases; subgroup fairness and calibration analyses are a natural next step the paper leaves implicit.
- Inference: The paper notes a hardware distribution shift reduces staging accuracy on the KISS dataset; coupling DGCL pretraining with multi-hardware augmentation or domain adaptation is a plausible path to closing that gap.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces SleepMaMi, a sleep foundation model with a dual-encoder architecture: a Micro-Encoder (private–shared transformers trained with masked autoencoding and multi-modal contrastive learning) that captures fine-grained signal morphology, and a Macro-Encoder (bidirectional Mamba) that models full-night temporal structure using Demographic-Guided Contrastive Learning (DGCL), where the similarity target is a hand-defined demographic distance based on age, sex, and BMI. The model is pretrained on 20,964 PSG recordings (158,028 hours) and evaluated on sleep staging, SDB segmentation, disease prediction, and few-shot adaptation, with ablations supporting the contribution of each pretraining component.
Significance. If the central claims hold, SleepMaMi would be a valuable contribution: it is one of the largest sleep pretraining efforts, the architecture is clearly specified, the ablations (Table 11) support the incremental value of MAE, CL, large-scale pretraining, and DGCL, and the use of public datasets makes the work reproducible in principle. However, the load-bearing evidence that DGCL encodes sleep macro-structure rather than demographic shortcuts is not established, the broad 'outperforms existing foundation models' claim is contradicted by Table 1 for KISS, and the comparisons lack statistical grounding. The core idea is defensible and the issues are addressable, but the manuscript in its current form overstates its evidence.
major comments (4)
- [Abstract and §4.1.1, Table 1] The abstract and conclusion claim SleepMaMi 'outperforms existing foundation models' without qualification, but Table 1 shows MOMENT-Base exceeds SleepMaMi on KISS sleep staging by 7 percentage points (69.8 vs 62.8). The text in §4.1.1 acknowledges this and offers a hardware-shift hypothesis, but the unqualified framing remains in the abstract and conclusion. This is load-bearing for the 'universal' and 'superior generalizability' claims. Please qualify the claims to 'outperforms on several tasks' and discuss the KISS failure case, or add additional datasets supporting the global claim.
- [§3.2, Eqs. (4)–(5) and Table 4] DGCL directly supervises interval embeddings with the demographic distance d_ij (age/BMI z-score difference plus sex penalty). Table 4 then attributes improvements in sex classification and age regression to the Macro-Encoder — but these are the very attributes used as pretraining supervision, so those gains are circular. Sleep staging and AHI estimation are also strongly confounded with age, sex, and BMI, so the observed gains do not demonstrate encoding of macro-structure. I request control experiments: (i) shuffle demographic labels during DGCL pretraining, (ii) compare against a linear probe on raw demographics alone, and (iii) validate d_ij against a pairwise macro-architecture similarity (e.g., full-night stage-distribution distance). Without these, the claim that DGCL captures sleep macro-structure rather than demographic grouping is unsupported.
- [Tables 1–4 and Figure 5] All performance comparisons are reported as point estimates with no error bars, multiple seeds, or significance tests. For linear probing, run-to-run variation is often nontrivial, so differences such as SHHS1 staging 81.9 vs 79.4 or disease C-indices that differ by <0.02 cannot be evaluated. Figure 5 (few-shot) shows single curves with no variance, and it is unclear whether 'Number of Samples' refers to epochs, subjects, or something else. Please report mean±std over at least three seeds and clarify the few-shot sampling procedure.
- [§4.1, baseline selection] The baselines are limited to other foundation models (MOMENT, UniTS, SleepFM-Disease). No strong task-specific supervised models (e.g., U-Sleep, XSleepNet, SeqSleepNet) are included. For a paper claiming 'universal' and 'label-efficient adaptation for clinical sleep analysis,' it is necessary to show that the linear-probe or fine-tuned embeddings are competitive with state-of-the-art supervised systems on at least sleep staging and SDB segmentation. Without such context, the practical significance of the foundation-model representation is unclear.
minor comments (5)
- [Abstract] The abstract contains both 'outperforms or matches' and 'outperforms existing foundation models'; the latter is inconsistent with Table 1. Please unify the wording and qualify the claim.
- [Figure 5] The x-axis labels read '1510 20 30 50 90'; this appears to be a typo for 1, 5, 10, 20, 30, 50, 90. Fix the tick labels.
- [Figure 6 and Figure 10 captions] 'U-MAP' should be 'UMAP' (the standard name of the algorithm).
- [§D.1, Tables 11–12] Table 11 experiments 4–5 use the full pretraining corpus, while Table 12 states 'DGCL is only done for the training split of SHHS1.' Clarify which pretraining setup each table refers to, and whether experiment 5 in Table 11 includes PHY (which lacks BMI and is excluded from Macro-Encoder pretraining in Appendix C).
- [Eq. (4)] The denominator sums over k=1..K subjects, but the loss is summed over pairs i≠j. It would help to define whether K includes i and j, and to explain how the per-pair weight w_ij normalizes across pairs in the batch.
Circularity Check
DGCL validation is partly self-referential: Sex/Age 'predictions' are the pretraining targets, though main benchmarks remain independent.
specific steps
-
fitted input called prediction
[Section 3.2, Eqs. (4)-(5); Section 4.3, Table 4]
"di,j = (|agei −agej|+|BMIi −BMIj|)/2 +λsex (5) ... Micro-Encoder only: Sleep stage 79.8, Sex 80.1, Age 9.45, AHI 9.69; SleepMaMi: Sleep stage 81.9, Sex 88.2, Age 6.73, AHI 8.40"
Eq. (4)-(5) train the Macro-Encoder by pulling interval embeddings together according to a demographic distance defined solely from age, BMI, and sex. The Sex and Age rows of Table 4 are linear probes for exactly those same attributes. Their improvement is therefore a check that the pretraining objective was optimized, not independent evidence that the encoder learned sleep macro-structure. Presenting these rows as 'validating the effectiveness of DGCL in incorporating sleep macro-structure' is self-referential: the predicted labels are, by construction, the supervision signal.
-
self definitional
[Section 4.4, Figure 6]
"The visualization reveals clear clustering based on demographic attributes, with subjects of similar age and sex residing closely within the embedding space. This distinct separation confirms that our DGCL framework successfully maps demographic characteristics into the latent space, providing the model with a grounded, subject-aware context for sleep analysis."
The demographic clustering is the direct result of a loss that was defined to minimize demographic distance (Eq. 4-5). Observing demographic clustering in the embeddings is equivalent to confirming that training minimized its own objective; it cannot independently confirm that the representation captures global sleep architecture. The paper presents this tautology as validation of the macro-structure encoding.
full rationale
The core foundation-model claims are mostly supported by independent evaluation: the Micro-Encoder uses self-supervised MAE and contrastive learning, and the main downstream benchmarks (sleep staging, SDB segmentation, disease prediction) are compared against external baselines and do not reduce to the DGCL objective. No load-bearing self-citation chain or imported uniqueness theorem appears. However, the paper's evidence that the Macro-Encoder captures sleep macro-structure is partially circular. DGCL explicitly supervises embeddings with a distance built from age, BMI, and sex (Eq. 5), so the improved Sex classification and Age regression in Table 4 are expected by construction rather than novel evidence of macro-structural representation. The U-MAP demographic clustering in Figure 6 is likewise a tautological confirmation of the training objective. The remaining Table 4 tasks (sleep staging, AHI) are correlated with the same demographics, so the gains could partly reflect demographic shortcutting, though this is a confound rather than strict equivalence to the pretraining inputs. Overall, the central multi-task foundation-model result remains non-circular, but the macro-encoder validation is partly self-referential, warranting a moderate score of 4.
Axiom & Free-Parameter Ledger
free parameters (5)
- lambda_sex =
1
- cycle_length =
90 minutes (180 epochs)
- DGCL temperatures rho and upsilon =
rho=0.1, upsilon=0.5
- Micro-Encoder loss weights and contrastive temperature =
lambda_CL=0.1, lambda_KoLeo=0.01, tau=0.07
- mask_ratio =
50%
axioms (6)
- domain assumption Age, sex, and BMI are primary determinants of sleep macro-architecture.
- domain assumption Demographic metadata are objective and noise-free supervisory signals.
- domain assumption Mamba/SSM layers can model full-night temporal dependencies effectively.
- domain assumption 90-minute ultradian cycle partition is a valid universal segmentation of sleep.
- domain assumption Self-supervised pretraining on large PSG corpora transfers to downstream tasks.
- standard math Linear probing of frozen features is a meaningful measure of representation quality.
read the original 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, sex and BMI 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 state-of-the-art existing foundation models across a diverse suite of downstream tasks, demonstrating superior generalizability and label-efficient adaptation for clinical sleep analysis.
Figures
Reference graph
Works this paper leans on
-
[5]
Lepikhin, D., Lee, H., Xu, Y ., Chen, D., Firat, O., Huang, Y ., Krikun, M., Shazeer, N., and Chen, Z. Gshard: Scaling giant models with conditional computation and automatic sharding.arXiv preprint arXiv:2006.16668,
Pith/arXiv arXiv 2006
-
[7]
Spreading vectors for similarity search.arXiv preprint arXiv:1806.03198,
Sablayrolles, A., Douze, M., Schmid, C., and J ´egou, H. Spreading vectors for similarity search.arXiv preprint arXiv:1806.03198,
-
[10]
R., Moore, H., Ganjoo, G., Mignot, E., and Zou, J
Thapa, R., He, B., Kjaer, M. R., Moore, H., Ganjoo, G., Mignot, E., and Zou, J. Sleepfm: Multi-modal repre- sentation learning for sleep across brain activity, ecg and respiratory signals.arXiv preprint arXiv:2405.17766,
-
[11]
Datasets The brief description of the datasets used for this research is provided below
11 SleepMaMi: A Universal Sleep Foundation Model for Integrating Macro- and Micro-structures A. Datasets The brief description of the datasets used for this research is provided below. Table 5 provides the summary statistics extracted from each dataset used for pretraining. Table 6 provides the summary statistics from the data not used for pretraining, bu...
2018
-
[1997]
This study consists of data collected over two visits
is a multicenter cohort initiative organized by the National Heart, Lung, and Blood Institute. This study consists of data collected over two visits. SHHS1 was collected from the initial visit, conducted between 1995 and 1998, which involved 6,441 men and women aged 40 and older. SHHS2 was collected from the second visit, conducted between 2001 and 2003, ...
1995
-
[2009]
Dao, T. Flashattention-2: Faster attention with bet- ter parallelism and work partitioning.arXiv preprint arXiv:2307.08691,
-
[2011]
The study was conducted between December 2003 and March 2005, during which 3,135 participants from the parent MrOS cohort of 5,994 men completed overnight unattended in-home PSG
is a multicenter sleep cohort of older men (aged 65 years or older) that includes unattended in-home polysomnography (PSG), which was set up by trained technicians and annotated using standardized scoring procedures. The study was conducted between December 2003 and March 2005, during which 3,135 participants from the parent MrOS cohort of 5,994 men compl...
2003
-
[2012]
B., Brooks, R., Gamaldo, C., Harding, S
Berry, R. B., Brooks, R., Gamaldo, C., Harding, S. M., Lloyd, R. M., Quan, S. F., Troester, M. T., and Vaughn, B. V . Aasm scoring manual updates for 2017 (version 2.4),
2017
-
[2015]
As part of Exam 5 (2010–2013), the MESA Sleep exam enrolled 2,237 participants who completed single-night unattended in-home polysomnography (PSG) and wrist actigraphy
is a multicenter cohort of 6,814 adults aged 45–84 years from four racial/ethnic groups (White, Black, Hispanic, and Chinese-American). As part of Exam 5 (2010–2013), the MESA Sleep exam enrolled 2,237 participants who completed single-night unattended in-home polysomnography (PSG) and wrist actigraphy. PSG was set up during an in-home evening visit by tr...
2010
-
[2017]
Oord, A. v. d., Li, Y ., and Vinyals, O. Representation learn- ing with contrastive predictive coding.arXiv preprint arXiv:1807.03748,
-
[2018]
Glu variants improve transformer.arXiv preprint arXiv:2002.05202,
Shazeer, N. Glu variants improve transformer.arXiv preprint arXiv:2002.05202,
Pith/arXiv arXiv 2002
-
[2019]
Deepsleepnet: A model for automatic sleep stage scoring based on raw single-channel eeg.IEEE Transactions on Neural Sys- tems and Rehabilitation Engineering, 25(11):1998–2008,
Supratak, A., Dong, H., Wu, C., and Guo, Y . Deepsleepnet: A model for automatic sleep stage scoring based on raw single-channel eeg.IEEE Transactions on Neural Sys- tems and Rehabilitation Engineering, 25(11):1998–2008,
1998
-
[2023]
Collected between 2013 and 2020 across four sleep centers, the dataset utilizes recordings from Embla and NOX-A1 PSG systems, totaling 10,253 records
is a standardized, image-based polysomnography (PSG) repository. Collected between 2013 and 2020 across four sleep centers, the dataset utilizes recordings from Embla and NOX-A1 PSG systems, totaling 10,253 records. Expert scoring was conducted in accordance with AASM version 2.6 guidelines (Berry, 2012; Berry et al., 2017). Each record captures 21 distin...
2013
-
[2024]
H., and Thorey, V
Guillot, A., Sauvet, F., During, E. H., and Thorey, V . Dreem open datasets: Multi-scored sleep datasets to compare human and automated sleep staging.IEEE Transactions on Neural Systems and Rehabilitation Engineering, 28 (9):1955–1965,
1955
-
[2025]
ISBN 9798400711299. URL https://doi.org/10. 1145/3680207.3765693. Jeong, J., Yoon, W., Lee, J.-G., Kim, D., Woo, Y ., Kim, D.-K., and Shin, H.-W. Standardized image-based polysomnography database and deep learning algorithm for sleep-stage classification.Sleep, 46(12):zsad242,
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.