论文 · 建模 / 计算研究
AnySleep:一种跨通道的深度学习系统,用于多中心队列中的高分辨率睡眠分期
AnySleep: a channel-agnostic deep learning system for high-resolution sleep staging in multi-center cohorts
作者:Niklas Grieger, Jannik Raskob, Siamak Mehrkanoon, Stephan Bialonski
NPJ Digit Med · 2026年10月30日 · Grieger 等 4 位作者
不需要生物学背景,多打比方
正在阅读全文并生成讲解…
已等待 0 秒大约需要 10–20 秒
可以先看别的,做好了会自动出现在这里。
这篇还没有动画
动画会把研究的流程、作用机制和关键结果一步一步演示出来,每一步都标明出自原文哪里。制作大约需要一两分钟。
摘要Abstract
Sleep is essential for health, yet studying its dynamics requires manual sleep staging, a labor-intensive step in research and clinical care. Across centers, polysomnography (PSG) recordings are traditionally scored in 30-s epochs for pragmatic, not physiological, reasons and vary in electrode count, montage, and subject characteristics. These constraints challenge harmonized multi-center studies and the discovery of robust biomarkers on shorter timescales. We present AnySleep, a deep neural network that scores sleep from any electroencephalography (EEG) or electrooculography (EOG) data at adjustable temporal resolutions. We trained and validated the model on over 20,000 overnight recordings (>200,000 h of EEG and EOG) from 28 datasets across multiple clinics to promote robust generalization across sites. The model attains state-of-the-art performance and surpasses or equals established baselines at 30-s epochs. Performance improves with more channels, yet remains strong when EOG is absent, or only EOG or single EEG derivations (frontal, central, or occipital) are available. On sub-30-s timescales, the model captures short wake intrusions consistent with arousals and improves the prediction of pathophysiological conditions (obstructive sleep apnea, narcolepsy type 1, insomnia) over 30-s scoring. We make the model publicly available to facilitate large-scale studies with heterogeneous electrode setups and accelerate biomarker discovery in sleep.
引言Introduction
Sleep carries diagnostic and prognostic value across a wide range of conditions, from sleep disorders to cardiometabolic, psychiatric, and neurodegenerative diseases. In clinical practice and research, extracting this information usually requires overnight polysomnography (PSG) and expert annotations (sleep staging), which is work-intensive, costly, and subject to significant inter-rater variability. Moreover, sleep dynamics have traditionally been analyzed based on 30-s epochs, a convention originating from the practical constraints of manual annotation on paper strips rather than from any underlying physiological rationale. This approach has long served as the foundation for sleep research, yet sleep unfolds at temporal resolutions much finer than can be captured by 30-s windows. This is particularly evident in gradual sleep state transitions, which may pass through short intermediate “substages”, or in brief disruptions caused by micro-sleep or micro-arousals. The latter occur on the scale of seconds and play a critical role in various sleep disorders, including REM sleep behavior disorder (RBD), obstructive sleep apnea (OSA), and insomnia.
Large-scale studies with shorter timescale annotations would, therefore, be valuable for gaining a deeper understanding of sleep dynamics and discovering novel biomarkers. Yet, despite the availability of large amounts of raw PSG data, conducting large-scale studies based on expert annotations is practically infeasible, as the time and effort required for manual scoring increases substantially with the frequency of annotations. At the same time, empirical studies have demonstrated that shorter annotations lead to increased inter-rater variability, although it has been hypothesized that shorter epochs could reduce disagreements by decreasing the number of ambiguous transition epochs.
Automated sleep staging models based on machine learning offer a potential solution to these limitations. These models can quickly and cost-effectively provide sleep annotations at high resolution even when trained with conventional 30-s labels (e.g., via shorter input windows, high-resolution feature maps, segmentation architectures, or sliding-window methods that generate overlapping predictions per 30-s window). Yet, adapting these models for large-scale studies requires a combination of robust generalization across cohorts and clinics, as well as flexible handling of heterogeneous montages. Furthermore, models should be able to provide sleep stage predictions at configurable resolutions, which is essential for studying sleep dynamics across a wide range of timescales. While recent work has made progress on these aspects individually or in pairs, including generalization, robustness to varying channel configurations, and flexible high-resolution predictions, a single approach combining all three capabilities remains an open problem.
Among recent models, U-Sleep comes closest to meeting these requirements, providing sleep stage predictions at adjustable temporal resolutions of up to 128 Hz and showing robust generalization across datasets. However, U-Sleep’s practical utility is limited by its deliberately fixed input modality and channel requirements (one EEG and one EOG channel in the original version, single channels in later developments), which does not natively support integration of heterogeneous multi-channel configurations encountered in large-scale studies. Restricting inputs to one or two channels also limits the spatial resolution across the scalp, which does not reflect the recommendations of the American Academy of Sleep Medicine (AASM) to use at least three EEG channels placed at frontal, central, and occipital regions of the scalp, as well as EOG and EMG channels for sleep scoring. Although these recommendations were developed for human scoring, empirical evidence suggests that automated systems likewise benefit from access to additional channels. To enable U-Sleep to handle more than two channels, it was proposed to evaluate recordings multiple times with different channel combinations and to aggregate the resulting predictions by majority vote, a post-hoc strategy that can serve as a pragmatic workaround but lacks an explicit mechanism for learning complex cross-channel relationships and scales poorly as channel counts increase.
In this work, we introduce AnySleep, a deep neural network that can dynamically combine any available EEG or EOG channels to score sleep at flexible temporal resolutions. We trained and validated the model on 20,589 overnight recordings from 28 datasets spanning multiple centers, recording setups, and patient populations, and assessed generalization on datasets from studies not used during training. We evaluated AnySleep at conventional 30-s epochs across diverse channel configurations, including cases with missing EOG or EEG channels, and examined how performance depended on the number of available channels. At shorter timescales, we studied whether AnySleep’s high-resolution predictions could represent short sleep events, such as arousals, and whether they provide micro-architectural information useful for distinguishing between healthy controls and patients with obstructive sleep apnea (OSA), narcolepsy type 1 (NT1), or insomnia. AnySleep’s ability to characterize sleep dynamics at short timescales and across heterogeneous montages makes it a promising tool with the potential to accelerate the discovery and validation of novel biomarkers.
Results / Datasets and model training
We trained and evaluated AnySleep on an extensive collection of 28 datasets comprising 20,589 overnight recordings (≈200,000 h of EEG/EOG data). These datasets cover a wide range of recording conditions, including different clinics, recording setups, patient populations, and experts. We divided the datasets into two groups: an in-distribution group of 13 datasets and a hold-out group of 15 datasets (see Section “Data”). While the in-distribution group served as the basis for model training and validation, the hold-out group was solely used for testing and split into subsets for traditional 30-s sleep staging (8 datasets) and high-resolution analysis (7 datasets). By isolating the hold-out group from the training process, we aimed to obtain a realistic measure of our model’s ability to generalize to new datasets from other studies and clinics. To enable comparisons between AnySleep’s and U-Sleep’s scoring performance, our data splits closely followed those used by U-Sleep.
The design of AnySleep blends two architectural concepts: a U-Net-inspired encoder-decoder architecture that allows for high-frequency sleep staging, and channel-attention modules that enable the model to handle variable numbers and choices of EEG and EOG channels (see Section “Model”). In brief, each input channel is first processed by successive encoder blocks to yield channel-specific feature maps at increasing levels of abstraction. Channel-attention modules then combine a variable number of these channel-specific feature maps into cross-channel representations based on learnable attention weights that specify each channel’s relevance to the sleep staging task. The cross-channel representations are passed to the decoder branch of the architecture, at which end a segment classifier produces sleep stage predictions at configurable frequencies of up to 128 Hz, corresponding to a minimum temporal resolution of about 0.008 s per predicted sleep stage. To encourage robustness to heterogeneous montages, we trained AnySleep while randomly varying both the number and type of input channels (see Section “Training”).
Results / Robustness to channel configurations
We assessed AnySleep’s dependence on channel type, spatial location, and input order by testing the model with different single- and two-channel configurations. Specifically, we evaluated test recordings on all possible single- or two-channel permutations created from the following set of channels: EOG (left or right), F3, F4, C3, C4, O1, and O2 (e.g., F3, F3 & EOG1, EOG1 & F3). For each recording and channel permutation, we predicted 30-s sleep stages and compared these predictions with expert annotations to obtain macro F1 (MF1) scores as measures of model performance. We repeated the same analysis for the U-Sleep model, duplicating the input channel in configurations where AnySleep was evaluated with a single channel to account for U-Sleep’s inability to handle single-channel inputs.
AnySleep showed minimal sensitivity to channel type, spatial location, or input order (see Fig. 1a). Across all two-channel configurations, including those without EOG, macro F1 scores lay in a narrow range (0.726–0.760). Performance remained high under single-channel conditions: the lowest score of 0.710, obtained when only one occipital EEG derivation was provided, was only slightly below the maximum score of 0.760 observed for the best two-channel combinations. In comparison, U-Sleep was originally designed to receive exactly one EEG and one EOG channel, and performance decreased substantially when deviating from this design choice by swapping the order of EEG and EOG channels (average macro F1 decrease of 0.160–0.203; see Fig. 1a). We observed a similar, albeit less severe, decline in performance when replacing the EOG channel with a second EEG channel, particularly a frontal one. This suggests that U-Sleep can partially exploit eye-movement information embedded in frontal EEG that is less pronounced at more posterior sites.
Fig. 1. Robustness of AnySleep and U-Sleep to variations in channel type, order, and number as measured by recording-wise macro F1 scores (higher values indicate better performance). a Performance of AnySleep (upper matrix) and U-Sleep (lower matrix) for two-channel input permutations using EOG and frontal (F3/F4), central (C3/C4), and occipital (O1/O2) EEG channels; diagonal entries correspond to single-channel configurations. Evaluations used all test recordings in the reference montage that contained all investigated channels (563 recordings; see Table S3 for detailed channel overview). b Performance for a varying number of EEG (NEEG) and EOG (NEOG) channels, grouped by the total number of channels. Evaluations were restricted to recordings with at least one EOG and six EEG channels from the test set (643 recordings). For each channel-count condition, we randomly sampled 5000 recordings with replacement and evaluated each on a randomly chosen subset of channels of that size (without replacement). Missing bars reflect U-Sleep’s multi-channel requirement and the experiment’s restriction to six EEG channels. In both panels, evaluations were repeated for three independent training runs, and we report the average scores over recordings and runs. Stars (*) indicate significant (p < 0.01, one-sided t-test) differences in scores between AnySleep and U-Sleep (see (a, b)), or between AnySleep with and without EOG (see (b)).
Next, we investigated how performance depended on the number of input channels (see Fig. 1b). We evaluated AnySleep and U-Sleep on test recordings with random channel subsets containing between one and seven channels, with at most one EOG channel included. Given a recording and a channel subset, we evaluated AnySleep with a single forward pass, while U-Sleep was evaluated on all possible (EOG, EEG) channel pairs (NEEG channels ⋅ NEOG channels runs) with subsequent majority voting. AnySleep’s macro F1 increased with the number of available EEG channels, reaching 0.771 when six EEG and one EOG channels were provided. This trend persisted at even larger channel counts, as observed on the MASS datasets (up to 23 channels) and an additional high-density dataset (85 channels; see Table S5), with no substantial differences between channels represented in the training datasets and those not represented (see Fig. S2). When the EOG channel was omitted and replaced with an additional EEG derivation, performance decreased slightly but consistently, suggesting that an additional modality (EOG) provides more complementary information than adding another EEG channel. Across all tested channel numbers, AnySleep achieved higher macro F1 scores than U-Sleep, which seemed to benefit less from additional EEG channels, likely reflecting AnySleep’s more flexible and dynamic handling of multi-channel input.
Results / High-frequency sleep staging capabilities
Because there is currently no widely adopted standard for expert sleep staging at sub-30-s timescales, we assessed AnySleep’s high-resolution predictions indirectly, asking whether they encode physiologically meaningful information beyond conventional 30-s epochs. Visual inspections suggested that the high-frequency predictions captured transitions between sleep states more accurately than 30-s epochs (e.g., Wake transitions in Fig. 2a at around 23:12:05 and 23:13:30). This was especially evident for arousals, often described as short awakenings, which we investigated by comparing expert-annotated arousals in the held-out MASS C1 and C3 test datasets with Wake predictions of AnySleep at different temporal resolutions. With conventional 30-s predictions, only 7.7% of the total duration of expert-annotated arousal time overlapped with Wake stages (see Fig. 2b), highlighting the difficulty of representing short events like arousals in traditional sleep staging. This overlap increased with the temporal resolution of the sleep stage predictions, peaking at 57.7% at a timescale of around 2 s, and then decreased slightly at even finer timescales (53.1% at around 0.05 s).
Fig. 2. Representation of short arousals in AnySleep’s high-frequency sleep stage predictions on held-out MASS C1 and C3 data. a Three-minute EEG segment from MASS C1. The top panel shows a time-frequency representation (spectrogram), the middle panel the raw EEG trace (C4-CLE, CLE = computed linked-ear), and the bottom panel the corresponding annotations (black line: expert-scored 30-s sleep stages; red line: AnySleep predictions at 3.75-s resolution; colored areas: class probabilities for Wake, REM, N1, N2, N3; green bars: expert-annotated arousals; orange bars: arousals derived from high-resolution Wake predictions; see Section “High-frequency sleep staging capabilities”). b Proportion of total expert-annotated arousal time in MASS C1 and C3 that overlaps with intervals predicted as Wake (dark blue) or non-Wake (orange) by AnySleep, as a function of the temporal resolution of sleep stage predictions. Curves show the mean across three independently trained models; shaded areas indicate the standard deviation across models. c Arousal detection performance in MASS C1 and C3 at different sleep stage resolutions, quantified using intersection-over-union (IoU) precision, recall, and F1 score (0 = no agreement, 1 = perfect agreement) between predicted and expert arousals. A predicted and an expert arousal were counted as matching if their temporal overlap covered at least 20% of their combined duration. Scores were computed per subject for each of three models, then averaged across subjects and models; the shaded area shows the corresponding standard deviation of the IoU F1 score.
To test whether AnySleep indeed learned to represent arousals as short Wake events, we derived candidate arousals in MASS C1 and C3 by identifying contiguous Wake segments of 3–15 s in the model’s predictions (see Fig. 2a; see Section “High-frequency sleep stages” for details). We then compared candidate and expert-annotated arousals using intersection-over-union (IoU) precision, recall, and F1 scores, where 0 indicates no agreement and 1 perfect agreement. Across temporal resolutions, performance was highest for timescales between 2–8 s, with a maximum IoU precision of 0.475, IoU recall of 0.521, and IoU F1 of 0.442 (see Fig. 2c), corresponding to approximately 52.1% of expert-annotated arousals being detected and 47.5% of predicted arousals overlapping with an expert annotation. As expected, IoU scores declined for sleep stage predictions at timescales longer than 8 s, consistent with short arousals typically being missed in 30-s sleep stages. At fine resolutions below 2 s, IoU F1 also decreased, suggesting an increasing level of noise in high-frequency sleep stages.
We next investigated whether high-frequency sleep stages could be used to predict subject-level pathophysiological characteristics, such as the presence of obstructive sleep apnea (OSA), narcolepsy type 1 (NT1), and insomnia. We hypothesized that these characteristics would be reflected in the frequency of rapid transitions between sleep stages, since OSA, NT1, and insomnia have been associated with sleep fragmentation and altered sleep-stage transition dynamics. Following the approach of Perslev et al., we quantified the temporal regularity of sleep by using “triplet features,” defined as counts of sleep stage triplets (si, si+1, si+2) with si ≠ si+1 and si+1 ≠ si+2. Varying the resolution of the underlying sleep stage predictions, we calculated the absolute number of these triplets for the subjects of different cohorts and then trained random forest (RF) classifiers to distinguish patients from healthy controls (see Section “High-frequency sleep stages”). Specifically, we trained separate models to distinguish healthy controls from: (i) patients with obstructive sleep apnea (OSA) in the DODO and DODH datasets, (ii) patients with narcolepsy type 1 (NT1) in the CNC, DHC, FHC, IHC, KHC, and SSC datasets, and (iii) patients with insomnia in the CAP dataset.
Compared with conventional 30-s staging, AnySleep’s high-frequency sleep stage predictions allowed the RF classifiers to better discriminate between patients and healthy controls across all three disorders (see Fig. 3). The best performances were achieved for timescales between 0.1–1.0 s, with MF1 scores of 0.91, 0.86, and 0.82 for the classifications of OSA, NT1, and insomnia, respectively. Consistent with our findings for arousal detection, performance declined slightly when the temporal resolution was further increased.
Fig. 3. Prediction of sleep disorders from triplet features derived from AnySleep’s high-frequency sleep stages at different timescales on held-out test datasets. a–c show macro F1 scores (MF1s) of random forest (RF) classifiers predicting the presence (yes vs no) of obstructive sleep apnea (25 healthy controls from DODH and 55 patients from DODO), narcolepsy type 1 (395 healthy controls and 260 patients from the CNC, DHC, FHC, IHC, KHC, and SSC datasets), and insomnia (9 insomnia patients and 16 healthy controls from the CAP dataset), respectively. For each timescale and disorder in (a–c), 50 RF models were trained on features derived from each of three independent AnySleep training runs (150 RF models in total); the blue line and blue shaded area show mean score and standard deviation across these models.
To better understand which sleep-transition patterns were most informative for distinguishing patients from healthy controls, we examined the triplets most consistently selected by the classifiers at the temporal resolution that performed best for each disorder (see Section “High-frequency sleep stages”). For OSA, the triplets N2 → Wake → N2 and REM → N2 → REM were among the most influential, consistent with pronounced sleep fragmentation and the general vulnerability of non-REM and REM sleep associated with the disorder. We also found that the triplet N2 → N3 → N2 was often selected, which may reflect altered NREM sleep dynamics contributing to the distinction between OSA patients and healthy controls. For NT1, transitions between REM and wakefulness (e.g., Wake → N1 → REM, N2 → Wake → REM, REM → Wake → N1, REM → Wake → REM) were highly influential, consistent with hypothesized nocturnal SOREMPs and generally altered REM sleep. Additionally, the influence of the triplet Wake → N3 → Wake may reflect broader sleep instability in NT1. For insomnia, we found triplets such as Wake → N2 → Wake, N1 → Wake → N2, and N2 → Wake → N2 were most informative, in line with previously reported NREM instability in insomnia patients.
Results / Channel-attention patterns
AnySleep’s flexibility with respect to varying input channel configurations is supported by channel-attention modules, which learned to assign an attention weight to each available channel. We analyzed these weights to characterize the model’s channel-selection strategy. For this analysis, we considered test recordings that contained the left EOG and F3, C3, O1 channels in referential montage to maximize the amount of included recordings (614 recordings in total). Each recording was passed through the trained model, and the attention weights assigned to each channel were extracted from all 13 channel-attention modules located at different depths of the U-Net-inspired architecture (see Section “Model”). For every channel and module, we then averaged the attention weights over all evaluated recordings.
We observed varying patterns between the attention modules, with the model focusing on different channels and modalities at different depths (i.e., feature abstraction levels; see Fig. 4). Interestingly, attention patterns differed between training runs, making it unlikely that channel preferences at a given depth are rigidly determined by the receptive field or the characteristic timescale at that depth (for example, targeting a specific frequency band). This variability is consistent with the stochastic nature of model training, including random weight initialization and stochastic sampling of training epochs and input channels (see Section “Training”). Despite the differences in attention patterns, the three training runs achieved similar test performance (see Table 1), indicating that comparable predictive performance can arise from different channel-weighting preferences. Nevertheless, two trends were consistent across runs. First, deeper modules sometimes concentrated most of their weight on a single channel, with average weights of up to 88%, demonstrating that the model can reliably identify particularly informative modalities or brain regions across recordings. Second, averaging attention across all modules produced similar mean weights for all four channels, which suggests that AnySleep integrates information from all available EEG and EOG channels rather than relying on a single modality or channel to achieve optimal performance.
Fig. 4. Attention weights assigned to the left EOG and EEG F3, C3, and O1 channels by AnySleep’s channel-attention modules (columns 1–13). Heatmaps show average weights over test recordings containing all four channels in a referential montage. The three panels correspond to independent training runs; the rightmost column ("avg.'') shows the mean weight per channel across all modules.
Table 1. Model performance of U-Sleep and AnySleep with different placements of the channel-attention modules on the in-distribution and hold-out test sets, quantified by macro F1 scores
Results / Impact of channel-attention placement
The channel-attention modules that allow AnySleep to handle variable channel combinations can be placed at different network depths (see Section “Model”). Network layers before these modules operate on individual channels, whereas layers following them operate on the combined, cross-channel features. Consequently, placing channel-attention modules at the start of the network architecture biases the model towards cross-channel features, whereas placing them near the end of the model emphasizes channel-wise features. In the baseline AnySleep configuration, we located the attention modules mid-network to balance these two extremes. To gain a better understanding of this design choice, we implemented two variants: early fusion and late fusion, in which the intermediate channel-attention modules were replaced by a single module at the beginning or end of the network, respectively.
We compared AnySleep to its early and late fusion variants and to the original U-Sleep architecture. Across the four architectures, the baseline AnySleep model achieved the highest macro F1 scores on most test datasets (see Table 1). On the in-distribution test sets, AnySleep achieved an average macro F1 score of 0.812 (weighted by the number of recordings in each dataset), slightly outperforming late fusion (0.804) and U-Sleep (0.799), while early fusion underperformed on most datasets and attained the lowest average macro F1 score (0.787). Similar trends were observed on the hold-out test sets: AnySleep achieved an average macro F1 of 0.777, compared with 0.774 for late fusion, 0.768 for U-Sleep, and 0.752 for early fusion. All architectures showed modest performance drops from in-distribution to hold-out datasets, providing an empirical estimate of the performance loss to expect when these models are deployed in centers different from those providing the training data. We also observed modest variability between training runs, suggesting that stochastic factors such as training data sampling and weight initialization could influence model performance and could be further controlled through improved training procedures.
讨论Discussion
In this work, we presented AnySleep, a deep neural network that accepts any combination of EEG and EOG channels and produces sleep stage predictions at adjustable temporal resolution. AnySleep was trained on a heterogeneous collection of 13 datasets covering diverse subject populations, clinical centers, and recording setups. On held-out test data from studies not used in training, AnySleep matched or slightly exceeded the state-of-the-art performance of U-Sleep (see Table 1) and achieved scores comparable to other recent models validated on independent cohorts; per-dataset and per-stage results as well as confusion matrices are reported in Tables S1–S2 and Fig. S1. Moreover, sleep metrics derived from AnySleep’s predicted hypnograms were comparable to those derived from U-Sleep’s predictions, with modest mean deviations to expert-derived values for most metrics (see Table S4). The performance of AnySleep was further validated by its ability to match or exceed typical expert–expert agreement (see Fig. S4).
A key property of AnySleep is its ability to handle flexible EEG and EOG channel configurations through channel-attention modules. When evaluated across two-channel permutations, model performance remained stable, and AnySleep maintained strong performance even in single-channel configurations (Fig. 1). Consistent with prior studies, performance improved with additional channels, reflecting the benefit of increased spatial resolution. In contrast, U-Sleep expects a fixed input format of one EEG and one EOG channel, and its performance dropped substantially when the input channels deviated from this configuration (Fig. 1). A recent extension of U-Sleep partially addressed this limitation by reducing the number of required channels to a single EEG or EOG channel. However, when evaluating recordings with more than one EEG and one EOG channel, U-Sleep and its advancements require multiple evaluations of different channels followed by majority voting over the resulting predictions (Fig. 6). While such post-hoc aggregation can, in principle, exploit information from multiple channels, our results indicate that it does not fully substitute for model components explicitly designed to learn cross-channel relationships.
Fig. 6. Number of computational steps required for AnySleep, its two variants, and U-Sleep as a function of the number of EEG and EOG channels. We defined the number of computational steps as the count of individual model components (channel encoders, attention modules, encoder blocks, decoder blocks, and segment classifier) applied to the input data.
Motivated by the hypothesis that post-hoc aggregation underutilizes cross-channel relationships, we assessed how fusing channels at different points in the network affects model performance using two variants of AnySleep. The early fusion variant emphasizes cross-channel features, relying on a small channel-wise feature extractor before combining channels. This configuration performed substantially worse than the original AnySleep architecture (Table 1), suggesting that limited channel-wise capacity impaired the extraction of informative per-channel features and hindered channel combination. The late fusion variant focuses on extracting channel-wise features, combining them only shortly before the final classification layers. This variant outperformed early fusion but did not reach the performance of the baseline AnySleep model (Table 1), indicating that optimal performance requires a balance between channel-specific and cross-channel features. AnySleep achieves this balance by adaptively combining channel information at multiple network depths, which allows the model to shift its focus across channels and modalities at different feature abstraction levels (Fig. 4). Such “gradual” fusion strategies are consistent with the idea that EEG and EOG channels provide complementary information at different temporal and spatial scales. To our knowledge, this is the first study to investigate these strategies for sleep staging models, which have predominantly relied on early or late fusion schemes to handle variable channel configurations.
Beyond handling heterogeneous montages, AnySleep predicts sleep stages at temporal resolutions of up to 128 Hz, which allows the model to capture short-lived sleep events such as micro-arousals that are often obscured in conventional 30-s staging. Consistent with the literature, we found that expert-annotated micro-arousals, typically described as short and sudden awakenings, were rarely represented as Wake in standard 30-s epoch scoring (Fig. 2b). As we increased the temporal resolution of the predicted stages, the proportion of expert-annotated arousals that aligned with Wake predictions increased, indicating that AnySleep’s high-frequency outputs encode these brief events. A simple rule-based detector applied to these predictions identified up to 52.1% of expert-annotated arousals, with a maximum IoU F1 score of 0.442, and achieved optimal performance for timescales of 2–8 s, which aligns with typical arousal durations of 3–15 s. Repeating this analysis with U-Sleep yielded qualitatively similar results (with predictions identifying up to 50.2% of expert-annotated arousals), suggesting that sensitivity to arousals is a broader property of high-resolution sleep staging. AnySleep extends this capability to heterogeneous montages without fixed channel requirements, which is important for multi-center applications.
To further probe the information contained in high-frequency sleep stages, we extracted transition patterns from AnySleep’s predicted hypnograms and trained random forest classifiers to discriminate between healthy controls and patients with obstructive sleep apnea (OSA), narcolepsy type 1 (NT1), or insomnia. Prediction performance improved for all three disorders as the temporal resolution of the sleep stages increased (Fig. 3), supporting the notion that OSA, NT1, and insomnia influence sleep dynamics on short timescales and that AnySleep can encode these dynamics in its outputs. This is consistent with prior work reporting that finer temporal scales can reveal increasingly disrupted sleep continuity in OSA patients, and with the observation that 5-s resolution sleep-stage features are particularly informative for discriminating patients with REM sleep behavior disorder (RBD) from controls. Beyond sleep disorders, the prediction of physiological characteristics, such as age and sex, also benefited from higher temporal resolutions (see Fig. S3). Notably, the optimal temporal resolution differed across tasks, with OSA, NT1, and insomnia discriminators performing best at around 0.1, 0.2, and 1.0 s, respectively, whereas arousal detection was best at 2–8 s. Our feature-selection analysis further indicated that each disorder was characterized by a distinct set of transition triplets, such as N2–Wake disruptions in OSA, REM–wake instability in NT1, and wake intrusions into NREM sleep in insomnia. While preliminary, these investigations demonstrate how models that represent sleep dynamics across a flexible range of temporal resolutions may serve as an interpretable tool for studying links between sleep disorders and sleep architecture.
Despite the promising findings, several methodological limitations of this study warrant consideration. First, AnySleep was trained and evaluated for sleep staging using 30-s epochs, and high-frequency predictions were assessed indirectly, through their overlap with annotated arousals and their utility for predicting various sleep-related disorders. As a result, the absolute accuracy of high-frequency predictions remains uncertain. Investigations of U-Sleep have demonstrated that performance decreases when evaluated against expert annotations at 5-s resolution, while also noting substantial human inter-rater disagreement, likely due to a lack of standardized scoring rules for shorter sleep stages. Second, we observed a slight decrease in performance when moving from in-distribution data to held-out test datasets, in line with previous reports on distributional shifts in sleep staging. Given that model performance is constrained by human inter-rater variability, further performance gains may be increasingly incremental and are likely to depend on improved annotations, strategies to address distribution shifts, and broader, more representative training cohorts. This is particularly relevant for mobile recording devices, which tend to be more prone to artifacts and have shown discrepancies in sleep statistics compared with in-laboratory polysomnography systems. Third, we observed modest variability in model performance across training runs, which may suggest that data and channel sampling strategies could be further improved to increase performance, particularly for underrepresented sleep stages such as N1. Finally, although the AnySleep model is relatively small (≈ 12 MB), its computational demands may still be challenging for deployment on low-power consumer hardware where on-device sleep staging is desirable for privacy reasons.
Our findings suggest several directions for future research. First, developing expert-annotated datasets with sleep stages labeled at high temporal resolution would enable direct evaluation of model performance in the high-frequency regime instead of relying on proxy measures. Such datasets should ideally include multiple raters and consensus annotations to quantify inter-rater variability at short timescales. Second, more extensive studies of high-frequency sleep annotations and their applications are warranted. Potential use cases include the development of biomarkers for sleep disorders such as OSA, NT1, REM sleep behavior disorder (RBD), and insomnia, as well as for the early detection of neurodegenerative diseases associated with sleep changes. Our results provide initial evidence that high-frequency stages may carry relevant information for some of these tasks, but dedicated studies will be needed to validate these findings. Third, as with most studies based on large, well-annotated polysomnography cohorts, our analysis is retrospective by necessity. Although evaluations on held-out test datasets provide estimates of expected model performance in practice, prospective validation in routine clinical workflows remains necessary. Fourth, better methods may exist for aggregating AnySleep’s high-frequency representations into 30-s sleep stages, beyond the average pooling currently used in the segment classifier or simple voting schemes (see Fig. S5). Such aggregations could also provide a more reliable form of uncertainty quantification than interpreting model output probabilities as confidence values, thereby improving the basis for hypnodensity analyses. Finally, incorporating training data from mobile recording devices and reducing the model’s computational footprint would enable the study of sleep dynamics on short timescales in large cohort studies outside clinical settings. Given its ability to handle diverse and sparse channel configurations, AnySleep appears well-suited for extension to wearable EEG systems, provided that sufficient high-quality data is collected and domain-specific challenges, such as increased artifact levels, are addressed.
In conclusion, AnySleep provides robust sleep staging across heterogeneous input montages, representing a further step towards large-scale, harmonized sleep staging across studies and centers. Beyond conventional 30-s scoring, AnySleep generates sleep stage predictions at higher temporal resolutions, which, in our analysis, revealed information obscured by traditional staging. The interpretation and principled use of such high-resolution predictions remain an emerging area of sleep research. We expect AnySleep and comparable models to help researchers characterize short-scale sleep dynamics and, in the longer term, to facilitate the development of novel analytical methods and clinically useful biomarkers for sleep and neurological disorders. To support these developments, we publicly release AnySleep’s source code and trained model weights, complemented by our SomnoBot platform, which offers an easy-to-use interface for users without a programming background.
Methods / Data
We trained deep neural networks for automatic sleep staging, a multi-class classification problem where short segments of EEG and EOG data (sleep epochs) are mapped to one of five stages (Wake, N1, N2, N3, REM). The models were trained and evaluated on data from 28 datasets (20,589 overnight recordings, ≈ 200,000 h of EEG/EOG data) from multiple studies and clinics (Table 2), covering healthy participants and patients with various sleep and medical disorders. This study is a secondary analysis of previously published, de-identified datasets. No new data were collected from human participants by the authors. All datasets were accessed and used in accordance with their applicable data-use agreements and licenses. Therefore, no additional ethics approval was required for the present secondary analysis. All datasets included at least one EEG and one EOG channel. We note that AnySleep could naturally accommodate EMG channels as well, but we refrained from doing so as preliminary experiments indicated no performance improvements, in line with previous findings.
Table 2. Datasets used in this study, with demographics and the number of recordings per training, validation, and test split
The datasets were grouped into 13 in-distribution datasets and 15 hold-out datasets. Only in-distribution datasets contributed to model training and validation, while hold-out datasets were reserved exclusively for testing the traditional 30-s sleep staging (8 datasets) and high-frequency capabilities (7 datasets). Within each in-distribution dataset, subjects were partitioned into training, validation, and test subsets, with 10% of subjects (up to 50 per dataset) used for validation, 15% (up to 100 per dataset) for testing, and the remainder for training. This yielded 18,038 training recordings, 559 validation recordings, and 1992 test recordings (966 from the in-distribution group, 346 from the 30-s hold-out group, and 680 from the high-frequency hold-out group; see Table 2). To ensure comparability with the results reported by Perslev et al., our data split closely followed their protocol, except for the high-frequency hold-out group, which was not included in their study. In addition to the 30-s and high-frequency hold-out groups, we evaluated a high-density EEG dataset (ANPHY) to assess AnySleep’s performance in recordings with substantially larger channel counts (Table S5). Across all datasets, we excluded 32 recordings flagged as problematic by the data providers or lacking EEG/EOG channels (see code repository available at https://github.com/dslaborg/AnySleep).
All recordings used for training or to evaluate 30-s staging were scored by expert annotators into 30-s sleep epochs according to either the AASM or the Rechtschaffen and Kales rules. To harmonize labels, we remapped stage N4 to N3. We did not remove epochs labeled outside the five main stages (e.g., movement, artifacts) to prevent discontinuities between non-consecutive epochs and to familiarize the model with artifacts, but excluded such epochs from loss computation and evaluation metrics (Section “Training”). For the DODO and DODH datasets, which each provide annotations of five independent scorers per recording, we derived consensus labels by majority voting. Scorers were ranked per recording by their mean agreement with the other scorers, and only the four most reliable scorers contributed to the vote, with ties resolved in favor of the highest-ranked scorer. Some datasets additionally contain event annotations and subject-level metadata, which we used in downstream analyses, namely arousal annotations in MASS C1 and C3, and clinical indicators for patient versus healthy control status, in DODO, DODH, CNC, DHC, FHC, IHC, KHC, SSC, and CAP. For all datasets other than DODO and DODH, annotations were available from a single expert scorer per recording.
For preprocessing, all EEG and EOG signals were resampled to 128 Hz using polyphase filtering. Then, we normalized the amplitudes of each recording and channel by subtracting the median and dividing by the interquartile range of the amplitude distribution. To minimize outliers, the normalized signal was clipped to the range [−20, 20]. Following U-Sleep, we did not apply bandpass filtering, as our preliminary experiments with the U-Sleep architecture on bandpass-filtered data did not yield notable performance improvements.
Methods / Model
The AnySleep architecture is a U-Net-style encoder-decoder network for multi-channel EEG/EOG segmentation. We adopted the backbone configuration from U-Sleep, with 12 encoder blocks, a connector, and 12 decoder blocks connected by skip connections (Fig. 5a). The output of the last decoder block is passed to a convolutional segment classifier (Fig. 5c) with a temporal average-pooling layer. The kernel size and stride of this pooling layer determine the effective temporal resolution of the output. During training, we set this pooling window to 30 s (3840 samples at 128 Hz) to match the expert 30-s annotations. At inference, we varied the pooling kernel and stride to obtain higher-resolution sleep stage predictions from the same backbone. We additionally evaluated soft and hard majority voting as alternatives to average pooling for aggregating these high-frequency predictions into 30-s labels (see Fig. S5).
Fig. 5. Model architecture of AnySleep. a gives an overview of AnySleep with its two variants: early fusion and late fusion (see Section “Impact of channel-attention placement”). In the two variants, the attention modules of AnySleep (highlighted in red) were extended with a channel encoder and moved before the first encoder block or after the last decoder block, respectively (greyed out modules). b Architecture of the channel-attention modules. The channel encoder serves as an additional channel-wise feature extractor in the early and late fusion variants. c Architecture of the segment classifier with the configurable average pooling layer that allows for the prediction of high-frequency sleep stages at flexible resolution.
To support flexible input channel configurations, we introduced channel-attention modules that combined information across any number of channels (Fig. 5b). Layers before a channel-attention module operate on each channel separately, and layers after the module operate on a fused multi-channel representation. In the baseline AnySleep model, we inserted 13 channel-attention modules at different depths between the encoder and decoder blocks (Fig. 5a). For an input with C channels, each attention module receives a feature map m∈RC×F×T, where F denotes the number of convolutional filters and T the temporal dimension. Inspired by the attention mechanism described by Guillot et al., our attention modules split these maps into channel-wise feature maps mi∈RF×T, which are averaged over the time dimension T, yielding m¯i=1T∑t=1Tmi,t,m¯i∈RF. The m¯i are then passed through a multi-layer perceptron (MLP) with one hidden layer (40 units), batch normalization, a ReLU activation, and a single output unit. The resulting scalars are normalized across channels with a softmax layer to obtain normalized attention weights wi∈R with ∑i=1Cwi=1. These attention weights are used to calculate the weighted sum over the channel-wise feature maps mi, yielding an aggregated feature map magg=∑i=1Cwimi,magg∈RF×T without the channel dimension.
In the early and late fusion variants of AnySleep (Section “Impact of channel-attention placement”), the attention modules were replaced with a single attention module positioned either before the first encoder block or after the last decoder block, respectively (Fig. 5a, b). Additionally, these modules were extended with a channel encoder that serves as an additional channel-wise feature extractor. The feature extractor consists of two convolutional layers (32 filters, kernel sizes 64 and 9, strides 32 and 1, respectively) with an ELU activation and batch normalization between them. For the early fusion architecture, we implemented a multi-head attention mechanism with four parallel channel-attention modules, yielding Cvirtual = 4 fused feature maps (“virtual channels”), mfused∈RCvirtual×F×T. This increases the number of input channels of the first encoder block from 1 to 4. In contrast, the baseline AnySleep model and the late fusion variant use single-head attention, as preliminary experiments did not show consistent benefits of multi-head fusion in this setting.
The introduction of channel-attention modules reduced the computational requirements needed to evaluate recordings with increasing channel numbers compared to U-Sleep. We approximated the compute required to score a single recording with NEEG EEG channels and NEOG EOG channels by counting how often each network component (encoder block, decoder block, channel encoder, attention module, segment classifier) needed to be evaluated (Fig. 6). In AnySleep and its two variants, components before the attention modules are applied independently to each input channel, so the number of component evaluations increases linearly with the channel count. The steepness of this increase depends on the number of channel-specific components (largest for late fusion, smallest for early fusion). In contrast, U-Sleep handles increasing channel numbers by performing additional full model evaluations with subsequent majority voting. In the original version of U-Sleep, a recording with NEEG EEG and NEOG EOG channels requires separate evaluations for all (EOG, EEG) pairs (i.e., NEEG ⋅ NEOG evaluations), leading to a quadratic increase in computational cost with the number of channels. This scaling makes U-Sleep less compute-efficient relative to AnySleep in datasets with large channel numbers, especially when more than one EOG channel is available. In contrast, introducing additional channel-attention components only modestly increased the models’ parameters, with AnySleep, early fusion, and late fusion containing 3,157,856 (+1.4% compared to U-Sleep’s 3,114,337 parameters), 3,131,601 (+0.6%), and 3,137,356 (+0.7%) parameters, respectively.
Methods / Training
Each training sample consisted of a sequence of 35 contiguous 30-s sleep epochs (17.5 min) to leverage the models’ receptive fields spanning 14.36 min. For each training sample, the models predicted sleep stages for every epoch in the sequence, and we minimized the average cross-entropy loss across these epochs. Epochs annotated as artifacts or unknowns by the experts (see Section “Data”) were excluded from the loss calculation. Optimization used the AMSGrad variant of Adam with a fixed learning rate of 10^−5, following prior work, and a batch size of 64 (reduced to 32 for the late-fusion AnySleep variant due to memory constraints). We trained for a maximum of 10,000 training epochs and applied early stopping if the macro F1 score on the validation data did not improve for 100 consecutive training epochs. Each training epoch consisted of 443 gradient updates, which corresponded to approximately 10^6 sleep epochs for a batch size of 64 and a sequence length of 35.
We generated training samples by stratified sampling over sleep stages and datasets, similar to Perslev et al.. For each training sample, we first uniformly sampled a sleep stage c ∈ {Wake, N1, N2, N3, REM}. We then sampled a dataset d from the Nd available training datasets with probability
where Nrecd is the number of recordings in dataset d and α is a hyperparameter controlling the balance between equal weighting of datasets and weighting by dataset size. We set α = 0.5 to ensure that recordings from smaller datasets are neither under- nor overrepresented. From the selected dataset, we uniformly sampled a recording and then uniformly sampled a sleep epoch of class c within that recording. If no such epoch was present, the procedure was repeated from the dataset selection step. Once a sleep epoch of class c was selected, it was placed at a random position within a 35-epoch sequence by uniformly sampling the number of preceding epochs from {0,…, 34}.
To expose the model to a wide range of channel numbers and combinations during training, we used stochastic channel subsampling inspired by Guillot et al.. For each batch, we first randomly sampled a number n of 1,…, Nch channels with probability
where Nch = 10 is the maximum number of channels across all train recordings (see in-distribution datasets in Table 1). For each recording in the batch, we then uniformly selected n of its available channels, independent of the channel type (EEG or EOG). If a recording had less than n channels, sampling was performed with replacement; otherwise, channels were sampled without replacement.
In contrast to the U-Sleep training pipeline, we did not apply data augmentation. Preliminary experiments indicated that the masking-based augmentations used in U-Sleep did not improve AnySleep’s performance and slightly degraded its high-frequency sleep staging performance. To obtain a directly comparable baseline, we retrained U-Sleep using the same sampling strategy, optimization hyperparameters, and stopping criteria as for AnySleep but replaced the channel subsampling scheme with random selection of an (EOG, EEG) pair for each training sample. Our retrained U-Sleep models closely reproduced the originally reported performance, with weighted mean MF1 scores across all test data of 0.79 (see Table 2 in Perslev et al.) and 0.791 for the original and retrained models, respectively, well within the variability observed across training runs.
Methods / Evaluation
We assessed sleep staging performance by calculating macro F1 (MF1) scores, which are defined as the unweighted average of the per-stage F1 scores across the five sleep stages,
where TPi, FPi, and FNi are the number of true positives, false positives, and false negatives of sleep stage i, respectively. Only sleep epochs annotated as Wake, N1, N2, N3, or REM were included in these calculations, while epochs annotated as artifacts or unknowns were excluded (see Section “Data”). Macro F1 scores were calculated either recording-wise or dataset-wise by aggregating TPi, FPi, and FNi over all epochs of a recording (Section “Robustness to channel configurations”) or dataset (Section “Impact of channel-attention placement”), respectively.
Because both AnySleep and U-Sleep accept input signals of variable length, we passed full recordings to the models, ensuring that each sleep epoch prediction could exploit the models’ full temporal receptive field without resorting to segmenting the input into overlapping windows. AnySleep processed all available channels jointly in a single forward pass. For U-Sleep, following Perslev et al., we evaluated the model on every available (EOG, EEG) channel pair and combined the resulting per-epoch predictions by majority voting, breaking ties at random. Unless specified otherwise, all evaluations used all available EEG and EOG channels of a recording.
Methods / High-frequency sleep stages
AnySleep outputs sleep stages at temporal resolutions of up to 128 Hz (3840 predictions per 30-s epoch; see Section “Model”). For the high-frequency analyses, we evaluated 14 temporal resolutions ranging from 1 to 3840 predictions per epoch (1, 2, 4, 8, 16, 32, 64, 128, 256, 384, 640, 960, 1920, and 3840), corresponding to time steps from 30 s down to 0.008 s.
Methods / Arousal prediction
We used AnySleep’s high-frequency predictions to derive candidate arousals for the MASS C1 and C3 datasets (see Section “High-frequency sleep staging capabilities”). Specifically, we first identified segments of continuous Wake predictions. We merged segments that were separated by less than 10% of their merged length, provided the resulting event did not exceed 15 s. Then, in line with AASM scoring rules, we removed segments that contained Wake predictions in the preceding 10 s. Finally, we defined candidate arousals as segments with a length of 3–15 s, consistent with typical arousal durations.
To compare predicted and expert-annotated arousals, we calculated Intersection over Union (IoU) precision, IoU recall, and IoU F1 scores. True positives were defined as pairs of predicted and expert-annotated arousals that overlapped by at least 20% of their combined length. Predicted arousals without such a match were counted as false positives, and expert events without matching predictions were counted as false negatives (see Section “Evaluation”).
Methods / Analysis of subject characteristics
We used AnySleep’s high-frequency predictions to quantify associations between fine-grained sleep dynamics and various disorders (obstructive sleep apnea, narcolepsy type 1, and insomnia). Following Perslev et al., these analyses were based on “triplets” of sleep transitions. To calculate these features, we first predicted sleep stages for the DODO, DODH, CNC, DHC, FHC, IHC, KHC, SSC, and CAP datasets at varying temporal resolutions with all available EEG and EOG channels (except for DODO and DODH, which were limited to channels shared by the two datasets). We then restricted the predictions to the interval between the first and last non-Wake 30-s epoch, partitioned this interval into non-overlapping 1.5-h blocks, and, for each block and timescale, counted the absolute number of sleep-stage triplets (si, si+1, si+2) where si ≠ si+1 and si+1 ≠ si+2. This yielded one feature vector with 80 features per 1.5-h block.
Based on these features, we trained random forest classifiers in a leave-one-subject-out cross-validation setting to distinguish healthy controls from patients with obstructive sleep apnea (OSA), narcolepsy type 1 (NT1), or insomnia. Each of the three tasks was treated as a binary classification problem. The random forest models were implemented using the RandomForestClassifier from scikit-learn, with criterion set to gini and class_weight set to balanced. For each disorder and timescale, we trained 50 of these forests with hyperparameters uniformly sampled from the ranges max_tree_depth ∈ [2, 7], min_samples_leaf ∈ [2, 7], min_samples_split ∈ [2, 7], max_features ∈ {sqrt, log2}. Performance was quantified using macro F1 scores. Specifically, we aggregated block-level predictions for each subject by majority voting across the subject’s 1.5-h blocks, and then computed macro F1 scores based on the resulting subject-level predictions.
To investigate the impact of different triplet features on the performance of the random forest classifiers, we carried out a feature selection analysis for the best-performing timescales (256 predictions per epoch for OSA, 128 for NT1, and 32 for insomnia). For each of the 150 training runs of a disorder (three AnySleep checkpoints with 50 random forest models each), we started with an empty feature set and iteratively added the triplet that maximally improved validation performance up to a maximum of five features. We then ranked the triplets by how often they were selected across the 150 runs and treated the highest-ranking triplets as the most influential features.
Data availability
All datasets analyzed during the current study are publicly available. In the following, we list the datasets and the URLs to access them: ABC (https://doi.org/10.25822/nx52-bc11), CCSHS (https://doi.org/10.25822/cg2n-4y91), CFS (https://doi.org/10.25822/jmyx-mz90), CHAT (https://doi.org/10.25822/d68d-8g03), DCSM (https://doi.org/10.17894/ucph.282d3c1e-9b98-4c1e-886e-704afdfa9179), HPAP (https://doi.org/10.25822/xmwv-yz91), MESA (https://doi.org/10.25822/n7hq-c406), MrOS (https://doi.org/10.25822/kc27-0425), Phys (https://doi.org/10.13026/6phb-r450), SEDF-ST and SEDF-SC (https://doi.org/10.13026/C2X676), SHHS (https://doi.org/10.25822/ghy8-ks59), SOF (https://doi.org/10.25822/e1cf-rx65), DODO and DODH (https://doi.org/10.5281/zenodo.15900394), ISRUC SG 1–3 (https://sleeptight.isr.uc.pt/), MASS C1 and C3 (https://doi.org/10.5683/SP3/OVISPE and https://doi.org/10.5683/SP3/9MYUCS), SVUH (https://doi.org/10.13026/C26C7D), CNC, DHC, FHC, IHC, KHC, and SSC (https://stanfordmedicine.app.box.com/s/r9e92ygq0erf7hn5re6j51aaggf50jly), CAP (https://doi.org/10.13026/C2VC79), ANPHY (used in the Supplementary Materials; https://doi.org/10.17605/OSF.IO/R26FH). Information about excluded recordings and the used data split is provided in our GitHub repository: https://github.com/dslaborg/AnySleep.
Code availability
The underlying code, trained model files, and training, validation, and test data splits for this study are available on GitHub and can be accessed via this link: https://github.com/dslaborg/AnySleep. Further instructions on how to reproduce our main experiments and evaluate our trained models on custom datasets are also provided there. The software is based on PyTorch (version 2.5.1, https://pytorch.org/). All models were trained on an NVIDIA DGX A100 workstation equipped with eight NVIDIA A100 GPUs.
Associated Data / Data Availability Statement
All datasets analyzed during the current study are publicly available. In the following, we list the datasets and the URLs to access them: ABC (https://doi.org/10.25822/nx52-bc11), CCSHS (https://doi.org/10.25822/cg2n-4y91), CFS (https://doi.org/10.25822/jmyx-mz90), CHAT (https://doi.org/10.25822/d68d-8g03), DCSM (https://doi.org/10.17894/ucph.282d3c1e-9b98-4c1e-886e-704afdfa9179), HPAP (https://doi.org/10.25822/xmwv-yz91), MESA (https://doi.org/10.25822/n7hq-c406), MrOS (https://doi.org/10.25822/kc27-0425), Phys (https://doi.org/10.13026/6phb-r450), SEDF-ST and SEDF-SC (https://doi.org/10.13026/C2X676), SHHS (https://doi.org/10.25822/ghy8-ks59), SOF (https://doi.org/10.25822/e1cf-rx65), DODO and DODH (https://doi.org/10.5281/zenodo.15900394), ISRUC SG 1–3 (https://sleeptight.isr.uc.pt/), MASS C1 and C3 (https://doi.org/10.5683/SP3/OVISPE and https://doi.org/10.5683/SP3/9MYUCS), SVUH (https://doi.org/10.13026/C26C7D), CNC, DHC, FHC, IHC, KHC, and SSC (https://stanfordmedicine.app.box.com/s/r9e92ygq0erf7hn5re6j51aaggf50jly), CAP (https://doi.org/10.13026/C2VC79), ANPHY (used in the Supplementary Materials; https://doi.org/10.17605/OSF.IO/R26FH). Information about excluded recordings and the used data split is provided in our GitHub repository: https://github.com/dslaborg/AnySleep.
The underlying code, trained model files, and training, validation, and test data splits for this study are available on GitHub and can be accessed via this link: https://github.com/dslaborg/AnySleep. Further instructions on how to reproduce our main experiments and evaluate our trained models on custom datasets are also provided there. The software is based on PyTorch (version 2.5.1, https://pytorch.org/). All models were trained on an NVIDIA DGX A100 workstation equipped with eight NVIDIA A100 GPUs.
还没有查过关联研究
我会去找这篇研究之前的基础工作、做类似事情的研究,以及之后引用它的研究,并说明每篇为什么相关。