[Electrocardiogram signal classification algorithm of nested long short-term memory network based on focal loss function]

Sheng Wu Yi Xue Gong Cheng Xue Za Zhi. 2022 Apr 25;39(2):301-310. doi: 10.7507/1001-5515.202110002.
[Article in Chinese]

Abstract

Electrocardiogram (ECG) can visually reflect the physiological electrical activity of human heart, which is important in the field of arrhythmia detection and classification. To address the negative effect of label imbalance in ECG data on arrhythmia classification, this paper proposes a nested long short-term memory network (NLSTM) model for unbalanced ECG signal classification. The NLSTM is built to learn and memorize the temporal characteristics in complex signals, and the focal loss function is used to reduce the weights of easily identifiable samples. Then the residual attention mechanism is used to modify the assigned weights according to the importance of sample characteristic to solve the sample imbalance problem. Then the synthetic minority over-sampling technique is used to perform a simple manual oversampling process on the Massachusetts institute of technology and Beth Israel hospital arrhythmia (MIT-BIH-AR) database to further increase the classification accuracy of the model. Finally, the MIT-BIH arrhythmia database is applied to experimentally verify the above algorithms. The experimental results show that the proposed method can effectively solve the issues of imbalanced samples and unremarkable features in ECG signals, and the overall accuracy of the model reaches 98.34%. It also significantly improves the recognition and classification of minority samples and has provided a new feasible method for ECG-assisted diagnosis, which has practical application significance.

心电图(ECG)可直观地反映人体心脏生理电活动,在心律失常检测与分类领域中具有重要意义。针对ECG数据中类别不平衡对心律失常分类带来的消极作用,本文提出一种用于不平衡ECG信号分类的嵌套长短时记忆网络(NLSTM)模型。搭建NLSTM学习并记忆复杂信号中的时序特征,利用焦点损失函数(focal loss)降低易识别样本的权重;然后采用残差注意力机制(residual attention mechanism),根据各类别特征重要性修改已分配权值,解决样本不平衡问题;再采用合成过采样技术算法(SMOTE)对麻省理工学院与贝斯以色列医院心律失常(MIT-BIH-AR)数据库进行简单的人工过采样处理,进一步增加模型的分类准确率,最终应用MIT-BIH-AR数据库对上述算法进行实验验证。实验结果表明,所提方法能有效地解决ECG信号中样本不平衡、特征不突出的问题,模型的总体准确率达到98.34%,较大地提升对少数类样本的识别和分类效果,为心律失常辅助诊断提供可行的新方法。.

Keywords: Arrhythmia; Focal loss; Nested long short-term memory network; Residual attention; Synthetic minority over-sampling technique.

MeSH terms

  • Algorithms
  • Arrhythmias, Cardiac / diagnosis
  • Electrocardiography
  • Humans
  • Memory, Short-Term*
  • Neural Networks, Computer*
  • Signal Processing, Computer-Assisted

Grants and funding

国家高技术研究发展计划(2018YFC2002100)