# Heart Murmur Quality Detection Using Deep Neural Networks with Attention Mechanism
###### Abstract  
Heart murmurs play a critical role in assessing the condition of the heart. Murmur quality reflects the subjective human perception of heart murmurs and is an important characteristic strongly linked to cardiovascular diseases (CVDs). This study aims to use deep neural networks to classify the patients' murmur quality (i.e., harsh and blowing) from phonocardiogram (PCG) signals. The phonocardiogram recordings with murmurs used for this task are from the CirCor DigiScope Phonocardiogram dataset, which provides the murmur quality labels. The recordings were segmented, and a dataset of 1266 segments with average lengths of 4.1 s from 164 patients' recordings was obtained. Each patient usually has multiple segments. A deep neural network model based on convolutional neural networks (CNNs) with channel attention and gated recurrent unit (GRU) networks was first used to extract features from the log-Mel spectrograms of segments. Then, the features of different segments from one patient were weighted by the proposed \"Feature Attention\" module based on the attention mechanism. The \"Feature Attention\" module contains a layer of global pooling and two fully connected layers. Through it, the different features can learn their weight, which can help the deep learning model distinguish the importance of different features of one patient. Finally, the detection results were produced. The cross-entropy loss function was used to train the model, and five-fold cross-validation was employed to evaluate the performance of the proposed methods. The accuracy of detecting the quality of patients' murumurs is 73.6%. The F1-scores (precision and recall) for the murmurs of harsh and blowing are 76.8% (73.0%, 83.0%) and 67.8% (76.0%, 63.3%), respectively. The proposed methods have been thoroughly evaluated and have the potential to assist physicians with the diagnosis of cardiovascular diseases as well as explore the relationship between murmur quality and cardiovascular diseases in depth. cardiovascular diseases (CVDs); computer-aided diagnosis; heart murmur quality detection; phonocardiogram (PCG); deep learning; attention mechanism +
Footnote †: journal:  
experience [2], which limits its popularization in most low- and middle-income countries that lack cardiologists [5]. Computer-aided auscultation offers a solution by significantly decreasing the cost related to cardiac auscultation, efficiently addressing this difficulty. Computer-aided heart sound classification and detection is a crucial part of computer-aided auscultation. Most studies in this field now focus on determining the presence or absence of heart murmurs and the normality or abnormality of heart sounds. An overview of the methods used in these studies can be found in [6; 7; 8]. Notably, except for [5; 9], there has been limited research using deep learning methods to explore more detailed PCG signal characteristics such as the grading, pitch, shape, timing, and quality of heart sounds, though they are all important for assessing the condition of the heart. Heart murmurs include systolic and diastolic murmurs, which occur during the systole period and the diastolic period, respectively. According to the classification of Leather, systolic heart murmurs are majorly divided into the systolic ejection murmur and the systolic regurgitant murmur. The \"harsh\" quality is most commonly found in the systolic ejection murmur, and the presence of this type of murmur is usually associated with innocent systolic flow murmurs and valvular or vascular obstruction. The qualities of \"blowing\" and \"harsh\" are all likely to be found in the systolic regurgitant murmur, and the presence of these murmurs is associated with mitral or tricuspid regurgitation and ventricular septal defect [10]. So, the use of computer-aided detection of murmur quality would provide richer and more accurate information related to the CVDs for computer-aided auscultation.