Skip to main content
MethodsX logoLink to MethodsX
. 2026 Jan 29;16:103808. doi: 10.1016/j.mex.2026.103808

Redefining obstructive sleep apnea diagnosis: An attention augmented CNN-BiLSTM hybrid alternative to traditional PSG testing

Rishita Rathore a, Harsh Lakdawala a, Nilima Zade a, Deepali Vora a,⁎, Aditya Gupte b,c, Shruti Patil a,d
PMCID: PMC12891778  PMID: 41684745

Abstract

Obstructive sleep apnea (OSA) is a common sleep disorder characterized by repeated episodes of upper airway obstruction during sleep. Despite its health risks, OSA often goes undiagnosed, as many individuals are unaware of the condition or misattribute its symptoms such as daytime fatigue or restlessness to poor sleep or lifestyle factors. Traditional diagnostic methods like polysomnography (PSG) being accurate are expensive, require multiple overnight hospital stays, and often cause patient discomfort, making early and widespread detection challenging. This study addresses these challenges and aims to develop an alternative approach for traditional methods by implementing different deep learning models for automated OSA detection. The proposed alternative approach integrates:

  • •

    Proposing convolution neural network - bidirectional long short-term memory network (CNN-BiLSTM) hybrid architecture with necessary subset of physiological signals for accurate detection of OSA while minimizing computational overhead.

  • •

    Integrating attention mechanisms to improve the model’s capacity for relevant feature representation and classification performance.

  • •

    Insights obtained from proposed hybrid architecture with analysis of variance (ANOVA) selected signals better for OSA detection.

The model achieves high accuracy of 91.43 % and 95.36 % with F1-score of 0.86 and 0.75 respectively on two publicly available databases. The study emphasizes the need for alternative approaches for OSA and home-based detection methods. Given the global limited awareness of OSA, this study introduces an advanced, accessible, accurate diagnostic solution and outperforms traditional models.

Keywords: Sleep apnea, Deep learning, Obstructive sleep apnea, Polysomnography, Analysis of variance

Graphical abstract

Image, graphical abstract

Specifications table

Subject area Computer Science
More specific subject area Deep Learning
Name of your method CNN-BiLSTM hybrid alternative for detection of obstructive sleep apnea
Name and reference of original method None
Resource availability The UCD database is available on PhysioNet at https://physionet.org/content/ucddb/1.0.0/.
The OSASUD database is accessible via Springer Nature Figshare at https://springernature.figshare.com/collections/A_dataset_of_stroke_unit_recordings_for_the_detection_of_Obstructive_Sleep_Apnea_Syndrome/5630890.

Background

The study is conducted to suggest a novel approach to enhance accessibility and efficiency in detection of OSA by performing an in-depth analysis of computational performance between 14 physiological signals and top five features selected by ANOVA [1] to determine which of the signals can achieve comparable or superior performance. In the study [2] proposes a deep learning-based model for the diagnosis of Sleep Apnea-Hypopnea Syndrome from only SpO2 signals with the goal of reducing the complexity and cost of traditional PSG using convolutional neural network (CNN) model. Two datasets available publicly on PhysioNet, the Apnea-ECG and UCD Sleep Apnea databases were employed for training and testing with accuracies of 95.5 % and 90.2 % respectively. Authors in [3] explored CNN-BiLSTM architecture on the Wisconsin Sleep Cohort dataset for analyzing sleep stages based on image representations and patient-specific information, including stage durations and medical history, to enhance screening for OSA and comorbid condition. Exploring the domain, this study introduces a hybrid deep learning model with attention mechanism for multi-class classification of various apnea and hypopnea events for physiological time-series data with handling challenges such as misclassification and low precise results. And to evaluate the computational time efficiency of the proposed model when trained on both the full set of physiological signals and ANOVA selected feature subset. Aim is to propose a method that is quicker and equivalent effective than other traditional methods. To achieve this, we implemented and evaluated three DL models: a convolutional neural network [4], a bidirectional long short-term memory network [5], and a hybrid convolutional bidirectional long short-term memory [6] model. The use of the three models facilitates an inclusive comparison of spatial, temporal, and integrated feature extraction methods for OSA detection. Specifically, maximizing the CNN structure in hybrid model to improve overall classification accuracy, minimize misclassification errors, and identify OSA events more precisely over different sets of signals. This approach seeks to reduce dependence on expensive PSG-based diagnosis by highlighting other sets of signals that are equally valid for diagnosis but less expensive and comfortable for the patient without compromising diagnostic accuracy.

Method details

