Interpretable method and system for ventricular premature beat auxiliary diagnosis model

By combining the interpretability method of layer-by-layer correlation propagation and Bayesian model, the contribution and uncertainty of each waveform feature in the electrocardiogram data to the diagnosis of ventricular premature beats is solved, and the problem of reduced diagnostic accuracy caused by the limitations of electrogram data processing in the existing technology is achieved, achieving higher diagnostic accuracy and credibility for clinical applications.

CN120131035AActive Publication Date: 2025-06-13SUZHOU UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510210346.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-13
Estimated Expiration
2045-02-25

AI Technical Summary

Technical Problem

Existing interpretable methods have limitations in processing complex ECG data, resulting in reduced accuracy in ventricular premature beat diagnosis.

Method used

The layer-by-layer correlation propagation interpretability method is adopted, starting from the output layer of the ventricular premature beat assisted diagnostic model, the correlation score is backpropagated to the input layer layer by layer, and the contribution of each waveform feature to the predicted classification results is obtained. The uncertainty of the predicted classification results is calculated through the Bayesian model, and the decision tree is finally constructed to obtain the target classification results.

Benefits of technology

It improves the accuracy of ventricular premature beat diagnosis, and increases the credibility and transparency of the model in clinical applications through uncertainty assessment and interpretability analysis, helps doctors make more reliable decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120131035A_ABST
    Figure CN120131035A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electrocardiogram signal analysis, in particular to an interpretable method and system for a ventricular premature beat auxiliary diagnosis model and a computer readable storage medium. Inputting the preprocessed electrocardiogram image into a ventricular premature beat auxiliary diagnosis model, and outputting a prediction classification result of ventricular premature beat; adopting a layer-by-layer correlation propagation interpretability method to obtain the contribution degree of each waveform feature to a classification result; obtaining statistical characteristics of contribution degrees of the waveform characteristics to classification results, inputting the statistical characteristics into a Bayesian model, and calculating uncertainty of prediction classification results of ventricular premature beat; and constructing a decision tree according to the contribution degree of each waveform feature to the classification result and the uncertainty of the classification result to obtain a target classification result. According to the method, the accuracy of ventricular premature beat diagnosis is improved, the credibility and transparency of the model in clinical application are increased, and doctors can be helped to make more reliable decisions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrocardiogram signal analysis, and in particular to an interpretable method, system and computer-readable storage medium for a ventricular premature beat assisted diagnosis model. Background Art

[0002] As a non-invasive tool for cardiac health examination, electrocardiogram is widely used in the screening, diagnosis and monitoring of heart diseases. In recent years, with the rapid development of medical imaging technology, sensor technology and deep learning algorithms, the accuracy and efficiency of electrocardiogram analysis have been significantly improved.

[0003] In traditional electrocardiogram analysis, doctors usually rely on manual methods to judge various abnormalities in electrocardiograms. Although the accuracy is relatively high, there are still certain errors and workload. With the application of deep learning, especially the introduction of convolutional neural networks and recurrent neural networks, automated electrocardiogram analysis has begun to make significant progress. The ventricular premature beat assisted diagnosis model can automatically extract complex features from a large amount of electrocardiogram data and perform classification, prediction and anomaly detection based on this. These technologies have greatly improved the efficiency and accuracy of electrocardiogram analysis, especially in the detection of arrhythmias such as ventricular premature beats.

[0004] However, with the increasing complexity of the ventricular premature beat assisted diagnosis model, the "black box" characteristic of the model has become the main obstacle in clinical applications. Doctors often cannot directly understand how the model obtains the target classification result, which limits the use of the model in clinical decision-making. To overcome this problem, model interpretability has gradually become a research hotspot. Common interpretability methods include Local Interpretable Model-Agnostic Explanations (LIME) and SHapley Additive exPlanations (SHAP). These interpretability methods improve model transparency by analyzing the decision-making mechanism of the model on specific inputs. Although they can provide a certain degree of interpretability, there are still limitations in dealing with complex electrocardiogram data. Especially in the medical field, existing interpretability methods are often too simplistic and cannot accurately reflect the feature interaction relationships in time series data. Especially in the processing of complex electrocardiogram signals, they cannot fully show the actual contributions of different electrocardiogram features to the target classification result. For example, LIME cannot effectively capture the temporal characteristics and non-linear features of electrocardiogram waveforms, resulting in lower reliability and accuracy of its interpretation results. Although SHAP can provide a contribution score for each feature, in electrocardiogram data analysis, the computational cost and resource consumption of SHAP are very large. Especially on large-scale electrocardiogram datasets, the computational overhead of SHAP often leads to its inefficient application and is difficult to meet the needs of clinical real-time diagnosis.

[0005] In summary, the existing interpretable methods still have limitations in processing complex electrocardiogram data, reducing the efficiency and accuracy of electrocardiogram data analysis, and further leading to a decrease in the accuracy of ventricular premature beat diagnosis. Summary of the Invention

[0006] Therefore, the technical problem to be solved by the present invention is to overcome the limitation that the existing interpretable methods still have in processing complex electrocardiogram data, resulting in a decrease in the accuracy of ventricular premature beat diagnosis.

[0007] To solve the above technical problem, the present invention provides an interpretable method for a ventricular premature beat auxiliary diagnosis model, including:

[0008] Input the preprocessed electrocardiogram image into the trained ventricular premature beat auxiliary diagnosis model, and output the predicted classification result of ventricular premature beat;

[0009] Adopt the layer-by-layer relevance propagation interpretability method, starting from the output layer of the ventricular premature beat auxiliary diagnosis model, and reversely propagate the relevance scores layer by layer to the input layer to obtain the contribution degree of each waveform feature to the predicted classification result; among them, the relevance score of the output layer is obtained according to the predicted classification result of ventricular premature beat;

