A Neural Network System for Detection of Obstructive Sleep Apnea Through SpO2 Signal Features

Obstructive sleep apnea (OSA) is a common disorder in which individuals stop breathing during their sleep. These episodes last 10 seconds or more and cause oxygen levels in the blood to drop. Most of sleep apnea cases are currently undiagnosed because of expenses and practicality limitations of overnight polysomnography (PSG) at sleep labs, where an expert human observer is required. New techniques for sleep apnea classification are being developed by bioengineers for most comfortable and timely detection. In this study, we develop and validate a neural network (NN) using SpO2 measurements obtained from pulse oximetry to predict OSA. The results show that the NN is useful as a predictive tool for OSA with a high performance and improved accuracy, approximately 93.3%, which is better than reported techniques in the literature.


A. Background
Excessive daytime sleepiness and fatigue are the most symptoms of sleep disorders.The risk of sleepiness and fatigue lead to poor judgment and reaction time, especially for the drivers who do not take sleepiness seriously.
Sleep apnea is becoming a more common cause of sleepiness in children and adults.It is characterized by abnormal pauses of breathing or abnormally low breath during sleep.These pauses of breathing can range in frequency and duration.The duration of the pause might be ten to thirty seconds and upwards to as much as four hundred per night in those with severe sleep apnea [1].
Sleep apnea is classified into two types.The first type is Obstructive Sleep Apnea (OSA), which is generally caused by a collapse of the upper respiratory airway.The second one is Central Sleep Apnea (CSA), which is caused by inhibited respiratory drive, since the brain fails to appropriately control breathing during sleep.Out of the two sleep apnea types, OSA is more common than CSA [2].
Sleep apnea is not a problem to be taken lightly, since it is associated with, and is the possible cause of other medical conditions such as high blood pressure, heart disease, diabetes and depression.
Statistics show that over 18 million Americans suffer from sleep apnea, while an estimate of 10 million Americans remain undiagnosed [3].Most cases go undiagnosed because of the inconvenience, expenses and unavailability of testing.Testing is inconvenient to the patient because it requires them to spend the night away from their bed, causing discomfort.It is expensive because testing is done in the hospital, causing machines and various technicians and staff to work over night.Testing is also widely unavailable due to sleep centers operating at full capacity, and those on the waiting list can be untreated for an additional 6 months.To summarize, the mere dependency on PSG needs to be taken away from the laboratory for simpler detection and faster treatment.In this regard, we present a work based on a neural network using SpO 2 features extraction that will be used in a larger real time system for sleep apnea diagnosis.The objective of the system is to alert a patient who might be subject to an apnea attack.

B. Paper Organization
The rest of this paper is organized as follows.In Section II we glance at a variety of sleep apnea detection methods.Section III contains an overview of the system, including a description of the database of subjects, and the details of the analysis methodology including features extraction of the SpO 2 signal.The Neural Networks we used in this work is also described in the same Section.In Section IV, we detail the results of our system.Finally, Section V concludes this paper regarding the potential usefulness of our system, and highlights some directions for future research.

II. RELATED WORK
Several methods have been suggested for identification of sleep apnea over the past few years.Statistical features of different signals such as nasal air flow, the thorax and abdomen www.ijacsa.thesai.orgeffort signals, acoustic speech signal, oxygen saturation, electrical activity of the brain (EEG), and electrical activity of the heart (ECG) are commonly used in the detection.
Quiceno-Manrique et al. [5] proposed a simple diagnostic tool for OSA with a high accuracy (up to 92.67%) using timefrequency distributions and dynamic features in ECG signal.
The relationship between periodic changes in the oxygen saturation (SaO2) profile and in the EEG pattern due to apnea events during the night was investigated in [6].The spectral analysis of these two signals achieved 91% sensitivity, 83.3% specificity and 88.5% accuracy in OSA diagnosis.
Ng et al. [7] showed that thoracic and the abdominal signals were good parameters for the identification of the occurrence of sleep apnea.Using the mean of absolute amplitudes of the thoracic and the abdominal signals, the authors achieved good performance with a receiver operating characteristic value higher than 80%.
Wavelet transforms and an artificial neural network (ANN) algorithm were applied to the EEG signal in [8] to find a solution to the problem of identifying sleep apnea (SA) episodes.The system's identification results achieved a sensitivity of approximately 69.64% and a specificity of approximately 44.44%.
Based on spectral components of heart rate variability (HRV), frequency analysis was performed in [9] to detect sleep apnea.Using Fourier and Wavelet Transformation with appropriate application of the Hilbert Transform, the sensitivity was 90.8%.In addition, in [10] a bivariate autoregressive model was used to evaluate beat-by-beat power spectral density of HRV and R peak area, where the sleep apnea classification results showed accuracy higher than 85%.
The study in [11] assesses the analysis of various feature sets and a combination of classifiers based on the arterial oxygen saturation signal measured by pulse oximetry (SpO 2 ) and the ECG in order to evaluate sleep quality.With selected features of the SpO2 and ECG signals, the Bagging with REP Tree classifier achieved sensitivity of 79.75%, specificity of 85.89% and overall accuracy of 84.40%.

A. Subjects
The database of SpO 2 signals used in this research is available from the PhysioNet web site [12].
PhysioNet contains a growing collection of biomedical signals from healthy subjects and patients.The PhysioNet web site is a public service of the PhysioNet Resource funded by the National Institutes of Health's NIBIB and NIGMS.PhysioNet offers free access to Apnea-ECG Database, which we use to assess and validate our approach.
The Apnea-ECG Database contains 8 recordings with SpO 2 signals.These recordings have varying length from slightly less than 7 hours to nearly 10 hours each.
The subjects of these recordings were men and women between 27 and 63 years of age (mean: 43.8±10.8years) with weights between 53 and 135 kg (mean: 86.3±22.2kg).The sleep recordings originated from 32 subjects (25 men, 7 female), who were recruited for previous studies on healthy volunteers and patients with obstructive sleep apnea [4].

B. SpO 2 Signal
SpO 2 is the amount of oxygen being carried by the red blood cell in the blood.Very simply, SpO 2 goes up and down  according to how well a person is breathing and how well the blood is being pumped around the body [13].
SpO2 measured by pulse oximetry can be useful in OSA diagnosis.Significant changes can be found in patients affected by OSA because of the recurrent episodes of apnea, which are frequently accompanied by oxygen desaturations [14].
Figure 1 depicts a common OSA negative subject, and Figure 2 shows a SpO 2 record with OSA positive subject.However, diagnosis of the disease is not evident by visual inspection.

C. Features Extraction
In our work, the SpO 2 signals are saved to separate files and processed off-line by an automated system we developed using MATLAB to compute two of the common oximetric indices and one nonlinear metric.
These three features are detailed as follows, respectively: 1) Delta index (∆ index): This is a common measure to detect the apneic events by measuring SpO 2 variability.Levy et al. [15] calculates ∆ index as the sum of the absolute variations between two successive points, divided by the number of intervals.It is usually computed for 12-sec.intervals.
2) Oxygen desaturation indices of 3% (ODI3): This measure is obtained by calculating the number of times per hour with values of SpO 2 greater than or equal to 3% from the baseline.The baseline is set initially as the mean level in the first 3 minutes of recording [16].www.ijacsa.thesai.orgCentral tendency measure with radius 0.5 (CTM50): This measure applied in [16].CTM50 is computed by selecting a circular region of radius 0.5 around the origin, counting the number of points that fall within the radius, and dividing by the total number of points.Given N data points from a time series, N-2 would be the total number of points in the scatter plot.Hence, CTM50 can be computed as [17]: otherwise 0

D. Multi layer Networks Classifiers
In this research, we apply a neural network (NN) as a classifier to identify the diagnostic performance of OSA using SpO 2 features.
A neural network is used to perform a pattern classification task.NNs classifiers have been proven to be extremely helpful in assisting medical specialties in clinical diagnosis [18].
The NN described in this study is based on three layers feed-forward neural network learned with back-propagation algorithm; an input layer, an output layer, and a hidden layer.The hidden layer consists of a direct connection between the input and the output layer.
The three SpO2 features act as inputs to a neural network, and the diagnosis of OSA is the target.This is achieved by presenting previously recorded inputs to a neural network and then tuning it to produce the desired target outputs.This process is called neural network training.
A total of 93data sets (41 with a positive diagnosis of OSA and 52 with a negative diagnosis of OSA) are used.Validation is done with the same training dataset, and test dataset has been set to 17% of the original data.With these settings, the input vectors and target vectors will be randomly divided into two sets as follows:  83% are used for training and validation.
 The last 17% are used as a completely independent test of network generalization.
The training set with 78 samples was used to train the network.Network parameters are adjusted through training by attempting to minimize the error between the target (t) and the actual (y) network output values.This error is expressed as the mean square error [19]: where N is the number of samples in the training set.
In the training phase, the Purelin linear transfer function has been used as an activation function of the output layer of the network (for improving error derivative) [18].Since the output space must be divided into two regions: OSA positive and OSA negative, we suggest using a single output node.We applied Hardlim function [18] to test the data to improve the output of the network in the validation and testing phases.

A. Performance Evaluation
We evaluated the classification performance of the selected network configurations on the test set.Sensitivity, specificity for testing data and accuracy are computed.A confusion matrix is generated for the NN evaluation.www.ijacsa.thesai.orgFigures 3 and 4 show the confusion matrix for training and testing set classification, respectively.The confusion matrix shows the total percent of correctly classified cases and the total percent of misclassified cases.
The results show very good network validation performance of 85% and high diagnostic performance with an accuracy of 93.3% correct detection rate (sensitivity 87.5%, and specificity 100%).As a result, to reduce the dependency on complex PSG test measures, we find that NN using SpO2 measurements is a practical and useful screening test to estimate whether patients have sleep apnea or not.

B. Comparison With other Works
We performed a comparison with other sleep apnea detection techniques.Table I represents comparative results.As can be seen, our system has achieved a comparable or better performance.This applies to the other works that rely on the SpO2 signal as well as other biometric signals.

V. CONCLUSION AND FUTURE DIRECTIONS
In this work, we studied the possibility of the detection of sleep apnea from the SpO2 signal variation patterns.We further developed a NN using the SpO2 signal features and evaluated its effectiveness.This study has demonstrated a high performance and an improved accuracy of the NN.
A future direction to this work would be to apply our methodology to a larger population to validate the results obtained with this radius.
As another future direction, we are also planning to compute the CTM with several radii for every SpO2 signal in both OSA positive and OSA negative groups.Then, we select the optimum radius that achieves the most significant differences.
Moreover, we are planning to analyze the ECG features signals, in order to use it along with the SpO2 signals to build a two parameter technique and apply that as a system for automated recognition of OSA.

Figure 3 .
Figure 3. Confusion matrix for training set classification.

Figure 4 .
Figure 4. Confusion matrix for testing set classification.

TABLE I .
Comparison of Sleep Apnea Detection Approaches.