This section describes the proposed methodology. The method uses three deep learning (DL) models that are CNN, BiLSTM, and a hybrid model CNN-BiLSTM to identify sleep apnea (SA) and its subtypes, such as obstructive, central, mixed apneas, and hypopneas, keeping the focus on OSA. These models have been chosen since they can learn spatial features (CNN) and temporal relationships (BiLSTM) from physiological time-series data, and the hybrid model uses both to achieve improved performance. The dataset was segmented in an 80 % training set, 10 % validation set and 10 % test set. To mitigate the effects of class imbalance, minority class oversampling was performed on only the training set after segmentation, ensuring that the synthetic expansion of the less common apnea classification did not leak into the validation and/or test sets and artificially enhance performance metrics. The oversampling created a better representation of rare Apnea subtypes but did not alter the inherent temporal and physiological variability of the patient’s signals. ANOVA-based feature selection is utilized to preserve statistically significant signals, eliminating noise and enhancing model efficiency. Attention mechanisms are incorporated into the BiLSTM and hybrid models to enable the network to concentrate on clinically significant signal segments. Moreover, regularization techniques like dropout and batch normalization are used to avoid overfitting. New activation functions like swish [7] and gaussian error linear unit (GELU) [8] are experimented with to enhance model convergence and accuracy and to analyze model efficiency. A computational study has been performed with emphasis on training time and prediction time for hybrid model. The hybrid model being the targeted architecture is trained and evaluated on ANOVA selected features as well as the full PSG signal set. This is being done to evaluate if the reduced ANOVA feature set could provide a computationally equivalent, efficient and diagnostically good alternative to utilizing the full high-dimensional PSG data. In Fig. 1, the overall workflow for determining OSA using three DL models has been represented.

Fig. 1.

Fig. 1: dummy alt text

Workflow of the proposed methodology.

Dataset

In this study, two publicly available databases are used, St. Vincent University Hospital / University College Dublin Sleep Apnea Database (UCD) [9] available on PhysioNet and obstructive sleep apnea stroke unit dataset ( OSASUD) composed of overnight recordings of 30 patients that were admitted to the stroke unit of the Udine University Hospital, Italy [10]. The UCD database contains 25 full overnight PSG and the signals we used are: EEG (C3-A2 and C4-A1), left and right electrooculography (EOG), submental electromyography (EMG), ECG, oro-nasal airflow (thermistor), ribcage movements, abdomen movements, oxygen saturation, snoring, and body position [9]. The type of apnea events present in the UCD database are obstructive, mixed, and central Apnea/Hypopnea, No Event, and Periodic breathing. Table 1 shows a summary of 25 hospital-based subjects, including gender distribution, age, height, weight, body mass index (BMI), apnea–hypopnea i ndex (AHI), study duration, sleep efficiency, and number of European Data Format (EDF) data blocks. AHI values reflect PSG-derived events per hour, serving as a proxy for OSA severity.

Table 1.

Demographic and clinical characteristics of subjects in the UCDDB dataset.

Attribute Summary
Number of subjects 25
Gender distribution 20 Males (80 %), 5 Females (20 %)
Age (years) Mean: 50.6, Range: 34–68
Height (cm) Mean: 174.6, Range: 145–188
Weight (kg) Mean: 95.3, Range: 59.8–128.6
BMI (kg/m²) Mean: 32.0, Range: 25.1–42.5
PSG AHI (events/hour) Mean: 25.3, Range: 2–91
Study duration (hours) Mean: 6.9, Range: 5.9–7.7
Sleep efficiency ( %) Mean: 77.7, Range: 58–92
EDF blocks Mean: 25,520, Range: 21,350–27,711

The OSASUD database consists of a Pandas DataFrame with 18 columns and 961,357 rows, saved in Pickle format (file dataset OSAS.pickle). The signals recorded by PSG and used for this study are nasal airflow, snoring, body position, thoracic and abdominal movement [10]. Every line is marked by an anonymous patient code and annotated with a one-second granularity timestamp. Database columns have a wide range of vital sign information, such as multi-channel electrocardiography derived, photoplethysmography (PPG) derived attributes, physician information, and PSG signals [11]. The types of apnea events present in the OSASUD database are obstructive, mixed, and central Apnea, None, and Hypopnea.

Data preprocessing

The UCD database comprises physiological signals that were stored in .rec files, respiratory event annotations available in separate text files and patient-specific metadata, including PSG start and end times, were obtained from accompanying .xlsx sheets. As the UCD database lacked consistently labelled timestamps for annotations, preprocessing steps were undertaken to integrate and align the data for analysis.

For each of the 25 patients, raw signal data were extracted and combined into a unified DataFrame and key columns such as PatientID, Timestamp, Event Type, and Sleep Annotation were added into the new Pickle file. Timestamps were generated using the PSG start and end times, with a sampling frequency of 8 Hz (0.125-second intervals). Respiratory events were mapped by aligning annotation timestamps with exact apnea event occurrences, and each identified event was extended into a clinically relevant 30-second window, corresponding to 240 data points.

