ECG data classification method based on confidence enhancement and purification to correct noisy labels

By using the method of confidence enhancement and purification to correct noisy labels, the problem of the influence of noise labels in the deep learning electrocardiogram data classification model is solved, the robustness and classification accuracy of the model are improved, and more efficient data purification and classification effects are achieved.

CN117171636BActive Publication Date: 2025-09-12SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310972089.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2025-09-12
Estimated Expiration
2043-08-03

AI Technical Summary

Technical Problem

Existing deep learning ECG data classification models are easily affected by noisy labels during training, resulting in a decrease in generalization ability. Existing methods are difficult to effectively combat noisy labels, especially in ECG datasets, where labeling disagreements and the presence of noise lead to poor model performance.

Method used

The confidence enhancement and purification methods for correcting noisy labels are adopted. Through pre-training, separation of confidence set and noise set, time warping and K-nearest neighbor label correction, the ECG dataset is gradually purified to enhance the robustness and classification accuracy of the model for clean ECG sequences.

Benefits of technology

It significantly reduces the noise rate of the electrocardiogram dataset, improves the generalization ability and classification accuracy of the model, performs better than other methods on noisy datasets, and achieves more reliable classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117171636B_ABST
    Figure CN117171636B_ABST
Patent Text Reader

Abstract

The present invention discloses an electrocardiogram data classification method based on confidence enhancement and purification correction of noise labels, as follows: set the number of preheating rounds T w , training rounds T and iterations K; obtain an ECG dataset containing noise labels and preprocess it; randomly initialize the ECG neural network classification model, and use exponential smoothing to calculate the loss of each sample in each training; train T w After each round, confidence samples are selected based on the sample loss of each round. These confidence samples are then time-warped to generate enhanced samples. The model is then trained using these confidence and enhanced samples. After T rounds of training, the KNN method is used to perform label correction on the filtered noise samples to generate a new ECG dataset, completing one iteration. If the number of iterations reaches K, training ends; otherwise, training is restarted using the new dataset. This method not only enhances the model's learning of the robustness characteristics of clean ECG data, but also continuously reduces the noise level of the dataset through purification and correction.
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 classification, and in particular to an electrocardiogram data classification method based on confidence enhancement and purification to correct noisy labels, and in particular to electrocardiogram data classification against noisy labels (erroneous labels). Background Art

[0002] Deep learning technology has demonstrated tremendous potential in recent years across a variety of fields, including medical data analysis. Deep learning algorithms learn patterns and features from large amounts of data, enabling accurate classification of time series data. In particular, computer-assisted electrocardiogram (ECG) data processing techniques incorporating deep learning have made significant progress. Currently, a wide range of deep learning techniques are capable of reliably classifying ECG data.

[0003] Electrocardiogram (ECG) data can be classified as time series data. While time series classification methods combined with state-of-the-art deep learning techniques can effectively classify ECG data, training a reliable deep neural network classification model requires a large amount of high-quality annotated data. However, large-scale, high-quality annotated datasets are often difficult to obtain. ECG data annotation typically relies on the expertise and experience of medical experts. Different experts may disagree on the annotation of the same type of ECG data. This disagreement can be caused by factors such as the complexity of the ECG signal, the presence of data noise, and differences between individual samples. This disagreement inevitably introduces noisy labels, meaning that some ECG data may be mislabeled. For example, the first version of the annotations for the ECG dataset CinC2017 included samples from four categories. However, some samples were difficult to distinguish due to data noise, potentially resulting in mislabeling. Although manual verification can reduce noisy labels in datasets, this approach is labor-intensive and not an optimal solution for large datasets.

[0004] It's important to note that noisy labels in training datasets can significantly weaken the generalization capabilities of deep neural network classification models. To address this, sample selection and label correction are widely used in current noisy label learning methods. However, despite their success on image data, most of these methods fail to consider the inherent characteristics of the data (such as the scale information and time series variation characteristics) to combat noisy labels. Summary of the Invention

