## 3 Materials and Experiment Design
### Dataset Description
#### 3.1.3. HMC Dataset [36; 37; 38]  
The HMC in The Hague, the Netherlands, collected a diverse dataset of 151 whole-night PSG sleep recordings in 2018. This collection includes data from 85 male and 66 female participants with an age of 53.9 \(\pm\) 15.4 years (mean \(\pm\) standard deviation). All signals were sampled at 256 Hz. Signals were recorded using SOMNOscreen PSG, PSG+, and EEG 10-20 recorders (SOMNOmedics, Randersacker, Germany) using AgAgCl electrodes. Scoring of sleep stages was carried out manually by well-trained sleep technicians according to the 2.4 version of the AASM guidelines. For the sleep staging task, we followed standard preprocessing steps as described in our prior work [17], which included segmentation of PSG recordings into 30 s epochs and label alignment based on expert annotations following AASM criteria. Sleep stage classification was categorized into five classes using expert manual annotations for each dataset: W, N1, N2, N3, and REM. Signals from EEG, ECG, and respiratory channels were normalized to zero mean and unit variance within each subject to reduce inter-patient variability. For SDB severity classification, we adopt a proxy label extraction strategy based on ECG-derived respiratory analysis. Specifically, we implement an ECG-based AHI approximation pipeline inspired by prior cardiopulmonary coupling studies [39]. The core idea is to infer SDB events using surrogate features extracted from R-R interval (RRI) dynamics, which reflect autonomic nervous system fluctuations associated with apneic episodes. First, we extracted the RRI time series from ECG signals using a peak detection algorithm (e.g., Pan-Tompkins) followed by interpolation at 4 Hz to generate evenly sampled tachograms. Each night-long ECG signal was then segmented into overlapping 5 min windows with 30 s strides. Within each window, we computed short-term HRV features that are physiologically sensitive to respiratory effort and arousals. These include the standard deviation of NN intervals (SDNN), root mean square of successive differences (RMSSD), low- and high-frequency power ratios (LF/HF), and the respiratory-modulated cardiac oscillation index (RMCOI), a proxy for cyclic variation in heart rate (CVHR). To identify putative apnea-hypopnea events, we applied an unsupervised peak detection approach on the CVHR signal within each 5 min segment. Peaks that met duration (\(\geq\)10 s) and amplitude criteria (adaptive thresholding) were marked as surrogate events. The local AHI was then computed as the number of surrogate events per hour, scaled appropriately to the 5 min window. Finally, each 30 s epoch was assigned a severity label (normal, mild, moderate, or severe) based on the maximum AHI observed in its surrounding window. This process yields temporally aligned, discrete SDB labels that can be directly used for multi-task learning. These ECG-derived AHI values are then mapped into four discrete severity levels: normal (AHI \(<\) 5), mild (5 \(\leq\) AHI \(<\) 15), moderate (15 \(\leq\) AHI \(<\) 30), and severe (AHI \(\geq\) 30), in line with clinical thresholds. In this study, we selected seven physiological channels from each dataset to construct a consistent multimodal input space for sleep staging and SDB severity classification. For the EEG signal, we chose one central derivation per dataset based on availability and reliability: C3-M2 from APPLES, C4-M1 from SHHS, and F4-M1 from HMC. For EOG, which assists in REM detection through eye movement patterns, we selected ROC-M1 for APPLES, the left EOG channel for SHHS, and LOC-M2 for HMC. The EMG channel, used to track muscle tone fluctuations, was extracted from chin recordings: Chin EMG in APPLES, standard EMG in SHHS, and Chin1-Chin2 in HMC. For ECG, which provides heart rate variability cues linked to SDB events, we used a single ECG lead from each dataset. In terms of respiratory signals, we selected the most representative airflow-relatedchannel for apnea detection: Nasal Pressure for APPLES, Airflow for SHHS, and Nasal Thermistor for HMC.