Apnea and hypopnea events were not re-scored and all event annotations were taken directly from the expert-scored labels provided with the UCD database, which follow American Academy of Sleep Medicine (AASM)-compliant scoring practices defined as a ≥ 90 % reduction in airflow lasting at least 10 s. Hypopnea events followed the AASM recommended criteria, requiring a ≥ 30 % reduction in airflow accompanied by either a ≥ 3 % oxygen desaturation or an EEG arousal. Accordingly, AHI values reported in this study correspond to an AHI3 % definition, and arousal-associated hypopneas were included as part of the dataset’s original scoring protocol. This temporal alignment procedure ensured accurate correspondence between clinical annotations and signal data without modifying event timing, duration, or labels. Missing values were addressed using linear interpolation followed by forward filling. To reduce the influence of outliers, all physiological signals were normalized using the RobustScaler technique (median and interquartile range). This normalization step was applied after temporal alignment and did not alter event timing or annotation boundaries and does not affect the underlying AASM-based scoring of respiratory events. Histograms, boxplots, and a correlation heatmap were employed to conduct Exploratory Data Analysis on the data in order to investigate how each signal is distributed and how they relate to one another. Additionally, Violin Plots and Boxplots were created for determining separability of features between different event types [12]. One-Way ANOVA (p < 0.05) was utilized to determine which features were statistically significant for classification purposes such as oxygen saturation, airflow (Flow), abdominal movement, body position and pulse rate. The preprocessed dataset was saved to a Pickle File for analysis during modeling stages.

The OSASUD database captures the real-world challenges of monitoring stroke patients in an electrically hostile environment, with recordings affected by noise and missing data. Preprocessing focused on enhancing data usability and model robustness. Multi-dimensional signal arrays such as ECG and PSG were reduced by computing their mean values to yield single-valued numeric features. Irrelevant and unused columns were excluded from further analysis, missing values were removed, and all features were standardized using z-score normalization. Later, one-way ANOVA (p<0.05) was conducted to select the most informative features resulting in, heart rate (HR, bpm), oxygen saturation ( %), premature ventricular contractions (PVCs/min), anomaly flag, and PSG Snore. These features contributed to effective dimensionality reduction and model focus for event classification.

Deep learningmodels

The significant imbalance with the No Event class dominating the dataset led to the oversampling of the minority apnea events threefold within the training set, following the initial segmentation of the data into the training, validation and testing partitions. This approach allowed for sufficient training samples to be provided for each apnea subtype having been trained using an independent training set, while keeping the validation and testing sets free from data leakage and giving a realistic assessment of the model's generalisation performance. The physiological information was broken into 30-second intervals (30-time steps) with each step having 15 important features like SpO2, airflow, body position, and pulse. Complete segments were utilized only. The data was then split into training (80 %), validation (10 %), and test (10 %) sets keeping the class balance intact.

CNN architecture

To detect OSA occurring events, CNN architecture was created based on multivariate physiological signals recorded in sleep studies. CNNs are particularly effective for time-series as they can learn and extract useful patterns automatically over time [13]. The CNN model architecture is shown in Fig. 2 such that it took input in the form of 30-time steps by 15 features. It was composed of four stacked 1DCNN layers with Swish activation function, which were each responsible for detecting increasingly complex signal patterns. The initial two layers involved normalization and pooling to increase stability and decrease dimensionality. A global pooling layer was added to reduce the dimensionality of the output that was followed by gaussian noise for regularization to prevent overfitting.

Fig. 2.

Fig. 2: dummy alt text

Architecture for CNN model.

A densely connected layer with 256 units with GELU activation (a smoother alternative to ReLU that improves performance in deep networks) and L2 penalties for regularization. It also had dropout applied with a rate of 0.4 and handled the pooled features prior to the last output layer, which employed a softmax function to output the input as one of the types of respiratory events and the model was trained on the adam optimizer with a learning rate of 0.0005 and the sparse categorical cross-entropy loss function appropriate for multi-class classification. For improving training, callbacks were introduced like model checkpoint (to save the model best fit) and ReduceLROnPlateau (to reduce the learning rate dynamically on plateauing validation loss) to save the best-performing model and adjust the learning rate when validation loss plateaued.

BiLSTM architecture

BiLSTM network is a recurrent neural network architecture that is well-suited for sequential data analysis, especially in clinical settings where temporal dependencies in both past and future time step are crucial [14]. This makes them exceptionally effective in detection of OSA. A BiLSTM model was implemented shown in Fig. 3, to learn temporal patterns from multivariate physiological signals captured over 30 s windows and every input sequence consisted of 30 steps in time, with 15 features in each step, which made the input shape (30, 15).

Fig. 3.

Fig. 3: dummy alt text

