A cardiac data anomaly detection method based on unsupervised adaptive weights

By introducing unsupervised adaptive weights with variational autoencoder and Gaussian kernel density estimation model in cardiac abnormality detection, the problem of existing methods neglecting low-dimensional representation optimization weights is solved, and more efficient cardiac abnormality detection is achieved.

CN114548281BActive Publication Date: 2025-05-02CHINA ANIMAL SCIENCE (HUZHOU) INTELLIGENT TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210168082.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2025-05-02
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

The existing cardiac anomaly detection method based on deep learning ignores the optimization weights of low-dimensional representations in each layer of the potential space, resulting in room for improvement in detection effect and accuracy.

Method used

A method for detecting cardiac data abnormality based on unsupervised adaptive weights is proposed. The latent spatial distribution of cardiac measured value data is extracted through a variational autoencoder, and the adaptive reconstruction loss and KL divergence are constructed to optimize the utilization of different levels of features. Anomaly detection is performed in combination with the Gaussian kernel density estimation model.

Benefits of technology

By balancing the reconstruction losses at different levels through adaptive weights, avoiding indifferent and tendency learning, improving the accuracy and recall of cardiac abnormality detection, and having a higher F1 score.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114548281B_ABST
    Figure CN114548281B_ABST
Patent Text Reader

Abstract

The present invention claims a method for detecting abnormality of cardiac data based on unsupervised adaptive weights, including: constructing a variational autoencoder based on adaptive weight optimization to extract and balance features between data at different levels; constructing a Gaussian kernel density estimation model to process density estimation tasks of complex task input data and perform abnormality detection; constructing an adaptive reconstruction loss between the input and output of the autoencoder to constrain the autoencoder to correctly learn the features of cardiac measurement data; constructing an adaptive reconstruction loss between the low-dimensional representation of the latent space and the reconstructed data corresponding to the corresponding layer to retain the data consistency of features from high dimensions to low dimensions; constructing an adaptive reconstruction loss between input data and output data; constructing the KL divergence of the data distribution of the low-dimensional features of the data in the loss function to optimize the difference between the sampled samples and the generated samples. The present invention obtains better detection results with less training ratio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to a medical data anomaly detection method, which combines a deep autoencoder and a Gaussian kernel density estimation model to detect abnormal cardiac data. Background Art

[0002] Cardiac anomaly detection can help doctors quickly and effectively identify abnormal cases and reduce the chances of missed or false positives. Traditional anomaly detection methods evaluate outlier data by calculating data distance and density in the original data space, which has certain limitations, especially when dealing with complex high-dimensional data. Deep learning-based methods can map high-dimensional data to latent space through a multi-layer network and extract low-dimensional representation features of the data to predict anomalies. In addition, deep learning methods often have stronger generalization capabilities than shallow methods, can better simulate real data distribution, and do not need to explicitly construct features. However, current deep learning-based anomaly detection ignores the different values ​​of low-dimensional representations at each layer in the latent space, and there is still room for improvement in effect and accuracy.

[0003] Since the current anomaly detection algorithm based on variational autoencoders does not pay attention to the optimization weights of low-dimensional representations of different layers, the heart disease anomaly detection method based on unsupervised adaptive weight variational autoencoders is used to adaptively balance the reconstruction losses corresponding to different layers in the encoder and decoder to avoid indifferent learning and biased learning of the model. In addition, the low-dimensional representation in the encoder and the relative Euclidean distance corresponding to the input and output layers are input into the Gaussian kernel density model to model normal data, and then the anomaly is predicted based on the threshold, thereby improving the accuracy of heart disease anomaly detection.

