A method for predicting mortality risk of ICU patients based on contrastive learning
By adopting a contrast learning-based method in the prediction of death risk of ICU patients, using transformer-gru-cnn architecture and multi-task learning, the problem of failure to fully utilize domain knowledge and difficulty in capturing time-step information in the prior art is solved, and higher prediction accuracy and model generalization performance are achieved.
Patent Information
- Application Number
- CN202210783403.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-05
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-07-05
AI Technical Summary
The prior art has three major problems in the prediction of death risk in ICU patients: 1) Failure to make full use of the domain knowledge of medical scenarios; 2) Time series classification model is difficult to capture all information at the time step; 3) Longer time series information is required to predict, making accurate predictions in a shorter time.
Using a method based on contrast learning, the electronic medical record data of ICU patients is obtained, preprocessed and randomly divided, and input it into a constructed transformer-gru-cnn-based classifier. Comparative learning and multi-task learning are used to construct auxiliary loss functions and optimize model parameters to improve prediction accuracy.
Through comparative learning and multi-task learning, the model can better learn the difference relationship between samples, improve prediction accuracy and model generalization performance, and make more accurate predictions in a short time, which is better than traditional survival analysis methods and multiple time series classification models.
Smart Images

Figure CN115148359B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of risk prediction, and in particular relates to a method for predicting the risk of death of ICU patients based on contrastive learning. Background Art
[0002] In recent years, machine learning research in the medical and health field has developed rapidly, covering a variety of data types such as medical images, medical texts, and electronic health records. The ICU (Intensive Care Unit) database is a very typical type of electronic health record. Compared with ordinary medical health records, the electronic health records in the ICU database have richer medical indicators and test items, and are a research hotspot in the field of medical machine learning.
[0003] In the study of electronic medical records, the assessment of death risk for ICU patients has always been the basic and most important issue. By constructing a risk assessment prediction model for ICU patients based on historical ICU data, hospitals can allocate medical resources and make medical decisions for new ICU patients according to their critical risk conditions. They can also provide guidance and assistance to doctors' treatment methods through ICU patient data. Through the patient death risk prediction model, doctors can also obtain the determinants and disease types that affect patient death, thereby providing assistance for the development of the medical field.
[0004] Prediction of mortality risk is essentially a binary classification problem. In early studies, scholars usually used a series of traditional survival analysis methods based on critical risk scores, such as log-series test, Cox proportional hazard model, APACHE, SAPS and SOFA, to predict the mortality risk of ICU patients. As deep learning becomes more popular, some scholars have tried to introduce deep learning models into the study of mortality risk of patients in the MIMIC-III database. Because electronic clinical data has a time series nature, the recurrent neural network (RNN) model was first introduced; subsequently, some scholars used the long short-term memory network (LSTM) and gated recurrent unit network (GRU), which improved the defect of RNN network in capturing the long-term dependency of time series, for ICU patient mortality risk assessment and prediction, and achieved better results.
[0005] At present, most studies on the risk of death of ICU patients in medical electronic records focus on establishing a complete pipeline from data preprocessing to model prediction. This is because the field lacks public benchmark datasets like computer vision and natural language processing, which are hot computer fields. However, as more and more benchmark tasks are studied, researchers should not spend too much time on the establishment of the overall pipeline, but should make good use of the work of their predecessors and focus on more valuable work in the computer field, such as prediction algorithms.
[0006] For the prediction algorithm itself, there are three major types of problems in the existing technology: 1. For example, for specific medical scenarios, such as ICU patients, if the patient indicators are similar, they are likely to have similar clinical manifestations, while most of the existing time series classification algorithm models consider the application and improvement of network structures, and each calculation is only for one sample, without considering the domain knowledge of the medical scenario. 2. For the classification of a specific time series sample, the classification result should fully capture all the information on the time step, while the existing convolutional network system and recurrent network system can only model local time step information. 3. The longer the time series information obtained, the more accurate the prediction can be, but the actual application requires more accurate predictions in a shorter time.
[0007] In summary, there is an urgent need for an ICU patient mortality risk prediction algorithm based on contrastive learning to solve the problems existing in the existing prediction models in the ICU patient mortality risk prediction scenario. Summary of the invention
[0008] In view of the shortcomings of the prior art, the present invention proposes a method for predicting the death risk of ICU patients based on contrastive learning. The method comprises: obtaining electronic medical record data of the patient to be predicted, inputting the electronic medical record data into a constructed ICU patient death risk prediction model based on contrastive learning, and obtaining the death risk prediction result of the patient to be predicted.
[0009] The process of building a mortality risk prediction model for ICU patients based on contrastive learning includes:
[0010] S1: Obtain the electronic medical record dataset of ICU patients;
[0011] S2: Preprocess the electronic medical record dataset to obtain a structured multivariate time series dataset;
[0012] S3: Randomly divide the multivariate time series data set to obtain multiple batches of data samples;
[0013] S4: Input the data samples in the batch into the constructed transformer-gru-cnn based classifier to obtain the classification loss function and the third data high-dimensional representation;
[0014] S5: inputting the high-dimensional representation of the third data into the Kmeans clustering algorithm to obtain similar samples and divorced samples;
[0015] S6: Construct auxiliary contrastive learning loss function based on similar samples and divorced samples;
[0016] S7: Construct an optimization loss function based on the classification loss function and the auxiliary contrastive learning loss function;
[0017] S8: The parameters of the transformer-gru-cnn-based classifier are updated according to the optimized loss function to obtain the constructed ICU patient mortality risk prediction model based on contrastive learning.
[0018] Preferably, the multivariate time series data set includes hourly statistical information of 17 physiological indicators of ICU patients within 48 hours.
[0019] Preferably, the process of obtaining similar samples and divorced samples includes:
[0020] Given a sample x i and x j , if the samples satisfy x j ∈Kmeans(x i ), then the sample x j For sample x i Similar samples of
[0021] Given a sample x i and x j If the samples satisfy Then the sample x j For sample x i Divorce sample.
[0022] Preferably, the process of constructing the auxiliary loss function includes: taking the given sample as the target to have a higher similarity with its similar samples and a lower similarity with its dissimilar samples, constructing an auxiliary loss function according to similar samples and divorced samples; the formula of the auxiliary contrastive learning loss function is:
[0023]
[0024] Where R(f) represents the auxiliary contrastive learning loss, n represents the number of samples, and ξ 1 represents a set of similar samples, ξ 2 represents a set of dissimilar samples, score(f(x i ),f(x j )) represents the familiarity between samples, and f represents the high-dimensional representation of the samples.
[0025] Preferably, the process of constructing a transformer-gru-cnn based classifier includes:
[0026] A multi-layer multi-head self-attention network is used to encode the input information to obtain a high-dimensional representation of the first data;
[0027] A bidirectional GRU is superimposed on a unidirectional GRU, and a linear layer is superimposed behind the superimposed GRU to obtain a basic GRU architecture; input information is input into the basic GRU architecture to obtain a high-dimensional representation of the second data;
[0028] Using a multi-layer one-dimensional or two-dimensional convolutional network to process the input information, a high-dimensional representation of the third data is obtained;
[0029] The first data high-dimensional representation, the second data high-dimensional representation and the third data high-dimensional representation are concatenated and processed by a fully connected layer and an activation function to obtain an output result.
[0030] Preferably, the formula of the classification loss function is:
[0031] L CE =-P(x)loglog(P(x))-(1-P(x))loglog(1-P(x))
[0032] Among them, L CE represents the classification loss, and P(x) represents the probability of the predicted category.
[0033] The formula for the preferred optimization loss function is:
[0034] Loss = L CE +αR(f)
[0035] Among them, Loss represents the total loss of the model, L CE represents classification loss, R(f) represents auxiliary contrastive learning loss, and α represents a hyperparameter.
[0036] The beneficial effects of the present invention are as follows: the present invention defines similarities and divergences on small batches of data according to the relationship between ICU patient samples in the feature space of medical electronic records, adopts contrastive learning to construct an auxiliary loss function, and uses the similarity and divergence relationship of the samples to guide network layer learning, so that the network can learn the prior knowledge of the difference relationship between the samples; the optimization process of comparing sample differences and the optimization process of prediction are carried out together through multi-task learning, so that the optimization process of the model is constrained by the difference relationship between the samples of the data set and will not go astray in the optimization process. The present invention is constrained by the prior relationship in the data set during the optimization process of the deep learning framework, which makes the optimization process more stable, and can improve data utilization while retaining the advantages of random optimization; by implementing the present invention in a real medical electronic record scenario, it is proved that the present invention is superior to traditional survival analysis methods and various time series classification models for predicting the risk of death of ICU patients in medical electronic records in terms of the accuracy of the prediction results, model generalization performance, and model convergence; the present invention has high prediction accuracy and high practicality. By predicting the risk of patient death, it is helpful to make relevant preparations in time, such as individualized plans to reduce the risk of patient death and increase the probability of patient survival. It can also provide timely warnings to facilitate relatives to make relevant preparations, and has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flowchart of constructing a mortality risk prediction model for ICU patients based on contrastive learning in the present invention;
[0038] Figure 2 Schematic diagram of the network structure of the ICU patient mortality risk prediction model based on contrastive learning in the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] The present invention proposes a method for predicting the risk of death of ICU patients based on contrastive learning. Figure 1 As shown, the method includes: obtaining electronic medical record data of the patient to be predicted, inputting the electronic medical record data into a constructed ICU patient death risk prediction model based on contrastive learning, and obtaining a death risk prediction result of the patient to be predicted;
[0041] The process of building a mortality risk prediction model for ICU patients based on contrastive learning includes:
[0042] S1: Obtain the electronic medical record dataset of ICU patients.
[0043] Select a medical electronic record scenario to complete the extraction of relevant electronic medical record data, and use this as a data set to complete the prediction of ICU patient mortality risk.
[0044] Preferably, the MIMIC-III database is selected. The MIMIC-III database is a public medical electronic record data set that records relevant data of patients in the intensive care unit of Beth Israel Deacon Medical Center from 2001 to 2019, and has medical health data and records of more than 40,000 patients. The entire database has more than 20 tables. Specifically, it records the patient's demographic information, such as fixed structured data information such as height, weight, and gender; time series structured information such as various physiological indicators and medical measurement information measured by patients in the ICU; text information such as nurse notes and doctor's order notes related to patients; and image information such as medical images of patients' chests.
[0045] S2: Preprocess the electronic medical record dataset to obtain a structured multivariate time series dataset.
[0046] The present invention uses the baseline method developed by predecessors to extract more than 20,000 structured time series data from the MIMIC-III database. The data includes hourly statistical information of 17 physiological indicators of ICU patients within 48 hours. Each patient has a label, which is 0 or 1, recording whether he survived or died during hospitalization.
[0047] S3: Randomly divide the multivariate time series dataset into multiple batches of data samples.
[0048] The multivariate time series dataset is randomly divided into multiple small batches of data samples of size b for batch gradient descent. In deep learning, the model learns a batch of data each time, which is equivalent to a random sampling of the full data. The randomly sampled data belongs to the same distribution as the original data, then according to the manifold hypothesis, these samples should have similar distributions in the feature space.
[0049] S4: Input the data samples in the batch into the constructed classifier based on the deep self-attention transformer network (transformer) + gated recurrent neural network (gru) + convolutional network (cnn) architecture, referred to as the transformer-gru-cnn based classifier, to obtain the classification loss function and the third data high-dimensional representation.
[0050] like Figure 2As shown, the process of building a transformer-gru-cnn based classifier includes:
[0051] Transformer part: a multi-layer multi-head self-attention network is used to encode the input information to obtain a high-dimensional representation of the first data;
[0052] GRU part: A bidirectional GRU is superimposed on a unidirectional GRU, and a linear layer is superimposed behind the superimposed GRU to obtain a basic GRU architecture; the input information is input into the basic GRU architecture to obtain a high-dimensional representation of the second data;
[0053] CNN part: Use a multi-layer one-dimensional or two-dimensional convolutional network to process the input information and obtain a high-dimensional representation of the third data.
[0054] The first data high-dimensional representation, the second data high-dimensional representation and the third data high-dimensional representation are concatenated and processed by a fully connected layer and an activation function to obtain an output result.
[0055] For general two-classification tasks, you can use represents the sample space, Y=[y 1 ,y 2 ,...,y m ] T ∈{0,1,...,c} m×1 Denotes the label space, where c = 2 means the total number of categories is 2. Let p(x, y) be the joint probability density of the random variables X×Y composed of samples. The process of learning the classifier f(x) is to minimize the empirical risk estimator and obtain the classification loss function of the transformer-gru-cnn based classifier, that is, the cross entropy loss function in the binary classification scenario:
[0056] L CE =-P(x)loglog(P(x))-(1-P(x))loglog1-P(x)
[0057] Among them, L CE It represents the classification loss, that is, the cross entropy loss in the binary classification scenario, and P(x) represents the probability of the predicted category.
[0058] The data samples in the batch are input into the constructed transformer-gru-cnn based classifier. The data samples in the batch are processed by the CNN part to obtain the third data high-dimensional representation of the data samples in the batch.
[0059] S5: Input the third data high-dimensional representation into a k-means clustering algorithm (Kmeans algorithm for short) to obtain similar samples and divorced samples.
[0060] make represents the sample space, Y=[y 1 ,y 2 ,...,y m ] T ∈{0,1} m×q Represents the label space, the elements of the label space are the labels (alive or dead) corresponding to each sample, and introduce the following definitions:
[0061] 1) Given a sample x i and x j , x i ,x j ∈X, if the samples satisfy x j ∈Kmeans(x i ), then the sample x j For sample x i The similar samples of , the similar sample set can be expressed as:
[0062] N(x i )={x j |x j ∈Kmeans(x i ),i≠j}
[0063] 2) Given a sample x i and x j , x i ,x j ∈X, if the samples satisfy Then the sample x j For sample x i The divorced samples can be expressed as:
[0064]
[0065] S6: Construct an auxiliary contrastive learning loss function based on similar samples and divorced samples.
[0066] In order to learn an encoder f, the features of a sample x are more similar to those of similar samples, and less similar to those of divorced samples (dissimilar samples). The goal is to make the given sample more similar to its similar samples and less similar to its dissimilar samples. An auxiliary loss function is constructed based on similar samples and divorced samples, that is, a specific loss function is used to encourage similar pairs (x, x + ) is closer, while different pairs (x,x - ) is more orthogonal. In addition to orthogonality, other metric functions can also be used to measure similarity, such as Euclidean distance, cosine distance, etc. The initial auxiliary contrastive learning loss function is:
[0067]
[0068] Where R(f)′ represents the initial auxiliary contrastive learning loss, n represents the number of samples, represents the familiarity between samples, It represents the unfamiliarity between samples.
[0069] The essence of contrastive learning is to learn the differences between similar samples and dissimilar samples, so that the network layer encoding of the model can better distinguish between similar samples and dissimilar samples.
[0070] Based on the above formula, a new loss function, namely the auxiliary contrastive learning loss function, can be obtained. This loss function is similar to the cross entropy loss function. It is worth noting that f here is not the output of the model, but the result of the model encoding the sample. By default, the present invention takes the output of the last layer of the hidden layer of the neural network (the output of the spliced classifier transformer part, gru part and cnn part) as f.
[0071] In this scenario, the contrastive learning auxiliary loss function constructed based on similar samples and divorced samples is:
[0072]
[0073] Among them, ξ 1 represents a set of similar samples, ξ 2 represents a set of dissimilar samples, score(f(x i ),f(x j )) represents the similarity or unfamiliarity between samples obtained using an arbitrary metric function.
[0074] The score in the above formula may be the familiarity between samples obtained by using any metric function. Preferably, the present invention uses Euclidean distance as the metric function.
[0075] S7: Construct an optimization loss function based on the classification loss function and the contrastive learning auxiliary loss function.
[0076] The process of optimizing the auxiliary function is actually based on two prior knowledges, the manifold hypothesis of the feature space and the semantic difference of the label space, and aims to introduce more effective information into the algorithm through this optimization method. By optimizing the auxiliary loss function of comparative learning, the sample representation can be made more accurate, but the learning algorithm cannot learn the classifier. Therefore, the present invention also combines the target optimization and the representation optimization through multi-task learning to obtain a new loss function to guide the model to optimize and obtain the final improved classifier based on transformer-gru-cnn.
[0077] Multi-task learning is relative to single-task learning. Single-task learning means that there is only one optimization target in the process of model learning, while multi-task learning means that the number of optimization targets is greater than one. The original intention of multi-task learning was to use other related tasks to improve the generalization ability of the main task. This influence is mainly reflected in the shared parameters. Since multiple tasks share the same structure, the parameters in this structure will be affected by all downstream tasks when they are optimized. When the final algorithm converges, the shared network layer structure is equivalent to meeting the conditions for optimizing all tasks. Therefore, its generalization ability is generally better than that of a single task.
[0078] Through multi-task learning, the classification loss function L is optimized CE As the main task, that is, learning multiple classifiers, and adding an auxiliary task of optimizing sample representation using auxiliary contrastive learning loss R(f) to make greater use of the prior optimization model output. The network structure here can be any deep learning network. Generally, the parameters of the last layer in the network are optimized using R(f) as the representation of the sample, and finally back-propagation is performed by weighting the two loss functions; R(f) acts on the network / sample representation, and the parameters of the network / sample representation are shared by the two tasks. Therefore, when the algorithm finally converges, the parameters of the network layer will be affected by both tasks at the same time, which makes the auxiliary task constrain the main task to a certain extent like a regular term, reducing the risk of it being affected by inaccurate model output.
[0079] When setting the weights, the present invention artificially adjusts the weights of the two tasks through a hyperparameter α to obtain the final optimization loss function, namely:
[0080] Loss = L CE +αR(f)
[0081] Among them, Loss represents the total loss of the model, L CE represents the classification loss, and R(f) represents the contrastive learning auxiliary loss.
[0082] S8: The parameters of the transformer-gru-cnn-based classifier are updated according to the optimized loss function to obtain the constructed ICU patient mortality risk prediction model based on contrastive learning.
[0083] The gradient is calculated according to the optimized loss function and back propagation is performed, and the parameters of the model are iteratively updated to obtain the constructed ICU patient mortality risk prediction model based on contrastive learning.
[0084] The electronic medical record data is input into the constructed ICU patient death risk prediction model based on contrastive learning to obtain the death risk prediction results of the patients to be predicted.
[0085] The established ICU patient death risk prediction model based on contrastive learning is used to predict the death risk of the predicted patients; specifically: the transformer-gru-cnn-based classifier is used to process the data samples in the batch:
[0086] Transformer part: The multi-layer multi-head self-attention network encodes the data samples in the batch to obtain the first data high-dimensional representation of the data samples in the batch; the neural network of the transformer part captures all the information of each sample at the global time step;
[0087] GRU part: The basic GRU architecture processes the data samples in the batch to obtain the second data high-dimensional representation of the data samples in the batch; the neural network of the GRU part is used to better mine the information of each sample in a limited time;
[0088] CNN part: A multi-layer one-dimensional or two-dimensional convolutional network processes the data samples in the batch to obtain a third-dimensional high-dimensional representation of the data samples in the batch.
[0089] The first data high-dimensional representation, the second data high-dimensional representation, and the third data high-dimensional representation of the data samples in the batch are concatenated and processed by the fully connected layer and the activation function to output the death risk prediction result of the patient to be predicted, that is, the category probability of death and survival of the ICU patients in this batch during hospitalization.
[0090] The present invention is evaluated, and the evaluation process is as follows:
[0091] Since the medical properties of each feature in the data set are different, such as the measurement frequency of blood pressure and body temperature will not be consistent with the measurement frequency of height and weight, this will cause the extracted time series data set to have natural missing. In order to carry out the experiment, the present invention follows the research work of most scholars in this field, and consults relevant people in the medical field. For the missing of various physiological indicators, the non-missing value closest to the missing time of the indicator is filled. In addition, according to the conventional thinking in the field of machine learning, the present invention performs categorized representation of discrete variables and normalized representation of continuous variables on the extracted features, and finally obtains 76 features of the input model.
[0092] In order to illustrate the performance of the present invention on the data set extracted from the MIMIC-III database, the present invention investigated the situation of the data set itself. Whether from the perspective of medical common sense or the label distribution of the data set itself, there is a problem of class imbalance in the death and survival of ICU patients, that is, it is impossible for the ratio of the number of patients who died and survived in a batch of samples to be consistent. From previous studies, the ratio of patient survival and death in the data set extracted from the MIMIC-III database is about 10:1. In the case of class imbalance, the precision and recall rate cannot well reflect the results of the invention. The present invention selects the area under the receiver operating characteristic curve and the coordinate axis (hereinafter referred to as AUCROC) and the area under the precision recall curve and the coordinate axis (hereinafter referred to as AUCPRC) as the evaluation parameters of the invention:
[0093] 1) Area under the ROC curve - AUCROC
[0094] TPR: How many of all positive classes are predicted as positive (positive class prediction is correct);
[0095] FPR: How many of all negative classes are predicted as positive classes (positive class prediction errors);
[0096] With FPR as the horizontal axis and TPR as the vertical axis, a curve can be drawn, called the ROC curve, and AUCROC is defined as the area under the ROC curve. AUCROC is an evaluation indicator for measuring the quality of a binary classification model, indicating the probability that a positive example is ranked before a negative example. AUCROC is a common and important model evaluation indicator in the field of machine learning. The ROC curve has a good feature: when the ratio of positive and negative samples in the total sample changes, the ROC curve can maintain very little change / or even remain unchanged. It is mainly used to measure the generalization performance of the model, that is, the quality of the classification effect.
[0097] 2) Area under the PRC curve - AUCPRC
[0098] Precision: The proportion of examples where the predicted value is positive and the true value is positive. Recall: The proportion of examples where the true value is positive and is predicted to be positive. The curve formed by the recall rate as the horizontal axis and the precision rate as the vertical axis is the PRC curve, and AUCPRC is defined as the area under the PRC curve. Although the AUCROC mentioned above can reflect the prediction ability of the model itself in the case of unbalanced samples, this prediction ability is independent of the positive and negative ratio of samples. Therefore, the insensitive nature of AUCROC makes it difficult to see how a model predicts a small number of categories when the sample ratio is unbalanced. Because AUCPRC is sensitive to the sample ratio, it can better reflect the classification performance when the ratio of positive and negative samples is large. Therefore, when the positive and negative samples are extremely unevenly distributed, PRC can more effectively reflect the quality of the classifier than ROC.
[0099] In the experiment, the data of each patient is equivalent to a matrix of size 48*76, with 48 rows representing 48 time steps and 76 columns representing 76 preprocessed features; the optimizer selected for the entire model is the Adam optimizer with a learning rate of 0.001; the batchsize is set to 32, that is, there are 32 samples in a batch, and each input of the ICU patient mortality risk prediction model based on contrastive learning is a data sample in a batch; the Kmeans clustering algorithm divides the high-dimensional representation of the 32 samples in a batch into two categories according to the feature space, thereby defining the similar and dissimilar samples of each sample in the batch, and setting the parameter α of the auxiliary loss function to 0.5, which means that the weight ratio of the contrastive learning auxiliary loss function and the cross entropy loss function of the classifier is 1:2; the number of iterations of the entire training is 50 rounds.
[0100] The following are specific experimental results, comparing the ROC curve area and PRC curve area of each survival analysis algorithm and time series classification algorithm compared with the present invention, as shown in Table 1:
[0101] Table 1 Evaluation results of the present invention and other algorithms on the dataset extracted from the MIMIC database
[0102] Model Test set AUCPRC Test set AUCROC SAPS (Simplified Acute Physiology Score) 0.301 0.720 OASIS (Oxford Acute Illness Severity Scale) 0.311 0.760 RNN (Recurrent Neural Network) 0.477 0.849 TST (Time Series Deep Self-Attention Transformer Network) 0.467 0.845 GMLP (Gated Multilayer Perceptron) 0.462 0.848 MLSTM+FCN (Long Short-Term Memory Fully Convolutional Neural Network) 0.491 0.857 RESNET (Residual Network) 0.472 0.854 Ours. 0.512 0.858
[0103] From the experimental results, the present invention is significantly better than the traditional survival analysis model and also significantly better than the latest time series classification model.
[0104] Aiming at the shortcomings of existing ICU mortality risk prediction methods and time series classification algorithms, this paper proposes an ICU patient mortality risk prediction algorithm based on contrastive learning. The main contributions are as follows:
[0105] 1. In view of the fact that patients with similar indicators have a high probability of having similar clinical manifestations, the present invention proposes the concepts of contrastive learning and multi-task learning, so that the deep learning classifier takes into account the similarity and dissimilarity relationship between specific samples when optimizing parameters. Here, the sample is the specific physiological indicator measurement of a patient. Therefore, the contrastive learning method constructed based on the sample similarity and dissimilarity relationship means that the model tends to find patients with similar vital signs and distinguish patients with dissimilar vital signs, so that patients with similar vital signs recognized in the medical field may have similar clinical results. This prior knowledge can guide the training of deep learning models.
[0106] 2. In view of the problem that the existing time series classification model cannot well capture all the information of each sample at the global time step, the present invention proposes a model classifier based on the transformer architecture. In view of the problem that the existing time series classification model cannot well capture all the information of each sample at the global time step, the present invention proposes a model classifier based on the transformer architecture.
[0107] 3. In response to the need to make more accurate predictions in a shorter time, the present invention proposes a model of transformer+GRU architecture. The GRU model focuses on the information of the last time step. It uses the characteristics of the time series scenario of the physiological indicators of ICU patients. When judging the death and survival results of ICU patients, the information at the 48th hour should have greater value than the information at the first hour. Better mining and utilization of information within a limited time enables the present invention to extract more valuable sample information in a shorter sample time series.
[0108] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting the risk of death in ICU patients based on contrastive learning, characterized in that: include: Obtain the electronic medical record data of the patient to be predicted, input the electronic medical record data into the constructed ICU patient death risk prediction model based on contrastive learning, and obtain the death risk prediction result of the patient to be predicted; The process of building a mortality risk prediction model for ICU patients based on contrastive learning includes: S1: Obtain the electronic medical record dataset of ICU patients; S2: Preprocess the electronic medical record dataset to obtain a structured multivariate time series dataset; S3: Randomly divide the multivariate time series data set to obtain multiple batches of data samples; S4: Input the data samples in the batch into the constructed transformer-gru-cnn-based classifier to obtain the classification loss function and the third data high-dimensional representation; the process of constructing the transformer-gru-cnn-based classifier includes: A multi-layer multi-head self-attention network is used to encode the input information to obtain a high-dimensional representation of the first data; A bidirectional GRU is superimposed on a unidirectional GRU, and a linear layer is superimposed behind the superimposed GRU to obtain a basic GRU architecture; input information is input into the basic GRU architecture to obtain a high-dimensional representation of the second data; Using a multi-layer one-dimensional or two-dimensional convolutional network to process the input information, a high-dimensional representation of the third data is obtained; The first data high-dimensional representation, the second data high-dimensional representation and the third data high-dimensional representation are concatenated and processed by a fully connected layer and an activation function to obtain an output result; S5: inputting the high-dimensional representation of the third data into the Kmeans clustering algorithm to obtain similar samples and divorced samples; S6: Constructing an auxiliary contrastive learning loss function based on similar samples and divorced samples; the process of obtaining similar samples and divorced samples includes: Given a sample x i and x j , if the samples satisfy x j ∈Kmeans(x i ), then the sample x j For sample x i Similar samples of Given a sample x i and x j , if the samples satisfy Then the sample x j For sample x i of divorced samples; S7: construct an optimization loss function based on the classification loss function and the auxiliary contrastive learning loss function; the process of constructing the auxiliary loss function includes: taking the given sample as having a higher similarity with its similar samples and a lower similarity with its dissimilar samples as the goal, constructing an auxiliary loss function based on similar samples and divorced samples; the formula of the auxiliary contrastive learning loss function is: Among them, R(f) represents the auxiliary contrastive learning loss, n represents the number of samples, ξ1 represents the similar sample set, ξ2 represents the dissimilar sample set, score(f(x i ),f(x j )) represents the familiarity between samples, and f represents the high-dimensional representation of samples; S8: The parameters of the transformer-gru-cnn-based classifier are updated according to the optimized loss function to obtain the constructed ICU patient mortality risk prediction model based on contrastive learning.
2. A method for predicting the risk of death of ICU patients based on contrastive learning according to claim 1, characterized in that: The multivariate time series dataset includes hourly statistical information of 17 physiological indicators recorded for ICU patients over a 48-hour period.
3. The method for predicting the risk of death of ICU patients based on contrastive learning according to claim 1, characterized in that: The formula for the classification loss function is: L CE =-P(x)loglog(P(x))-(1-P(x))loglog(1-P(x)) Among them, L CE represents the classification loss, and P(x) represents the probability of the predicted category.
4. The method for predicting the risk of death of ICU patients based on contrastive learning according to claim 1, characterized in that: The formula for optimizing the loss function is: Loss=L CE +αR(f) Among them, Loss represents the total loss of the model, L CE represents classification loss, R(f) represents auxiliary contrastive learning loss, and α represents a hyperparameter.
Citation Information
Patent Citations
Machine learning recognition method based on double contrast learning
CN108229692A
Patient death risk prediction method and system based on electronic medical record, terminal and readable storage medium
CN113902186A