Abstract
Medical data are often multi-modal, which are collected from different sources with different formats, such as text, images, and audio. They have some intrinsic connections in meaning and semantics while manifesting disparate appearances. Polysomnography (PSG) datasets are multi-modal data that include hypnogram, electrocardiogram (ECG), and electroencephalogram (EEG). It is hard to measure the associations between different modalities. Previous studies have used PSG datasets to study the relationship between sleep disorders and quality and sleep architecture. We leveraged a new method of deep learning manifold alignment to explore the relationship between sleep architecture and EEG features. Our analysis results agreed with the results of previous studies that used PSG datasets to diagnose different sleep disorders and monitor sleep quality in different populations. The method could effectively find the associations between sleep architecture and EEG datasets, which are important for understanding the changes in sleep stages and brain activity. On the other hand, the Spearman correlation method, which is a common statistical technique, could not find the correlations between these datasets.
Keywords: Deep Learning, Manifold Alignment, EEG, Sleep Architecture
1. Introduction
Nowadays, complex data usually come from different information sources and have disparate formats and representations, such as images, text, and audio. Such data are known to be multi-modal because they belong to different modalities or categories of information. However, the data of disparate sources in these datasets are not independent or unrelated. They often have certain intrinsic connection that links them together. For instance, a dataset that has images and textual captions for each image is multi-modal. The images and the captions are different types of data, but they both convey the same or similar meaning or information about the scene depicted in the image.
In sleep study, polysomnography (PSG) data typically contains various multi-modal datasets. They include but are not limited to electroencephalogram (EEG), electrocardiogram (ECG), and sleep architecture based on the hypnogram. The task of measuring the correlations of features within one modality is well studied and understood; however, the problem of measuring the associations between two or more modalities is unclear and often challenging. Researchers have conducted a comprehensive analysis of the relationship between PSG datasets, which are used to diagnose sleep disorders and monitor sleep quality. Picard-Deland et al. [1, 2] suggested that sleep latency and sleep spindle play a role in influencing the occurrence and intensity of nightmares in individuals. Purcell et al. [3] suggested the sleep spindle as a distinctive feature of sleep stage 2. In this study, we leveraged a novel method for exploring the relationships between PSG datasets, particularly EEG and sleep architecture datasets. This method was based on deep learning manifold alignment by Nguyen et al. [4], which performed the alignment with the supervision of the class labels. We adapted the feature alignment to an unsupervised setting where no class labels of the data were needed.
The rest of the paper is presented as follows. In Sect. 2, we provide a review of the relevant studies. In Sect. 3, we describe the datasets and preprocessing procedures, as well as the machine learning algorithm to be used. In Sect. 4, we report and analyze the results of our experiment. Finally, Sect. 5 concludes the paper by highlighting our contributions and outlining several avenues for future research.
2. Related Work
Nguyen et al. [4] introduced a method for deep manifold regularized alignment (deepManReg), which could exploit multi-modal data, such as single-cell multi-omics data, to predict the characteristics of complex biological systems. It implemented deep neural networks (DNN) for learning and aligning cross-modal manifolds, and it used the nonlinear patterns to enhance the prediction models and discover the relevant features and interactions for the characteristics. The method was demonstrated to outperform several existing methods, such as linear manifold alignment (LMA), canonical correlation analysis (CCA), and MATCHER, in predicting phenotypes via prioritizing the multi-modal features and cross-modal interactions according to their importance for the phenotypes. The effectiveness of deepManReg was demonstrated on two datasets in [4]: one with images of handwritten digits with varying attributes and the other with single-cell multi-modal data of mouse brain cells. Though the deepManReg was mainly designed for phenotype prediction in [4], we adapted it for exploring the potentially nonlinear, complex relationships between cross-modal features such as those of EEG and sleep architectures with no need of class labels in this paper.
The Spearman correlation [5] is commonly used to assess how well two variables are related in strength and direction. Unlike the Pearson correlation, which assumes a linear relationship between the variables and a normal distribution of the data, the Spearman correlation does not require these assumptions. Instead of using the actual values of the variables, the Spearman correlation calculates the degree of their association based on their ranks, thus being insensitive to the data distributions and outliers. While powerful, it does not take into account the geometrical structures of the data, thus often ignoring important inter-relationships between cross-modal variables.
There have been accumulating works linking sleep features to brain functional,structural, and pathological characteristics. The strong crosstalk between sleep and cognition has been reported [6]. New evidence has also shown strong associations between sleep oscillations (measured by EEG) and sleep-dependent memory processing. Improving sleeping health has emerged as an intervention strategy for boosting metabolic, immune, and cardiovascular systems as well as for sleep-dependent memory consolidation, and reinforcing executive processes including working memory, mood, and other cognitive functions. Recently, improving sleeping health has emerged as an intervention strategy for various diseases, including metabolic diseases, all-cause mortality, and Alzheimer’s diseases [7–10]. Sleep EEG data (less noisy than daytime EEG recording) has long been used for investigating memory functions [11, 12]. For example, normal aging effects on cognition were reliably estimated from the sleep EEG data [13]; sleep EEG-based brain age index has been studied to find the association between sleep and dementia [14]. Despite intensive research and progress, the relationship between various sleep EEG features and sleep architectural characteristics, particularly spindles, remains largely unexplored. This paper seeks to tackle this unmet need by using the cross-modal feature alignment.
3. Methodology
3.1. Dataset
For this study, we obtained the datasets from the Sleep Heart Health Study (SHHS) [15, 16], which is a large-scale, multi-center, prospective cohort study of the cardiovascular consequences of sleep-disordered breathing. The datasets were available from the National Sleep Research Resource (NSRR) [17], an online repository of sleep data and tools. To simplify the analysis, we only included the data from the first clinic visit and polysomnogram of each subject, which were conducted between November 1995 and January 1998. We removed subjects who had non-numeric values in the data, such as missing or invalid entries. This resulted in 4,482 subjects out of the original 5,782 subjects. These subjects had a mean age of 62.68 years old at the time of the clinic visit, with a minimum age of 39 years old and a maximum age of 90 years old. The sex distribution of the subjects was slightly skewed towards women, with a female-to-male ratio of 1.15:1.
From the polysomnography data, we extracted two modalities: EEG and sleep architecture. We used these datasets to learn cross-modal feature alignment and explore their relationships.Both datasets were derived from the original European Data Format (EDF) signal files by using the Compumedics Profusion software. The EEG dataset contains 58 EEG biomarkers that measure the brain activity of each subject during sleep. The EEG biomarkers include the following: the average Odds Ratio Product (ORP) in all 30-s epochs of a sleep stage, which indicates the level of arousal and sleep quality; the spindle traits (density, frequency, and percentage of fast spindles) from C3 and C4 EEG channels, which reflect the cognitive functions and memory consolidation; and the average power of different spectral bands (alpha (7.33–12.0 Hz), beta (14.3–20.0 and 20.3–35 Hz), delta (0.33–2.33 Hz), gamma omega (35.3–60.0 Hz), sigma (12.33–14.0 Hz), and theta (2.67–6.33 Hz)) in all 3-s epochs for C3 and C4 channels, which represent the different stages and cycles of sleep. The biomarkers of the EEG dataset are presented in Supplementary Table 11.
The sleep architecture dataset is a rich source of data that captures the sleep cycle patterns of individuals who participated in type II polysomnography, a sleep study that monitors brain waves, oxygen levels, heart rate, and breathing. The dataset contains 55 extracted attributes that measure the quality and quantity of sleep, such as the number of times the individual shifted from one sleep stage to another (stage 1, 2, 3/4, and Rapid Eye Movement (REM)), the total amount of time spent in each sleep stage (and how it compares to the total sleep time), and the percentage of total sleep time that was compromised by different conditions that affect breathing and oxygenation, such as having oxygen saturation below a certain threshold, experiencing desaturation events (drops in oxygen levels), having apneas (pauses in breathing), or having hypopneas (shallow breathing). The dataset represents a comprehensive profile of the sleep architecture of the individuals, and the attributes are presented in Supplementary Table 22.
3.2. Deep Learning Manifold Alignment Method
Manifold alignment is a machine learning technique that can learn from multi-modal datasets [18]. It can discover the relationship between the features of different modalities by projecting them onto a common latent manifold, thereby forming a low-dimensional representation to capture the shared structure of the data. Two features are considered to share the same characteristic when their distance on the manifold is small. The correlations of features within one modality are well studied, but the associations across modalities are unclear, especially when they are nonlinear. Manifold alignment can help tackle this problem by finding a low-dimensional embedding that preserves the high-dimensional data structure and the inter-data correspondences. Although the technique works well for nonlinear problems, it can also be used in linear scenarios. Two modal datasets with a set of p samples described in [4] as:
| (1) |
where X and Y are the features of modal 1 and modal 2, respectively, n and m are the number of features of X and Y, respectively, and xi and yj are the ith feature of modal 1 and the jth feature of modal 2 with both of which being p-dimensional. We want to learn two mappings f(xi) and g(yj) onto the latent space with dimension d << p. F is the joint representation of X and Y features on the shared latent space,
| (2) |
where f(X) is of size n x d and g(yj) is of size m x d, and F is of size (n + m) x d. To reveal nonlinear relationships across modalities, we perform the manifold alignment by adapting the deepManReg algorithm [4]. The objective function of this alignment is
| (3) |
where L is the Laplacian matrix of the similarity matrix W that is of size (n + m) x (n + m) and defines the correspondence between every feature of X and that of Y, and D is the diagonal matrix of the row-sum of W.
We trained two DNNs to represent f and g that respectively map the EEG and sleep architecture modalities to a common latent manifold. The latent manifold was chosen to be a 10-dimensional Stiefel manifold, which constitutes a set of orthogonal matrices. Both DNNs had the same network architecture: an input layer with 4,482 nodes that corresponded to the number of subjects, two hidden layers with 512 and 64 nodes, and an output layer with 10 nodes. We trained the DNNs for 55 epochs and implemented the Adam algorithm as the optimizer. We used the k-Nearest Neighbors (kNN) algorithm with k = 5 to measure the similarity between the modalities in the latent manifold. A similarity square matrix with a size equal to the total number of features (i.e., 113) was obtained, where each element represented the number of common neighbors between two points. We set a threshold of 0.92 to select similar features across the modalities. The optimization of Eq. (3) followed that of [4] over the Stiefel manifold.
4. Experimental Results
The latent space generated by the manifold alignment constructed two graphs that capture the similarity between features across EEG and sleep architecture datasets. Figure 1 demonstrates how one of the features from the sleep architecture dataset, namely sleep latency, has strong nonlinear relationships with many features from the EEG dataset. Such features include the average ORP, which measures the overall regularity of sleep patterns, the Sleep Spindle traits, which reflect the bursts of brain activity during non-REM sleep, and the average spectral band power, which indicates the amount of energy in different frequency ranges. These results are consistent with those in the previous study on sleep and nightmares by Picard-Deland et al. [1, 2] that suggested sleep latency and sleep spindle play a role in influencing the occurrence and intensity of nightmares in individuals.
Fig. 1.

