Self-supervised learning method and system for evaluating arrhythmia

Through self-supervised learning and data augmentation methods, convolutional neural networks and residual block feature extractors are constructed, which solves the dependence problem on a large number of labeled data in the prior art, and realizes high-precision arrhythmia assessment, reducing costs and time .

CN119441830APending Publication Date: 2025-02-14上海哈特智康医疗技术有限公司

Patent Information

Application Number
CN202411548585.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art requires a large amount of high-quality labeled data when training an electrocardiogram diagnostic model based on deep learning, which is costly and time-consuming.

Method used

A self-supervised learning method is adopted to build a feature extractor through convolutional neural networks and residual blocks, and combined with data enhancement methods, reducing dependence on labeled data.

Benefits of technology

With only 25% of the labeled data, an average accuracy of 99.0% was achieved, significantly improving the accuracy of arrhythmia evaluation and reducing the cost and time of data annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441830A_ABST
    Figure CN119441830A_ABST
Patent Text Reader

Abstract

The invention provides a self-supervised learning method and system for evaluating arrhythmia. The method comprises the steps that S1, electrocardiogram signals collected by different devices are resampled to a preset number of sampling points; s2, performing residual block configuration on input and output of different dimensions by using a convolutional neural network; s3, automatically extracting hidden features of the electrocardiogram signal by using a feature extractor; s4, a data enhancement method is used for converting the input electrocardiosignals; and S5, establishing a pre-training framework based on the data enhancement method, and obtaining a feature extractor. Under the support of an unmarked data set, the workload of clinicians can be effectively reduced; compared with an existing method, the method has the advantages that about 25% of mark data is used, and better evaluation performance is achieved in the aspect of the average accuracy rate of 99.0%.
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 data processing, and in particular to a self-supervised learning method and system for evaluating arrhythmia. Background Art

[0002] Cardiovascular disease (CVD) is one of the major diseases that threaten the life and health of people all over the world. The waveform changes of electrocardiogram (ECG) signals can reflect the pathological changes of CVD. It is a clinical tool commonly used to diagnose CVD, and more than 300 million ECG signal data are generated every year. In recent years, electrocardiogram (ECG) diagnostic systems based on deep learning (DL) have attracted much attention. However, training DL-based models requires a large amount of high-quality labeled data, and labeling ECG records is time-consuming and expensive.

[0003] In the Chinese patent document with the publication number CN115429286A, a self-supervised learning method for ECG representation is disclosed, which includes the following steps: Step 1, ECG data conversion processing is realized based on noise increase processing and filtering processing, and the ECG data conversion processing is divided into a preprocessing stage, a noise increase processing stage and a filtering processing stage; Step 2, based on adversarial learning, an encoder and a discriminator adversarial task is constructed, and an adversarial learning module of the ECG representation self-supervised learning model is constructed to realize the adversarial task of the encoder and the discriminator; Step 3, based on a regression network, an ECG spatiotemporal regression task is constructed, and a regression module of the ECG representation self-supervised learning model is constructed to realize the ECG data spatiotemporal regression task; Step 4, based on contrastive learning, a patient contrast task is constructed, and a contrastive learning module of the ECG representation self-supervised learning model is constructed. The method provided in this patent document still requires a large amount of high-quality labeled data for DL ​​model training, which is costly and time-consuming. Summary of the invention

[0004] In view of the defects in the prior art, the object of the present invention is to provide a self-supervised learning method and system for evaluating arrhythmia.

[0005] A self-supervised learning method for assessing arrhythmia provided by the present invention comprises:

[0006] Step S1: resampling the electrocardiogram signals collected by different devices to a predetermined number of sampling points;

[0007] Step S2: Use a convolutional neural network to configure residual blocks for inputs and outputs of different dimensions;

[0008] Step S3: using a feature extractor to automatically extract hidden features of the electrocardiogram signal;

[0009] The feature extractor consists of a convolutional neural network and residual blocks.

[0010] Preferably, it also includes:

[0011] Step S4: transforming the input ECG signal using a data enhancement method;

[0012] The data enhancement method includes performing multi-angle mask recording of the 12-lead electrocardiogram from the time and lead dimensions respectively according to the waveform change characteristics of the 12-lead electrocardiogram in the time and lead dimensions;

[0013] Step S5: Establish a pre-training framework based on the data enhancement method to obtain a feature extractor.

[0014] Preferably, the step S2 comprises:

[0015] Train the network model; the update process of weight parameters is:

[0016] X i+1 =F(X i ,W i ,b i )

[0017]

[0018] Where X is the input, F(·) is a nonlinear function used to extract deep features containing multiple convolutional layers of different sizes; b i and W i are the bias and weight parameters of the i-th layer respectively.

[0019] Preferably, step S3 includes using a feature extractor to automatically extract hidden features of the electrocardiogram signal to obtain a valid feature expression of the input data; allowing a feature classifier to calculate deep features based on actual annotated data, output a prediction result, and obtain a classification loss.

[0020] Preferably, step S4 comprises:

[0021] Time dimension masking: Perform time-mask operation on each wire separately and set the sampling mask ratio;

[0022] Lead dimension masking: Randomly select a certain proportion of leads for time dimension masking and set the ratio parameter.

[0023] Preferably, step S5 comprises:

[0024] For each sample in each random batch, the data augmentation method is used to generate each sample from two different views, i.e., a data pair (xi, xj); a feature extractor is used to map the input ECG signal to a representation space, i.e., oi = f(xi) and oj = f(xj); the contrast loss is set as:

[0025]

[0026] Where I(·) represents the indicator function, N represents the batch size, and τ represents the hyperparameter;

[0027] The function sim(·) is used to calculate the cosine similarity between oi and oj, and:

[0028]

[0029] A self-supervised learning system for assessing arrhythmia provided by the present invention comprises:

[0030] Module M1: resample the electrocardiogram signals collected by different devices to a predetermined number of sampling points;

[0031] Module M2: Use convolutional neural networks to configure residual blocks for inputs and outputs of different dimensions;

[0032] Module M3: Automatically extract hidden features of ECG signals using feature extractors;

[0033] The feature extractor consists of a convolutional neural network and residual blocks.

[0034] Preferably, it also includes:

[0035] Module M4: transform the input ECG signal using a data enhancement method;

[0036] The data enhancement method includes performing multi-angle mask recording of the 12-lead electrocardiogram from the time and lead dimensions respectively according to the waveform change characteristics of the 12-lead electrocardiogram in the time and lead dimensions;

[0037] Module M5: Establish a pre-training framework based on the data enhancement method to obtain a feature extractor.

[0038] Preferably, the module M2 comprises:

[0039] Train the network model; the update process of weight parameters is:

[0040] X i+1 =F(X i ,W i ,b i )

[0041]

[0042] Where X is the input, F(·) is a nonlinear function used to extract deep features containing multiple convolutional layers of different sizes; b i and W i are the bias and weight parameters of the i-th layer respectively.

[0043] Preferably, the module M3 includes using a feature extractor to automatically extract hidden features of the electrocardiogram signal to obtain a valid feature expression of the input data; allowing a feature classifier to calculate deep features based on actual labeled data, output a prediction result, and obtain a classification loss.

[0044] Preferably, the module M4 includes:

[0045] Time dimension masking: Perform time-mask operation on each wire separately and set the sampling mask ratio;

[0046] Lead dimension masking: Randomly select a certain proportion of leads for time dimension masking and set the ratio parameter.

[0047] Preferably, the module M5 comprises:

[0048] For each sample in each random batch, the data augmentation method is used to generate each sample from two different views, i.e., a data pair (xi, xj); a feature extractor is used to map the input ECG signal to a representation space, i.e., oi = f(xi) and oj = f(xj); the contrast loss is set as:

[0049]

[0050] Where I(·) represents the indicator function, N represents the batch size, and τ represents the hyperparameter;

[0051] The function sim(·) is used to calculate the cosine similarity between oi and oj, and:

[0052]

[0053] Compared with the prior art, the present invention has the following beneficial effects:

[0054] 1. The present invention designs a convolutional neural network and residual block to construct a deep feature extractor, which can automatically obtain the characteristic expression of the ECG signal; by using self-supervised learning and residual convolutional neural network, it can achieve an average accuracy of up to 99.0% with only 25% labeled data, significantly improving the accuracy of arrhythmia assessment and analysis.

[0055] 2. The present invention can reduce the reliance on a large amount of high-quality labeled data, greatly reduce the cost and time of data annotation, and reduce the workload of clinicians; by using data enhancement methods, the model can better handle the noise and variation in unlabeled samples, thereby enhancing the robustness and generalization ability of the model.

[0056] 3. The present invention can automatically mine the hidden features of electrocardiogram signals without the need for manual feature design, thus simplifying the model development process, improving the applicability and flexibility of the model, and having good application prospects.

[0057] Other beneficial effects of the present invention will be explained in the specific implementation manner through the introduction of specific technical features and technical solutions. Through the introduction of these technical features and technical solutions, those skilled in the art should be able to understand the beneficial technical effects brought about by the technical features and technical solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0059] Figure 1 The figure is a flow chart of the method of the present invention.

[0060] Figure 2 Schematic diagram of the data augmentation process of the present invention.

[0061] Figure 3 This is a pre-training framework diagram of the present invention. DETAILED DESCRIPTION

[0062] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0063] Reference Figure 1 As shown, a self-supervised learning method for assessing arrhythmia comprises:

[0064] Step S1: resampling the electrocardiogram signals collected by different devices to a predetermined number of sampling points;

[0065] Step S2: Use a convolutional neural network to configure residual blocks for inputs and outputs of different dimensions;

[0066] The network model is trained, and the update process of the weight parameters is:

[0067] X i+1 =F(Xi ,W i ,b i )

[0068]

[0069] Where X is the input, F(·) is a nonlinear function used to extract deep features containing multiple convolutional layers of different sizes; b i and W i are the bias and weight parameters of the i-th layer respectively.

[0070] Step S3: using a feature extractor to automatically extract hidden features of the electrocardiogram signal;

[0071] The feature extractor consists of a convolutional neural network and residual blocks.

[0072] After using the feature extractor to automatically extract the hidden features of the electrocardiogram signal, the effective feature expression of the input data is obtained; the feature classifier is used to calculate the deep features based on the actual labeled data, output the prediction results, and obtain the classification loss.

[0073] Step S4: transforming the input ECG signal using a data enhancement method;

[0074] Reference Figure 2 As shown, the data enhancement method includes performing multi-angle mask recording of the 12-lead ECG from the time and lead dimensions respectively according to the waveform change characteristics of the 12-lead ECG in the time and lead dimensions. Specifically, the time dimension masking includes performing a time-mask operation on each wire and setting a sampling mask ratio; the lead dimension masking includes randomly selecting a certain proportion of leads for time-dimensional masking and setting a ratio parameter.

[0075] Step S5: Refer to Figure 3 As shown, a pre-training framework is established based on the data enhancement method to obtain a feature extractor.

[0076] For each sample in each random batch, the data augmentation method is used to generate each sample from two different views, i.e., a data pair (xi, xj); a feature extractor is used to map the input ECG signal to a representation space, i.e., oi = f(xi) and oj = f(xj); the contrast loss is set as:

[0077]

[0078] Where I(·) represents the indicator function, N represents the batch size, and τ represents the hyperparameter;

[0079] The function sim(·) is used to calculate the cosine similarity between oi and oj, and:

[0080]

[0081] The above is a basic embodiment of the present invention. The technical solution of the present invention is further described below through a preferred embodiment.

[0082] Example 1

[0083] Reference Figure 1 As shown, a self-supervised learning method for assessing arrhythmia comprises:

[0084] Step 1: Since the sampling frequencies of different devices are different, in order to ensure the consistency of signal length, all records are resampled to 4096 sampling points;

[0085] Step 2: Use CNN to design residual blocks for inputs and outputs of different dimensions to improve the representation performance of the network. During the training of the network model, the update process of the weight parameters is as follows:

[0086] X i+1 =F(X i ,W i ,b i ) (1)

[0087]

[0088] Where X is the input, F(·) is a nonlinear function used to extract deep features containing multiple convolutional layers of different sizes. bi and Wi are the bias and weight parameters of the i-th layer, respectively.

[0089] Step 3: The feature extractor is composed of a CNN and a residual block, which can automatically mine the hidden features of the ECG or heartbeat segments in end-to-end learning and obtain the effective feature expression of the input data. Next, the feature classifier calculates the deep features based on the actual labeled data, outputs the prediction results, and obtains the classification loss:

[0090] X i+1 =F(X i ,W i ,b i )+L(X i ,W i ) (3)

[0091] Among them, X i is the input, X i+1 is the output, F(·) and L(·) are nonlinear functions used to extract deep features containing multiple convolutional layers of different sizes.

[0092] Step 4: Reference Figure 2As shown in the figure, a new data enhancement method is designed to transform the input ECG signal, so that the model can more effectively obtain the characteristic expression of the ECG signal on the unlabeled samples. According to the waveform change characteristics of the 12-lead ECG in the time and lead dimensions, the 12-lead ECG is recorded with a multi-angle mask from the time and lead dimensions. The specific process is as follows:

[0093] Time dimension masking: Time-masking operation is performed on each lead separately. Considering the normal time limit of each heartbeat and QRS wave, the sampling mask ratio is set to 0.1; that is, some sample values ​​of the single-lead ECG signal are randomly sampled and set to zero to increase the input unlabeled data.

[0094] Lead dimension masking: The heart state described by each lead of the 12-lead ECG recording at the same time is consistent, and the difference in waveform is caused by different observation angles. Therefore, applying the same time dimension mask to all leads may mask key information at the same time. A lead size mask is designed to randomly select a certain proportion of leads for time dimension masking, thereby ensuring the integrity of the 12-lead ECG recording information. In this embodiment, the ratio is set to 0.5.

[0095] Step 5: Reference Figure 3 As shown, a pre-training framework is designed to obtain an efficient and low-annotation-cost feature extractor. Figure 2 The proposed pre-training framework is shown.

[0096] First, for each sample in each random batch, we use the data augmentation method proposed in the previous step to generate each sample from two different views, i.e., a data pair (x i ,x j ). Next, a feature extractor is used to map the input ECG signal into a representation space, namely o i = f(xi) and o j =f(x j ). Finally, in order to characterize the differences between different views, the following contrast loss is designed:

[0097]

[0098] Where I(·) represents the indicator function, N represents the batch size, and τ represents the hyperparameter.

[0099] Among them, the function sim(·) can calculate o i and j The cosine similarity of , and:

[0100]

[0101] With the support of unlabeled data sets, the present invention can effectively reduce the workload of clinicians. Compared with existing methods, the present invention uses about 25% labeled data and achieves better evaluation performance in terms of an average accuracy of 99.0%. By adopting the structure of a self-supervised residual convolutional neural network, the problem of high-precision deep networks obtained through low-cost annotation is solved, achieving the purpose of low-cost accurate evaluation of various types of arrhythmia diseases, providing decision-making suggestions for doctors and reducing their workload.

[0102] The present invention also provides a self-supervised learning system for evaluating arrhythmias. The self-supervised learning system for evaluating arrhythmias can be implemented by executing the process steps of the self-supervised learning method for evaluating arrhythmias, that is, those skilled in the art can understand the self-supervised learning method for evaluating arrhythmias as a preferred implementation of the self-supervised learning system for evaluating arrhythmias.

[0103] Specifically, a self-supervised learning system for assessing arrhythmia includes:

[0104] Module M1: resample the electrocardiogram signals collected by different devices to a predetermined number of sampling points;

[0105] Module M2: Use convolutional neural networks to configure residual blocks for inputs and outputs of different dimensions;

[0106] Module M3: Automatically extract hidden features of ECG signals using feature extractors;

[0107] The feature extractor consists of a convolutional neural network and residual blocks.

[0108] Also includes:

[0109] Module M4: transform the input ECG signal using a data enhancement method;

[0110] The data enhancement method includes performing multi-angle mask recording of the 12-lead electrocardiogram from the time and lead dimensions respectively according to the waveform change characteristics of the 12-lead electrocardiogram in the time and lead dimensions;

[0111] Module M5: Establish a pre-training framework based on the data enhancement method to obtain a feature extractor.

[0112] The module M2 comprises:

[0113] Train the network model; the update process of weight parameters is:

[0114] X i+1 =F(X i ,W i ,b i )

[0115]

[0116] Where X is the input, F(·) is a nonlinear function used to extract deep features containing multiple convolutional layers of different sizes; b i and W i are the bias and weight parameters of the i-th layer respectively.

[0117] The module M3 includes using a feature extractor to automatically extract hidden features of the electrocardiogram signal to obtain a valid feature expression of the input data; allowing a feature classifier to calculate deep features based on actual labeled data, output a prediction result, and obtain a classification loss.

[0118] The module M4 comprises:

[0119] Time dimension masking: Perform time-mask operation on each wire separately and set the sampling mask ratio;

[0120] Lead dimension masking: Randomly select a certain proportion of leads for time dimension masking and set the ratio parameter.

[0121] The module M5 comprises:

[0122] For each sample in each random batch, the data augmentation method is used to generate each sample from two different views, i.e., a data pair (xi, xj); a feature extractor is used to map the input ECG signal to a representation space, i.e., oi = f(xi) and oj = f(xj); the contrast loss is set as:

[0123]

[0124] Where I(·) represents the indicator function, N represents the batch size, and τ represents the hyperparameter;

[0125] The function sim(·) is used to calculate the cosine similarity between oi and oj, and:

[0126]

[0127] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0128] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A self-supervised learning method for assessing cardiac arrhythmias, characterized in that include: Step S1: resampling the electrocardiogram signals collected by different devices to a predetermined number of sampling points; Step S2: Use a convolutional neural network to configure residual blocks for inputs and outputs of different dimensions; Step S3: using a feature extractor to automatically extract hidden features of the electrocardiogram signal; The feature extractor consists of a convolutional neural network and residual blocks.

2. The self-supervised learning method for assessing arrhythmia according to claim 1, characterized in that Also includes: Step S4: transforming the input ECG signal using a data enhancement method; The data enhancement method includes performing multi-angle mask recording of the 12-lead electrocardiogram from the time and lead dimensions respectively according to the waveform change characteristics of the 12-lead electrocardiogram in the time and lead dimensions; Step S5: Establish a pre-training framework based on the data enhancement method to obtain a feature extractor.

3. The self-supervised learning method for assessing arrhythmia according to claim 1, characterized in that: The step S2 comprises: Train the network model; the update process of weight parameters is: X i+1 =F(X i ,W i ,b i ) Where X is the input, F(·) is a nonlinear function used to extract deep features containing multiple convolutional layers of different sizes; b i and W i are the bias and weight parameters of the i-th layer respectively.

4. The self-supervised learning method for assessing arrhythmia according to claim 1, characterized in that The step S3 includes using a feature extractor to automatically extract hidden features of the electrocardiogram signal to obtain a valid feature expression of the input data; Let the feature classifier calculate the deep features based on the actual labeled data, output the prediction results, and get the classification loss.

5. The self-supervised learning method for assessing arrhythmia according to claim 2, characterized in that: The step S4 comprises: Time dimension masking: Perform time-mask operation on each wire separately and set the sampling mask ratio; Lead dimension masking: Randomly select a certain proportion of leads for time dimension masking and set the ratio parameter.

6. The self-supervised learning method for assessing arrhythmia according to claim 2, characterized in that: The step S5 comprises: For each sample in each random batch, the data augmentation method is used to generate each sample from two different views, i.e., a data pair (xi, xj); a feature extractor is used to map the input ECG signal to a representation space, i.e., oi = f(xi) and oj = f(xj); the contrast loss is set as: Where I(·) represents the indicator function, N represents the batch size, and τ represents the hyperparameter; The function sim(·) is used to calculate the cosine similarity between oi and oj, and:

7. A self-supervised learning system for assessing cardiac arrhythmias, characterized in that include: Module M1: resample the electrocardiogram signals collected by different devices to a predetermined number of sampling points; Module M2: Use convolutional neural networks to configure residual blocks for inputs and outputs of different dimensions; Module M3: Automatically extract hidden features of ECG signals using feature extractors; The feature extractor consists of a convolutional neural network and residual blocks.

8. The self-supervised learning system for assessing cardiac arrhythmia according to claim 7, characterized in that: Also includes: Module M4: transform the input ECG signal using a data enhancement method; The data enhancement method includes performing multi-angle mask recording of the 12-lead electrocardiogram from the time and lead dimensions respectively according to the waveform change characteristics of the 12-lead electrocardiogram in the time and lead dimensions; Module M5: Establish a pre-training framework based on the data enhancement method to obtain a feature extractor.

9. The self-supervised learning system for assessing cardiac arrhythmia according to claim 7, characterized in that: The module M2 comprises: Train the network model; the update process of weight parameters is: X i+1 =F(X i ,W i ,b i ) Where X is the input, F(·) is a nonlinear function used to extract deep features containing multiple convolutional layers of different sizes; b i and W i are the bias and weight parameters of the i-th layer respectively.

10. The self-supervised learning system for assessing cardiac arrhythmia according to claim 7, characterized in that: The module M3 includes using a feature extractor to automatically extract hidden features of the electrocardiogram signal and obtain a valid feature expression of the input data; Let the feature classifier calculate the deep features based on the actual labeled data, output the prediction results, and get the classification loss.

Citation Information

Patent Citations

  • Electrocardiogram characterization self-supervised learning method

    CN115429286A

Cited By

  • Multi-modal physiological signal pre-training method and system and related equipment

    CN122594702A