Architecture for BiLSTM model.

It starts with a bidirectional LSTM layer of 128 units, allowing the model to process both the sequence in reverse and forward simultaneously, thus improving its contextual perception of physiological dynamics. Dropout (0.3 rate) and recurrent dropout (0.15 rate) were used to avoid overfitting which was followed by a normalization layer to regularize training and enhance convergence. A second bidirectional LSTM layer with 64 units was added to further refine temporal feature extraction. To allow the attention layer to analyze the full sequence, the model was configured to keep outputs from each time step rather than just the final one. The attention layer calculated context vectors by assigning learned weights to each time step, enabling the model to focus on the most relevant segments for apnea event identification.

The context vector was fed into a dense layer with 128 units and GELU activation, which stimulated smooth learning and adaptive transformation of features. The L2 regularization was applied to constrain weight magnitudes, and dropout (0.4 rate) was used to improve generalization. The last classification was conducted by a softmax output layer with the number of units being the SA event classes. Training of the model was done with the adam optimizer and learning rate of 0.0005, and with the sparse categorical cross-entropy loss function, suitable for multi-class classification where labels are integers. The training performance was improved with callbacks including model checkpoint, ReduceLROnPlateau, and early stopping (to stop training when no improvement was seen).

Proposed CNN-BiLSTMhybridarchitecture

The suggested CNN-BiLSTM hybrid model integrates convolutional and recurrent networks to efficiently capture both spatial and temporal features from sequential physiological data to correctly classify SA events [15]. The model architecture is presented in Fig. 4. It accepts as input a reshaped sequence of 30-time steps, with each consisting of 15 physiological features, and includes a singleton channel dimension to ensure compatibility with Conv1D operations. This configuration allows the model to learn top-level patterns from multivariate time-series signals such as SpO2, flow, EMG, ECG, and body position that are crucial in identifying apnea and related events.

Fig. 4.

Fig. 4: dummy alt text

Architecture for CNN-BiLSTM Hybrid model.

The convolutional block consists of three-time distributed Conv1D layers (64, 128, 256 filters) with swish activation, layer normalization, and max pooling for extraction of local patterns in time. One global pooling layer was added which compresses temporal dimensions which was followed by a gaussian noise layer (std=0.1) to improve robustness. Later, the extracted spatial features are fed into two bidirectional LSTM layers (128 and 64 units), which capture long range dependencies in both forward and backward directions. The second bidirectional LSTM layer is designed to output the entire sequence of information it processes, rather than just the result. This allows the attention mechanism to examine and assign importance to each time step in the sequence, helping the model focus on the most relevant moments that indicate apnea events. This is followed by a dense layer (128 units) with GELU activation, L2 regularization, dropout (0.4), and the final softmax layer outputs probabilities for each apnea class.

The model is trained using the adam optimizer (learning rate = 0.0005) giving best results among all tested optimizers and sparse categorical cross-entropy loss, with callbacks for model checkpoint, ReduceLROnPlateau, and early stopping to optimize performance and prevent overfitting. Lastly, the hybrid model being the proposed solution and giving best accuracy among all tested architectures, to evaluate training efficiency, computational time was also calculated using all PSG features set and those using ANOVA selected features subset across varying epoch lengths (20 to 60, at 10-epoch intervals). This helped assess the impact of feature reduction on training time and model scalability. The model is optimally suited to the challenging task of detecting heterogeneous SA and OSA events in noisy and unbalanced physiological signals. Table 2 gives a clear overview of the three DL models used, including the exact layers and configurations employed in each architecture.

Table 2.

Summary of layers implemented for deep learning models used in this study.

Layer Type CNN BiLSTM CNN + BiLSTM Hybrid
Input Layer Includes Batch size, time steps, features per step, channels (64, 30, 15, 1) Includes Batch size, time steps, features per step (64, 30, 15) Includes Batch size, time steps, features per step, channels (64, 30, 15, 1)
Convolutional Layers 4 Conv1D layers with filters (64, 128, 256, 512) NA 3 TimeDistributed Conv1D layers with filters (64, 128, 256)
Pooling Layer 2 MaxPooling1D layers NA 2 TimeDistributed MaxPooling1D layers
Flatten Layer GlobalAveragePooling1D NA TimeDistributed GlobalAveragePooling1D
BiLSTM Layers NA 2 BiLSTM layers (128, 64 units) 2 BiLSTM layers (128, 64 units)
Attention Layer NA Attention layer after BiLSTM Attention layer after BiLSTM
Dense Layer 1 Dense layer with 128 units (GELU) 1 Dense layer with 128 units (GELU) 1 Dense layer with 128 units (GELU)
Dropout 0.4 0.4 0.4
Loss Function Sparse categorical cross entropy Sparse categorical cross entropy Sparse categorical cross entropy
Batch Size 64 64 64
Optimizer Adam Adam Adam
Activation Function Swish in CNN layers, GELU in dense layer, Softmax output GELU in dense layer, Softmax output Swish in CNN layers, GELU in dense, Softmax output
Callbacks ModelCheckpoint, ReduceLROnPlateau ModelCheckpoint, ReduceLROn-Plateau, EarlyStopping ModelCheckpoint, ReduceLROnPlateau, EarlyStopping
Gaussian Noise 0.1 NA 0.1
Steps per Epoch 200 200 200

