CN114154530A - Training method and device for atrial fibrillation detection model of electrocardio timing signals - Google Patents

Training method and device for atrial fibrillation detection model of electrocardio timing signals Download PDF

Info

Publication number
CN114154530A
CN114154530A CN202111248135.6A CN202111248135A CN114154530A CN 114154530 A CN114154530 A CN 114154530A CN 202111248135 A CN202111248135 A CN 202111248135A CN 114154530 A CN114154530 A CN 114154530A
Authority
CN
China
Prior art keywords
model
sample
model training
training sample
detection model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111248135.6A
Other languages
Chinese (zh)
Inventor
张霖
杜铭钰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN202111248135.6A priority Critical patent/CN114154530A/en
Publication of CN114154530A publication Critical patent/CN114154530A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Signal Processing (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention discloses an atrial fibrillation detection model training method and device for an electrocardio timing signal. The method comprises the following steps: obtaining a model training sample; the model training samples comprise a first model training sample with a label and a second model training sample without the label; training an initial electrocardio time sequence signal atrial fibrillation detection model based on a first model training sample to obtain a training electrocardio time sequence signal atrial fibrillation detection model; the initial electrocardio time sequence signal atrial fibrillation detection model is formed by connecting a multi-branch residual error network layer and a generated multi-antibody classification network layer in parallel; inputting a second model training sample into the training electrocardio timing signal atrial fibrillation detection model to obtain a pseudo label sample corresponding to the second model training sample; training the electrocardio time sequence signal atrial fibrillation detection model based on the pseudo label sample and the first model training sample to obtain the electrocardio time sequence signal atrial fibrillation detection model. The method and the device can ensure the accuracy and the speed of model updating and improve the stability of model updating.

Description

Training method and device for atrial fibrillation detection model of electrocardio timing signals
Technical Field
The invention relates to the technical field of model training, in particular to an atrial fibrillation detection model training method and device for an electrocardio time sequence signal.
Background
In order to meet the requirement of improving the performance of a neural network on a small amount of labeled electrocardio data and a large amount of unlabeled electrocardio data, a new method is developed and tested to obtain a high-precision electrocardio signal atrial fibrillation detection model. The labeling of the electrocardiographic signals is a very complicated process, the electrocardiographic signals may not see obvious arrhythmia symptoms during the acquisition period, a large amount of data needs to be considered when professional analysis is performed, and the attributes (such as period and amplitude) of the electrocardiographic signals are different from person to person and depend on different factors such as age, sex, physical condition and life style, so that experts can hardly make misjudgment in the marking process. In addition, in the face of a large amount of electrocardiographic data, it is not practical to require a professional to mark each sample accurately, resulting in a very limited number of labeled samples that can be finally studied, and poor performance when processing off-sample data.
Most of the existing researches are based on supervised learning (supervised learning), wherein the supervised learning refers to updating model parameters through the difference between a sample classification result given by a model and an actual label of the sample in each iteration of a machine learning model, so that the model parameters approach to a local or global optimal direction, and the purpose of improving the classification capability of the model is achieved. In other words, all samples in supervised learning must have explicit labels, otherwise the model cannot learn useful information from the samples.
A large amount of electrocardiosignal data carrying category labels are needed in the training process, however, obvious arrhythmia symptoms cannot be seen possibly during the acquisition of the electrocardiosignals, a large amount of data needs to be considered when experts analyze the electrocardiosignals, the attributes (such as period and amplitude) of the electrocardiosignals are different from person to person and depend on different factors, such as age, sex, physical condition and life style, and the experts are difficult to avoid misjudgment in the marking process. In addition, in the face of a large amount of electrocardiographic data, it is impractical for experts to mark each sample accurately, resulting in a very limited number of labeled samples that can be finally studied, which is not well behaved when processing off-sample data. The limited sample number greatly limits the research scope of researchers in the field of electrocardiosignal classification, and finally causes the problems of poor robustness of the model, reduced classification precision of samples outside the data set and the like.
Disclosure of Invention
The technical problem solved by the invention is as follows: the defects of the prior art are overcome, and the training method and the device for the atrial fibrillation detection model of the electrocardio time sequence signal are provided.
The technical solution of the invention is as follows:
in a first aspect, an embodiment of the present invention provides a training method for an atrial fibrillation detection model for an electrocardiographic time sequence signal, including:
obtaining a model training sample; the model training samples are 3D data constructed according to electrocardiosignal data, relative front RR intervals and relative rear RR intervals, and comprise first model training samples with labels and second model training samples without labels;
training an initial electrocardio time sequence signal atrial fibrillation detection model based on the first model training sample to obtain a training electrocardio time sequence signal atrial fibrillation detection model; the initial electrocardio time sequence signal atrial fibrillation detection model is formed by connecting a multi-branch residual error network layer and a generated multi-antibody classification network layer in parallel;
inputting the second model training sample into the training electrocardiogram time sequence signal atrial fibrillation detection model to obtain a pseudo label sample corresponding to the second model training sample;
and carrying out secondary training on the training electrocardio time sequence signal atrial fibrillation detection model based on the pseudo label sample and the first model training sample to obtain the electrocardio time sequence signal atrial fibrillation detection model.
Optionally, the obtaining model training samples includes:
acquiring the electrocardiosignal data;
calculating to obtain a global RR interval corresponding to the electrocardiosignal data;
calculating to obtain the relative front RR interval and the relative rear RR interval based on the global RR interval;
and constructing to obtain 3D data based on the electrocardiosignal data, the relative pre-RR interval and the relative post-RR interval, and taking the constructed 3D data as a model training sample.
Optionally, the first model training sample corresponds to a sample label value, wherein,
based on training initial electrocardio time sequence signal atrial fibrillation detection model is trained to first model training sample, obtains training electrocardio time sequence signal atrial fibrillation detection model, includes:
inputting the first model training sample into the initial electrocardio time sequence signal atrial fibrillation detection model;
calling the multi-branch residual error network layer to process the first model training sample to obtain a first prediction label value corresponding to the first model training sample;
calling the generated multi-resistance classification network layer to process the first model training sample to obtain a second prediction label value corresponding to the first model training sample;
calculating to obtain a loss value corresponding to the initial electrocardio time sequence signal detection model based on the first prediction label value, the second prediction label value and the sample label value;
and under the condition that the loss value is within a preset range, taking the trained initial electrocardio time sequence signal detection model as the training electrocardio time sequence signal detection model.
Optionally, the calculating a loss value corresponding to the initial electrocardiographic time series signal detection model based on the first prediction tag value, the second prediction tag value, and the sample tag value includes:
calculating to obtain a first loss value of the multi-branch residual error network layer according to the first prediction label value and the sample label value;
calculating to obtain a second loss value of the generated multi-reactive classification network layer according to the second prediction label value and the sample label value;
and determining the loss value of the initial electrocardio time sequence signal detection model according to the first loss value and the second loss value.
Optionally, the inputting the second model training sample into the training electrocardiographic timing signal atrial fibrillation detection model to obtain a pseudo tag sample corresponding to the second model training sample includes:
inputting the second model training sample into the training electrocardiogram time sequence signal atrial fibrillation detection model;
calling the multi-branch residual error network layer to process the second model training sample and generate a first classification result corresponding to the second model training sample;
calling the generated multi-antibody classification network layer to process the second model training sample and generate a second classification result corresponding to the second model training sample;
and under the condition that the first classification result is the same as the second classification result, labeling the second model training sample to generate the pseudo label sample.
In a second aspect, an embodiment of the present invention provides an atrial fibrillation detection model training device for an electrocardiographic timing signal, including:
the model training sample acquisition module is used for acquiring a model training sample; the model training samples are 3D data constructed according to electrocardiosignal data, relative front RR intervals and relative rear RR intervals, and comprise first model training samples with labels and second model training samples without labels;
the training detection model acquisition module is used for training an initial electrocardio time sequence signal atrial fibrillation detection model based on the first model training sample to obtain a training electrocardio time sequence signal atrial fibrillation detection model; the initial electrocardio time sequence signal atrial fibrillation detection model is formed by connecting a multi-branch residual error network layer and a generated multi-antibody classification network layer in parallel;
the pseudo label sample acquisition module is used for inputting the second model training sample into the training electrocardio timing signal atrial fibrillation detection model to acquire a pseudo label sample corresponding to the second model training sample;
and the electrocardio detection model acquisition module is used for carrying out secondary training on the training electrocardio time sequence signal atrial fibrillation detection model based on the pseudo label sample and the first model training sample to obtain the electrocardio time sequence signal atrial fibrillation detection model.
Optionally, the model training sample obtaining module includes:
the electrocardiosignal data acquisition unit is used for acquiring the electrocardiosignal data;
the global RR interval calculation unit is used for calculating to obtain a global RR interval corresponding to the electrocardiosignal data;
a relative RR interval calculation unit, configured to calculate the relative pre-RR interval and the relative post-RR interval based on the global RR interval;
and the model training sample acquisition unit is used for constructing and obtaining 3D data based on the electrocardiosignal data, the relative pre-RR interval and the relative post-RR interval, and taking the constructed 3D data as a model training sample.
Optionally, the first model training sample corresponds to a sample label value, wherein,
the training detection model acquisition module comprises:
the first model sample input unit is used for inputting the first model training sample to the initial electrocardio time series signal atrial fibrillation detection model;
a first prediction label value obtaining unit, configured to call the multi-branch residual network layer to process the first model training sample, so as to obtain a first prediction label value corresponding to the first model training sample;
a second prediction label value obtaining unit, configured to invoke the generated multi-reactance classification network layer to process the first model training sample, so as to obtain a second prediction label value corresponding to the first model training sample;
a loss value calculation unit, configured to calculate a loss value corresponding to the initial electrocardiographic time series signal detection model based on the first prediction tag value, the second prediction tag value, and the sample tag value;
and the training detection model acquisition unit is used for taking the trained initial electrocardio time sequence signal detection model as the training electrocardio time sequence signal detection model under the condition that the loss value is in a preset range.
Optionally, the loss value calculation unit includes:
a first loss value operator unit, configured to calculate a first loss value of the multi-branch residual network layer according to the first prediction tag value and the sample tag value;
a second loss value operator unit, configured to calculate a second loss value of the generated multi-reactance classification network layer according to the second prediction label value and the sample label value;
and the loss determining subunit is used for determining the loss value of the initial electrocardio time sequence signal detection model according to the first loss value and the second loss value.
Optionally, the pseudo label sample acquiring module includes:
the second model sample input unit is used for inputting the second model training sample into the training electrocardio time sequence signal atrial fibrillation detection model;
the first classification result generation unit is used for calling the multi-branch residual error network layer to process the second model training sample and generate a first classification result corresponding to the second model training sample;
the second classification result generation unit is used for calling the generated multi-antibody classification network layer to process the second model training sample and generate a second classification result corresponding to the second model training sample;
and the pseudo label sample generating unit is used for labeling the second model training sample to generate the pseudo label sample under the condition that the first classification result is the same as the second classification result.
Compared with the prior art, the invention has the advantages that:
according to the electrocardio time sequence signal atrial fibrillation detection model training method and device provided by the embodiment of the invention, a two-channel network method consisting of a multi-branch residual error neural network and a generation countermeasure classification network is utilized to perform two-dimensional feature extraction, and the two-channel network method participates in pseudo label generation work together in a self-adaptive stage, so that a more reliable pseudo label is manufactured, and the accuracy and the speed of model updating are ensured. In addition, an evaluation process of the confidence degree of each pseudo label is added into the domain difference measurement function, so that the more reliable pseudo labels have higher contribution degree to the domain difference loss value, and the model updating stability is further improved.
Drawings
FIG. 1 is a flowchart illustrating steps of a training method for an atrial fibrillation detection model of an ECG (electrocardiograph) timing signal according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a multi-branch residual network layer according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a network layer for generating a countermeasure classification according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a generator according to an embodiment of the present invention;
FIG. 5 is a diagram of an arbiter according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a model training phase according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of obtaining a pseudo label sample according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a domain difference metric calculation according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a confusion matrix according to an embodiment of the present invention;
FIG. 10 is a diagram illustrating states of model prediction in a pre-training phase (a) and an adaptive phase (b) according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a training device for an atrial fibrillation detection model of an electrocardiographic timing signal according to an embodiment of the present invention.
Detailed Description
Example one
Referring to fig. 1, a flowchart illustrating steps of a training method for an atrial fibrillation detection model of an electrocardiographic time series signal according to an embodiment of the present invention is shown, and as shown in fig. 1, the training method for the atrial fibrillation detection model of the electrocardiographic time series signal may include the following steps:
step 101: obtaining a model training sample; the model training samples are 3D data constructed according to electrocardiosignal data, relative front RR intervals and relative rear RR intervals, and comprise first model training samples with labels and second model training samples without labels.
The embodiment of the invention can be applied to a training scene of an atrial fibrillation detection model of an electrocardio time sequence signal.
The model training samples refer to samples for training an atrial fibrillation detection model for an electrocardio time series signal, in this example, the model training samples may be 3D data constructed according to electrocardio signal data, a relative pre-RR interval and a relative post-RR interval, and the model training samples may include a labeled first model training sample and a unlabeled second model training sample, that is, a labeled sample and an unlabeled sample.
The process of obtaining model training samples may be described in detail in conjunction with the following specific implementation.
In a specific implementation manner of the embodiment of the present invention, the step 101 may include:
substep A1: and acquiring the electrocardiosignal data.
Substep A2: calculating to obtain a global RR interval corresponding to the electrocardiosignal data;
substep A3: calculating to obtain the relative front RR interval and the relative rear RR interval based on the global RR interval;
substep A4: and constructing to obtain 3D data based on the electrocardiosignal data, the relative pre-RR interval and the relative post-RR interval, and taking the constructed 3D data as a model training sample.
In this embodiment, the original electrocardiographic signal data can be processed first, and 3D data is constructed by using RR intervals of the electrocardiograph, where the RR intervals are defined as intervals from one QRS main peak to the next QRS main peak as shown in fig. 2.
In the construction, the fact that the numerical values of RR intervals under data samples of the same type have large difference due to the existence of individual difference among different people is considered, and the classification effect of the model is influenced, therefore, for each person, the global RR interval of the sample is calculated firstly, then the ratio of the global RR interval calculation to the pre-RR interval and the post-RR interval is utilized, the relative pre-RR interval and the relative post-RR interval are obtained, and the numerical fluctuation caused by the individual difference can be reduced to a certain extent. And finally, constructing 3D data according to the electrocardiosignals, the relative front RR interval and the relative rear RR interval, wherein the 3D data can be used as a model training sample.
After the model training samples are acquired, step 102 is performed.
Step 102: training an initial electrocardio time sequence signal atrial fibrillation detection model based on the first model training sample to obtain a training electrocardio time sequence signal atrial fibrillation detection model; the initial electrocardio time sequence signal atrial fibrillation detection model is formed by connecting a multi-branch residual error network layer and a generated multi-antibody classification network layer in parallel.
In this example, the initial cardiac electrical timing signal atrial fibrillation detection model refers to a cardiac electrical timing signal atrial fibrillation detection model that has not yet started training.
When the electrocardio time sequence signal atrial fibrillation detection model needs to be trained, the model can be built firstly.
In this embodiment, two neural networks, namely a multi-branch residual network and a generation confrontation classification neural network, can be set up.
The structure of the multi-branch residual error network is shown in fig. 3, and the multi-branch residual error network sequentially includes: the system comprises a convolutional layer, an average pooling layer (sequentially comprising a batch normalization layer, a ReLU active layer, a convolutional layer, a ReLU active layer and a convolutional layer), a batch normalization layer, a ReLU active layer, a cavity convolutional layer, a global pooling layer, a full connection layer and a softmax layer.
The structure of the generated countermeasure classification network can be as shown in fig. 4, the generated countermeasure classification network is composed of a generator, a discriminator and a classifier, for a general generated countermeasure network, the generator generates pseudo data according to input data, and the discriminator needs to judge whether the input data is the pseudo data, that is, the generator needs to learn continuously to generate samples which can cheat the discriminator, and the discriminator needs to learn continuously to discriminate the pseudo samples. In the process of continuously competing learning of the two networks, the performances of the two networks are mutually improved, so the generation of the competing network is called. The structure of the generator may be as shown in fig. 5, and the structure of the discriminator may be as shown in fig. 6.
After the model is built, a model pre-training process may be performed. Specifically, the initial cardiac electrical time series signal atrial fibrillation detection model can be trained based on the labeled first model training sample to obtain a training cardiac electrical time series signal atrial fibrillation detection model. The training process can be described in detail in conjunction with the following specific implementation.
In another specific implementation manner of the embodiment of the present invention, the first model training sample corresponds to a sample label value, and the step 102 may include:
substep B1: and inputting the first model training sample into the initial electrocardio time sequence signal atrial fibrillation detection model.
In this embodiment, when pre-training the initial ecg timing signal atrial fibrillation detection model, the first model training sample may be input to the initial ecg timing signal atrial fibrillation detection model to perform supervised learning on a small amount of labeled data by the two networks, and then perform sub-step B2.
Substep B2: and calling the multi-branch residual error network layer to process the first model training sample to obtain a first prediction label value corresponding to the first model training sample.
Substep B3: and calling the generated multi-resistance classification network layer to process the first model training sample to obtain a second prediction label value corresponding to the first model training sample.
Substep B4: calculating to obtain a loss value corresponding to the initial electrocardio time sequence signal detection model based on the first prediction label value, the second prediction label value and the sample label value;
substep B5: and under the condition that the loss value is within a preset range, taking the trained initial electrocardio time sequence signal detection model as the training electrocardio time sequence signal detection model.
The first prediction tag value refers to a prediction tag value of a first model training sample output by the multi-branch residual network layer.
The second predictive tag value refers to the predictive tag value of the first model training sample output by the generation of the antagonistic classification network layer.
The multi-branch residual error network adopts an end-to-end mode to carry out error calculation and parameter optimization. Inputting a sample into a model, sequentially passing through a residual error network and a multi-branch network, finally splicing the sample into a classifier, and outputting a model result y 'by a Softmax layer, and calculating an error value between the model result y' and a real label value y through cross entropy, wherein the error value is as the following formula (1):
lossce=y×logy'+(1-y)×log(1-y') (1)
error lossceAnd updating the parameters of each layer network from back to front by adopting a back propagation method.
The generated confrontation classification network has the effect of mutual constraint by performing different calculations on output values and intermediate characteristic values among the three modules of the generator, the discriminator and the classifier in the training stage, so that the performance of each module is improved. The flow of the pre-training phase may be as shown in fig. 7.
The discriminator receives real input and pseudo input, outputs a judgment result, and calculates a cross entropy loss value loss _ D with the real labelceAs shown in the following formula (2):
loss_Dce=yDlogy'D+(1-yD)log(1-y'D) (2)
to ensure that the true input and the pseudo input are sufficiently similar, the difference between the two distributions needs to be calculated to penalize the generator, and the difference value is called Reconstruction Loss (Reconstruction Loss), and here, the mean square error calculation is adopted, as shown in the following formula (3):
Figure BDA0003321789380000101
if Latent _ i is only used for reconstructing input samples, Latent _ i can continuously mine the description characteristics of input data, namely, each part of detail of the input data can be comprehensively reflected, the fact that the input data are similar to original images as much as possible after Decoder is guaranteed, but the target of the model not only can generate data similar to the original samples, but also hopes that generated pseudo data can be fully and fully generatedHighlight lesion features that may not be apparent in the raw data, so Latent _ i should also possess classification features of the raw data. When the Latent _ i has classification characteristics, after a focus region in the generated pseudo data is highlighted, dense characteristics with higher quality are extracted through the Encoder _2, and the classification accuracy can be obviously improved after the dense characteristics are input into a classifier. In view of the above objectives, Latent _ i is input into the classifier for classification judgment, Latent _ o is input into the classifier for classification judgment, and cross entropy loss _ C _ i is calculated according to the classification resultceAnd loss _ C _ oceAs shown in the following formula:
loss_C_ice=yClogC(Latent_i)+(1-yC)log(1-C(Latent_i)) (4)
loss_C_oce=yClogC(Latent_o)+(1-yC)log(1-C(Latent_o)) (5)
the summation then yields: loss _ Cce=loss_C_ice+loss_C_oce
Wherein f isTrueFeatures of the real sample output by the discriminator, fFakeFor the features of the pseudo samples output by the discriminator, the features are considered to be n-dimensional, fTrue_iRepresenting the ith dimension of the true feature. In addition, the problem of gradient disappearance in the initial stage still occurs during training, so that the loss _ D _ f is judged during trainingmseAnd when the value is less than a certain threshold value, initializing the weight of the discriminator to ensure the updating speed of the generator.
Finally, the loss values of the components are integrated, i.e. the loss value loss of the discriminatorDLoss of generator value lossGAnd classifier loss value lossCObtained according to the following formula:
lossD=loss_Dce+loss_D_fmse
lossG=loss_Gmse+loss_Cce+loss_Dce
lossC=loss_Cce
and the parameters of each component are updated by back propagation through the chain derivative rule.
After the initial cardiac electrical time series signal atrial fibrillation detection model is trained based on the first model training sample to obtain a training cardiac electrical time series signal atrial fibrillation detection model, step 103 is executed.
Step 103: and inputting the second model training sample into the training electrocardiogram time sequence signal atrial fibrillation detection model to obtain a pseudo label sample corresponding to the second model training sample.
Step 104: and carrying out secondary training on the training electrocardio time sequence signal atrial fibrillation detection model based on the pseudo label sample and the first model training sample to obtain the electrocardio time sequence signal atrial fibrillation detection model.
After the pre-trained electrocardio timing signal atrial fibrillation detection model is obtained, the second model training sample can be input into the training electrocardio timing signal atrial fibrillation detection model to obtain a pseudo label sample corresponding to the second model training sample. And secondly, performing secondary training on the training electrocardio time sequence signal atrial fibrillation detection model by combining the pseudo label sample and the first model training sample, so that the electrocardio time sequence signal atrial fibrillation detection model can be obtained.
In this embodiment, according to a pre-trained network, firstly, a pseudo label needs to be marked on target domain data without a label, two models respectively give classification results to input data, in order to avoid an error in judgment of the models, output results of the two models are compared, if the two models have the same type judgment on current input, the judgment is considered to be reliable, namely, the input data is marked with a pseudo label, and if output types of the two models are not consistent and generate ambiguity, the judgment of each model is considered to be unreliable, and the label is discarded. The flow chart may be as shown in fig. 7:
as shown in fig. 7, it is considered that m data are input into one batch, m judgments are respectively given by two models, the judgments are compared one by one, k judgments of the last two models are consistent, that is, k pseudo tags are generated for subsequent domain difference metric calculation, the entropy of each tag is calculated to determine the reliability of the pseudo tag, and the smaller the entropy is, the higher the reliability is. Finally, the target domain data carrying the pseudo label participates in the domain difference metric calculation with the source domain according to the respective label and the corresponding credibility, and the specific flow can be as shown in fig. 8.
Taking a multi-branch residual error network as an example, defining a space between an input receiving end and a global pooling layer of the network as a feature extractor for extracting high-quality sample features, and judging the sample category according to the output of the feature extractor by using a full connection layer and Softmax as classifiers. In the figure fsSource domain features output for source domain data via a feature extractor, ftThe parameters of the two networks are shared for the target domain features of the target domain data output by the feature extractor. When the source domain data is calculated, the output of the model classifier and the real label calculate the cross entropy loss LclsMeanwhile, when the target domain data is processed, a pseudo label is made according to the flow of the figure, and f corresponding to the pseudo label is usedtAnd f of the source domainsCo-computing intra-domain differences Lintrainter-and-Domain Difference LinterAnd finally, integrating the loss values of the three parts to update parameters of the classifier and the feature extractor together.
Domain difference calculation in order to guarantee the calculation amount and the calculation speed, only the update calculation is carried out on the multi-branch residual error network at the present stage. And respectively extracting the source data and the target data through features to obtain respective feature domains, comparing the features of the target data with the generated countermeasure network result after passing through the classifier, and keeping the classification result with consistent judgment as a pseudo label. Calculating each sample x by using Shannon information entropy formulatInformation entropy of the pseudo tag of (1):
Figure BDA0003321789380000121
where M is the number of classes, where M is 5 and i represents the class of the sample. The larger the information entropy, the lower the confidence. Meanwhile, the characteristic domains are guaranteed to be similar and compact, the heterogeneous domains are far away, and loss functions are introduced to quantitatively calculate domain differences, wherein the similar domain differences are shown as the following formula:
Figure BDA0003321789380000122
the heterogeneous domain differences are defined as:
Figure BDA0003321789380000123
in the above formula, F is the feature extractor, D is the distance metric function, ciAnd tau is a constant for the information entropy when the sample pseudo label is in the i class. And then combining the source domain output and the real label to calculate the cross entropy loss:
Figure BDA0003321789380000124
wherein N is the number of source domain samples in the iteration. Finally, the domain difference loss function for the entire adaptation phase is shown as follows:
L=Lcls+Lintra+Linter
wherein the Domain difference metric function employs contrast difference (CDD). Firstly, defining a judgment function:
Figure BDA0003321789380000131
then the CDD is defined:
Figure BDA0003321789380000132
wherein e1,e2And e3Are respectively defined as:
Figure BDA0003321789380000133
Figure BDA0003321789380000134
Figure BDA0003321789380000135
wherein n issNumber of samples in source domain, ntIs the number of samples, x, of the target domainsAnd xtPhi is a characteristic extraction network for samples of a source domain and a target domain, a pseudo label is made for the sample of the target domain through a previous multi-branch residual error network and a generated countermeasure classification network, and a part of fuzzy labels are discarded to obtain
Figure BDA0003321789380000136
The final complete CDD is:
Figure BDA0003321789380000137
wherein, M is the category number of the target data, the experiment is set to 5, the first term of the above equation is as compact as possible for homogeneous items, and the latter term is as far away as possible for heterogeneous items.
In the testing phase, in terms of evaluating the performance of the classification model, Accuracy (Accuracy), Precision (Precision), and Recall (Recall) may be employed.
Before explaining these three criteria, the concept of confusion matrix needs to be introduced, as shown in fig. 9. In the binary classification, the two classes are P and N, and the output of the model is y', which represents the probability that the sample belongs to class P. In practical use, a threshold θ is typically set: when y' is larger than theta, the type predicted by the model is P; when y' is less than θ, the class predicted by the model is N. In the subclass, each data point has a label (P or N) that exists truly objectively. Meanwhile, the model judges the label of the data to obtain a prediction label. Assume a total of M test samples. These M samples consist of 4 cases.
TP represents the number of samples with a true label of P and a model prediction of class P.
FP represents the number of samples with a true label of N and a model prediction of class P.
FN represents the number of samples with a true label of P and a model prediction of N.
TN represents the number of samples with a true label of N and a model prediction of N.
Obviously, M is TP + FP + FN + TN. In addition, the number of samples with true labels P, MP being TP + FN, and the number of samples with true labels N, MN being FP + FN, can be obtained. In the 4 cases described above, the predicted and actual results of the model are consistent only in the first two cases (TP and TN). Accordingly, Accuracy is found according to the following equation: accuracy ═ TP + TN)/M.
However, the above formula has drawbacks. When the types of the test samples are unbalanced, for example, the number of samples in class N is much larger than that of samples in class P (MN ≧ MP), the index Accuracy cannot objectively represent the actual performance of the model. In order to solve the problem that important information is hidden when the number of test samples is unbalanced, Precision and Recall rate are introduced. Precision and Recall are not an integral index, which is evaluated for a specific class (P-class or N-class) of predicted cases. For example, in the case of class P, the definitions of the two are given as follows:
Precision=TP/(TP+FP)
Recall=TP/(TP+FN)
that is, the accuracy rate refers to how many proportions of the data with the model prediction result of the class P belong to the class P, and the recall rate refers to how many proportions of the data with the model prediction result of the class P belong to the class P.
Through the iterative training of the self-adaptive stage, the classifier after pre-training is compared with the self-adaptive training which adopts a single channel and no information entropy and the self-adaptive training which adopts a double channel and information entropy, and compared with the experimental results of other researchers in the field of electrocardio semi-supervised learning, the method is shown in the following table:
Figure BDA0003321789380000141
Figure BDA0003321789380000151
according to the table, through the training of the field self-adaption stage, various performances of the model are improved, meanwhile, the pseudo label is generated by adopting the dual-channel network, and the training effect of the self-adaption stage can be further improved by adding the information entropy in the domain difference loss calculation process. In the semi-supervised learning field, the model is at a leading level on Precision and Recall, and is inferior to the optimal model on Accuracy. In conclusion, the model already has excellent performance on the classification effect of the electrocardio.
In addition, model classification prediction graphs of the model in the pre-training stage and the adaptive stage are drawn, as shown in fig. 10, wherein the ordinate is a sample real label, and the abscissa is a model judgment result, and comparison of the two graphs can clearly show that the numerical value on the main diagonal line of the graph (b) is obviously increased compared with the graph (a), which shows that the number of samples of the prediction pair is increased, thereby proving that the classification accuracy of the model can be obviously improved by adopting the domain adaptive technology.
According to the embodiment of the invention, through comparison between different indexes of the model in the self-adaptive stage and models of other researchers, comparison of classification precision matrixes of various categories in two stages of the model and comparison of characteristic space distribution of the model in the two stages finally, the model structure provided by the research has better diagnosis performance of atrial fibrillation, and the design of the domain difference measurement function in the self-adaptive stage can effectively further improve the performance of the model.
Example two
Referring to fig. 11, which shows a schematic structural diagram of an electrocardiographic time series signal atrial fibrillation detection model training apparatus according to an embodiment of the present invention, as shown in fig. 11, the electrocardiographic time series signal atrial fibrillation detection model training apparatus may include the following modules:
a model training sample obtaining module 210, configured to obtain a model training sample; the model training samples are 3D data constructed according to electrocardiosignal data, relative front RR intervals and relative rear RR intervals, and comprise first model training samples with labels and second model training samples without labels;
a training detection model obtaining module 220, configured to train an initial cardiac electrical timing signal atrial fibrillation detection model based on the first model training sample to obtain a training cardiac electrical timing signal atrial fibrillation detection model; the initial electrocardio time sequence signal atrial fibrillation detection model is formed by connecting a multi-branch residual error network layer and a generated multi-antibody classification network layer in parallel;
a pseudo label sample obtaining module 230, configured to input the second model training sample to the training electrocardiograph timing signal atrial fibrillation detection model, so as to obtain a pseudo label sample corresponding to the second model training sample;
and the electrocardio detection model acquisition module 240 is used for carrying out secondary training on the training electrocardio time sequence signal atrial fibrillation detection model based on the pseudo label sample and the first model training sample to obtain the electrocardio time sequence signal atrial fibrillation detection model.
Optionally, the model training sample obtaining module includes:
the electrocardiosignal data acquisition unit is used for acquiring the electrocardiosignal data;
the global RR interval calculation unit is used for calculating to obtain a global RR interval corresponding to the electrocardiosignal data;
a relative RR interval calculation unit, configured to calculate the relative pre-RR interval and the relative post-RR interval based on the global RR interval;
and the model training sample acquisition unit is used for constructing and obtaining 3D data based on the electrocardiosignal data, the relative pre-RR interval and the relative post-RR interval, and taking the constructed 3D data as a model training sample.
Optionally, the first model training sample corresponds to a sample label value, wherein,
the training detection model acquisition module comprises:
the first model sample input unit is used for inputting the first model training sample to the initial electrocardio time series signal atrial fibrillation detection model;
a first prediction label value obtaining unit, configured to call the multi-branch residual network layer to process the first model training sample, so as to obtain a first prediction label value corresponding to the first model training sample;
a second prediction label value obtaining unit, configured to invoke the generated multi-reactance classification network layer to process the first model training sample, so as to obtain a second prediction label value corresponding to the first model training sample;
a loss value calculation unit, configured to calculate a loss value corresponding to the initial electrocardiographic time series signal detection model based on the first prediction tag value, the second prediction tag value, and the sample tag value;
and the training detection model acquisition unit is used for taking the trained initial electrocardio time sequence signal detection model as the training electrocardio time sequence signal detection model under the condition that the loss value is in a preset range.
Optionally, the loss value calculation unit includes:
a first loss value operator unit, configured to calculate a first loss value of the multi-branch residual network layer according to the first prediction tag value and the sample tag value;
a second loss value operator unit, configured to calculate a second loss value of the generated multi-reactance classification network layer according to the second prediction label value and the sample label value;
and the loss determining subunit is used for determining the loss value of the initial electrocardio time sequence signal detection model according to the first loss value and the second loss value.
Optionally, the pseudo label sample acquiring module includes:
the second model sample input unit is used for inputting the second model training sample into the training electrocardio time sequence signal atrial fibrillation detection model;
the first classification result generation unit is used for calling the multi-branch residual error network layer to process the second model training sample and generate a first classification result corresponding to the second model training sample;
the second classification result generation unit is used for calling the generated multi-antibody classification network layer to process the second model training sample and generate a second classification result corresponding to the second model training sample;
and the pseudo label sample generating unit is used for labeling the second model training sample to generate the pseudo label sample under the condition that the first classification result is the same as the second classification result.
According to the training device for the electrocardio time sequence signal atrial fibrillation detection model, provided by the embodiment of the invention, a two-channel network method consisting of a multi-branch residual error neural network and a generation countermeasure classification network is utilized to extract two-dimensional characteristics, and the two-dimensional characteristics jointly participate in pseudo label generation work in a self-adaptive stage, so that a more reliable pseudo label is manufactured, and the accuracy and the speed of model updating are ensured. In addition, an evaluation process of the confidence degree of each pseudo label is added into the domain difference measurement function, so that the more reliable pseudo labels have higher contribution degree to the domain difference loss value, and the model updating stability is further improved.
The detailed description set forth herein may provide those skilled in the art with a more complete understanding of the present application, and is not intended to limit the present application in any way. Thus, it will be appreciated by those skilled in the art that modifications or equivalents may still be made to the present application; all technical solutions and modifications thereof which do not depart from the spirit and technical essence of the present application should be covered by the scope of protection of the present patent application.
Those skilled in the art will appreciate that those matters not described in detail in the present specification are well known in the art.