[0005] In order to solve the above technical problems existing in the existing methods, the present invention discloses an electrocardiogram data classification method based on confidence enhancement and purification to correct noisy labels, thereby combating the noisy labels in the electrocardiogram dataset to achieve statistically consistent classification.

[0006] The purpose of the present invention can be achieved by taking the following technical solutions:

[0007] A method for correcting noisy labels based on confidence enhancement and purification is used to combat noisy labels in electrocardiogram datasets to achieve statistically consistent classification, including the following steps:

[0008] S1. Set the number of preheating rounds T w , the number of training rounds T and the number of iterations K;

[0009] S2. Obtain an electrocardiogram dataset D containing noise labels ori , for the dataset D ori Perform preprocessing, perform z-score normalization on each ECG sequence, and then integrate them to obtain the ECG dataset D for training;

[0010] S3. Construct an electrocardiogram neural network classification model and randomly initialize it. Input all electrocardiogram sequences into the electrocardiogram neural network classification model for warm-up training. Use the exponential smoothing method to calculate the training loss corresponding to each electrocardiogram sequence during each training.

[0011] S4. Warm-up training T w After each round, the confident ECG sequence is selected according to the training loss of the ECG sequence in each round and included in the confidence set D conf The unselected ones are regarded as noise ECG sequences and included in the noise set D noisy In addition, the enhanced ECG sequence is obtained by time warping method and included in the enhanced set D aug middle;

[0012] S5. ECG neural network classification model using confidence set D conf and enhanced set D aug After T rounds of training, the K-nearest neighbor method is used to perform label correction on the remaining ECG sequences that are not included in the confidence set in the last round of step S4, and the labels of the confidence ECG sequences remain unchanged, thereby obtaining a newly labeled ECG dataset D new , complete 1 iteration;

[0013] S6. Repeat steps S3 to S5 to train the reinitialized electrocardiogram neural network classification model using the new electrocardiogram dataset until the number of iterations of the electrocardiogram neural network classification model reaches K, and the iterative training is completed to obtain a trained robust electrocardiogram neural network classification model;

[0014] S7. Input the electrocardiogram data to be classified into the trained robust electrocardiogram neural network classification model to complete the classification of the electrocardiogram data.

[0015] Furthermore, step S2 performs preprocessing, performing z-score normalization on each ECG sequence in the ECG dataset, so that the ECG neural network classification model is more likely to converge. Specifically, for the ECG dataset D ori Each sequence in (R represents the set of real numbers, L represents the length of the sequence, and C represents the number of leads in the ECG sequence) The z-score normalization operation is performed as follows:

[0016]

[0017] in Represents the original electrocardiogram sequence The signal value of the jth lead of ; mean(·) is the operator for calculating the mean value; std(·) is the operator for calculating the standard deviation; x i [:,j] means The electrocardiogram sequence x obtained after z-score normalization i The signal value of the jth lead. Original ECG dataset D ori After preprocessing, the electrocardiogram dataset D for training is obtained.

[0018] Furthermore, in step S3, the electrocardiogram neural network classification model is composed of an encoder h(·) and a classifier f(·) connected in sequence, wherein the encoder adopts a fully convolutional neural network, and the classifier is composed of a fully connected layer and a softmax activation function. The electrocardiogram neural network classification model is expressed as F(·) = f(h(·)).

[0019] The warm-up training process in step S3 is as follows: first, the electrocardiogram neural network model is randomly initialized. When the number of iterations of the electrocardiogram neural network classification model training is greater than 1, the initialization operation can prevent the electrocardiogram neural network classification model from memorizing some noise samples in the training set and weakening the generalization ability of the electrocardiogram neural network classification model.

[0020] Exponential smoothing is used when calculating the training loss of the ECG sequence during training:

[0021] Given a smoothing coefficient α, the i-th ECG sequence x i The t-th round training loss The calculation process is as follows:

[0022]

[0023]

[0024] Where cls represents the number of categories of the electrocardiogram sequence in D; F(x i )∈Rcls Represents the electrocardiogram neural network classification model for x i The classification estimation vector of ; is x i The observation label is represented in the form of one-hot encoding. for The encoding on the sth category (if x i Belongs to the sth category, then otherwise ); [F(x i )] s represents F(x i ) about the classification probability of the sth category. Then the target loss L of the final warm-up training is w The calculation is as follows:

[0025]

[0026] Where |D| represents the number of ECG sequences in D, and the ECG neural network classification model is based on the target loss L w Conduct training.

[0027] Furthermore, step S4 pre-trains the electrocardiogram neural network classification model T w After the first round, the distribution of the dataset has been preliminarily learned. Due to the memory effect (i.e., deep neural networks first learn simple data patterns), the ECG neural network classification model learns the data patterns of correctly labeled clean ECG sequences more thoroughly. As a result, the training loss of clean ECG sequences is generally small. In contrast, the training loss of incorrectly labeled ECG sequences is generally large. Therefore, ECG sequences with small training loss can be selected and included in the confidence set. Specifically, the process of obtaining and using the confidence set and enhancement set to train the ECG neural network classification model is as follows:

[0028] S41. Use the loss of all ECG sequences in each round of training Model a Gaussian mixture model of two distributions, take all the ECG sequences corresponding to the loss distribution with smaller mean in the Gaussian mixture model as the confidence ECG sequences, and include them in the confidence set D conf ; All ECG sequences corresponding to the loss distribution with a larger mean are regarded as noisy ECG sequences and included in the noise set D noisy ;

[0029] S42, the confidence set D obtained in step S41 conf The time warping method is performed on all ECG sequences in to obtain the enhanced sample set:

[0030]

[0031] Among them, TW (·) adopted the literature “Terry T.Um, Franz MJ Pfister, Daniel Pichler, Satoshi Endo, Muriel Lang, Sandra Hirche, Urban Fietzek, and Dana The time warping method used by Terry T. Um et al. in "Data augmentation of wearable sensor data for parkinson's disease monitoring using convolutional neural networks." In Proceedings of the 19th ACM international conference on multimodal interaction, pp. 216-220, 2017, linearly interpolates the sampling points of the electrocardiogram sequence and then randomly selects values ​​between the sampling points as new sampling points. Each new sampling point constitutes an enhanced electrocardiogram sequence. This method aims to simulate the situation where the sampling point position is disturbed, so that the model can learn robust time series variation characteristics. conf and They represent the confident ECG sequence and the corresponding observation label respectively.

[0032] S43. Use the obtained confidence set D conf and enhanced set D aug Train the ECG neural network classification model and calculate the final target loss L for the tth round:

[0033]

[0034] where |D conf | represents the statistical set D conf The number of samples is , and λ represents the weight of the loss term. The ECG neural network model is trained based on this target loss.

[0035] Furthermore, in order to gradually correct the labels of the original ECG dataset to reduce the noise rate, step S5 is to train the ECG neural network classification model for T rounds and then perform the noise set D obtained in the last round in step S4. noisy Perform label correction on the ECG sequence in the following process:

[0036] S51. Obtain the confidence set D using the encoder h(·) of the electrocardiogram neural network classification model conf Feature representation of all ECG sequences in the ECG neural network classification model:

[0037]

[0038] Among them H conf Represents the set of feature representations of all confidence EKG sequences and their corresponding observation labels;

[0039] S52. Since the confident ECG sequence is essentially the ECG sequence that the ECG neural network model considers to be correctly labeled, the labels of the confident ECG sequence can be used to guide the correction of the labels of the noisy ECG sequence. Specifically, the process of generating new labels for the noisy ECG sequence using the obtained feature representation set of the confident ECG sequence and the K-nearest neighbor algorithm is as follows:

[0040]

[0041] D new =D conf ∪D corr

[0042] Among them D corr Denotes the noise set D noisy The correction set obtained after regenerating new labels for all ECG sequences in the ; the symbol “∪” indicates the noise set D noisy and the modified set D corr The union of x noisy and Represent the electrocardiogram sequence selected into the noise set and the corresponding observation label; Represents the ECG sequence x in which the noise is concentrated noisy The feature representation h(x noisy ) and H conf The Euclidean distance of all the confidence electrogram sequence features in the selected distance h(x noisy ) The k nearest features represent the corresponding confidence ECG sequence, and vote according to the observed labels of these k confidence ECG sequences. The label with the most votes among the k labels is counted as the noise ECG sequence x noisy New Tags Finally, the confidence set and the correction set are combined to obtain the new ECG dataset D new , completing one iteration of the ECG neural network classification model.

[0043] Furthermore, step S6 ensures that the ECG neural network classification model performs K iterations. Each new iteration uses the new dataset D obtained in step S5 of the previous iteration. new The reason is that: (1) the trained ECG neural network classification model may have memorized some noisy ECG sequences; (2) although the label correction in step S5 can reduce the noise rate of the original ECG dataset, the new dataset Dnew There may still be some noise labels due to incomplete or inaccurate label correction. The neural network's memory of noise labels will seriously affect the generalization ability. Therefore, in the new round of iteration, the ECG neural network classification model is reinitialized in step S3 to eliminate the influence of the noise labels in the original dataset in the previous round of model fitting; new In the next iteration of the ECG neural network classification model, the selection of confident samples is repeated in step S4. This allows for filtering the corrected labels from this iteration, preventing incorrect label corrections from impacting the model's generalization ability. After multiple iterations of the model, the noise level of the ECG sequence dataset is reduced to a low level, achieving a cleansing effect.

[0044] The present invention has the following advantages and effects compared to the prior art:

[0045] 1. The present invention uses a confidence enhancement method, that is, a time warping method is used to obtain enhanced samples for training the ECG neural network classification model. This can enhance the ECG neural network classification model's learning of the robustness features of clean ECG sequences, and is more generalizable than a model trained using only sample selection techniques.

[0046] 2. In the present invention, the ECG neural network classification model corrects the ECG dataset after each iteration and retrains on a new dataset, resulting in an ECG dataset with a reduced noise level, known as purification. Furthermore, the ECG neural network classification model is reinitialized before training on the purified dataset, preventing the model's generalization from being affected by the memory of noisy labels from the original dataset. Retraining the model on the dataset with reduced noise yields more accurate classification, further enhancing the correction of noisy labels. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0048] Figure 1 This is a specific flow chart of the electrocardiogram data classification method based on confidence enhancement and purification correction of noise labels disclosed in the present invention;

[0049] Figure 2 This is a network structure diagram of the electrocardiogram data classification method based on confidence enhancement and purification correction of noise labels disclosed in the present invention.

[0050] Figure 3This is a comparison chart of the classification accuracy of the electrocardiogram data classification method based on confidence enhancement and purification and correction of noise labels disclosed in the present invention on the TwoLeadECG dataset containing 40% symmetrical noise with other methods; Figure 3 (a) is a schematic diagram of the classification accuracy of the ECG neural network classification model based on confidence enhancement and purification to correct noisy labels on the TwoLeadECG dataset containing 40% symmetrical noise; Figure 3 (b) is a diagram showing the classification accuracy of the Vanilla method on the TwoLeadECG dataset containing 40% symmetric noise without using any anti-noise labeling techniques. DETAILED DESCRIPTION

[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0052] Example 1

[0053] This example considers the most basic type of symmetrical noise in the noise labeling problem. Taking the ECG5000 electrocardiogram dataset containing 40% symmetrical noise as an example (each electrocardiogram sequence in the dataset has a 40% probability of being mislabeled, and the probability of being mislabeled as other categories is the same), we disclose an electrocardiogram data classification method based on confidence enhancement and purification to correct noisy labels. Figure 1 Is the flow chart of the present invention, the model structure of the method is as follows Figure 2 The steps are as follows:

[0054] S1. Set the number of preheating rounds T w is 20, the number of training rounds T is 40 and the number of iterations K is 3;

[0055] S2. Obtain the ECG5000 dataset containing 40% symmetrical noise, where the training set (denoted as D ori ) contains 4500 samples. The data set is preprocessed and each ECG sequence (R represents a set of real numbers; the length of each sequence is 140, and the number of leads is 1) perform the z-score normalization operation:

[0056] in Represents the original electrocardiogram sequence The signal value of the first lead of x; mean(·) is the operator for calculating the mean value; std(·) is the operator for calculating the standard deviation; x i [:,1] means The electrocardiogram sequence x obtained after z-score normalization i The signal value of the first lead. Original ECG dataset D ori After preprocessing, the electrocardiogram dataset D for training is obtained.

[0057] S3. Construct an ECG neural network classification model and initialize it randomly. Input all ECG sequences into the ECG neural network classification model for warm-up training. Each training uses the exponential smoothing method to calculate the training loss corresponding to each ECG sequence. Given a smoothing coefficient α = 0.5, the i-th ECG sequence x i The corresponding t-th round training loss The calculation process is as follows:

[0058]

[0059] in, x i represents the i-th electrocardiogram sequence; F(x i )∈R 5 Represents the electrocardiogram neural network classification model for x i The probability prediction vector of the five ECG categories; is x i The observation label is represented in the form of one-hot encoding; for The encoding on the s-th category, [F(x i )] s represents F(x i ) about the classification probability of the sth category. The target loss L of the final warm-up training w The calculation is as follows:

[0060] Where |D| = 4500 represents the data size of the ECG dataset D used for training. The ECG neural network classification model is trained based on this target loss using a standard deep learning training paradigm, namely, batch gradient descent, which can be implemented in the PyTorch library.

[0061] S4. After 20 rounds of warm-up training, the ECG neural network classification model will follow Figure 2 Route (1) in the above example selects the confident ECG sequence according to the training loss of each round of ECG sequence and includes it in the confidence set D conf : Each round will lose 4500 ECG sequences By inputting it into the GaussianMixture in the python library sklearn, a two-distribution Gaussian mixture model can be easily modeled. The electrocardiogram sequence corresponding to the loss value of the Gaussian distribution with a smaller mean is regarded as a confidence electrocardiogram sequence and included in the confidence set D conf ; The ECG sequences corresponding to other loss values ​​are regarded as noisy ECG sequences and included in the noise set D noisy .

[0062] For the obtained confidence set D conf The time warping method is performed on all ECG sequences in to obtain the enhanced sample set:

[0063] where x conf and Represent the confident ECG sequence and the corresponding observation label respectively. TW(·) represents the reference “Terry T.Um, Franz MJ Pfister, Daniel Pichler, Satoshi Endo, Muriel Lang, Sandra Hirche, Urban Fietzek, and Dana Data augmentation of wearable sensor data for 10arkinson's disease monitoring using convolutional neural networks.InProceedings of the 19 th The time warping method used by Terry T. Um et al. in the "ACM International Conference on Multimodal Interaction, pp. 216-220, 2017"

[2017] linearly interpolates the sampling points of the ECG sequence and then randomly selects values ​​between the sampling points as new sampling points. Each new sampling point constitutes an enhanced ECG sequence. This method aims to simulate perturbations in the sampling point positions, enabling the model to learn robust time series variation characteristics. This method can be implemented by calling the TimeWarp method in the Python library tsaug.

[0064] Use the obtained confidence set D conf and enhanced set D aug Train the ECG neural network classification model and calculate the final target loss L for the tth round:

[0065]

[0066] where |D conf| represents the statistical set D conf The number of samples, λ represents the loss term weight, which is set to 0.1 in this example. The ECG neural network model is trained based on this target loss, using the batch gradient descent algorithm, similar to step S3.

[0067] S5. After the ECG neural network classification model is trained for 40 rounds according to step S4, the model will proceed as follows: Figure 2 Route (2) in the last round uses the K-nearest neighbor method to noisy Perform label correction:

[0068] First, the encoder h(·) of the ECG neural network classification model is used to obtain the confidence set D conf Feature representation of all ECG sequences in the ECG neural network classification model:

[0069]

[0070] Among them H conf Represents the set of feature representations and corresponding observation labels of all confident ECG sequences; then the obtained feature representation set of confident ECG sequences and the K-nearest neighbor algorithm are used to generate new labels for the noisy ECG sequence:

[0071]

[0072] D new =D conf ∪D corr

[0073] Among them D corr Denotes the noise set D noisy The revised set obtained by regenerating new labels for all ECG sequences in x noisy and Represent the electrocardiogram sequence selected into the noise set and the corresponding observation label; Represents the calculation of the noisy ECG sequence x noisy The feature representation h(x noisy ) and H conf The Euclidean distance of all the confidence electrogram sequence features in the selected distance h(x noisy ) The k nearest features represent the corresponding confidence ECG sequence, and vote according to the observed labels of these k confidence ECG sequences. The label with the most votes among the k labels is counted as the noise ECG sequence x noisy New Tags Where k is set to the minimum number of labels in ECG5000; finally, the confidence set and the correction set are combined to obtain the new ECG dataset D new . Complete 1 iteration of the model.

[0074] S6, if the number of iterations of the ECG neural network classification model reaches 3, then execute step S7, otherwise jump to step S3 and use the new ECG dataset D new Train the reinitialized ECG neural network classification model.

[0075] S7. After completing the training steps above, an ECG data set ECG5000 with reduced noise label levels and a robust ECG neural network classification model are obtained. By inputting the ECG data to be classified into this model, reliable classification of the ECG data can be achieved. In this embodiment, the ECG5000 data set containing 40% symmetrical noise was trained three times using the method of the present invention, reducing the noise level from 40% to 5.65%. Table 1 shows the comparative results of the ECG data classification method based on confidence enhancement and purification of modified noise labels disclosed in the present invention and other noise label learning methods on the ECG5000 data set containing 40% symmetrical noise.

[0076] Table 1. Experimental results of the present invention and other noise label learning methods on the ECG5000 dataset containing 40% symmetric noise

[0077] Accuracy F1 score Vanilla 0.712 0.729 SIGUA 0.793 0.787 Mixup-BMM 0.832 0.812 Dividemix 0.806 0.792 Sel-CL 0.833 0.829 Co-teaching 0.768 0.789 SREA 0.831 0.810 The method proposed by the present invention 0.838 0.834

[0078] In Table 1, the higher the evaluation index (accuracy, F1 score), the better the classification performance of the method. From the comparison of the experimental results in Table 1, it can be seen that compared with the method that does not use any anti-noise label techniques (Vanilla) and other noise label learning methods based on sample selection and label correction techniques (SIGUA, Mixup-BMM, Dividemix, Sel-CL, Co-teaching, SREA), the electrocardiogram data classification method based on confidence enhancement and purification and correction of noisy labels disclosed in the present invention achieved the best classification effect on the ECG5000 dataset containing 40% symmetrical noise, verifying the effectiveness and practicality of the present invention.

[0079] Example 2

[0080] To further demonstrate the effect of the electrocardiogram data classification method based on confidence enhancement and purification and correction of noise labels disclosed in the present invention. This embodiment considers the TwoLeadECG electrocardiogram dataset containing 40% symmetrical noise. The specific implementation process is the same as that of Example 1, and only the final classification effect is described here. In this embodiment, the noise rate of the TwoLeadECG dataset containing 40% symmetrical noise is reduced from 40% to 3.25% after 3 iterative training using the method of the present invention. Table 2 shows the comparison results of the electrocardiogram data classification method based on confidence enhancement and purification and correction of noise labels disclosed in the present invention and other noise label learning methods on the TwoLeadECG dataset. The compared methods and the evaluation indicators used are the same as those in Example 1. Table 2 shows that the method proposed in the present invention achieved the best classification effect on this dataset, verifying the effectiveness and practicality of the present invention.

[0081] Table 2. Experimental results of the present invention and other noise label learning methods on the TwoLeadECG dataset containing 40% symmetrical noise

[0082]

[0083]

[0084] like Figure 3 As shown, Figure 3 middle Figure 3 (a) and Figure 3 (b) A comparison of the classification test accuracy curves of the method disclosed in the present invention and the method Vanilla that does not use any anti-noise labeling techniques is given. It can be observed that the ECG neural network classification model based on confidence enhancement and purification to correct noise labels can well ensure the generalization ability of the model due to the use of confidence enhancement and purification to correct noise labels, while Vanilla affects the generalization ability of the ECG neural network classification model due to the memorization of the noise labels in the data set, resulting in a gradual decrease in the classification accuracy of the test.

[0085] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A method for classifying electrocardiogram data based on confidence enhancement and purification to correct noisy labels, characterized in that: The electrocardiogram data classification method comprises the following steps: S1. Set the number of preheating rounds T w , the number of training rounds T and the number of iterations K; S2. Obtain an electrocardiogram dataset D containing noise labels ori , for the dataset D ori Perform preprocessing, perform z-score normalization on each ECG sequence, and then integrate them to obtain the ECG dataset D for training; S3. Construct an electrocardiogram neural network classification model and randomly initialize it. Input all electrocardiogram sequences into the electrocardiogram neural network classification model for warm-up training. Use the exponential smoothing method to calculate the training loss corresponding to each electrocardiogram sequence during each training. S4. Warm-up training T w After each round, the confident ECG sequence is selected according to the training loss of the ECG sequence in each round and included in the confidence set D conf The unselected ones are regarded as noise ECG sequences and included in the noise set D noisy In addition, the enhanced ECG sequence is obtained by time warping method and included in the enhanced set D aug middle; Preheat training of ECG neural network classification model T w After the round, the process of obtaining and using the confidence set and enhancement set to train the ECG neural network classification model is as follows: S41. Use the loss of all ECG sequences in each round of training Model a Gaussian mixture model of two distributions, and take all the ECG sequences corresponding to the loss distribution with smaller mean in the Gaussian mixture model as the confidence ECG sequences and include them in the confidence set D conf All ECG sequences corresponding to the loss distribution with a larger mean are regarded as noisy ECG sequences and included in the noise set D noisy ; S42, the confidence set D obtained in step S41 conf The time warping method is performed on all ECG sequences in to obtain the enhanced sample set: Where TW(·) represents the time warping operation, which performs linear interpolation on the sampling points of the ECG sequence, and then randomly selects values ​​between the sampling points as new sampling points. Each new sampling point constitutes an enhanced ECG sequence, x conf and Represent the confident ECG sequence and the corresponding observation label respectively; S43. Use the obtained confidence set D conf and enhanced set D aug Train the ECG neural network classification model and calculate the final target loss L for the tth round: where |D conf | represents the statistical confidence set D conf The number of samples, λ represents the weight of the loss term, and the ECG neural network model is trained according to the target loss L; S5. ECG neural network classification model using confidence set D conf and enhanced set D aug After T rounds of training, the K-nearest neighbor method is used to perform label correction on the remaining ECG sequences that are not included in the confidence set in the last round of step S4, and the labels of the confidence ECG sequences remain unchanged, thereby obtaining a newly labeled ECG dataset D new , complete 1 iteration; S6. Repeat steps S3 to S5 to train the reinitialized electrocardiogram neural network classification model using the newly labeled electrocardiogram dataset until the number of iterations of the electrocardiogram neural network classification model reaches K, and the iterative training is completed to obtain a trained robust electrocardiogram neural network classification model; S7. Input the electrocardiogram data to be classified into the trained robust electrocardiogram neural network classification model to complete the classification of the electrocardiogram data.

