  The automatic detection of atrial fibrillation based on electrocardiograph
(ECG) signals has received wide attention both clinically and practically. It
is challenging to process ECG signals with cyclical pattern, varying length and
unstable quality due to noise and distortion. Besides, there has been
insufficient research on separating persistent atrial fibrillation from
paroxysmal atrial fibrillation, and little discussion on locating the onsets
and end points of AF episodes. It is even more arduous to perform well on these
two distinct but interrelated tasks, while avoiding the mistakes inherent from
stage-by-stage approaches. This paper proposes the Multi-level Multi-task
Attention-based Recurrent Neural Network for three-class discrimination on
patients and localization of the exact timing of AF episodes. Our model
captures three-level sequential features based on a hierarchical architecture
utilizing Bidirectional Long and Short-Term Memory Network (Bi-LSTM) and
attention layers, and accomplishes the two tasks simultaneously with a
multi-head classifier. The model is designed as an end-to-end framework to
enhance information interaction and reduce error accumulation. Finally, we
conduct experiments on CPSC 2021 dataset and the result demonstrates the
superior performance of our method, indicating the potential application of
MMA-RNN to wearable mobile devices for routine AF monitoring and early
diagnosis.