Method validation

The outcome of the study is supported by validating the models and predicting the performance of all the three proposed models on two publicly available databases, UCD and OSASUD for all available features and ANOVA selected features to evaluate the trade-off between model complexity and diagnostic accuracy. The models were evaluated based on performance metrics including accuracy, precision, recall, F1-score, confusion matrix analysis, specificity, sensitivity, and computational time for hybrid model training and prediction time with a focus on both overall classification performance and per-class effectiveness, especially for minority SA types. Given the highly imbalanced nature of the databases special attention was given to how well each model handled the detection of underrepresented classes such as OSA, Central SA, and Mixed SA. Binary diagnostic evaluations resulted in a strong differentiation between OSA and non-OSA segments. High specificity (≈ 96 %) creates an extremely low false positive rate even in the face of extreme class imbalance. Overall sensitivity for OSA detection ranged from ≈82 % to ≈89 % across apnea and hypopnea subtypes, with higher sensitivity observed for obstructive events and comparatively lower values for mixed apneas, reflecting inherent differences in event morphology and prevalence. Positive predictive value (PPV) for OSA related events was between 87 %−93 %, while negative predictive value (NPV) was greater than 89 %, thereby demonstrating that events that did not occur in the OSA category could be reliably excluded as not being OSA events. Cohen's κ statistic ranged from 0.78–0.82, which represents substantial agreement between the labels annotated by the human expert and the model output. Additionally, the model did not demonstrate systematic bias towards the predominating "No Event" class. 95 % confidence intervals for diagnostic performance metrics were estimated post hoc using bootstrap resampling on the held-out test set.The inclusion of confidence intervals provides additional insight into the robustness of the proposed framework, particularly in the presence of class imbalance and small numerical differences between model variants, without implying clinical superiority. Table 3 shows binary metrics including sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and Cohen’s κ for mild (AHI ≥5), moderate (AHI ≥15), and severe (AHI ≥30) OSA categories with corresponding 95 % confidence intervals. The results showcase stable performance of the model across increasing disease severity.

Table 3.

Diagnostic performance of the model across clinically relevant AHI thresholds (≥5, ≥15, ≥30 events/hour) using AHI3 % scoring rules. Values are reported as point estimate (95 % CI).

AHI Threshold Sensitivity Specificity PPV NPV Cohen’s κ
≥5 0.995 (0.994–0.996) 0.816 (0.793–0.839) 0.992 (0.990–0.993) 0.884 (0.864–0.902) 0.842 (0.825–0.859)
≥15 0.995 (0.994–0.995) 0.834 (0.816–0.854) 0.989 (0.988–0.991) 0.909 (0.893–0.924) 0.862 (0.848–0.876)
≥30 0.993 (0.992–0.995) 0.829 (0.813–0.845) 0.984 (0.982–0.985) 0.924 (0.913–0.936) 0.863 (0.851–0.875)

For the UCD database, the CNN model trained with all 14 features with ANOVA selected features slightly outperformed all PSG features. This improvement in accuracy and F1-score indicates that ANOVA feature selection helped to reduce input noise and model overfitting, particularly benefiting minority classes. The BiLSTM model using all 14 physiological features without using ANOVA selected features gave a slightly better performance in accuracy and F1 which suggests some diminishment of the detailed signal information because of dimension reduction, although performance overall was high for ANOVA selected features.

The hybrid CNN-BiLSTM approach with all 14 features registered the highest accuracy of 91.43 % among all the models, with the F1-score of 0.87. The model also demonstrated a strong precision of 0.90 and recall of 0.84. This configuration showed strong and balanced performance across all SA and hypopnea types and accurately detected OSA events with high accuracy. For the ANOVA selected features the hybrid model still maintained strong performance, achieving an accuracy of 92.56 %, F1-score of 0.86. While overall for ANOVA selected features the hybrid model gave slightly lower performance than the all-features variant, this model still handled minority events with high precision of 0.93. A complete overview of performance for all the implemented models for UCD database is given in Table 4. These findings validate that the proposed model gave better outcomes than traditional PSG techniques used for the detection of OSA.

Table 4.

Comparative analysis of all implemented model performance on UCD database.