[0004] After searching, the application publication number CN110279411A is a method for detecting abnormal cardiac data, comprising: real-time acquisition of multimodal cardiac data, and preprocessing of the cardiac data; low-pass filtering of the preprocessed cardiac data with a cutoff frequency less than or equal to 5HZ; discrete wavelet filtering of the cardiac data with high-frequency noise removed to correct the baseline drift; obtaining the positions of the peaks and troughs in the data waveform according to the cardiac data with corrected baseline drift, and obtaining the time interval value between the peaks according to the positions of the peaks and troughs and the sampling rate of the cardiac data; calculating the cardiac vital sign data according to the time interval between the peaks; performing analog-to-digital conversion on the cardiac vital sign data to obtain cardiac digital data; judging the cardiac digital data through artificial intelligence re-learning and Bayesian model to determine the abnormal situation; the present invention solves the problem of abnormal errors in the acquisition and detection of cardiopulmonary data in the prior art, thereby improving the detection accuracy of cardiac data. This patent uses a Bayesian model to judge cardiac data. The present invention adopts a variational autoencoder in a deep learning model to learn the distribution of normal cardiac data. It has a more powerful unsupervised modeling capability and can fully learn the semantic features of different levels in cardiac data. The probability-based Gaussian mixture model can more accurately detect abnormal cardiac data, thereby improving the performance of abnormality detection. Summary of the invention

[0005] The present invention aims to solve the above problems of the prior art. A cardiac data anomaly detection method based on unsupervised adaptive weights is proposed. The technical solution of the present invention is as follows:

[0006] A cardiac data anomaly detection method based on unsupervised adaptive weights comprises the following steps:

[0007] 1) Input the heart measurement data x into the variational autoencoder, extract the latent space distribution of the input data x through the variational autoencoder, and generate the reconstructed heart measurement data x′ from the data distribution obtained by the variational autoencoder through the decoder, so as to perform unsupervised data feature extraction;

[0008] 2) construct a reconstruction loss between the input data x and the output data x′ of the variational autoencoder, that is, the mean square error loss of x and x′, constraining the autoencoder to learn the data features of the heart measurement in an unsupervised manner;

[0009] 3) Construct a reconstruction loss between the low-dimensional representation of the latent space and the reconstructed data corresponding to the corresponding layer, that is, the mean square error loss between the input and output of the hidden layer, to retain the data consistency of the image features from high dimension to low dimension;

[0010] 4) Construct an adaptive regularization term Δ of the reconstruction loss, that is, enhance the reconstruction loss with smaller loss and weaken the reconstruction loss with larger loss, and automatically learn the weight parameters of different reconstruction losses through gradient optimization;

[0011] 5) Construct the Kullback-Leibler divergence of the data distribution of the low-dimensional features of the data in the loss function to optimize the difference between the sampled sample z and the generated sample x′;

[0012] 6) Model the Gaussian kernel density estimation model, fit the normal samples in the data through the Gaussian kernel density estimation model, and detect abnormal samples through the model.

[0013] Furthermore, in step 1), the heart measurement data x is input into a variational autoencoder, the encoder is used to extract the latent space distribution of the input data x, and the decoder is used to generate the reconstructed heart measurement data x′ from the data distribution obtained by the encoder, which specifically includes:

[0014] The encoder maps the input data x into a multi-layer low-dimensional representation h in the latent space latent , and the last layer of low-dimensional representation is recorded as h, the data distribution mapping of the last layer of low-dimensional representation h is represented by mean μ and variance σ, and then randomly sampled data from the distribution to obtain z is sent to the decoder to obtain the reconstructed data h′ of the multi-layer low-dimensional representation corresponding to the encoder latent , and finally the reconstructed data x′ corresponding to the input data x is obtained.

[0015] Further, the process of step 1) is defined as follows:

[0016] h=f e (x,θ)

[0017] μ,σ=f h (h,θ)

[0018] z=f s (μ,σ,θ)

[0019] x′=g d (z,φ)

[0020] Among them, θ is the model parameter obtained by the autoencoder after training with heart measurement data, and f e represents the forward calculation of the encoder, f h Indicates the hidden layer data distribution of the encoder, f s Represents the sampling process of the encoder.

[0021] Furthermore, in step 2), the optimization of the autoencoder is constrained by constructing a reconstruction loss between the input data x and the reconstructed data x′ to globally optimize the reconstructed data of the model. The reconstruction loss is defined as:

[0022] L io =||xx′|| 2