Claims (10)

1. An electrocardio time sequence signal atrial fibrillation detection model training method is characterized by comprising the following steps:
obtaining a model training sample; the model training samples are 3D data constructed according to electrocardiosignal data, relative front RR intervals and relative rear RR intervals, and comprise first model training samples with labels and second model training samples without labels;
training an initial electrocardio time sequence signal atrial fibrillation detection model based on the first model training sample to obtain a training electrocardio time sequence signal atrial fibrillation detection model; the initial electrocardio time sequence signal atrial fibrillation detection model is formed by connecting a multi-branch residual error network layer and a generated multi-antibody classification network layer in parallel;
inputting the second model training sample into the training electrocardiogram time sequence signal atrial fibrillation detection model to obtain a pseudo label sample corresponding to the second model training sample;
and carrying out secondary training on the training electrocardio time sequence signal atrial fibrillation detection model based on the pseudo label sample and the first model training sample to obtain the electrocardio time sequence signal atrial fibrillation detection model.
2. The method of claim 1, wherein the obtaining model training samples comprises:
acquiring the electrocardiosignal data;
calculating to obtain a global RR interval corresponding to the electrocardiosignal data;
calculating to obtain the relative front RR interval and the relative rear RR interval based on the global RR interval;
and constructing to obtain 3D data based on the electrocardiosignal data, the relative pre-RR interval and the relative post-RR interval, and taking the constructed 3D data as a model training sample.
3. The method of claim 1, wherein the first model training sample corresponds to a sample label value, wherein,
based on training initial electrocardio time sequence signal atrial fibrillation detection model is trained to first model training sample, obtains training electrocardio time sequence signal atrial fibrillation detection model, includes:
inputting the first model training sample into the initial electrocardio time sequence signal atrial fibrillation detection model;
calling the multi-branch residual error network layer to process the first model training sample to obtain a first prediction label value corresponding to the first model training sample;
calling the generated multi-resistance classification network layer to process the first model training sample to obtain a second prediction label value corresponding to the first model training sample;
calculating to obtain a loss value corresponding to the initial electrocardio time sequence signal detection model based on the first prediction label value, the second prediction label value and the sample label value;
and under the condition that the loss value is within a preset range, taking the trained initial electrocardio time sequence signal detection model as the training electrocardio time sequence signal detection model.
4. The method according to claim 3, wherein the calculating a loss value corresponding to the initial cardiac electrical timing signal detection model based on the first prediction label value, the second prediction label value and the sample label value comprises:
calculating to obtain a first loss value of the multi-branch residual error network layer according to the first prediction label value and the sample label value;
calculating to obtain a second loss value of the generated multi-reactive classification network layer according to the second prediction label value and the sample label value;
and determining the loss value of the initial electrocardio time sequence signal detection model according to the first loss value and the second loss value.
5. The method according to claim 1, wherein the inputting the second model training sample into the training ecg timing signal atrial fibrillation detection model to obtain a pseudo label sample corresponding to the second model training sample comprises:
inputting the second model training sample into the training electrocardiogram time sequence signal atrial fibrillation detection model;
calling the multi-branch residual error network layer to process the second model training sample and generate a first classification result corresponding to the second model training sample;
calling the generated multi-antibody classification network layer to process the second model training sample and generate a second classification result corresponding to the second model training sample;
and under the condition that the first classification result is the same as the second classification result, labeling the second model training sample to generate the pseudo label sample.
6. The utility model provides an electrocardio time sequence signal atrial fibrillation detects model trainer which characterized in that includes:
the model training sample acquisition module is used for acquiring a model training sample; the model training samples are 3D data constructed according to electrocardiosignal data, relative front RR intervals and relative rear RR intervals, and comprise first model training samples with labels and second model training samples without labels;
the training detection model acquisition module is used for training an initial electrocardio time sequence signal atrial fibrillation detection model based on the first model training sample to obtain a training electrocardio time sequence signal atrial fibrillation detection model; the initial electrocardio time sequence signal atrial fibrillation detection model is formed by connecting a multi-branch residual error network layer and a generated multi-antibody classification network layer in parallel;
the pseudo label sample acquisition module is used for inputting the second model training sample into the training electrocardio timing signal atrial fibrillation detection model to acquire a pseudo label sample corresponding to the second model training sample;
and the electrocardio detection model acquisition module is used for carrying out secondary training on the training electrocardio time sequence signal atrial fibrillation detection model based on the pseudo label sample and the first model training sample to obtain the electrocardio time sequence signal atrial fibrillation detection model.
7. The apparatus of claim 6, wherein the model training sample acquisition module comprises:
the electrocardiosignal data acquisition unit is used for acquiring the electrocardiosignal data;
the global RR interval calculation unit is used for calculating to obtain a global RR interval corresponding to the electrocardiosignal data;
a relative RR interval calculation unit, configured to calculate the relative pre-RR interval and the relative post-RR interval based on the global RR interval;
and the model training sample acquisition unit is used for constructing and obtaining 3D data based on the electrocardiosignal data, the relative pre-RR interval and the relative post-RR interval, and taking the constructed 3D data as a model training sample.
8. The apparatus of claim 6, wherein the first model training sample corresponds to a sample label value, wherein,
the training detection model acquisition module comprises:
the first model sample input unit is used for inputting the first model training sample to the initial electrocardio time series signal atrial fibrillation detection model;
a first prediction label value obtaining unit, configured to call the multi-branch residual network layer to process the first model training sample, so as to obtain a first prediction label value corresponding to the first model training sample;
a second prediction label value obtaining unit, configured to invoke the generated multi-reactance classification network layer to process the first model training sample, so as to obtain a second prediction label value corresponding to the first model training sample;
a loss value calculation unit, configured to calculate a loss value corresponding to the initial electrocardiographic time series signal detection model based on the first prediction tag value, the second prediction tag value, and the sample tag value;
and the training detection model acquisition unit is used for taking the trained initial electrocardio time sequence signal detection model as the training electrocardio time sequence signal detection model under the condition that the loss value is in a preset range.
9. The apparatus according to claim 8, wherein the loss value calculation unit includes:
a first loss value operator unit, configured to calculate a first loss value of the multi-branch residual network layer according to the first prediction tag value and the sample tag value;
a second loss value operator unit, configured to calculate a second loss value of the generated multi-reactance classification network layer according to the second prediction label value and the sample label value;
and the loss determining subunit is used for determining the loss value of the initial electrocardio time sequence signal detection model according to the first loss value and the second loss value.
10. The apparatus of claim 6, wherein the pseudo label exemplar acquisition module comprises:
the second model sample input unit is used for inputting the second model training sample into the training electrocardio time sequence signal atrial fibrillation detection model;
the first classification result generation unit is used for calling the multi-branch residual error network layer to process the second model training sample and generate a first classification result corresponding to the second model training sample;
the second classification result generation unit is used for calling the generated multi-antibody classification network layer to process the second model training sample and generate a second classification result corresponding to the second model training sample;
and the pseudo label sample generating unit is used for labeling the second model training sample to generate the pseudo label sample under the condition that the first classification result is the same as the second classification result.
CN202111248135.6A 2021-10-26 2021-10-26 Training method and device for atrial fibrillation detection model of electrocardio timing signals Pending CN114154530A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111248135.6A CN114154530A (en) 2021-10-26 2021-10-26 Training method and device for atrial fibrillation detection model of electrocardio timing signals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111248135.6A CN114154530A (en) 2021-10-26 2021-10-26 Training method and device for atrial fibrillation detection model of electrocardio timing signals