Features Selected Precision ( %)
Recall ( %)
F1 Score ( %)
CNN BiLSTM Hybrid CNN BiLSTM Hybrid CNN BiLSTM Hybrid
All 14 features 84 86 90 71 77 84 76 81 87
ANOVA selected [’SpO2’, ’Flow’, ’Abdo’, ’BodyPos’, ’Pulse’] 89 88 93 78 75 88 83 79 86

Note: Point estimates are reported for comparative purposes. Confidence intervals for diagnostic performance metrics are provided in Table 3.

Additionally, a comparative analysis was done to analyze the effect of different activation functions and optimizers on the performance of CNN as well as BiLSTM models represented in Table 5. With the Adam optimizer, the activation functions of ReLU, Tanh, GELU, Swish, and Softmax were compared, among which swish provided maximum accuracy for CNN and for BiLSTM [16]. As another comparison with a fixed activation as swish, optimizers like Adam, stochastic gradient descent (SGD), Root Mean Square Propagation (RMSprop), Adagrad, Adadelta, and Nadam were compared where Adadelta performed the maximum for CNN and Adam was optimal for BiLSTM [17].

Table 5.

Overview of using single optimizer and its impact on different activation functions and using single activation function showing its impact on different optimizers on UCD database.

Database Component Selected Accuracy ( %)
CNN BiLSTM
UCD Activation Functions using Adam optimizer ReLU 87.98 89.32
Tanh 87.99 89.22
Gelu 88.08 89.07
Swish 88.18 89.35
Softmax 86.90 89.05
Optimizers using Swish activation function Adam 88.27 89.28
SGD 87.61 87.83
RMSprop 88.13 88.86
Adagrad 85.07 84.31
Adadelta 88.63 78.93
Nadam 88.26 89.06

The computational analysis of the hybrid model displayed that training from ANOVA selected features consistently resulted in lower prediction time at different epochs compared to employing all features and is represented in Fig. 5. This reveals that ANOVA based dimensionality reduction improves computational efficiency without compromising predictive quality.

Fig. 5.

Fig. 5: dummy alt text

Comparative prediction time analysis across CNN-BiLSTM hybrid model using all features and ANOVA-selected features for OSA detection.

Fig. 6, demonstrates the CNN-BiLSTM Hybrid Model accuracy and loss training and validation curves where Training Accuracy achieved was between 84 % to 93 %, and Validation Accuracy plateaued at approximately around 90 % to 91 % after starting Epochs. The Loss curve also followed this trend - Training Loss steadily declined, while Validation Loss reached a plateau early in the Training phase - Both show stable learning without any indications that significant overfitting had occurred. Whereas, Fig. 7 illustrates the multi-class receiver operating charactrastics (ROC) curves obtained using a one-versus-rest evaluation strategy demonstrating ideal levels of discriminative ability for distinguishing between the multiple Apnea Subtypes (AUC Values from 0.98 – 1.0). In conclusion, Central, Obstructive and Mixed Apneas show better separation, and Hypopnea subtypes (and "No Event") Classifications also display a robust classification between low False Positives/High True Positives. The high True Positive rate, the low False Positive rate, and overall significant differences highlighted in the curves illustrate the robustness of this proposed model for discriminating clinically relevant respiratory event classes, despite a high degree of class imbalance between classes.

Fig. 6.

Fig. 6: dummy alt text

Training and validation accuracy and loss curves of the optimized CNN–BiLSTM hybrid model.

Fig. 7.

Fig. 7: dummy alt text

Post-hoc one-versus-rest ROC curves illustrating the model’s discriminative performance across individual apnea and hypopnea subtypes.

For the OSASUD database, our study evaluated the performance using different feature configurations: all features, ANOVA selected features, SpO2 alone, and a combination of SpO2 and HR as mentioned in Table 6. These predictions indicate that hybrid architecture always performs better than single CNN, particularly when more comprehensive feature sets are employed. Although, due to the data imbalance and misclassification for OSASUD database the F1-score comes out to be 0.75. Compared to earlier studies that typically reported high overall accuracy but missed minority apnea classes present in databases through extreme class imbalance and poor temporal modeling, the proposed hybrid approach demonstrates marked improvements. It delivers a generalizable and clinically meaningful solution, addressing key limitations in event-level OSA classification.

Table 6.

Comparison of accuracy with published work.