[0010] Obtain the statistical features of the contribution degree of each waveform feature to the predicted classification result and input them into the Bayesian model to calculate the uncertainty of the predicted classification result of ventricular premature beat;

[0011] Construct a decision tree according to the contribution degree of each waveform feature to the predicted classification result and the uncertainty of the predicted classification result to obtain the target classification result.

[0012] Preferably, obtaining the electrocardiogram image and performing preprocessing includes:

[0013] Convert the original electrocardiogram image containing 12-lead signals into a grayscale image and then crop it, and then perform denoising processing on the cropped electrocardiogram image;

[0014] Cut the denoised electrocardiogram image along the middle axis, splice the right half of the image below the left half of the image, and align it according to the time series;

[0015] Select the required heartbeat signals from the aligned image for cropping, and divide them into 12 subgraphs according to the lead signals;

[0016] Splice the 12 subgraphs along the depth direction to obtain the preprocessed electrocardiogram image.

[0017] Preferably, a local domain-based filtering method is used to perform denoising processing on the cropped electrocardiogram image, including:

[0018] For each pixel point x in the cropped electrocardiogram image ab , calculate the neighborhood average value of its 3×3 neighborhood. The formula is as follows:

[0019]

[0020] Where represents the neighborhood average value of pixel point x ab , x a+m,b+n represents the neighborhood pixels of pixel point x ab , and m and n respectively represent the neighborhood index values of the abscissa and ordinate;

[0021] If the neighborhood average value of the pixel point is greater than 200, then set the value of this pixel point to 255.

[0022] Preferably, the ventricular premature beat auxiliary diagnosis model includes a plurality of 3×3 convolutional layers, a plurality of residual blocks, an average pooling layer, a 5×1 convolutional layer, and a fully connected layer connected in sequence; the residual block includes two 3×3 convolutional layers and an SE attention block connected in sequence, and a skip connection is made between the input feature of the residual block and the output feature of the SE attention block.

[0023] Preferably, using the layer-by-layer relevance propagation interpretability method, starting from the output layer of the ventricular premature beat auxiliary diagnosis model, the relevance scores are propagated layer by layer in the reverse direction to the input layer to obtain the contribution degrees of each waveform feature to the prediction classification result, including:

[0024] The relevance of the i-th pixel node in the feature map of the electrocardiogram image of the l-th layer of the ventricular premature beat auxiliary diagnosis model The calculation formula is:

[0025]

[0026] Where n l+1 is the number of pixel nodes in the (l + 1)-th layer, represents the activation value of the k-th pixel node in the (l + 1)-th layer, represents the input weighted sum of the i-th pixel node in the l-th layer, represents the relevance of the k-th pixel node in the (l + 1)-th layer; σ′ is the derivative of the activation function σ, represents the input weighted sum, which is obtained by weighted summing the activation values of all pixel nodes in the l-th layer, n l is the number of pixel nodes in the l-th layer, represents the weight connecting the j-th pixel node in the l-th layer to the k-th pixel node in the (l + 1)-th layer, represents the activation value of the j-th pixel node in the l-th layer, represents the weight connecting the i-th pixel node in the l-th layer to the k-th pixel node in the (l + 1)-th layer;

[0027] The relevance scores are propagated layer by layer in reverse to the input layer, and a contribution heat map is formed based on the relevance of all pixel nodes in the feature map of the electrocardiogram image in the input layer. The contribution of each waveform feature to the prediction classification result is obtained through the contribution heat map.

[0028] Preferably, the weight connecting the i-th pixel node in the l-th layer to the k-th pixel node in the l+1-th layer is calculated as follows: The weight of the i-th pixel node in the l-th layer to the k-th pixel node in the l+1-th layer is calculated based on the spatial distance where d(k,i) represents the spatial distance between the i-th pixel node in the l-th layer and the k-th pixel node in the l+1-th layer, and σ 1 represents the hyperparameter that controls the weight decay.

[0029] Preferably, the statistical features of the contribution of each waveform feature to the prediction classification result are obtained and input into the Bayesian model, and the uncertainty of the prediction classification result of ventricular premature beats is calculated by the MC Dropout method, including:

[0030] The Bayesian model performs multiple random forward propagations, and the mean of the prediction probabilities of the random forward propagations is calculated based on the prediction probabilities of each random forward propagation;

[0031] The statistical features of the contribution of each waveform feature to the prediction classification result are obtained, including the mean and variance of the contribution of each waveform feature to the prediction classification result; The uncertainty of the prediction classification result of ventricular premature beats is calculated based on the mean of the prediction probabilities of the random forward propagations and the statistical features of the contribution of each waveform feature to the prediction classification result.

[0032] Preferably, the uncertainty of the prediction classification result of ventricular premature beats is calculated based on the mean of the prediction probabilities of the random forward propagations and the statistical features of the contribution of each waveform feature to the prediction classification result, and the formula is:

[0033]

[0034] where, U c represents the uncertainty of the prediction classification result c of ventricular premature beats, represents the mean of the prediction probabilities of the random forward propagations, T represents the number of random forward propagations, represents the prediction probability of the t-th random forward propagation; f 1 and f 2 represent the mean and variance of the contribution of each waveform feature to the prediction classification result respectively.

[0035] The present invention also provides an interpretable system for a ventricular premature beat assisted diagnosis model, including:

[0036] A classification module, configured to input the preprocessed electrocardiogram image into a trained ventricular premature beat auxiliary diagnosis model, and output a predicted classification result of ventricular premature beats;