[0023] Furthermore, in step 3), the adaptive reconstruction loss L between the low-dimensional representation of the latent space and the reconstructed data corresponding to the corresponding layer is constructed. latent , retaining the data consistency of image features from high dimension to low dimension, adaptive reconstruction loss L latent The definition is as follows:

[0024]

[0025] L latent Includes the reconstruction loss of each layer output in the autoencoder. len(h latent ) represents the number of groups of low-dimensional representations corresponding to the encoder and decoder in the latent space, represents each layer of low-dimensional representation in the encoder, Represents each layer of low-dimensional representation in the decoder.

[0026] Furthermore, in step 4), an adaptive reconstruction loss regularization term is constructed, that is, the reconstruction loss with smaller loss is enhanced and the reconstruction loss with larger loss is weakened. The adaptive reconstruction loss regularization term is defined as follows:

[0027]

[0028] Among them, l and l′ represent the low-dimensional representations corresponding to different layers in the encoder and decoder, and merge_loss is defined as follows:

[0029]

[0030] Furthermore, in step 5), the KL divergence (relative entropy) of the data distribution of the low-dimensional features of the data is constructed in the loss function to optimize the difference between the sampled sample z and the generated sample x′. The loss function is defined as follows:

[0031]

[0032] where σ i represents the variance, μ i represents the mean, and n represents the number of data.

[0033] Furthermore, in step 6), a Gaussian kernel density estimation model is modeled, and a normal sample in the data is fitted by a Gaussian kernel density estimation model, and abnormal samples are detected by the model, specifically including: the Gaussian kernel density estimation model obtains a low-dimensional representation h of the heart measurement data according to the encoder, and inputs it together with the input data x and the output data x′ of the autoencoder into the Gaussian kernel density estimation model. The process is defined as follows:

[0034]

[0035] est_input=h+re_euclidean(x,x′)

[0036]

[0037] Where est_input represents the input data x, the output data x′ of the autoencoder, and the low-dimensional representation h of x, re_euclidean represents the relative Euclidean distance, and f b (y) represents the Gaussian kernel density estimation model, K b They represent the kernel density function, b is the bandwidth of the kernel function, and K is the non-negative Gaussian kernel function.

[0038] The advantages and beneficial effects of the present invention are as follows:

[0039] The innovative points of the present invention are as follows: 1) The introduction of adaptive weights. The adaptive weights balance the importance of the reconstruction errors of the low-dimensional representations corresponding to different layers in the latent space, thereby avoiding indifferent learning. In addition, the adaptive weights prevent the model from ignoring features with smaller losses during training, thereby avoiding biased learning. 2) By combining the adaptive weight-based variational autoencoder with the Gaussian kernel density function, the low-dimensional representation obtained in the variational autoencoder and the relative Euclidean distance between the input and output are fed into the kernel function for modeling, thereby performing effective anomaly detection.

[0040] This method balances the reconstruction losses corresponding to different levels of neural networks through an adaptive strategy, avoiding the indifferent learning and bias learning of anomaly detection based on variational autoencoders, thereby making the cardiac anomaly detection results have a higher F1 score. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a network structure diagram of a preferred embodiment provided by the present invention. DETAILED DESCRIPTION

[0042] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.

[0043] The technical solution of the present invention to solve the above technical problems is:

[0044] The heart measurement data x is input into the variational autoencoder, the encoder extracts the latent space distribution of the input data x, and the decoder generates the reconstructed heart measurement data x′ from the data distribution obtained by the encoder, so as to perform unsupervised data feature extraction; a reconstruction loss is constructed between the input data x and the output data x′ of the autoencoder, that is, the mean square error loss of x and x′, so as to constrain the autoencoder to correctly learn the data features of the heart measurement in an unsupervised manner; a reconstruction loss is constructed between the low-dimensional representation of the latent space and the reconstructed data corresponding to the corresponding layer, that is, the mean square error loss between the input and output of the hidden layer, so as to enhance the model's full utilization of features at different levels and retain image features from high The algorithm can improve the consistency of data from high-dimensional to low-dimensional data; construct an adaptive regularization term of the reconstruction loss, that is, enhance the reconstruction loss with smaller loss and weaken the reconstruction loss with larger loss, and automatically learn the weight parameters of different reconstruction losses through gradient optimization to avoid the indifference learning and bias learning of the model; construct the Kullback-Leibler (KL) divergence of the data distribution of the low-dimensional features of the data in the loss function to optimize the difference between the sampled sample z and the generated sample x′, and improve the accuracy and diversity of the output results of the autoencoder; model the Gaussian kernel density estimation model, fit the normal samples in the data through the Gaussian kernel density estimation model, and detect abnormal samples through the model.