Ref. No. Database Feature Selected CNN Accuracy ( %) LSTM Accuracy ( %) CNN+LSTM Accuracy ( %) BiLSTM Accuracy ( %) CNN+BiLSTM Accuracy ( %) CNN+BiLSTM Prediction Time (min)
[11] OSASUD All 15 features 93.71 94.08 95.26 NA NA NA
Our study UCD ANOVA selected HR (bpm), SpO2 ( %), PVCs (min), anomaly, PSG, ORL 92.92 93.23 93.63 NA NA NA
Our study UCD ECG signals [ECG I, II, III] 84.12 84.75 83.85 NA NA NA
Our study UCD All 14 features 88.15 NA NA 89.06 91.43 0.97
Our study UCD ANOVA selected [SpO2, Flow, Abdo, BodyPos, Pulse] 88.59 NA NA 88.31 92.56 0.82
Our study OSASUD All 15 features 92.45 NA NA 95.21 95.29 0.64
Our study OSASUD ANOVA selected 88 NA NA 95.25 95.36 0.55
Our study OSASUD Only SpO2 91.81 NA NA 93.54 91.65 1.21
Our study OSASUD Only SpO2 and Heart Rate (HR) 89 NA NA 93.45 92 1.63

Limitations

The study adopts a binary OSA vs. Other formulation. Due to the very low number of central and mixed apnea events in UCDDB and OSASUD, reliable multi-class subtype evaluation was not practical. Future work will explore multi-class classification using larger datasets with adequate subtype representation. The current study includes a combined total of approximately 55 hospital-based subjects from UCDDB and OSASUD. Future work will focus on external validation using independent datasets, including home- and wearable-based recordings, as well as subject-wise cross-validation to better capture inter-subject variability. Despite its excellent performance, there are limitations to the proposed hybrid CNN–BiLSTM model. The UCD and OSASUD datasets contain high class Inequality that creates difficulty in smaller group apnoea type detection, which is only addressed partially by current techniques. While ANOVA-based feature selection made better computational efficiency, model robustness may be reduced by its opportunity to overlook small but informative features. Over and above this, the evaluation was only performed on two datasets, leaving the question of whether the model will generalize to other populations, sources of data, or wearable technology in general. How well it works in other settings by adding Gaussian noise to training is a handy utility, but it might struggle to simulate the complex variability and artefacts observed on actual physiological signals. Finally, although the model is clinically promising, its accuracy in clinical or home settings with actual-world data needs to be observed and powerful methods to manage class imbalance, i.e., resampling or data synthesis, have not been tested in this investigation.

Ethics statements

No animal experiments were performed, nor were animal subjects used in the research work presented in this paper.

The databases supporting the findings of this study are publicly available from the respective sources: The UCD database is available on PhysioNet at https://physionet.org/content/ucddb/1.0.0/. The OSASUD database is accessible via Springer Nature Figshare at https://springernature.figshare.com/collections/A_dataset_of_stroke_unit_recordings_for_the_detection_of_Obstructive_Sleep_Apnea_Syndrome/5630890.

CRediT author statement

Rishita Rathore: Writing – original draft, Methodology, Software, Formal analysis, Investigation, Data curation, Visualization.

Harsh Lakdawala: Writing – original draft, Methodology, Software, Formal analysis, Investigation, Data curation, Visualization.

Deepali Vora: Conceptualization, Writing – review & editing, Methodology, Software, Formal analysis, Investigation, Data curation, Visualization, Supervision, Project administration, Funding acquisition.

Nilima Zade: Conceptualization, Writing – review & editing, Methodology, Validation, Formal analysis, Investigation, Data curation, Visualization, Supervision, Project administration.

Aditya Gupte: Conceptualization, Methodology, Validation, Formal analysis, Data curation, Writing – review & editing, Visualization, Supervision, Project administration, Funding acquisition.

Shruti Patil: Formal analysis, Data curation, Writing – review & editing, Visualization, Supervision.

Related research article

None

For a published article

None

Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

The authors are grateful to the authorities of Symbiosis Institute of Technology, Pune, Symbiosis International (Deemed University), Pune, India, for their support. This research work was carried out under Major Research Project No. 1752 funded by Symbiosis International (Deemed University), Pune.

Data availability

Data will be made available on request.