2. The electrocardiogram data classification method based on confidence enhancement and purification correction of noisy labels according to claim 1 is characterized in that In step S2, each electrocardiogram sequence in the electrocardiogram dataset is subjected to z-score standardization to complete preprocessing, and an electrocardiogram dataset D for training is obtained. The process is as follows: ori Each sequence in Perform the z-score normalization operation, where R represents the set of real numbers, L represents the length of the sequence, and C represents the number of leads in the ECG sequence. Perform the following operation: in Represents the original ECG sequence The signal value of the jth lead of ; mean(·) is the operator for calculating the mean value; std(·) is the operator for calculating the standard deviation; x i [:,j] means The electrocardiogram sequence x obtained after z-score normalization i The signal value of the jth lead.

3. The electrocardiogram data classification method based on confidence enhancement and purification correction of noisy labels according to claim 1 is characterized in that: The electrocardiogram neural network classification model is composed of an encoder h(·) and a classifier f(·) connected in sequence, wherein the encoder adopts a fully convolutional neural network, and the classifier is composed of a fully connected layer and a softmax activation function. The electrocardiogram neural network classification model is expressed as F(·)=f(h(·)).

4. The electrocardiogram data classification method based on confidence enhancement and purification of corrected noisy labels according to claim 3 is characterized in that: The warm-up training process in step S3 is as follows: Given a smoothing coefficient α, the i-th electrocardiogram sequence x i The t-th round training loss The calculation process is as follows: Where cls represents the number of categories of the electrocardiogram sequence in D; F(x i )∈R cls Represents the electrocardiogram neural network classification model for x i The classification estimation vector of ; is x i The observation label is represented in the form of one-hot encoding. for The encoding on the sth category, if x i Belongs to the sth category, then otherwise [F(x i )] s represents F(x i ) Regarding the classification probability of the s-th category, the final target loss L for warm-up training is w The calculation is as follows: Where |D| represents the number of ECG sequences in D, and the ECG neural network classification model is based on the target loss L w Conduct training.

5. The electrocardiogram data classification method based on confidence enhancement and purification correction of noisy labels according to claim 4 is characterized in that: The process of step S5 is as follows: S51. Use h(·) to represent the feature extractor of the ECG neural network classification model and obtain the confidence set D conf Feature representation of all ECG sequences in the ECG neural network classification model: Among them H conf Represents the set of feature representations of all confidence EKG sequences and their corresponding observation labels; S52. Use the obtained feature representation set of the confident ECG sequence and the K-nearest neighbor algorithm to generate a new label for the noisy ECG sequence. The formula is as follows: D new =D noisy ∪D corr Among them D corr Denotes the noise set D noisy The correction set obtained by regenerating new labels for all ECG sequences in ; the symbol "∪" indicates the noise set D noisy and the modified set D corr The union of x noisy and denote the electrocardiogram sequence and the corresponding observation label selected into the noise set, The ECG sequence x represents the computational noise set noisy The feature representation h(x noisy ) and H conf The Euclidean distance of all the confidence electrogram sequence features in the selected distance h(x noisy ) The nearest k features represent the corresponding confidence ECG sequence, and vote according to the observation labels of these k confidence ECG sequences. The label with the most votes among the k observation labels is counted as the noise ECG sequence x noisy New Tags Finally, the confidence set and the correction set are combined to obtain the new ECG dataset D new , completing one iteration of the ECG neural network classification model.

Citation Information

Patent Citations

  • Hyperspectral image semi-supervised classification method based on comprehensive confidence

    CN109784392A

  • Semi-supervised audio event identification method based on depth mutual information maximization

    CN111859010A