[0045] The technical solution of the present invention will be described in detail below:

[0046] A method for detecting abnormalities of heart diseases based on an unsupervised adaptive weighted variational autoencoder, comprising:

[0047] The heart measurement data x is input into the variational autoencoder, the encoder is used to extract the latent space distribution of the input data x, and the decoder is used to generate the reconstructed heart measurement data x′ from the data distribution obtained by the encoder, so as to perform unsupervised data feature extraction.

[0048] A reconstruction loss, i.e., the mean square error loss of x and x′, is constructed between the input data x and the output data x′ of the autoencoder, so as to constrain the autoencoder to correctly learn the data features of the heart measurements in an unsupervised manner.

[0049] A reconstruction loss is constructed between the low-dimensional representation of the latent space and the reconstructed data corresponding to the corresponding layer, that is, the mean square error loss between the input and output of the hidden layer, to enhance the model's full utilization of features at different levels and retain the data consistency of image features from high dimensions to low dimensions.

[0050] An adaptive regularization term of the reconstruction loss is constructed, that is, the reconstruction loss with smaller loss is enhanced and the reconstruction loss with larger loss is weakened. The weight parameters of different reconstruction losses are automatically learned through gradient optimization to avoid indifferent learning and biased learning of the model.

[0051] The Kullback-Leibler (KL) divergence of the data distribution of the low-dimensional features of the data is constructed in the loss function to optimize the difference between the sampled sample z and the generated sample x′, thereby improving the accuracy and diversity of the output results of the autoencoder.

[0052] The Gaussian kernel density estimation model is built to fit the normal samples in the data, and the abnormal samples are detected through the Gaussian kernel density estimation model.

[0053] Furthermore, the adaptive weighted variational autoencoder extracts the latent space distribution of the input data x through the encoder, and generates the reconstructed heart measurement data x′ from the data distribution obtained by the encoder through the decoder, so as to perform unsupervised data feature extraction. Specifically, the encoder maps the input data x into a multi-layer low-dimensional representation h of the latent space. latent , and the last layer of low-dimensional representation is recorded as h. The data distribution of the last layer of low-dimensional representation h is mapped to mean μ and variance σ, and then randomly sampled data from the distribution to obtain z is sent to the decoder to obtain the reconstructed data h′ of the multi-layer low-dimensional representation corresponding to the encoder latent , and finally obtain the reconstructed data x′ corresponding to the input data x. The process is defined as follows:

[0054] h=f e (x,θ)

[0055] μ,σ=f h (h,θ)

[0056] z=f s (μ,σ,θ)

[0057] x′=g d (z,φ)

[0058] Among them, θ is the model parameter obtained by the autoencoder after training with heart measurement data, and f e represents the forward calculation of the encoder, f h Indicates the hidden layer data distribution of the encoder, f s Represents the sampling process of the encoder.

[0059] Furthermore, the reconstruction loss between the input data x and the reconstructed data x′ is used to constrain the adaptive weight variational autoencoder. This optimization is a global optimization that only cares about the final result of the optimization. The reconstruction loss is defined as:

[0060] L io =||xx′|| 2

[0061] Furthermore, the adaptive reconstruction loss L between the low-dimensional representation of the latent space and the reconstructed data corresponding to the corresponding layer is constructed. latent , enhance the model to make full use of features at different levels and retain the data consistency of features from high dimensions to low dimensions. The reconstruction loss is defined as follows:

[0062]

[0063] L latent Includes the reconstruction loss of each layer output in the autoencoder.

[0064] Furthermore, it is described that an adaptive reconstruction loss regularization term Δ is constructed between reconstruction losses of different layers, that is, the reconstruction loss with smaller loss is enhanced and the reconstruction loss with larger loss is weakened, so as to avoid indifferent learning and biased learning of the model. The adaptive reconstruction loss regularization term is defined as follows:

[0065]

[0066] Among them, l and l′ represent the low-dimensional representations corresponding to different layers in the encoder and decoder, and merge_loss is defined as follows:

[0067]

[0068] Furthermore, the Kullback-Leibler (KL) divergence of the data distribution of the low-dimensional features of the data is constructed in the loss function to optimize the difference between the sampled sample z and the generated sample x′, thereby improving the accuracy and diversity of the output results of the autoencoder. The loss function is defined as follows:

[0069]

[0070] where σ i represents the variance, μ i represents the mean, and n represents the number of data

[0071] Furthermore, the Gaussian kernel density estimation model is modeled, and the normal samples in the data are fitted by the Gaussian kernel density estimation model, and the abnormal samples are detected by the model. Specifically, the Gaussian kernel density estimation model obtains the low-dimensional representation h of the heart measurement data according to the encoder, and inputs it together with the input data x and the output data x′ of the autoencoder into the Gaussian kernel density estimation model. The process is defined as follows:

[0072]

[0073] est_input=h+re_euclidean(x,x′)

[0074]

[0075] Where est_input represents the input data x, the output data x′ of the autoencoder, and the low-dimensional representation h of x, re_euclidean represents the relative Euclidean distance, and f b (y) represents the Gaussian kernel density estimation model, K b They represent the kernel density function, b is the bandwidth of the kernel function, and K is the non-negative Gaussian kernel function.

[0076] Step 1: Construct an adaptive weight variational autoencoder

[0077] The encoder extracts the latent space distribution of the input data x, and the decoder generates the reconstructed heart measurement data x′ from the data distribution obtained by the encoder to perform unsupervised data feature extraction. Specifically, the encoder maps the input data x into a multi-layer low-dimensional representation h of the latent space. latent , and the last layer of low-dimensional representation is recorded as h. The data distribution of the last layer of low-dimensional representation h is mapped to mean μ and variance σ, and then randomly sampled data from the distribution to obtain z is sent to the decoder to obtain the reconstructed data h′ of the multi-layer low-dimensional representation corresponding to the encoder latent , and finally obtain the reconstructed data x′ corresponding to the input data x. The process is defined as follows:

[0078] h=f e (x,θ)

[0079] μ,σ=f h (h,θ)

[0080] z=f s (μ,σ,θ)

[0081] x′=g d (z,φ)

[0082] Among them, θ is the model parameter obtained by the autoencoder after training with heart measurement data, and f e represents the forward calculation of the encoder, f h Indicates the hidden layer data distribution of the encoder, f s Represents the sampling process of the encoder.

[0083] Step 2: Construct the reconstruction loss between the input data x and the reconstructed data x′

[0084] The reconstruction loss between the input data x and the reconstructed data x′ is used to constrain the adaptive weight variational autoencoder. This optimization is a global optimization that only cares about the final result of the optimization. The reconstruction loss is defined as:

[0085] L io =||xx′|| 2

[0086] Step 3: Construct the reconstruction loss between the input and output of different levels of the autoencoder

[0087] By constructing an adaptive reconstruction loss L between the low-dimensional representation of the latent space and the reconstructed data corresponding to the corresponding layer latent , enhance the model to make full use of features at different levels and retain the data consistency of features from high dimensions to low dimensions. The reconstruction loss is defined as follows:

[0088]

[0089] L latent Includes the reconstruction loss of each layer output in the autoencoder.

[0090] Step 4: Construct an adaptive reconstruction loss regularization term

[0091] An adaptive reconstruction loss regularization term Δ is constructed between reconstruction losses at different layers, that is, the reconstruction loss with smaller loss is enhanced and the reconstruction loss with larger loss is weakened, so as to avoid the indifferent learning and biased learning of the model. The adaptive reconstruction loss regularization term is defined as follows:

[0092]

[0093] Among them, l and l′ represent the low-dimensional representations corresponding to different layers in the encoder and decoder, and merge_loss is defined as follows:

[0094]

[0095] Among them, len(h latent ) represents the number of groups of low-dimensional representations corresponding to the encoder and decoder in the latent space, represents each layer of low-dimensional representation in the encoder, Represents each layer of low-dimensional representation in the decoder.

[0096] Step 5: Construct KL divergence

[0097] The Kullback-Leibler (KL) divergence of the data distribution of the low-dimensional features of the data is constructed in the loss function to optimize the difference between the sampled sample z and the generated sample x′, thereby improving the accuracy and diversity of the output results of the autoencoder. The loss function is defined as follows:

[0098]

[0099] where σ i represents the variance, μ i represents the mean, and n represents the number of data

[0100] Step 6: Model the Gaussian kernel density estimation model and perform anomaly detection

[0101] The Gaussian kernel density estimation model is built, and the normal samples in the data are fitted by the Gaussian kernel density estimation model, and the abnormal samples are detected by the model. Specifically, the Gaussian kernel density estimation model obtains the low-dimensional representation h of the heart measurement data according to the encoder, and inputs it together with the input data x and the output data x′ of the autoencoder into the Gaussian kernel density estimation model. The process is defined as follows:

[0102]

[0103] est_input=h+re_euclidean(x,x′)

[0104]

[0105] Where est_input represents the input data x, the output data x′ of the autoencoder, and the low-dimensional representation h of x, re_euclidean represents the relative Euclidean distance, and f b (y) represents the Gaussian kernel density estimation model, K b They represent the kernel density function, b is the bandwidth of the kernel function, and K is the non-negative Gaussian kernel function.

[0106] In summary, the innovations and advantages of the present invention are:

[0107] The present invention proposes a cardiac data anomaly detection method based on unsupervised adaptive weights, which can detect anomalies in heart diseases. Compared with other methods, this method has better effects when the training ratio is low:

[0108] The present invention proposes a cardiac data anomaly detection method based on unsupervised adaptive weights, which uses an adaptive approach to balance the reconstruction losses corresponding to different layers, thereby avoiding the indifferent learning and bias learning of anomaly detection based on variational autoencoders:

[0109] The present invention proposes a cardiac data anomaly detection method based on unsupervised adaptive weights, which combines a variational autoencoder based on adaptive weights and a Gaussian kernel density function to enable the model to perform effective anomaly detection:

[0110] The present invention proposes a cardiac data anomaly detection method based on unsupervised adaptive weights, which can improve the accuracy and recall rate of anomaly detection and has important practical significance:

[0111] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0112] The above embodiments should be understood to be only used to illustrate the present invention and not to limit the protection scope of the present invention. After reading the contents of the present invention, technicians can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.

Claims