[0037] A contribution degree acquisition module, configured to adopt a layer-by-layer relevance propagation interpretability method, starting from the output layer of the ventricular premature beat auxiliary diagnosis model, and reversely propagate the relevance scores layer by layer to the input layer to obtain the contribution degrees of each waveform feature to the predicted classification result; wherein, the relevance scores of the output layer are obtained according to the predicted classification result of ventricular premature beats;

[0038] An uncertainty acquisition module, configured to obtain statistical features of the contribution degrees of each waveform feature to the predicted classification result and input them into a Bayesian model, and calculate the uncertainty of the predicted classification result of ventricular premature beats;

[0039] A decision-making module, configured to construct a decision tree based on the contribution degrees of each waveform feature to the predicted classification result and the uncertainty of the predicted classification result, and obtain a target classification result.

[0040] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned interpretable method for a ventricular premature beat auxiliary diagnosis model are implemented.

[0041] The above technical solution of the present invention has the following beneficial effects compared with the prior art:

[0042] The interpretable method for a ventricular premature beat auxiliary diagnosis model according to the present invention first obtains a predicted classification result through the ventricular premature beat auxiliary diagnosis model, and then obtains the contribution degrees of each waveform feature to the classification result through the layer-by-layer relevance propagation interpretability method; inputs the contribution degrees of each waveform feature to the classification result into a Bayesian model, and uses the Bayesian deep network to calculate the uncertainty of the predicted classification result of ventricular premature beats; finally, constructs a decision tree based on the contribution degrees of each waveform feature to the classification result and the uncertainty of the classification result, and obtains the target classification result of ventricular premature beats. The present invention not only improves the accuracy of ventricular premature beat diagnosis, but also increases the credibility and transparency of the model in clinical applications through uncertainty evaluation and interpretability analysis, and can help doctors make more reliable decisions. Description of the Drawings

[0043] In order to make the content of the present invention easier to be clearly understood, the following further details the present invention according to specific embodiments of the present invention in conjunction with the drawings, wherein:

[0044] Figure 1 is a flowchart of the interpretable method for a ventricular premature beat auxiliary diagnosis model of the present invention;

[0045] Figure 2It is the patient statistical chart in Embodiment 1;

[0046] Figure 3 It is an example diagram of the original electrocardiogram image;

[0047] Figure 4 It is an example diagram of the cropped electrocardiogram image;

[0048] Figure 5 It is an example diagram of the preprocessed electrocardiogram image;

[0049] Figure 6 It is the structural diagram of the ventricular premature beat auxiliary diagnosis model;

[0050] Figure 7 It is a schematic diagram of the LRP contribution heat map, where Figure 7 a) in it is the schematic diagram of the contribution heat map of class 0, Figure 7 b) in it is the schematic diagram of the contribution heat map of class 1, Figure 7 c) in it is the schematic diagram of the contribution heat map of class 2, Figure 7 d) in it is the schematic diagram of the contribution heat map of class 3, Figure 7 e) in it is the schematic diagram of the contribution heat map of class 4, Figure 7 f) in it is the schematic diagram of the contribution heat map of class 5;

[0051] Figure 8 It is an example diagram of the decision analysis tree. Detailed implementation manners

[0052] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, so that those skilled in the art can better understand the present invention and be able to implement it, but the exemplified embodiments shall not be used as a limitation to the present invention.

[0053] Referring to Figure 1 as shown, the present invention provides an interpretable method for a ventricular premature beat auxiliary diagnosis model, including:

[0054] S1: Obtain an electrocardiogram image and perform preprocessing.

[0055] In this embodiment, the real data of patients who underwent ventricular premature radiofrequency ablation in the First Affiliated Hospital of Soochow University is used as an example to elaborate on the technical solution of the present invention. All data were manually collected by several professional cardiologists and underwent strict review and screening. The patients were divided into 6 categories. As Figure 2 shown, categories 0 and 1 accounted for 77% of the number of images, while categories 2 to 5 only accounted for 23%. Therefore, it can be said that the data is unbalanced.

[0056] S1 specifically includes the following steps:

[0057] S101: Convert the original electrocardiogram (ECG) image containing 12-lead signals into a grayscale image, then crop it, and perform denoising processing on the cropped ECG image;

[0058] S102: Cut the denoised ECG image along the middle axis, splice the right half of the image below the left half of the image, and align it according to the time series;

[0059] S103: Select the required heartbeat signals from the aligned image for cropping, and divide them into 12 sub-images according to the lead signals;

[0060] S104: Splice the 12 sub-images along the depth direction to obtain the preprocessed ECG image.

[0061] In this embodiment, each ECG image contains the signals of 12 leads, and the original image size is 3×1346×2496, as Figure 3 shown. However, the ECG signal itself does not depend on color information. Therefore, convert the ECG image from RGB format to grayscale image, simplify the number of image layers to 1, and the image size becomes 1×1346×2496. At this time, the image only contains grayscale information. There is certain background noise in the original ECG image, especially light gray grid points and other interfering points. These elements do not contain useful information and may instead have a negative impact on the subsequent deep learning model training. Therefore, it is necessary to remove the edge part of the image, and these areas usually do not contain valid signals. The size of the cropped image is 1×1100×2496, as Figure 4 shown. Next, perform denoising processing on the cropped ECG image.

[0062] To remove the background noise, this embodiment adopts a filtering method based on the local neighborhood. For each pixel point x ab in the cropped ECG image, calculate the neighborhood average value of its 3×3 neighborhood, and the formula is:

[0063]

[0064] Among them, represents the neighborhood average value of the pixel point x ab , x a+m,b+n represents the neighborhood pixels of the pixel point x ab , and m and n respectively represent the neighborhood index values.

[0065] After calculating the average value of the neighborhood, perform denoising according to the following conditions: If the neighborhood average value of the pixel point is greater than 200 (that is, most of the area is white and the information content is small), then set the value of this pixel point to 255, and the formula is expressed as:

[0066]

[0067] The advantage of this filtering method is that it avoids the practice of traditional Gaussian filtering, which directly replaces each pixel value with the average value of the neighborhood. Instead, this method eliminates the irrelevant background by setting the pixel to 255 without affecting the electrocardiogram signal.

[0068] After image denoising, heartbeat extraction continues. Each electrocardiogram image contains multiple heartbeat cycles. To extract effective heartbeat data, a suitable heartbeat segment is selected according to the structure of the electrocardiogram. Since the original electrocardiogram image is divided into two parts (the left side is the limb leads and augmented limb leads, and the right side is the chest leads V1-V6), it is difficult to directly extract a single heartbeat from the image. To align the signals of the 12 leads, the original image needs to be cut along the central axis, and the right half of the image (chest lead signal) is spliced below the left half of the image to ensure that the leads are aligned in time series. Next, the required heartbeat signals are selected from the aligned image and cropped. Usually, each electrocardiogram image retains 1 to 4 heartbeat cycles, and the redundant parts are discarded. Finally, each electrocardiogram image is divided into 12 sub-images, and each sub-image corresponds to a lead signal. The height of each sub-image is 1 / 12 of the original image, and at this time, the time series of each lead signal is stored separately.

[0069] Finally, these 12 sub-images are spliced along the depth direction to obtain the preprocessed electrocardiogram image. Each sub-image still retains the original signal, but is arranged in time series for the convenience of processing and training by the deep learning model.

[0070] Assume that each sub-image is I k (k = 1, 2, …, 12), then the finally spliced image I final can be expressed as:

[0071] I final = concat(I 1 , I 2 ,..., I 12 )

[0072] where concat() represents the splicing of sub-images along the depth direction.

[0073] Through this series of preprocessing operations, an electrocardiogram image with a size suitable for input to the deep learning model is finally obtained. As Figure 5 shown, the redundant information in the preprocessed electrocardiogram image has been effectively removed, and the signal has been fully enhanced, which can be used for subsequent model training and inference.

[0074] S2: Input the preprocessed electrocardiogram image into the trained ventricular premature beat auxiliary diagnosis model, and output the predicted classification result of ventricular premature beats.

[0075] In this embodiment, the predicted classification results of ventricular premature beats include: the right ventricular outflow tract is category 0, the left ventricular outflow tract is category 1, the papillary muscle is category 2, the valve annulus is category 3, the peak is category 4, and the His-Purkinje fiber system is category 5.

[0076] The present invention adopts a hybrid model architecture combining a convolutional neural network (CNN), a SE channel attention mechanism (Squeeze-and-Excitation Networks, SENet), and a residual structure. Referring to Figure 6 As shown, the structure of the ventricular premature beat auxiliary diagnosis model constructed includes a plurality of 3×3 convolutional layers, a plurality of residual blocks, an average pooling layer, a 5×1 convolutional layer, and a fully connected layer connected in sequence. The residual block includes two 3×3 convolutional layers and a SE attention block connected in sequence, and a skip connection is made between the input feature of the residual block and the output feature of the SE attention block.

[0077] In the residual block, the convolutional layer is used to extract local features in the electrocardiogram signal, especially key waveforms such as QRS waves, P waves, and T waves. The calculation formula is as follows:

[0078]

[0079] where x i′+m′,j′+n′ is the local area of the input signal, W m′,n′ is the convolutional kernel, b is the bias term, and y i′,j′ is the feature map output by the convolution.

[0080] By introducing the SE channel attention mechanism, the SE module first compresses the features of each convolutional channel through global average pooling (GlobalAveragePooling) to generate a global feature description at the channel level. The formula is expressed as:

[0081]

[0082] where e c′ represents the global feature description of the c′-th channel, H and W are respectively the height and width of the feature map, and x i′j′c′ is the feature value at the position (i′j′) in the channel c′.

[0083] Next, the features are recalibrated through two fully connected layers, and the weight coefficients of the channels are generated through the sigmoid activation function:

[0084] s c′ =σ(W 2 .ReLU(W 1 .e c′ )

[0085] where W 1and W 2 is the learned weight matrix, e c′ is the channel feature after global pooling, s c′ is the weight coefficient generated for each channel.

[0086] The output of the SE module weights the original channel features to obtain new channel features:

[0087] y c ′ = s c ′.x c ′

[0088] Through this weighting operation, the model can pay more attention to the feature channels crucial for the diagnosis of premature ventricular contractions, thereby improving the overall diagnostic performance. To further enhance the training efficiency and avoid the problem of gradient disappearance, a residual structure is also introduced into the model. The residual connection directly passes the input of each layer to the subsequent layer in the way of skip connection, allowing information to propagate along a shorter path and reducing information loss in the deep network. The implementation formula of the residual structure is as follows:

[0089] y = f(x, {W i}) + x

[0090] Among them, x is the input, f(x, {W i}) is the output of the transformation through convolution and the SE module, and y is the final output of the residual structure.

[0091] During the model training process, the cross-entropy loss function is used for training, combined with L2 regularization to prevent overfitting:

[0092]

[0093] Among them, y i is the actual label, is the prediction result, and N is the total number of samples. At the same time, the Adam optimizer is used to optimize the parameters, and the dynamic learning rate is set to ensure that the model can converge efficiently.

[0094] S3: Adopt the layer-by-layer relevance propagation interpretability method. Starting from the output layer of the premature ventricular contraction auxiliary diagnosis model, the relevance scores are propagated layer by layer in the reverse direction to the input layer to generate a contribution heat map, and obtain the contribution of each waveform feature to the prediction classification result; among them, the relevance scores of the output layer are obtained according to the prediction classification result of premature ventricular contractions. The waveform features include QRS complex, T wave, P wave, and other waveform features.

[0095] After the model training is completed, the Layer-wise Relevance Propagation (LRP) method is used for interpretability analysis. The LRP method calculates the contribution degree of each input feature to the model decision result through layer-by-layer backpropagation. Given the activation value of a neuron R j The LRP calculates its contribution relationship with the input neurons as follows:

[0096]

[0097] where R i is the relevance of input feature i, a i is the activation value of this feature, w ij is the connection weight, and R j is the relevance value of the neuron in the previous layer. In this step, starting from the output layer, layer-by-layer forward backpropagation is performed to gradually determine the contribution of each input feature.

[0098] However, some studies have attempted to combine the layer-wise relevance propagation interpretability method (Layer-wise Relevance Propagation, LRP) to further enhance the interpretability of the ventricular premature beat auxiliary diagnosis model. LRP analyzes the activation of each layer of the model and generates a heatmap to show the contribution of different input features to the model decision. However, the existing LRP methods mainly focus on image classification tasks, have poor adaptability to one-dimensional signals such as electrocardiograms, and lack an effective combination for evaluating the complexity and uncertainty of the ventricular premature beat auxiliary diagnosis model.

[0099] Considering that the electrocardiogram signal is a one-dimensional signal and has unique waveform characteristics, the traditional LRP method has adaptability problems when applied. To solve this situation, the present invention makes the following improvements: regarding each pixel in the electrocardiogram as a node and performing node-by-node relevance propagation. For the input layer nodes, their values are the gray values of the corresponding pixels in the image. In the convolutional layer, the input of a node is the weighted sum of the outputs of the nodes in the previous layer, as described in the convolutional calculation method above. For the output layer nodes, their relevance (L is the last layer) is initialized according to the prediction result. For the node i in the l-th layer, its relevance The calculation needs to consider the contribution of the relevance of the nodes in its next layer. According to the chain rule, the contribution of node i to the relevance of the next layer node k (in the l + 1-th layer) is First calculate Because And So So Therefore, the relevance of the i-th node in the l-th layer The calculation formula is as follows:

[0100]

[0101] Among them, n l+1 is the number of nodes in the (l + 1)-th layer, represents the activation value of the k-th node in the (l + 1)-th layer, represents the input weighted sum of the i-th node in the l-th layer, represents the relevance of the k-th node in the (l + 1)-th layer; σ′ is the derivative of the activation function σ, represents the input weighted sum, which is obtained by weighted summing the activation values of all nodes in the l-th layer, and n l is the number of nodes in the l-th layer, represents the weight connecting the j-th node in the l-th layer to the k-th node in the (l + 1)-th layer, represents the activation value of the j-th node in the l-th layer, represents the weight connecting the i-th node in the l-th layer to the k-th node in the (l + 1)-th layer, represents the activation value of the i-th node in the l-th layer.

[0102] During the calculation process, due to the spatial characteristics of the data, the weight connecting the i-th node in the l-th layer to the k-th node in the (l + 1)-th layer is calculated as follows: Calculate the weight of the i-th node in the l-th layer to the k-th node in the (l + 1)-th layer based on the spatial distance where d(k, i) represents the spatial distance from the i-th node in the l-th layer to the k-th node in the (l + 1)-th layer, and σ 1 represents the hyperparameter that controls the weight decay. In this way, the propagation of relevance is made more in line with the spatial characteristics of the electrocardiogram, emphasizing the influence between adjacent or related nodes in space.

[0103] The relevance scores are propagated layer by layer in the reverse direction to the input layer. Based on the relevance of all pixel nodes in the feature map of the input layer electrocardiogram image, a contribution heat map is formed, and the contribution of each waveform feature to the prediction classification result is obtained through the contribution heat map.

[0104] In this embodiment, the method for obtaining the contribution of each waveform feature to the prediction classification result through the contribution heat map may include: First, automatically locate the spatial positions of each waveform feature in the electrocardiogram image through the attention mechanism, then extract all pixel relevance scores within the target waveform feature region from the contribution heat map, and then sum the relevance scores of the pixels within the region into a single value. To compare the relative importance of different waveform features, finally, the contribution is normalized to obtain the contribution of each waveform feature to the prediction classification result.

[0105] Consider an electrocardiogram (ECG) signal of a premature ventricular contraction (PVC). After LRP analysis, the contribution heatmap will show which waveform features in the ECG contribute the most to the prediction result. As Figure 7 shown, where Figure 7 a) in Figure 7 is a schematic diagram of the contribution heatmap for class 0, Figure 7 b) in Figure 7 is a schematic diagram of the contribution heatmap for class 1, Figure 7 c) in Figure 7 is a schematic diagram of the contribution heatmap for class 2,

[0106] d) in

[0107] is a schematic diagram of the contribution heatmap for class 3,

[0108] e) in

[0109] is a schematic diagram of the contribution heatmap for class 4, and

[0110] f) in

[0111] Figure 7 is a schematic diagram of the contribution heatmap for class 5. After LRP analysis, the attention regions of the model for each class are consistent with the clinical attention of doctors, indicating their impact on PVC diagnosis. Doctors can understand how the model makes diagnostic judgments through these heatmaps, understand the decision-making basis of the model, and improve the interpretability of the model in clinical practice.

[0106] S4: Obtain the statistical features of the contribution degrees of each waveform feature to the predicted classification result and input them into the Bayesian model to calculate the uncertainty of the predicted classification result of the premature ventricular contraction.

[0107] In recent years, some methods based on Bayesian uncertainty estimation have been introduced into medical diagnosis to quantify the confidence of the model in the prediction result. The Bayesian method can provide more reliable diagnostic support by inferring the uncertainty of the output result. However, most of the existing Bayesian estimation methods are carried out independently of the PVC auxiliary diagnosis model and fail to combine well with the feature learning ability of deep learning, resulting in a large room for improvement in the uncertainty assessment of the model.

[0108] Therefore, the present invention combines a Bayesian model to evaluate uncertainty through multiple random forward propagations in the inference stage, and this part quantifies the uncertainty of the model by calculating the weighted average prediction variance. In the decision tree part, a decision tree is constructed through contribution degree ranking and uncertainty assessment, and finally the class is predicted according to the contribution degree and uncertainty. For the classification of ECG signals, the combination of the Bayesian model and the decision tree can perform more accurate inference and decision-making.

[0109] Specifically, obtain the statistical features of the contribution degrees of each waveform feature to the classification result and input them into the Bayesian model, and calculate the uncertainty of the predicted classification result of the premature ventricular contraction through the MC Dropout method, including:

[0110] In the Bayesian model, through multiple random forward propagations, calculate the mean of the prediction probabilities of the random forward propagations through the prediction probabilities of each random forward propagation;

[0111] Obtain the statistical features of the contribution degrees of each waveform feature to the classification result, including the mean and variance of the contribution degrees of each waveform feature to the classification result; calculate the uncertainty of the predicted classification result of ventricular premature beats according to the mean of the predicted probabilities of random forward propagation and the statistical features of the contribution degrees of each waveform feature to the classification result.

[0112] In this embodiment, the statistical features of the contribution degrees of each waveform feature to the classification result are used to evaluate the uncertainty of each category. Through Bayesian inference, the distribution of the output can be simulated by multiple random forward propagations, and the variance and uncertainty of the prediction can be calculated (estimated by the weighted average prediction variance formula). Specifically, in the Bayesian model input stage, input the statistical feature F = {f 1 , f 2 , f 3 , f 4}. For example, the statistical feature F QRS of the QRS complex region = {0.75, 0.12, 0.6, 1.2}. In the inference stage, perform T times of random forward propagation, and record the predicted probability of each propagation The formula for calculating the mean of the predicted probabilities is:

[0113]

[0114] Calculate the uncertainty of the predicted classification result of ventricular premature beats according to the mean of the predicted probabilities of random forward propagation and the statistical features of the contribution degrees of each waveform feature to the classification result. The formula is:

[0115]

[0116] Among them, U c represents the uncertainty of the predicted classification result c of ventricular premature beats, represents the mean of the predicted probabilities of random forward propagation, T represents the number of times of random forward propagation, represents the predicted probability of the t-th random forward propagation; f 1 and f 2 represent the mean and variance of the contribution degrees of each waveform feature to the classification result respectively.

[0117] S5: Construct decision trees for each category with the contribution degrees of each waveform feature to the predicted classification result and the uncertainty of the predicted classification result as input features to obtain the target classification result. The said categories are the classification categories of ventricular premature beats.

[0118] In the decision tree construction logic, sort the waveform features according to their contribution degrees to the prediction classification results, and select the waveform feature with the highest contribution degree to the prediction classification results as the splitting feature. Select the decision threshold according to the uncertainty of the prediction classification result corresponding to the current node of the decision tree, where the decision threshold includes a loose threshold and a strict threshold. Finally, judge according to the contribution degree of each waveform feature to the prediction classification result and the decision threshold, and update the prediction classification result of ventricular premature beats according to the judgment result to obtain the target classification result.

[0119] This embodiment is illustrated by taking category 0 (right ventricular outflow tract, RVOT) as an example. Suppose an electrocardiogram image is input, and the model undergoes T = 50 forward propagations. For each forward propagation, the model outputs a probability distribution, and these results may include the predicted probabilities of category 0 (RVOT) and other categories (such as categories 1 to 5). Suppose the predicted results of category 0 (RVOT) in 50 forward propagations are as follows (each value represents the probability value of category 0): Among them represents the predicted probability of category 0 in the t-th forward propagation. To evaluate the final predicted result of category 0, calculate the average value of all 50 forward propagation results: This average value represents the final predicted probability of the model for category 0. At the same time, calculate the uncertainty by calculating the variance of these predicted values: If the variance is small, it means that the model is more confident in the prediction of category 0; if the variance is large, it means that the model has a high uncertainty in the prediction of this category. Through 50 forward propagations, the average predicted probability of category 0 is obtained and the uncertainty U 0 = 0.002. In Bayesian inference, the uncertainty U 0 is used to adjust the classification rules of the decision tree. For example, if the model has a high uncertainty in the prediction of category 0, the decision tree may choose to adopt a more strict classification threshold to make a decision.

[0120] Sort the waveform features according to their contribution degrees to the prediction classification results: QRS complex (R QRS = 0.45), T wave (R T = 0.3), P wave ( RP = 0.2), other features. Select the QRS complex with the highest contribution degree as the splitting feature. If the uncertainty U c <0.1 of the category corresponding to the current node of the decision tree, then adopt the loose threshold (such as R QRS > 0.4); if U c ≥0.1, then adopt the strict threshold (such as R QRS > 0.6).

[0121] Now, take R QRS , R T , R p (the contribution degree feature of category 0) and U 0 (the prediction uncertainty of category 0) as input features to construct a decision tree. In the decision tree of category 0 (RVOT), the contribution degree of the QRS complex is the largest, and the T wave and P wave also have a certain impact on the decision result. The decision analysis tree is as shown in Figure 8 . In this decision analysis tree, first check whether the prediction uncertainty U 0 of category 0 (RVOT) is less than 0.1. If U 0 < 0.1, it means that the model has a high confidence in the prediction of category 0, and continue to judge according to the contribution degree R QRS of the QRS complex. If the contribution degree of the QRS complex is greater than 0.4, further check the contribution degree of the T wave. If the contribution degree of the T wave is greater than 0.25, the final prediction is category 0 (RVOT); otherwise, the prediction is category 1 (LVOT). If the contribution degree of the QRS complex is less than or equal to 0.4, turn to check the contribution degree of the P wave. If the contribution degree of the P wave is greater than 0.15, the prediction is category 2 (PM); otherwise, the prediction is category 3 (VA).

