MLATANet: a neural network based on multi-scale lead attention and temporal attention for the diagnosis of arrhythmia types
摘要
Automatic diagnosis of the type of arrhythmia of a patient achieved by ECG plays an important role in the prevention and treatment of cardiovascular diseases. In recent years, convolutional neural network (CNN) and recurrent neural network (RNN) have been widely used in ECG diagnosis, however, using a simple convolutional network to capture the complex local changes in the signal is difficult. RNN is not effective enough in modeling the context of long-distance signals with dense time steps, and most of the methods are mostly modeling the lead space or the time domain individually, failing to combine the two features effectively. Therefore, we propose a network (MLATANet) based on convolution-transformer architecture with multi-scale lead attention and time domain attention. In the shallow layers of the network, parallel multi-scale convolution is used to extract features at different temporal resolutions. Small convolution kernels are used to capture local subtle features, while larger convolution kernels are used to obtain local coarse contour features. After convolution, the lead attention is used to automatically assign more weights to important lead channels based on the importance of different channel information. In the deep layers of the network, Transformer’s multi-head self-attention is used to model the global temporal dependencies, enriching the feature expression in both temporal and spatial dimensions. In summary, first, spatial local features were captured through shallow multi-scale convolution and lead attention, then temporal global features were captured through deep Transformer multi-head self-attention, enabling the model to not only deeply explore the subtle aspects of the signal, but also analyze the signal from the overall trend, achieving an organic combination of local and global features. Experiments were conducted on the 2018 China Physiological Signal Challenge (CPSC2018) dataset, 2021 PhysioNet/Computing in Cardiology Challenge (CinC2021) dataset, PTB-XL dataset, and MIT-BIH dataset. The F1 values of the model on these datasets were 0.840, 0.610, 0.755, and 0.974, respectively, which were superior to traditional CNN and RNN models.