1. A cardiac data anomaly detection method based on unsupervised adaptive weights, characterized in that: The following steps are involved: 1) Input the heart measurement data x into the variational autoencoder, extract the latent space distribution of the input data x through the variational autoencoder, and generate the reconstructed heart measurement data x′ from the data distribution obtained by the encoder through the decoder, so as to perform unsupervised data feature extraction; 2) construct a reconstruction loss between the input data x and the output data x′ of the variational autoencoder, that is, the mean square error loss of x and x′, constraining the autoencoder to learn the data features of the heart measurement in an unsupervised manner; 3) Construct a reconstruction loss between the low-dimensional representation of the latent space and the reconstructed data corresponding to the corresponding layer, that is, the mean square error loss between the input and output of the hidden layer, to retain the data consistency of the image features from high dimension to low dimension; 4) Construct an adaptive regularization term for the reconstruction loss, that is, enhance the reconstruction loss with smaller loss and weaken the reconstruction loss with larger loss, and automatically learn the weight parameters of different reconstruction losses through gradient optimization; 5) Construct the Kullback-Leibler divergence of the data distribution of the low-dimensional features of the data in the loss function to optimize the difference between the sampled sample z and the generated sample x′; 6) Model the Gaussian kernel density estimation model, fit the normal samples in the data through the Gaussian kernel density estimation model, and detect abnormal samples through the model; In the step 1), the heart measurement data x is input into the variational autoencoder, the encoder is used to extract the latent space distribution of the input data x, and the decoder is used to generate the reconstructed heart measurement data x′ from the data distribution obtained by the encoder, which specifically includes: The encoder maps the input data x into a multi-layer low-dimensional representation h in the latent space latent , and the last layer of low-dimensional representation is recorded as h, the data distribution mapping of the last layer of low-dimensional representation h is represented by mean μ and variance σ, and then randomly sampled data from the distribution to obtain z is sent to the decoder to obtain the reconstructed data h′ of the multi-layer low-dimensional representation corresponding to the encoder latent , and finally obtain the reconstructed data x′ corresponding to the input data x; In step 2), the optimization of the autoencoder is constrained by constructing a reconstruction loss between the input data x and the reconstructed data x′ to globally optimize the reconstructed data of the model. The reconstruction loss is defined as: L io =||x-x′|| 2 In step 3), the adaptive reconstruction loss L between the low-dimensional representation of the latent space and the reconstructed data corresponding to the corresponding layer is constructed. latent , retain the data consistency of features from high dimension to low dimension, and reconstruct the loss L latent The definition is as follows: L latent Includes the reconstruction loss of each layer output in the autoencoder; len(h latent ) represents the number of groups of low-dimensional representations corresponding to the encoder and decoder in the latent space, represents each layer of low-dimensional representation in the encoder, Represents each layer of low-dimensional representation in the decoder; In step 4), an adaptive reconstruction loss regularization term Δ is constructed, that is, the reconstruction loss with smaller loss is enhanced and the reconstruction loss with larger loss is weakened. The adaptive reconstruction loss regularization term is defined as follows: Where l and l′ represent the low-dimensional representations corresponding to different layers in the encoder and decoder, and merge_loss is defined as follows: In step 5), the KL divergence relative entropy of the data distribution of the low-dimensional features of the data is constructed in the loss function to optimize the difference between the sampled sample z and the generated sample x′. The loss function is defined as follows: where σ i represents the variance, μ i represents the mean, and n represents the number of data; In the step 6), a Gaussian kernel density estimation model is built, and a normal sample in the data is fitted by the Gaussian kernel density estimation model, and abnormal samples are detected by the model, specifically including: the Gaussian kernel density estimation model obtains a low-dimensional representation h of the heart measurement data according to the encoder, and inputs it together with the input data x and the output data x′ of the autoencoder into the Gaussian kernel density estimation model. The process is defined as follows: est_input=h+re_euclidean(x,x′) Where est_input represents the input data x, the output data x′ of the autoencoder, and the low-dimensional representation h of x, re_euclidean represents the relative Euclidean distance, and f b (y) represents the Gaussian kernel density estimation model, K b They represent the kernel density function, b is the bandwidth of the kernel function, and K is the non-negative Gaussian kernel function.

2. The method for detecting abnormal cardiac data based on unsupervised adaptive weights according to claim 1, characterized in that: The process definition of step 1) is as follows: h=f e (x,θ) μ,σ=f h (h,θ) z=f s (m,s,i) x′=g d (z,φ) Among them, θ is the model parameter obtained by the autoencoder after training with heart measurement data, and f e represents the forward calculation of the encoder, f h Indicates the hidden layer data distribution of the encoder, f s Represents the sampling process of the encoder.

Citation Information

Patent Citations

  • Heart data anomaly detection method, heart data anomaly detection device, storage medium and terminal equipment

    CN110279411A

  • SAR image change detection method based on stack semi-supervised adaptive denoising auto-encoder

    CN107392940A

  • Feature autoregression method for anomaly detection

    CN112949344A