[0122] When U 0 ≥ 0.1, it means that the model has a high prediction uncertainty for category 0, and will make further decisions according to the contribution degree R QRS of the QRS complex. If the contribution degree of the QRS complex is greater than 0.5, then judge according to the contribution degree of the T wave. If the contribution degree of the T wave is greater than 0.3, the prediction is category 4 (Summit); otherwise, the prediction is category 5 (HPS). If the contribution degree of the QRS complex is less than or equal to 0.5, enter the next judgment node and check the contribution degree of the P wave. If the contribution degree of the P wave is greater than 0.2, the prediction is category 2 (PM); otherwise, the prediction is category 3 (VA). Generally speaking, the contribution degree of the QRS complex plays the most important role in the prediction of category 0, while the T wave and P wave have a certain impact on the classification result. Especially when the uncertainty is high, the contributions of the T wave and P wave help the model make the final decision. This provides a clear decision-making path for doctors, helps doctors understand the reasoning process of the model, and improves the trust in the model.

[0123] In summary, for the interpretable method for a ventricular premature beat assisted diagnosis model of the present invention, first, the predicted classification result is obtained through the ventricular premature beat assisted diagnosis model, and then the contribution degree of each waveform feature to the classification result is obtained through the layer-by-layer relevance propagation interpretability method; the contribution degree of each waveform feature to the classification result is input into the Bayesian model, and the uncertainty of the predicted classification result of the ventricular premature beat is calculated using the Bayesian deep network; finally, a decision tree is constructed based on the contribution degree of each waveform feature to the classification result and the uncertainty of the classification result, and the target classification result of the ventricular premature beat is obtained. The present invention not only improves the accuracy of ventricular premature beat diagnosis, but also increases the credibility and transparency of the model in clinical applications through uncertainty evaluation and interpretability analysis, and can help doctors make more reliable decisions.

[0124] Embodiment 2

[0125] Based on the interpretable method for a ventricular premature beat assisted diagnosis model described in Embodiment 1, the present embodiment provides an interpretable system for a ventricular premature beat assisted diagnosis model, including:

[0126] A preprocessing acquisition module, configured to acquire an electrocardiogram image and perform preprocessing;

[0127] A classification module, configured to input the preprocessed electrocardiogram image into the trained ventricular premature beat assisted diagnosis model and output the predicted classification result of the ventricular premature beat;

[0128] A contribution degree acquisition module, configured to adopt the layer-by-layer relevance propagation interpretability method, starting from the output layer of the ventricular premature beat assisted diagnosis model, propagate the relevance score layer by layer in the reverse direction to the input layer, obtain the contribution degree of each waveform feature to the classification result, and generate a contribution degree heat map; wherein, the relevance score of the output layer is obtained according to the predicted classification result of the ventricular premature beat;

[0129] An uncertainty acquisition module, configured to acquire the statistical features of the contribution degree of each waveform feature to the classification result and input them into the Bayesian model, and calculate the uncertainty of the predicted classification result of the ventricular premature beat;

[0130] A decision module, configured to construct a decision tree based on the contribution degree of each waveform feature to the classification result and the uncertainty of the classification result, and obtain the target classification result.

[0131] The present embodiment also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned interpretable method for a ventricular premature beat assisted diagnosis model are implemented.

[0132] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.

[0133] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0134] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0136] Obviously, the above embodiments are only examples given for clear illustration and are not limitations on the implementation manners. For those of ordinary skill in the art, other different forms of changes or variations can be made based on the above description. It is not necessary and impossible to exhaustively list all the implementation manners here. And the obvious changes or variations derived therefrom are still within the protection scope of the present invention.

Claims

1. An interpretable method for auxiliary diagnosis model of ventricular premature beats, characterized in that: include: The preprocessed electrocardiogram image is input into the trained ventricular premature beat auxiliary diagnosis model, and the prediction and classification results of ventricular premature beats are output; The layer-by-layer correlation propagation interpretability method is adopted. Starting from the output layer of the ventricular premature beat auxiliary diagnosis model, the correlation score is back-propagated layer by layer to the input layer to obtain the contribution of each waveform feature to the prediction and classification results; among which, the correlation score of the output layer is obtained according to the prediction and classification results of ventricular premature beats; Obtaining the statistical characteristics of the contribution of each waveform feature to the prediction and classification results and inputting them into the Bayesian model to calculate the uncertainty of the prediction and classification results of ventricular premature beats; A decision tree is constructed based on the contribution of each waveform feature to the predicted classification result and the uncertainty of the predicted classification result to obtain the target classification result.

2. The interpretable method for the auxiliary diagnosis model of ventricular premature beats according to claim 1, characterized in that: Acquire ECG images and perform preprocessing, including: The original electrocardiogram image containing 12-lead signals is converted into a grayscale image and then cropped, and then the cropped electrocardiogram image is denoised; The denoised ECG image is split along the middle axis, the right half of the image is spliced ​​under the left half of the image, and aligned in time series; Select the required heartbeat signal from the aligned image for cropping and divide it into 12 sub-images according to the lead signal; The 12 sub-images are spliced ​​along the depth direction to obtain the preprocessed ECG image.

3. The interpretable method for auxiliary diagnosis model of ventricular premature beats according to claim 2, characterized in that: The cropped ECG image is denoised using a local area based filtering method, including: For each pixel x in the cropped ECG image ab , calculate the neighborhood average of its 3×3 neighborhood, The formula is: in, Represents pixel x ab The neighborhood average, x a+m,b+n Represents pixel x ab Neighborhood pixels, m and n represent the neighborhood index values ​​of the horizontal and vertical coordinates respectively; If the neighborhood average of a pixel is greater than 200, the value of the pixel is set to 255.

4. The interpretable method for auxiliary diagnosis model of ventricular premature beats according to claim 1, characterized in that: The ventricular premature beat auxiliary diagnosis model includes several 3×3 convolutional layers, several residual blocks, average pooling layers, 5×1 convolutional layers and fully connected layers connected in sequence; the residual block includes two 3×3 convolutional layers and an SE attention block connected in sequence, and the input features of the residual block and the output features of the SE attention block are jump-connected.

5. The interpretable method for auxiliary diagnosis model of ventricular premature beats according to claim 1, characterized in that: The layer-by-layer correlation propagation interpretability method is adopted. Starting from the output layer of the ventricular premature beat auxiliary diagnosis model, the correlation score is back-propagated layer by layer to the input layer to obtain the contribution of each waveform feature to the prediction and classification results, including: Correlation of the ith pixel node of the feature map of the lth layer of the electrocardiogram image in the auxiliary diagnosis model of ventricular premature beats The calculation formula is: Among them, n l+1 is the number of pixel nodes in the l+1th layer, represents the activation value of the k-th pixel node in the l+1th layer, represents the weighted sum of the inputs of the i-th pixel node in the l-th layer, represents the correlation of the k-th pixel node in the l+1th layer; σ′ is the derivative of the activation function σ, represents the input weighted sum, which is obtained by weighted summing of activation values ​​of all pixel nodes in layer l, n l is the number of pixel nodes in the lth layer, represents the weight connecting the j-th pixel node in the l-th layer to the k-th pixel node in the l+1-th layer, represents the activation value of the j-th pixel node in the l-th layer, represents the weight connecting the i-th pixel node in the l-th layer to the k-th pixel node in the l+1-th layer; The correlation scores are back-propagated to the input layer layer by layer, and a contribution heat map is constructed based on the correlation of all pixel nodes in the feature map of the input layer electrocardiogram image. The contribution of each waveform feature to the predicted classification result is obtained through the contribution heat map.

6. The interpretable method for auxiliary diagnosis model of ventricular premature beats according to claim 5, characterized in that: The weight connecting the i-th pixel node in the l-th layer to the k-th pixel node in the l+1-th layer The calculation method is as follows: based on the spatial distance, the weight of the distance from the i-th pixel node in the l-th layer to the k-th pixel node in the l+1-th layer is calculated. Where d(k,i) represents the spatial distance from the i-th pixel node in the l-th layer to the k-th pixel node in the l+1-th layer, and σ1 represents the hyperparameter that controls weight attenuation.

7. The interpretable method for auxiliary diagnosis model of ventricular premature beats according to claim 1, characterized in that: The statistical characteristics of the contribution of each waveform feature to the prediction and classification results are obtained and input into the Bayesian model. The uncertainty of the prediction and classification results of ventricular premature beats is calculated by the MCDropout method, including: The Bayesian model performs multiple random forward propagations, and calculates the mean of the prediction probability of random forward propagation based on the prediction probability of each random forward propagation; The statistical characteristics of the contribution of each waveform feature to the predicted classification result are obtained, including the mean and variance of the contribution of each waveform feature to the predicted classification result; the uncertainty of the predicted classification result of ventricular premature beats is calculated according to the mean of the predicted probability of random forward propagation and the statistical characteristics of the contribution of each waveform feature to the predicted classification result.

8. The interpretable method for auxiliary diagnosis model of ventricular premature beats according to claim 7, characterized in that: The uncertainty of the prediction classification result of ventricular premature beats is calculated based on the mean value of the prediction probability of random forward propagation and the statistical characteristics of the contribution of each waveform feature to the prediction classification result. The formula is: Among them, U c represents the uncertainty of the predicted classification result c of ventricular premature beats, represents the mean of the predicted probability of random forward propagation, T represents the number of random forward propagation, represents the prediction probability of the tth random forward propagation; f1 and f2 represent the mean and variance of the contribution of each waveform feature to the predicted classification result, respectively.

9. An interpretable system for auxiliary diagnosis model of ventricular premature beats, characterized in that: include: A classification module is used to input the preprocessed electrocardiogram image into the trained ventricular premature beat auxiliary diagnosis model and output the prediction and classification results of ventricular premature beats; A contribution acquisition module is used to adopt a layer-by-layer correlation propagation interpretability method, starting from the output layer of the ventricular premature beat auxiliary diagnosis model, and back-propagating the correlation score layer by layer to the input layer to obtain the contribution of each waveform feature to the prediction and classification results; wherein the correlation score of the output layer is obtained according to the prediction and classification results of ventricular premature beats; An uncertainty acquisition module is used to obtain the statistical characteristics of the contribution of each waveform feature to the prediction and classification results and input them into the Bayesian model to calculate the uncertainty of the prediction and classification results of ventricular premature beats; The decision module is used to construct a decision tree according to the contribution of each waveform feature to the predicted classification result and the uncertainty of the predicted classification result to obtain the target classification result.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of an interpretable method for an auxiliary diagnosis model for ventricular premature beats as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Machine learning driven plant gene discovery and gene editing

    CN116982113A

  • Optimization method for brain glioma prognosis prediction model

    CN119092106A

  • System and method for providing material installation information linked to material tag

    KR1020240014225A

  • System and method of determining disease based on heat map image explainable from electrocardiogram signal

    US20220160245A1

  • Backpropagation-based explainability method for unsupervised anomaly detection models based on autoencoder architectures

    US20240037372A1