Publications (1)

Publication Number Publication Date
CN114154530A true CN114154530A (en) 2022-03-08

Family

ID=80458698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111248135.6A Pending CN114154530A (en) 2021-10-26 2021-10-26 Training method and device for atrial fibrillation detection model of electrocardio timing signals

Country Status (1)

Country Link
CN (1) CN114154530A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116050428A (en) * 2023-03-07 2023-05-02 腾讯科技(深圳)有限公司 Intention recognition method, device, equipment and storage medium
WO2024017176A1 (en) * 2022-07-21 2024-01-25 维沃移动通信有限公司 Model training method and apparatus, network side device, and terminal device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024017176A1 (en) * 2022-07-21 2024-01-25 维沃移动通信有限公司 Model training method and apparatus, network side device, and terminal device
CN116050428A (en) * 2023-03-07 2023-05-02 腾讯科技(深圳)有限公司 Intention recognition method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
Lipton et al. Detecting and correcting for label shift with black box predictors
CN110427924A (en) A kind of heart impact signal based on LSTM more classifying identification methods automatically
CN112507901B (en) Unsupervised pedestrian re-identification method based on pseudo tag self-correction
CN110232395B (en) Power system fault diagnosis method based on fault Chinese text
CN110851491B (en) Network link prediction method based on multiple semantic influence of multiple neighbor nodes
CN114154530A (en) Training method and device for atrial fibrillation detection model of electrocardio timing signals
CN107945210B (en) Target tracking method based on deep learning and environment self-adaption
Lüer et al. Anomaly detection in time series using generative adversarial networks
CN111179235A (en) Image detection model generation method and device, and application method and device
CN114722892A (en) Continuous learning method and device based on machine learning
Wan et al. Confnet: predict with confidence
CN111144462A (en) Unknown individual identification method and device for radar signals
CN113762471A (en) Phase space reconstruction parameter estimation method based on attention mechanism and Bayesian optimization
CN113705645A (en) Adaptive joint model semi-supervised learning classification method for electroencephalogram signals
CN115115038B (en) Model construction method based on single lead electrocardiosignal and gender identification method
CN115511012B (en) Class soft label identification training method with maximum entropy constraint
CN116712099A (en) Fetal heart state detection method based on multi-mode data, electronic equipment and storage medium
CN116452812A (en) Camouflage object identification and semantic segmentation method
Chen et al. Parameter estimation in modelling the dynamics of fish stock biomass: are currently used observation-error estimators reliable?
CN113476065B (en) Multiclass pneumonia diagnostic system
CN115422977A (en) Radar radiation source signal identification method based on CNN-BLS network
Yu et al. Sarnet: self-attention assisted ranking network for temporal action proposal generation
CN111914952A (en) AD characteristic parameter screening method and system based on deep neural network
Susyanto et al. Two-step calibration method for multi-algorithm score-based face recognition systems by minimizing discrimination loss
Goh et al. An evolutionary approach for determining Hidden Markov Model for medical image analysis

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination