Content uploaded by Khaled Elleithy
Author content
All content in this area was uploaded by Khaled Elleithy
Content may be subject to copyright.
Content uploaded by Khaled Elleithy
Author content
All content in this area was uploaded by Khaled Elleithy
Content may be subject to copyright.
Content uploaded by Khaled Elleithy
Author content
All content in this area was uploaded by Khaled Elleithy
Content may be subject to copyright.
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 3, No.5, 2012
7 | P a g e
www.ijacsa.thesai.org
A Neural Network System for Detection of
Obstructive Sleep Apnea Through SpO2 Signal
Features
Laiali Almazaydeh, Miad Faezipour, Khaled Elleithy
Department of Computer Science and Engineering
University of Bridgeport
Bridgeport, CT 06604, USA
Abstract—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.
Keywords- sleep apnea; PSG; SpO2; features extraction; oximetry;
neural networks.
I. INTRODUCTION
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.
Polysomnography (PSG) is a test commonly ordered for
some sleep disorders. It records the breath airflow, respiratory
movement, oxygen saturation, body position,
electroencephalogram (EEG), electrooculogram (EOG),
electromyogram (EMG), and electrocardiogram (ECG) [4].
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 SpO2 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 SpO2
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
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 3, No.5, 2012
8 | P a g e
www.ijacsa.thesai.org
effort 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 time-
frequency 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 (SpO2)
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%.
III. METHODOLOGY
A. Subjects
The database of SpO2 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 SpO2
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.8 years) with
weights between 53 and 135 kg (mean: 86.3±22.2 kg). 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. SpO2 Signal
SpO2 is the amount of oxygen being carried by the red
blood cell in the blood. Very simply, SpO2 goes up and down
Figure 1. SpO2 record with OSA negative subject [12].
Figure 2. SpO2 record with OSA positive subject [12].
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 SpO2 record with OSA positive subject.
However, diagnosis of the disease is not evident by visual
inspection.
C. Features Extraction
In our work, the SpO2 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 SpO2 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 SpO2 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].
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 3, No.5, 2012
9 | P a g e
www.ijacsa.thesai.org
Central 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]:
2
)(
2
1
N
d
CTM
i
N
i
where,
5.0 1 1/2
22 112 iiii xxxxif
)( id
(2)
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
SpO2 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]:
2
1
1
N
n
nn yt
N
E
(3)
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.
Figure 3. Confusion matrix for training set classification.
Figure 4. Confusion matrix for testing set classification.
We applied Hardlim function [18] to test the data to improve
the output of the network in the validation and testing phases.
IV. RESULTS
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.
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 3, No.5, 2012
10 | P a g e
www.ijacsa.thesai.org
Figures 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.
TABLE I.
Comparison of Sleep Apnea Detection Approaches.
Method
Ref.
Approach
Performance [%]
Se
Sp
Acc.
Quiceno-
Manrique et al.
[5]
ECG signal
92.67
Alvarez et al.
[6]
SaO2 and EEG
signal
91
83.3
88.5
Ng et al.
[7]
Thoracic and
abdominal signals
NA
NA
80
Lin et al.
[8]
EEG signal
69.64
44.44
NA
Schrader et al.
[9]
HRV Fourier and
Wavelet
Transformation
90.8
NA
NA
Mendez et al.
[10]
Bivariate
autoregressive
model of HRV
NA
NA
85
Xie et al.
[11]
SpO2 and ECG
79.75
85.89
84.40
Proposed
-
Features
extraction of SpO2
signal
87.5
100
93.3
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.
ACKNOWLEDGMENT
We would like to express special thanks to Ahmad ElSayed
for his valuable suggestions in designing the Neural Network
for this study.
REFERENCES
[1] Sleep Disorders Guide. www.sleepdisordersguide.com.
[2] S. Isa, M. Fanany, W. Jatmiko and A. Arymurthy,“Sleep Apnea
Detection from ECG Signal, Analysis on Optimal Features, Principal
Components, and Nonlinearity,” in Proceedings of the 5th IEEE
International Conference on Bioinformatics and Biomedical
Engineering (iCBBE), pp. 1-4, May 2011.
[3] SleepMedInc. www.sleepmed.md.
[4] P. Chazal, T. Penzel and C. Heneghan, “Automated Detection of
Obstructive Sleep Apnoea at Different Time Scales Using the
Electrocardiogram,” Institute of Physics Publishing, vol. 25, no. 4, pp.
967-983, Aug. 2004.
[5] A.F. Quiceno-Manrique, J.B. Alonso-Hernandez, C.M. Travieso-
Gonzalez, M.A. Ferrer-Ballester and G. Castellanos-Dominguez,
“Detection of Obstructive Sleep Apnea in ECG Recordings using Time-
Frequency Distributions and Dynamic Features,” in Proceedings of the
31st IEEE International Conference on Engineering in Medicine and
Biology Society (EMBS 2009), pp. 5559-5562, Sep. 2009.
[6] D. Avarez, R. Hornero, J. Marcos, F. Campo and M. Lopez, “Spectral
Analysis of Electroencephalogram and Oximetric Signals in Obstructive
Sleep Apnea Diagnosis,” in Proceedings of the 31st IEEE International
Conference on Engineering in Medicine and Biology Society (EMBS
2009), pp. 400-403, Sep. 2009.
[7] A. Ng, J. Chung, M. Gohel, W. Yu, K. Fan and T. Wong, “Evaluation of
the Performance of Using Mean Absolute Amplitude Analysis of
Thoracic and Abdominal Signals for Immediate Indication of Sleep
Apnoea Events,” Journal of Clinical Nursing, vol. 17, no. 17, pp. 2360-
2366, Sep. 2008.
[8] R. Lin, R. Lee, C. Tseng, H. Zhou, C. Chao, J. Jiang,“A Ne w Approach
for Identifying Sleep Apnea Syndrome Using Wavelet Transform and
Neural Networks,” Biomedical Engineering: Applications, Basis &
Communications, vol. 18, no. 3, pp. 138-143, 2006.
[9] M. Schrader, C. Zywietz, V. Einem, B. Widiger, G. Joseph, “Detection
of Sleep Apnea in Single Channel ECGs from the PhysioNet Data
Base,” Computers in Cardiology 2000, vol. 27, pp. 263-266, Sep. 2000.
[10] M. Mendez, D. Ruini, O. Villantieri, M. Matteucci, T. Penzel and A.
Bianchi, “Detection of Sleep Apnea from Surface ECG Based on
Features Extracted by an Autoregressive Model, ” in Proceedings of the
IEEE International Conference on Engineering in Medicine and Biology
Society (EMBS 2007), pp. 6105-6108, Aug. 2007.
[11] B. Xie, H. Minn, “Real Time Sleep Apnea Detection by Classifier
Combination,” in IEEE Transactions on Information Technology in
Biomedicine (in Press), 2012.
[12] PhysioNet, www.physionet.org.
[13] What is SpO2. http://www.neann.com/spo2.htm.
[14] J. Marcos, R. Hornero, D. Alvarez, F. Campo, C. Zamrron and M.
Lopez, “Single Layer Network Classifiers to Assist in the Detection of
Obstructive Sleep Apnea Syndrome from Oximetry Data,” in
Proceedings of the 30th IEEE International Conference on Engineering
in Medicine and Biology Society (EMBS 2008), pp. 1651-1654, Aug.
2008.
[15] P. Levy, J. Pepin, C. Blanc, B. Paramelle and C. Brambilla, “Accuracy
of Oximetry for Detection of Respiratory Disturbances in Sleep Apnea
Syndrome,” Chestjournal, vol. 109, no. 2, pp. 395-399, Feb. 1996.
[16] D. Alvarez, R. Hornero, D. Abasolo, F. Campo and C. Zamarron,
“Nonlinear Characteristics of Blood Oxygen Saturation from Nocturnal
Oximetry for Obstructive Sleep Apnoea Detection,” Institute of Physics
Publishing, vol. 27, no. 4, pp. 399-412, Apr. 2006.
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 3, No.5, 2012
11 | P a g e
www.ijacsa.thesai.org
[17] J. Jeong, J. Gore and B. Peterson, “A Method for Determinism in Short
Time Series, and its Application to Stationary EEG,” in IEEE
Transactions on Biomedical Engineering, vol. 49, no. 11, pp. 1374-1379,
Nov. 2002.
[18] A. El-Solh, M. Mador, E. Brock, D. Shucard, M. Abdul-Khoudoud and
B. Grant, “Validity of Neural Network in Sleep Apnea,” Sleep journal,
vol. 22, no. 1, pp. 105-111, 1999.
[19] J. Marcos, R. Hornero, D. Alvarez, F. Campo and Miguel Lopez,
“Applying Neural Network Classifiers in the Diagnosis of the
Obstructive Sleep Apnea Syndrome from Nocturnal Pulse Oximetric
Recordings,” in Proceedings of the 29th IEEE International Conference
on Engineering in Medicine and Biology Society (EMBS 2007), pp.
5174-5177, Aug. 2007.