The first network shows the relationships across EEG and Sleep Architecture datasets. The red circle represents the EEG dataset, and the blue circle represents the Sleep Architecture dataset. The distance between a pair of nodes is inverse proportional to the strength of their association; the shortest the distance the stronger the relation.
slplatp; Sleep Latency: the interval between lights-out/in-bed time and sleep onset time from type II polysomnography
powers_C3A2_sigma; Powers C3/A2 (mV2) - Sigma (12.33–14.0)
powers_C3A2_beta1; Powers C3/A2 (mV2) - Beta1 (14.3–20.0)
powers_C3A2_beta2; Powers C3/A2 (mV2) - Beta2 (20.3–35)
powers_C3A2_gammaomega; Powers C3/A2 (mV2) - Gamma Omega (35.3–60.0)
powers_C4A1_sigma; Powers C4/A1 (æ¦V2) - Sigma (12.33–14.0)
powers_C4A1_beta1; Powers C4/A1 (æ¦V2) - Beta1 (14.3–20.0)
powers_C4A1_beta2; Powers C4/A1 (æ¦V2) - Beta2 (20.3–35.0)
avg_orp_wake; Average ORP During Wake
avg_orp_nonrem; Average ORP During non-REM
avg_orp_n1; Average ORP During N1
avg_orp_n2; Average ORP During N2
avg_orp_n3; Average ORP During N3
avg_orp_rem; Average ORP During REM
avg_org_trt; Average ORP Over Total Recording Time
avg_orp_last120m_nrem; Avg ORP Last 120 min NREM
min_orp_firsthalf_nrem; Min ORP First Half NREM
diff_orp; Change in ORP across the night
intensity_scale; Arousal Characteristics - Intensity Scale
dhr_intensity; Arousal Characteristics - dHR/ Intensity
chae_in_hr_perh_trt; Arousal Characteristics - Change in HR per hr of TRT
avg_normalized_EEG_power; Average Normalized EEG Power
icc_rl_orp; Icc R/L Orp
icc_ms_rows; Breakdown of ICC components - MS Rows
icc_ms_error; Breakdown of ICC components - MS Error
orpto9; Orp-9
spindle_char_N2_density_C3; Spindle Characteristics (Stage N2) - Density (C3)
spindle_char_N2_density_C4; Spindle Characteristics (Stage N2) - Density (C4)
The graph in Fig.2 demonstrates another set of high associations between the features of EEG and sleep architecture datasets in the aligned latent space. We can observe that two features about the sleep architecture, which measure the percentage of total sleep duration with oxygen saturation below 75%, have a strong nonlinear relationship with the average alpha spectral band power from the EEG dataset. Another two features from the sleep architecture dataset, which count the number of shifts from/to stage 2 per hour of sleep,strongly correlate with the sleepspindle feature from the EEG dataset.This finding is in line with the existing literature by Purcell et al. [3] that suggested sleep spindle as a distinctive feature of sleep stage 2. These relationships between cross-modality features were already known, thus substantiating the usefulness of our approach. There are other relations in Figs. 1 and 2, which appear to be novel. We will explore these newly found relationships, particularly under various disease conditions, in our future studies.
Fig. 2.

