AF Detection by Exploiting the Spectral and Temporal Characteristics of ECG Signals with the LSTM Model

Yen-Chun Chang1, Sau-Hsuan Wu1, Li-Ming Tseng2, Hsi-Lu Chao1, Chun-Hsien Ko1
1National Chiao Tung University, 2Shin Kong Wu Ho-Su Memorial Hospital


Abstract

Aims: This research reinvestigates the detection of atrial fibrillation (AF) from a recurrent neural network (RNN) perspective, aiming to identify a proper RNN architecture to exploit the high-order spectral and temporal features of ECG signals for AF detection. Methods: Research results on AF detection have shown that not only the deviation of the so-called RR intervals of ECG signals but also its temporal variations are critical to AF detection. Inspired by this observation, we pro-pose to exploit the high-order spectral and temporal features of ECG for AF detection with a long short term memory (LSTM) model of RNN. By having the spectrogram of the ECG signals of every 12 s as the input, we idenitfy an efficient architecture of LSTM for AF detection, both from the model complexity and the convergence of parameter training viewpoints as shown in the figure. The proposed model allows us to extract both the long-term and short-term characteristics of the spectral content of ECG signals, making it an excellent deep learning model for AF detection. Results: We tested our LSTM model with ECG data available from the MIT-BIH Normal Sinus Rhythm Database, the MIT-BIH AF Database, the MIT-BIH Long-Term ECG database, and the Long-Term AF Database. Together with some normal ECG data collected in our labs, we have a total of 3,140 data segments, divided into 2,140 training and 1,000 testing data segments. The experimental results show that the accuracy of AF detection can reach up to 98.3%, with a model of using 30 hidden units. Conclusion: We presented an LSTM model for the AF detection using typi-cal ECG signal, with an accuracy reaching up to 98.3%.