References

  • 1.Prucnal M.A., Polak A.G. Single-channel eeg processing for sleep apnea detection and differentiation. Metrol. Meas. Syst. 2023;30:323–336. doi: 10.24425/mms.2023.144866. [DOI] [Google Scholar]
  • 2.Albuhayri M.A. Cnn model for sleep apnea detection based on spo2 signal. Comput. Inf. Sci. 2022;16:39. doi: 10.5539/cis.v16n1p39. [DOI] [Google Scholar]
  • 3.Ramesh J., Solatidehkordi Z., Sagahyroon A., Aloul F. Multimodal neural network analysis of single-night sleep stages for screening obstructive sleep apnea. Appl. Sci. (Switz) 2025;15 doi: 10.3390/app15031035. [DOI] [Google Scholar]
  • 4.Mukherjee D., Dhar K., Schwenker F., Sarkar R. Ensemble of deep learning models for sleep apnea detection: an experimental study. Sensors. 2021;21:5425. doi: 10.3390/s21165425. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Lee M., Kang H., Yu S.H., Cho H., Oh J., Lande G.V.D., Gosseries O., Jeong J.H. Automatic sleep stage classification using nasal pressure decoding based on a multi-kernel convolutional bilstm network. IEEE Trans. Neural Syst. Rehabil. Eng. 2024;32:2533–2544. doi: 10.1109/TNSRE.2024.3420715. [DOI] [PubMed] [Google Scholar]
  • 6.Mahmud T., Khan I.A., Mahmud T.I., Fattah S.A., Zhu W.P., Ahmad M.O. Sleep apnea detection from variational mode decomposed eeg signal using a hybrid cnn-bilstm. IEEE Access. 2021;9:102355–102367. doi: 10.1109/ACCESS.2021.3097090. [DOI] [Google Scholar]
  • 7.Ramos-Martinez M., Sorcia-V´azquez F.D.J., Ortiz-Torres G., Garc´ıa M.M., Mena-Enriquez M.G., Sarmiento-Bustos E., Mixteco-S´anchez J.C., Renter´ıaVargas E.M., Valdez-Resendiz J.E., Rumbo-Morales J.Y. Sleep apnea classification using the mean Euler–Poincar´e characteristic and ai techniques. Algorithms. 2024;17 doi: 10.3390/a17110527. [DOI] [Google Scholar]
  • 8.Olsen M., Zeitzer J.M., Nakase-Richardson R., Musgrave V.H., Sorensen H.B.D., Mignot E., Jennum P.J. A deep transfer learning approach for sleep stage classification and sleep apnea detection using wrist-worn consumer sleep technologies. IEEE Trans. Biomed. Eng. 2024;71:2506–2517. doi: 10.1109/TBME.2024.3378480. [DOI] [PubMed] [Google Scholar]
  • 9.Goldberger A.L., Amaral L.A.N., Glass L., Hausdorff J.M., Ivanov P.C., Mark R.G., Mietus J.E., Moody G.B., Peng C.-K., Stanley H.E. Physiobank, physiotoolkit, and physionet: components of a new research resource for complex physiologic signals. Circulation. 2000;101:215–220. doi: 10.1161/01.CIR.101.23.e215. [DOI] [PubMed] [Google Scholar]
  • 10.Bernardini A., Brunello A., Gigli G.L., Montanari A., Saccomanno N. Osasud: a dataset of stroke unit recordings for the detection of obstructive sleep apnea syndrome. Sci. Data. 2022;9:177. doi: 10.1038/s41597-022-01272-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Kulkarni P., Vora D., Dewangan P., Bindal R., Zade N., Singh A., Gupte A. Obstructive sleep apnea syndrome identification using cnn-lstm hybrid model. J. Electr. Syst. 2024;20:2386–2394. doi: 10.52783/jes.2013. [DOI] [Google Scholar]
  • 12.Anupama B., Ramana A.V., Kumar A., Daniel E., Chaitanya A.S., Reddy A.K. 2024 IEEE 13th International Conference on Communication Systems and Network Technologies (CSNT) IEEE; 2024. Sleep disorder prediction with ai user interface; pp. 1046–1052. [DOI] [Google Scholar]
  • 13.Barnes L.D., Lee K., Kempa-Liehr A.W., Hallum L.E. Detection of sleep apnea from single-channel electroencephalogram (eeg) using an explainable convolutional neural network (cnn) PLoS ONE. 2022;17 doi: 10.1371/journal.pone.0272167. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Azimi H., Xi P., Bouchard M., Goubran R., Knoefel F. Machine learning based automatic detection of central sleep apnea events from a pressure sensitive mat. IEEE Access. 2020;8:173428–173439. doi: 10.1109/ACCESS.2020.3025808. [DOI] [Google Scholar]
  • 15.Chen Y., Yang S., Li H., Wang L., Wang B. Prediction of sleep apnea events using a cnn–transformer network and contactless breathing vibration signals. Bioengineering. 2023;10 doi: 10.3390/bioengineering10070746. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Lai D.K.H., Cheng E.S.W., So B.P.H., Mao Y.J., Cheung S.M.Y., Cheung D.S.K., Wong D.W.C., Cheung J.C.W. Transformer models and convolutional networks with different activation functions for swallow classification using depth video data. Mathematics. 2023;11 doi: 10.3390/math11143081. [DOI] [Google Scholar]
  • 17.Chaw H.T., Kamolphiwong T., Kamolphiwong S., Tawaranurak K., Wongtanawijit R. Zleepnet: a deep convolutional neural network model for predicting sleep apnea using spo2 signal. Appl. Comput. Intell. Soft Comput. 2023 doi: 10.1155/2023/8888004. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Data will be made available on request.


Articles from MethodsX are provided here courtesy of Elsevier

RESOURCES