The second network shows the relationships across EEG and Sleep Architecture datasets. The red circle represents the EEG dataset, and the blue circle represents the Sleep Architecture dataset. The distance between a pair of nodes is inverse proportional to the strength of their association; the shortest the distance the stronger the relation.
hremt34p; Number of shift (sleep stages shift) from REM sleep to stage 3/4 sleep per hour of sleep from type II polysomnography
remt34p; Total number of shift (sleep stages shift) from REM sleep to stage 3/4 sleep from type II polysomnography
hstg2t1p; Number of shift (sleep stages shift) from stage 2 to stage 1 sleep per hour of sleep from type II polysomnography
hremt2p; Number of shift (sleep stages shift) from REM sleep to stage 2 sleep per hour of sleep from type II polysomnography
pctsa70h; Percent total sleep duration with below 70% oxygen saturation from type II polysomnography
pctsa75h; Percent total sleep duration with below 75% oxygen saturation from type II polysomnography
powers_C3A2_alpha; Powers C3/A2 (mV2) - Alpha (7.33–12.0)
powers_C4A1_alpha; Powers C4/A1 (æ¦V2) - Alpha (7.33–12.0)
spindle_char_N2_freq_C3; Spindle Characteristics (Stage N2) - Frequency (C3)
spindle_char_N2_freq_C4; Spindle Characteristics (Stage N2) - Frequency (C4)
orp_type; ORP Type
pct_epoch_2_25to2_5pct; Distribution of epochs in 2.25–2.5% ORP decile
To compare the performance of manifold alignment with common method, Spearman correlation was calculated to measure the relationship between two features from the sleep architecture dataset and sleep spindle features from the EEG dataset. The two sleep architecture features were sleep latency and the count of the number of shifts from/to stage 2 per hour of sleep. The results of Spearman correlation in Table 1 showed that only one feature from the sleep architecture dataset, namely, the count of the number of shifts from/to stage 2 per hour of sleep, had a statistically significant correlation (p-value < 0.05) with any of the sleep spindles features from the EEG dataset. However, none of the features from the sleep architecture dataset had a noticeable correlation with any of the sleep spindle features from the EEG dataset because the absolute value of the Spearman correlation coefficients were all very small. This suggests that Spearman correlation was unable to capture the underlying relationship between these features; in contrast, our approach could find meaning nonlinear relations.
Table 1.
Spearman Correlation Result.
| Sleep Architecture | EEG | Spearman Correlation | P-value |
|---|---|---|---|
| slplatp | spindle_char_N2_density_C3 | −8.078E-03 | 5.887E-01 |
| slplatp | spindle_char_N2_density_C4 | −3.796E-03 | 7.995E-01 |
| hremt34p | spindle_char_N2_freq_C3 | 6.861E-03 | 6.461E-01 |
| hremt34p | spindle_char_N2_freq_C4 | 4.607E-03 | 7.578E-01 |
| hremt2p | spindle_char_N2_freq_C3 | 8.707E-02 | 5.257E-09 |
| hremt2p | spindle_char_N2_freq_C4 | 7.989E-02 | 8.545E-08 |
| hstg2t1p | spindle_char_N2_freq_C3 | −2.484E-02 | 9.636E-02 |
| hstg2t1p | spindle_char_N2_freq_C4 | − 1.718E-02 | 2.502E-01 |
5. Conclusion and Future Work
In this study, we applied a novel deep learning manifold alignment method to explore the complex relationships between different polysomnography (PSG) datasets, with a focus on electroencephalography (EEG) and sleep architecture datasets. The results of our analysis were consistent with the findings of previous studies that utilized PSG datasets to diagnose various sleep disorders and monitor sleep quality in different populations. The proposed method was able to effectively find the associations between EEG and sleep architecture datasets, which are essential for understanding the dynamics of sleep stages and brain activity. In contrast, the Spearman correlation method, which is a commonly used statistical technique for measuring nonlinear relationships between a pair of variables, failed to capture the correlations between these datasets.
The current results will inform future longitudinal studies for mental health improvement, both while awake and during nap or night sleep in during brain aging. One of the potential avenues for future research is to explore the relationship between the proposed method and other types of PSG datasets that measure different physiological signals, such as electrocardiogram (ECG) and electromyography (EMG). These datasets could provide additional insights into the sleep quality and patterns of the subjects. Furthermore, this method could be utilized as a model for the early detection of various brain diseases that affect the cognitive and motor functions of the patients,such as Alzheimer’s disease, Parkinson’s disease, and stroke. This could help in providing timely diagnosis and intervention for these conditions.
Acknowledgements.
The Sleep Heart Health Study (SHHS) was supported by National Heart, Lung, and Blood Institute cooperative agreements U01HL53916 (University of California, Davis), U01HL53931 (New York University), U01HL53934 (University of Minnesota), U01HL53937 and U01HL64360 (Johns Hopkins University), U01HL53938 (University of Arizona), U01HL53940 (University of Washington), U01HL53941 (Boston University), and U01HL63463 (Case Western Reserve University). The National Sleep Research Resource was supported by the National Heart, Lung, and Blood Institute (R24 HL114473, 75N92019R002).
The study is partially supported by NIH R21 AG070909-01, P30 AG072946-01, and R01 HD101508-01.
Footnotes
References
- 1.Picard-Deland C, Carr M, Paquette T, Nielsen T: Sleep spindles are altered in early- but not late-onset nightmare recallers. Sleep Med. 52, 34–42 (2018). 10.1016/j.sleep.2018.07.015 [DOI] [PubMed] [Google Scholar]
- 2.Picard-Deland C, Carr M, Paquette T, Saint-Onge K, Nielsen T: Sleep spindle and psychopathology characteristics of frequent nightmare recallers. Sleep Med. 50, 113–131 (2018). 10.1016/j.sleep.2017.10.003 [DOI] [PubMed] [Google Scholar]
- 3.Purcell S, Manoach D, Demanuele C, et al. : Characterizing sleep spindles in 11,630 individuals from the national sleep research resource. Nat. Commun 8, 15930 (2017). 10.1038/ncomms15930 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Nguyen ND, Huang J, Wang D: A deep manifold-regularized learning model for improving phenotype prediction from multi-modal data.Nat.Comput.Sci 2(1), 38–46 (2022) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Spearman C:The proof and measurement of association between two things.Am.J.Psychol 15(1), 72–101 (1904). 10.2307/1412159 [DOI] [PubMed] [Google Scholar]
- 6.Simon KC, Nadel L, Payne JD: The functions of sleep: a cognitive neuroscience perspective. Proc. Natl. Acad. Sci 119(44), e2201795119 (2022) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Leary EB, et al. : Association of rapid eye movement sleep with mortality in middle-aged and older adults. JAMA Neurol. 77, 1241–1251 (2020) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Winer JR, et al. : Sleep disturbance forecasts β-amyloid accumulation across subsequent years. Curr. Biol 30, 4291–4298 (2020) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Xiong X, Hu T, Yin Z, Zhang Y, Chen F, Lei P: Research advances in the study of sleep disorders, circadian rhythm disturbances and Alzheimer’s disease. Front. Aging Neurosci 14, 930 (2022) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Zhang Y, et al. : Sleep in Alzheimer’s disease: a systematic review and meta-analysis of poly-somnographic findings. Transl. Psychiatry 12(1), 1–12 (2022) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Djonlagic I, et al. : Associations between quantitative sleep EEG and subsequent cognitive decline in older women. J. Sleep Res 28(3), e12666 (2019) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Geng D, Wang C, Fu Z, Zhang Y, Yang K, An H: Sleep EEG-based approach to de-tect mild cognitive impairment. Front. Aging Neurosci 14, 865558 (2022) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Sun H, et al. : Brain age from the electroen-cephalogram of sleep. Neurobiol. Aging 1(74), 112–120 (2019) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Ye E, et al. : Association of sleep electroencephalography-based brain age index with dementia. JAMA Netw. Open 3(9), e2017357 (2020) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Zhang GQ, et al. : The National Sleep Research Resource: towards a sleep data commons. J.Am. Med. Inform. Assoc 25(10), 1351–1358 (2018). 10.1093/jamia/ocy064 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Quan SF, et al. : The Sleep Heart Health Study: design, rationale, and methods. Sleep 20(12), 1077–1085 (1997). [PubMed] [Google Scholar]
- 17.NSRR Homepage: https://sleepdata.org/
- 18.Ham JH, Lee DD, Saul LK: Learning high dimensional correspondences from low dimensional manifolds. In: Proceedings of the Twentieth International Conference on Machine Learning (ICML-2003) (2003) [Google Scholar]
