CN115831377A - Intra-hospital death risk prediction method based on ICU (intensive care unit) medical record data - Google Patents

Intra-hospital death risk prediction method based on ICU (intensive care unit) medical record data Download PDF

Info

Publication number
CN115831377A
CN115831377A CN202210774604.6A CN202210774604A CN115831377A CN 115831377 A CN115831377 A CN 115831377A CN 202210774604 A CN202210774604 A CN 202210774604A CN 115831377 A CN115831377 A CN 115831377A
Authority
CN
China
Prior art keywords
sequence
characterization
clinical
medical record
icu
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
CN202210774604.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.)
Central South University
Original Assignee
Central South 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 Central South University filed Critical Central South University
Priority to CN202210774604.6A priority Critical patent/CN115831377A/en
Publication of CN115831377A publication Critical patent/CN115831377A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The invention discloses a hospital death risk prediction method based on ICU medical record data, which comprises the steps of obtaining a historical medical record data set of an ICU patient and processing the historical medical record data set to obtain a training set sequence, a verification set sequence and a test set sequence; constructing a preliminary hospital death risk prediction model, and training, verifying and testing to obtain a hospital death risk prediction model; acquiring medical record data of the target to be predicted and inputting the medical record data into the in-hospital death risk prediction model to obtain the in-hospital death risk prediction result of the target to be predicted. According to the method for predicting the in-hospital death risk based on the ICU medical record data, the final patient representation for prediction is generated by modeling the dynamic clinical time sequence and the static demographic data; the method extracts the time sequence information of the clinical time sequence from local and global angles, and effectively combines the time sequence information and the static data; therefore, the method has high reliability, good accuracy and good practicability.

Description

Intra-hospital death risk prediction method based on ICU (intensive care unit) medical record data
Technical Field
The invention belongs to the field of big data processing, and particularly relates to a hospital death risk prediction method based on ICU (intensive care unit) medical record data.
Background
With the development of economic technology and the improvement of living standard of people, the attention degree of people to medical resources is higher and higher. How to plan and configure the medical resources becomes the research focus of researchers.
The number and management of Intensive Care Unit (ICU) beds has been one of the important factors reflecting medical resources. The probability of death data in the hospital also affects the planning and configuration of medical resources to some extent. Therefore, the prediction of the risk of death in the hospital becomes one of the new research hotspots.
Currently, methods for predicting the risk of in-hospital death are generally developed based on Electronic Medical Record (EMR) data. Many studies today treat EMR data as multivariate time series, using deep learning methods to extract relevant characterizations of patient health for mortality risk prediction. Although these methods show good application prospects, there are still some drawbacks in capturing the deep dependencies between clinical events.
The technical solutions for predicting the death risk in a hospital, which are commonly used at present, are generally a technical solution based on a Recurrent Neural Network (RNN) architecture, a technical solution based on a parallel Convolutional Neural Network (CNN) and an attention mechanism, or a technical solution based on a Transformer. Although the technical schemes can solve part of technical problems, the technical schemes have the defects of poor reliability, poor accuracy and low practicability.
Disclosure of Invention
The invention aims to provide a hospital death risk prediction method based on ICU medical record data, which is high in reliability, good in accuracy and good in practicability.
The method for predicting the death risk in the hospital based on the ICU medical record data comprises the following steps:
s1, acquiring a historical medical record data set of an ICU patient;
s2, processing the medical record data set obtained in the step S1 to obtain a training set sequence, a verification set sequence and a test set sequence;
s3, constructing a preliminary model for predicting the death risk in the hospital based on a time sequence characterization learning module and a multi-view characterization fusion module based on a gating mechanism;
s4, training the preliminary in-hospital death risk prediction model obtained in the step S3 by adopting the training set sequence obtained in the step S2, and verifying and testing by adopting a verification set sequence and a test set sequence to obtain an in-hospital death risk prediction model;
and S5, acquiring medical record data of the target to be predicted, and inputting the medical record data into the in-hospital death risk prediction model acquired in the step S4 to acquire a prediction result of the in-hospital death risk of the target to be predicted.
The step S1 of obtaining the historical medical record data set of the ICU patient specifically comprises the following steps:
selecting medical record data of an ICU patient with an ICU hospitalization time of more than 48 hours;
ICU patients were divided into positive and negative samples, with positive samples indicating eventual death and negative samples indicating eventual survival.
Step S2, processing the medical record data set acquired in step S1 to obtain a training set sequence, a verification set sequence, and a test set sequence, specifically including the steps of:
for each ICU patient, selecting a set clinical variable from an electronic medical record as a dynamic clinical time sequence, and selecting demographic data from the electronic medical record as a demographic data sequence;
the dynamic clinical time sequence takes an hour as a unit, and medical records in one hour are collected as a clinical event;
dividing the finally obtained data into a training set sequence, a verification set sequence and a test set sequence; wherein the training set sequence comprises a training set clinical time sequence and a training set demographic data sequence; the verification set sequence comprises a verification set clinical time sequence and a verification set demographic data sequence; the test set sequence includes a test set clinical timing sequence and a test set demographic data sequence.
The method for processing the medical record data set acquired in the step S1 to obtain a training set sequence, a verification set sequence and a test set sequence specifically comprises the following steps:
dynamic clinical time series of ICU patients were scored as P = [ r ] 1 ,r 2 ,...,r t ,...,r T ]Wherein r is t Is the clinical event at time T, T is the number of clinical events; each clinical event r t Is r t =[v 1 ,v 2 ,...,v f ,...,v F ]∈R F Is composed of clinical variables of patient including digital continuous variable and classified discrete variable, v f F is the number of clinical variables; during processing, the classified discrete variables are regarded as one-hot vectors and are connected with the digital continuous variables in series; the demographic data series of ICU patients was S = [ S ] 1 ,s 2 ,...,s m ,...,s M ],s m Is the mth demographic data, and M is the number of demographic data.
S3, constructing a preliminary model for predicting the death risk in the hospital based on the time sequence characterization learning module and the multi-view characterization fusion module based on the gating mechanism, which specifically comprises the following steps:
A. inputting the obtained training set sequence into a local time sequence representation learning module so as to obtain context representation;
B. inputting the context representation obtained in the step A into a global time sequence representation learning module so as to obtain a comprehensive representation;
C. a multi-view characterization fusion module based on a gating mechanism is adopted to aggregate the comprehensive characterization obtained in the step B in a time step, and the comprehensive characterization is fused with the result obtained in the step A to obtain a target characterization vector;
D. and D, inputting the target characterization vector obtained in the step C into a classifier for prediction to obtain a final death prediction risk result.
The step a of inputting the obtained training set sequence into a local time sequence characterization learning module to obtain a context characterization specifically includes the following steps:
the local time sequence characterization learning module comprises a clinical time sequence embedding layer, a demographic data embedding layer and a Bi-GRU layer based on a local attention mechanism;
the clinical time sequence embedding layer is used for specifically obtaining the embedding representation of the clinical time sequence by passing the clinical time sequence through a 1-layer feedforward network FFN with a linear rectification unit ReLU; specifically, the embedded representation of the clinical time sequence is calculated by adopting the following formula:
x t =ReLU(W x r t +b x )
in the formula x t Embedding a characterization for a clinical time sequence at the t-th time; reLU () is a linear rectification unit; w x A weight matrix that is a clinical variable; r is t Is the input clinical time sequence of the t time; b x Is a bias vector;
the demographic data embedding layer is used for specifically encoding a demographic data sequence into an embedded representation x of a clinical book sequence through linear mapping t In the same space, thereby obtaining an embedded representation of the demographic data sequence; in specific implementation, the embedded representation of the demographic data sequence is obtained by calculation according to the following formula:
d=W d S
wherein d is an embedded representation of the demographic data sequence; w is a group of d A mapping matrix obtained for training; s is an input demographic data sequence;
the Bi-GRU layer based on the local attention mechanism specifically adopts a Bi-GRU networkLearning the time sequence dependence of the embedded representation of the clinical time sequence, and initializing a hidden state unit of the Bi-GRU network by taking the embedded representation d of the demographic data as background information of an ICU patient to enhance semantic information; when in specific implementation, the method comprises the following steps
Figure BDA0003726295260000041
Hiding the unit state for the initial forward GRU; then, the embedding of a given clinical time series characterizes x t And previous hidden unit state
Figure BDA0003726295260000051
Calculating to obtain the hidden unit state of the forward GRU at the t-th moment
Figure BDA0003726295260000052
Is composed of
Figure BDA0003726295260000053
Wherein GRU () is a gated cyclic unit function; then, order
Figure BDA0003726295260000054
Obtaining a hidden unit state of a backward GRU for an initial backward GRU hidden unit state
Figure BDA0003726295260000055
Is composed of
Figure BDA0003726295260000056
Then, the hidden unit state of the forward GRU is set
Figure BDA0003726295260000057
And hidden cell states of backward GRUs
Figure BDA0003726295260000058
Splicing to obtain the hidden unit state h of the Bi-GRU network at the t moment t Is composed of
Figure BDA0003726295260000059
Hidden shape derived from Bi-GRU network outputState H is H = [ H = 1 ,h 2 ,...,h t ,...,h T ];
Finally, learning from the hidden state H using a local attention mechanism to obtain a contextual characterization comprising the significance of the clinical event of the ICU patient; in specific implementation, a layer 1 feedforward network is used, and then the local attention weight a of the tth clinical event is learned by adopting a softmax function t Is a t =σ((W a ) T h t +b a ) Where σ () is the softmax function, W a For the learned weight vectors, b a The learned offset value; according to local attention weight a t Computing a context characterization vector c t Is c t =a t ·h t (ii) a Finally, a contextual characterization C of C = [ C ] is obtained 1 ,c 2 ,...,c t ,...,c T ]。
Step B, inputting the context representation obtained in the step A into a global time sequence representation learning module so as to obtain a comprehensive representation, and specifically comprises the following steps:
inputting the context representation obtained in the step A into a global time sequence representation learning module, learning an enhanced representation containing global time sequence dependence, and combining local time sequence dependence and global time sequence dependence to obtain a comprehensive representation;
the global time sequence representation learning module learns global time sequence dependence from context representation by adopting a Transformer network with stacked L layers;
the Transformer network comprises position codes and L continuous blocks, wherein each block comprises a multi-head self-attention mechanism MHSA and a two-layer FFN module;
in specific implementation, the position code is first added to the context vector representation by the following formula:
e t =c t +p t
in the formula e t Characterizing a vector for the encoded context; c. C t Characterizing a vector for a context; p is a radical of t For position coding, and odd-numbered position coding p t,2k-1 Is composed of
Figure BDA0003726295260000061
Position coding p of even-numbered bits t,2k Is composed of
Figure BDA0003726295260000062
n is a context characterization vector c t The dimension size of (d);
then, e is added t Packed into matrix E = [ E ] 1 ,e 2 ,...,e t ,...,e T ]Then, the initial matrix is generated by sending the initial matrix to the linear mapping layer
Figure BDA0003726295260000063
Subscript 0 represents the first layer of the Transformer network;
then, a multi-headed self-attentive mechanism MHSA with h attentional heads was employed to capture hidden dependencies between clinical events:
Figure BDA0003726295260000064
in the formula
Figure BDA0003726295260000065
Is a hidden dependency between clinical events; MHSA () is a multi-head self-attention mechanism function; norm () is a batch normalization layer processing function;
Figure BDA0003726295260000066
l is more than or equal to 1 and less than or equal to L, and L is the number of layers of the Transformer network;
next, a hidden dependency relationship between clinical events using two layers of FFN modules
Figure BDA0003726295260000067
And (3) carrying out nonlinear conversion:
Figure BDA0003726295260000068
in the formula
Figure BDA0003726295260000069
Is the output of the first layer of Transformer network; FFN () is a processing function, and FFN (x) = W 2 (ReLU(W 1 x+b 1 )+b 2 ) Wherein W is 1 And W 2 Mapping matrices, b, being two layers of FFN modules, respectively 1 And b 2 Respectively are offset vectors of two layers of FFN modules, and ReLU () is a linear rectification unit function;
finally, the result obtained by the last layer of the Transformer network is taken
Figure BDA00037262952600000610
As the global timing dependence of the final clinical event, and in combination with the contextual characterization, the overall characterization of the ICU patient, U, is obtained as
Figure BDA00037262952600000611
And C, performing time-step aggregation on the comprehensive characterization obtained in the step B by adopting a multi-view characterization fusion module based on a gating mechanism, and fusing the comprehensive characterization obtained in the step B with the result obtained in the step A to obtain a target characterization vector, wherein the method specifically comprises the following steps:
a multi-view characterization fusion module based on a gating mechanism is adopted to aggregate the comprehensive characterization obtained in the step B in a time step to obtain a characterization vector of the dynamic characteristics, and the characterization vector is fused with the embedded characterization of the demographic data sequence obtained in the step A to obtain a target characterization vector;
in specific implementation, the characterization vector of the dynamic characteristic adopts a Bi-GRU network, and dynamically aggregates the comprehensive characterization of a plurality of time steps from two directions to form a stable unified dynamic characteristic characterization vector g T Is g T = Bi-GRU (U), where Bi-GRU () is a Bi-directional gated cyclic unit function and U is a comprehensive characterization of ICU patients;
then, a splicing operation is adopted to fuse the dynamic characteristic representation vectors g T And embedding the characterization d of the demographic data sequence to obtain a final target characterization vector z of z = [ g ] T ,d]。
And D, inputting the target characterization vector obtained in the step C into a classifier for prediction to obtain a final death prediction risk result, wherein the method specifically comprises the following steps:
inputting the target characterization vector z obtained in the step C into a classifier containing a sigmoid activation function for prediction to obtain a final death prediction risk result;
in specific implementation, the classifier adopts a full connection layer containing a sigmoid activation function for prediction, and the calculation formula is as follows:
Figure BDA0003726295260000071
in the formula
Figure BDA0003726295260000072
Predicting a risk outcome for the final death; w y And b y Are all parameters obtained by learning.
The training of step S4 specifically includes the following steps:
in the training process, calculating cross entropy loss according to the final death prediction risk result and a real death risk value, and optimizing model parameters according to the cross entropy result;
in specific implementation, the cross entropy loss function is:
Figure BDA0003726295260000081
wherein θ represents all trainable parameters; n is the number of samples; y is i A label for the sample authenticity;
Figure BDA0003726295260000082
and predicting the obtained prediction label for the model.
According to the method for predicting the in-hospital death risk based on the ICU medical record data, the final patient representation for prediction is generated by modeling the dynamic clinical time sequence and the static demographic data; the method extracts the time sequence information of the clinical time sequence from local and global angles, and effectively combines the time sequence information and the static data; therefore, the method has high reliability, good accuracy and good practicability.
Drawings
FIG. 1 is a schematic process flow diagram of the process of the present invention.
FIG. 2 is a schematic diagram of a prediction model structure of the method of the present invention.
Detailed Description
FIG. 1 is a schematic flow chart of the method of the present invention: the method for predicting the death risk in the hospital based on the ICU medical record data comprises the following steps:
s1, acquiring a historical medical record data set of an ICU patient; the method specifically comprises the following steps:
selecting medical record data of an ICU patient with an ICU hospitalization time of more than 48 hours;
dividing the ICU patient into a positive sample and a negative sample, wherein the positive sample indicates the final death of the ICU patient, and the negative sample indicates the final survival of the ICU patient;
s2, processing the medical record data set obtained in the step S1 to obtain a training set sequence, a verification set sequence and a test set sequence; the method specifically comprises the following steps:
for each ICU patient, selecting a set clinical variable from an electronic medical record as a dynamic clinical time sequence, and selecting demographic data from the electronic medical record as a demographic data sequence;
the dynamic clinical time sequence takes an hour as a unit, and medical records in one hour are collected as a clinical event;
dividing the finally obtained data into a training set sequence, a verification set sequence and a test set sequence; wherein the training set sequence comprises a training set clinical timing sequence and a training set demographic data sequence; the verification set sequence comprises a verification set clinical time sequence and a verification set demographic data sequence; the test set sequence comprises a test set clinical time sequence and a test set demographic data sequence;
when the method is implemented, the method comprises the following steps:
patients with ICUThe dynamic clinical time sequence of (1) is noted as P = [ r ] 1 ,r 2 ,...,r t ,...,r T ]Wherein r is t Is the clinical event at time T, and T is the number of clinical events; each clinical event r t Is r t =[v 1 ,v 2 ,...,v f ,...,v F ]∈R F Is composed of clinical variables of patient including digital continuous variable and classified discrete variable, v f F is the number of clinical variables; during processing, the classified discrete variables are regarded as one-hot vectors and are connected with the digital continuous variables in series; the demographic data series of ICU patients was S = [ S ] 1 ,s 2 ,...,s m ,...,s M ],s m Is the mth demographic data, and M is the number of demographic data;
s3, constructing a preliminary model (the model structure is shown in figure 2) for predicting the death risk in the hospital based on a time sequence characterization learning module and a multi-view characterization fusion module based on a gating mechanism; the method specifically comprises the following steps:
A. inputting the obtained training set sequence into a local time sequence representation learning module so as to obtain context representation; the method specifically comprises the following steps:
the local time sequence characterization learning module comprises a clinical time sequence embedding layer, a demographic data embedding layer and a Bi-GRU layer based on a local attention mechanism;
the clinical time sequence embedding layer is used for specifically obtaining the embedding representation of the clinical time sequence through a 1-layer feedforward network FFN with a linear rectification unit ReLU; specifically, the embedded representation of the clinical time sequence is calculated by adopting the following formula:
x t =ReLU(W x r t +b x )
in the formula x t Embedding a characterization for a clinical time sequence at the t-th time; reLU () is a linear rectification unit function; w x A weight matrix that is a clinical variable; r is t Is the input clinical time sequence of the t time; b x Is a bias vector;
the demographic data embedding layerIn particular, the method encodes a demographic data sequence into an embedded representation x of a clinical book sequence by linear mapping t In the same space, thereby obtaining an embedded representation of the demographic data sequence; in specific implementation, the embedded representation of the demographic data sequence is obtained by calculation according to the following formula:
d=W d S
wherein d is an embedded representation of the demographic data sequence; w d A mapping matrix obtained for training; s is an input demographic data sequence;
the Bi-GRU layer based on the local attention mechanism specifically adopts the time sequence dependence of the embedded representation of the Bi-GRU network learning clinical time sequence, and adopts the embedded representation d of the demographic data as the background information of an ICU patient to initialize the hidden state unit of the Bi-GRU network, thereby enhancing the semantic information; when implemented, the order of
Figure BDA0003726295260000101
Hiding the unit state for the initial forward GRU; then, the embedding of a given clinical time series characterizes x t And previous hidden unit state
Figure BDA0003726295260000102
Calculating to obtain the hidden unit state of the forward GRU at the t-th moment
Figure BDA0003726295260000103
Is composed of
Figure BDA0003726295260000104
Wherein GRU () is a gated cyclic unit function; then, order
Figure BDA0003726295260000105
Obtaining a hidden unit state of a backward GRU for an initial backward GRU hidden unit state
Figure BDA0003726295260000106
Is composed of
Figure BDA0003726295260000107
Then, the hidden unit state of the forward GRU is set
Figure BDA0003726295260000108
And hidden cell states of backward GRUs
Figure BDA0003726295260000109
Splicing to obtain the hidden unit state h of the Bi-GRU network at the t moment t Is composed of
Figure BDA00037262952600001010
The hidden state H obtained by the output of the Bi-GRU network is H = [ H = 1 ,h 2 ,...,h t ,...,h T ];
Finally, learning from the hidden state H using a local attention mechanism to obtain a contextual characterization comprising the significance of the clinical event of the ICU patient; in specific implementation, a layer 1 feedforward network is used, and then the local attention weight a of the tth clinical event is learned by adopting a softmax function t Is a t =σ((W a ) T h t +b a ) Where σ () is the softmax function, W a For the learned weight vectors, b a The learned offset value; according to local attention weight a t Computing a context characterization vector c t Is c t =a t ·h t (ii) a Finally, a contextual characterization C of C = [ C ] is obtained 1 ,c 2 ,...,c t ,...,c T ];
B. Inputting the context representation obtained in the step A into a global time sequence representation learning module so as to obtain a comprehensive representation; the method specifically comprises the following steps:
inputting the context representation obtained in the step A into a global time sequence representation learning module, learning an enhanced representation containing global time sequence dependence, and combining local time sequence dependence and global time sequence dependence to obtain a comprehensive representation;
the global time sequence representation learning module learns global time sequence dependence from context representation by adopting a Transformer network with stacked L layers;
the Transformer network comprises position codes and L continuous blocks, wherein each block comprises a multi-head self-attention mechanism MHSA and a two-layer FFN module;
in specific implementation, the position code is first added to the context vector representation by the following formula:
e t =c t +p t
in the formula e t Characterizing a vector for the encoded context; c. C t Characterizing a vector for a context; p is a radical of t For position coding, and odd-numbered position coding p t,2k-1 Is composed of
Figure BDA0003726295260000111
Position coding p of even-numbered bits t,2k Is composed of
Figure BDA0003726295260000112
n is a context characterization vector c t The dimension size of (d);
then, e is added t Packing into matrix E = [ E ] 1 ,e 2 ,...,e t ,...,e T ]Then, the initial matrix is generated by sending the initial matrix to the linear mapping layer
Figure BDA0003726295260000113
Subscript 0 represents the first layer of the Transformer network;
then, a multi-headed self-attentive mechanism MHSA with h attentional heads was employed to capture hidden dependencies between clinical events:
Figure BDA0003726295260000121
in the formula
Figure BDA0003726295260000122
Are hidden dependencies between clinical events; MHSA () is a multi-head self-attention mechanism function; norm () is a batch normalization layer processing function;
Figure BDA0003726295260000123
is layer l-1 TransfoL is more than or equal to 1 and less than or equal to L, and L is the number of layers of the transform network;
next, a hidden dependency relationship between clinical events using two layers of FFN modules
Figure BDA0003726295260000124
And (3) carrying out nonlinear conversion:
Figure BDA0003726295260000125
in the formula
Figure BDA0003726295260000126
Is the output of the first layer of Transformer network; FFN () is a processing function, and FFN (x) = W 2 (ReLU(W 1 x+b 1 )+b 2 ) Wherein W is 1 And W 2 Mapping matrices, b, being two layers of FFN modules, respectively 1 And b 2 Respectively are offset vectors of two layers of FFN modules, and ReLU () is a linear rectification unit function;
finally, the result obtained by the last layer of the Transformer network is taken
Figure BDA0003726295260000127
As the global timing dependence of the final clinical event, and in combination with the contextual characterization, the overall characterization of the ICU patient, U, is obtained as
Figure BDA0003726295260000128
C. A multi-view characterization fusion module based on a gating mechanism is adopted to aggregate the comprehensive characterization obtained in the step B in a time step, and the comprehensive characterization is fused with the result obtained in the step A to obtain a target characterization vector; the method specifically comprises the following steps:
a multi-view characterization fusion module based on a gating mechanism is adopted to aggregate the comprehensive characterization obtained in the step B in a time step to obtain a characterization vector of the dynamic characteristics, and the characterization vector is fused with the embedded characterization of the demographic data sequence obtained in the step A to obtain a target characterization vector;
in specific implementation, the characterization vector of the dynamic characteristic adopts a Bi-GRU network, and dynamically aggregates the comprehensive characterization of a plurality of time steps from two directions to form a stable unified dynamic characteristic characterization vector g T Is g T = Bi-GRU (U), where Bi-GRU () is a Bi-directional gated cyclic unit function and U is a comprehensive characterization of ICU patients;
then, a splicing operation is adopted to fuse the dynamic characteristic representation vectors g T And embedding the characterization d of the demographic data sequence to obtain a final target characterization vector z of z = [ g ] T ,d];
D. Inputting the target characterization vector obtained in the step C into a classifier for prediction to obtain a final death prediction risk result; the method specifically comprises the following steps:
inputting the target characterization vector z obtained in the step C into a classifier containing a sigmoid activation function for prediction to obtain a final death prediction risk result;
in specific implementation, the classifier adopts a full connection layer containing a sigmoid activation function for prediction, and the calculation formula is as follows:
Figure BDA0003726295260000131
in the formula
Figure BDA0003726295260000132
Predicting a risk outcome for the final death; w y And b y All are parameters obtained by learning;
s4, training the preliminary in-hospital death risk prediction model obtained in the step S3 by adopting the training set sequence obtained in the step S2, and verifying and testing by adopting a verification set sequence and a test set sequence to obtain an in-hospital death risk prediction model;
in the training process, calculating cross entropy loss according to the final death prediction risk result and a real death risk value, and optimizing model parameters according to the cross entropy result;
in specific implementation, the cross entropy loss function is:
Figure BDA0003726295260000133
wherein θ represents all trainable parameters; n is the number of samples; y is i A label for the sample authenticity;
Figure BDA0003726295260000134
predicting the obtained prediction label for the model;
and S5, acquiring medical record data of the target to be predicted, and inputting the medical record data into the in-hospital death risk prediction model acquired in the step S4 to acquire a prediction result of the in-hospital death risk of the target to be predicted.
The process of the invention is compared with the prior art with reference to the following examples:
Bi-GRU: the method is a standard bidirectional gating cyclic unit network, wherein the death risk is predicted by adopting a hidden state vector of the last time step;
Transformer e : it is the encoder of the transform network. Here the output of the last encoder is flattened and a full link layer is used for mortality risk prediction;
retain: the method is a two-stage neural attention model, and prediction is carried out by detecting historical clinical events with influence and important clinical variables;
SAnd: the method learns patient characterization for clinical time series sequences and uses for downstream clinical prediction tasks based on masked self-attention mechanisms and intensive interpolation strategies;
ConCare: the method separately embeds clinical feature sequences and uses a multi-head self-attention mechanism to capture interdependencies between dynamic features and static baseline information for mortality risk prediction;
AdaCare: the method utilizes an expanded convolution with multi-scale receptive fields and gated cyclic cells to capture long-term and short-term timing information of EMR data to achieve mortality risk prediction.
As most comparisons do not take into account demographic data. To compare the prediction performance fairly, the present application adds an embedded vector d of demographic data to the final patient characterization of these methods for predicting the risk of death.
The in-hospital death risk prediction of the method is defined as a binary task, real world data sets are unbalanced, and AUROC, AUPRC and min (Se, P +) evaluation indexes are used for evaluating the performance of the method in experiments. AUROC and AUPRC are evaluation indexes with the most reference value aiming at unbalanced data classification, and min (Se, P +) is a custom index proposed in the Physionet/CinC challenge match of 2012. The larger their value, the stronger the ability of the model to distinguish between positive and negative samples, i.e. the higher the prediction accuracy. The method reports the average value and standard deviation of various performance indexes of MIMIC-III and e-ICU on a test set.
The inventive and comparative methods were evaluated on the same test set and the results are shown in table 1, wherein the numbers in parentheses are standard deviations.
TABLE 1 schematic presentation of the predicted Performance comparison results of the inventive and comparative methods
Figure BDA0003726295260000151
As can be seen from Table 1, the method proposed by the present invention achieves the best performance of all comparison methods on MIMIC-III and e-ICU data sets, wherein the average AUROC, AUPRC, min (Se, P +) values of five experiments are 0.8680 (0.001), 0.5254 (0.002) and 0.5138 (0.005) respectively by performing model evaluation on the MIMIC-III test set, and the average AUROC, AUPRC, min (Se, P +) values of five experiments are 0.8733 (0.005), 0.5801 (0.014) and 0.5588 (0.017) respectively by performing model evaluation on the e-ICU test set.
Therefore, the experimental results of the method on MIMIC-III and e-ICU data sets show that the method has good EMR time sequence dependence extraction capability and patient characterization learning capability, and can accurately predict the in-hospital death risk of the patient.

Claims (10)

1. An ICU medical record data-based in-hospital death risk prediction method comprises the following steps:
s1, acquiring a historical medical record data set of an ICU patient;
s2, processing the medical record data set obtained in the step S1 to obtain a training set sequence, a verification set sequence and a test set sequence;
s3, constructing a preliminary model for predicting the death risk in the hospital based on a time sequence characterization learning module and a multi-view characterization fusion module based on a gating mechanism;
s4, training the preliminary in-hospital death risk prediction model obtained in the step S3 by adopting the training set sequence obtained in the step S2, and verifying and testing by adopting a verification set sequence and a test set sequence to obtain an in-hospital death risk prediction model;
and S5, acquiring medical record data of the target to be predicted, and inputting the medical record data into the in-hospital death risk prediction model acquired in the step S4 to acquire a prediction result of the in-hospital death risk of the target to be predicted.
2. The method of claim 1, wherein the step S1 of obtaining the historical medical record dataset of the ICU patient comprises the steps of:
selecting medical record data of an ICU patient with an ICU hospitalization time of more than 48 hours;
ICU patients were divided into positive and negative samples, with positive samples indicating eventual death and negative samples indicating eventual survival.
3. The ICU medical record data-based hospital death risk prediction method according to claim 2, wherein the step S2 processes the medical record data set obtained in the step S1 to obtain a training set sequence, a verification set sequence and a test set sequence, and specifically comprises the steps of:
for each ICU patient, selecting a set clinical variable from an electronic medical record as a dynamic clinical time sequence, and selecting demographic data from the electronic medical record as a demographic data sequence;
the dynamic clinical time sequence takes an hour as a unit, and medical records in one hour are collected as a clinical event;
dividing the finally obtained data into a training set sequence, a verification set sequence and a test set sequence; wherein the training set sequence comprises a training set clinical time sequence and a training set demographic data sequence; the verification set sequence comprises a verification set clinical time sequence and a verification set demographic data sequence; the test set sequence includes a test set clinical timing sequence and a test set demographic data sequence.
4. The ICU medical record data-based hospital death risk prediction method according to claim 3, wherein said medical record data set obtained in step S1 is processed to obtain a training set sequence, a validation set sequence and a test set sequence, specifically comprising the steps of:
dynamic clinical time series of ICU patients were scored as P = [ r ] 1 ,r 2 ,...,r t ,...,r T ]Wherein r is t Is the clinical event at time T, and T is the number of clinical events; each clinical event r t Is r t =[v 1 ,v 2 ,...,v f ,...,v F ]∈R F Is composed of clinical variables of patient including digital continuous variable and classified discrete variable, v f F is the number of clinical variables; during processing, the classified discrete variables are regarded as one-hot vectors and are connected with the digital continuous variables in series; the demographic data series of ICU patients was S = [ S ] 1 ,s 2 ,...,s m ,...,s M ],s m Is the mth demographic data, and M is the number of demographic data.
5. The method for predicting the risk of death in a hospital based on ICU medical record data as claimed in claim 4, wherein said step S3 of fusing the module based on the time sequence characterization learning module and the multi-view characterization fusion module based on the gating mechanism to construct a preliminary model for predicting the risk of death in the hospital, comprises the following steps:
A. inputting the obtained training set sequence into a local time sequence representation learning module so as to obtain a context representation;
B. inputting the context representation obtained in the step A into a global time sequence representation learning module so as to obtain a comprehensive representation;
C. a multi-view characterization fusion module based on a gating mechanism is adopted to aggregate the comprehensive characterization obtained in the step B in a time step, and the comprehensive characterization is fused with the result obtained in the step A to obtain a target characterization vector;
D. and D, inputting the target characterization vector obtained in the step C into a classifier for prediction to obtain a final death prediction risk result.
6. The method of claim 5, wherein the step A of inputting the training set sequence into a local time series characterization learning module to obtain a context characterization, comprises the steps of:
the local time sequence characterization learning module comprises a clinical time sequence embedding layer, a demographic data embedding layer and a Bi-GRU layer based on a local attention mechanism;
the clinical time sequence embedding layer is used for specifically obtaining the embedding representation of the clinical time sequence by passing the clinical time sequence through a 1-layer feedforward network FFN with a linear rectification unit ReLU; specifically, the embedded representation of the clinical time sequence is calculated by adopting the following formula:
x t =ReLU(W x r t +b x )
in the formula x t Embedding a characterization for a clinical time sequence at the t-th time; reLU () is a linear rectification unit function; w x A weight matrix that is a clinical variable; r is t Is the input clinical time sequence of the t time; b x Is a bias vector;
the demographic data embedding layer is used for specifically encoding a demographic data sequence into an embedded representation x of a clinical book sequence through linear mapping t In the same space, thereby obtaining an embedded representation of the demographic data sequence; in specific implementation, the embedded representation of the demographic data sequence is obtained by calculation according to the following formula:
d=W d S
wherein d is an embedded representation of the demographic data sequence; w d A mapping matrix obtained for training; s is an input demographic data sequence;
the Bi-GRU layer based on the local attention mechanism specifically adopts the time sequence dependence of the embedded representation of the Bi-GRU network learning clinical time sequence, and adopts the embedded representation d of the demographic data as the background information of an ICU patient to initialize the hidden state unit of the Bi-GRU network, thereby enhancing the semantic information; when implemented, the order of
Figure FDA0003726295250000041
Figure FDA0003726295250000042
Hiding the unit state for the initial forward GRU; then, the embedding of a given clinical time series characterizes x t And previous hidden unit state
Figure FDA0003726295250000043
Calculating to obtain the hidden unit state of the forward GRU at the t-th moment
Figure FDA0003726295250000044
Is composed of
Figure FDA0003726295250000045
Wherein GRU () is a gated cyclic unit function; then, let
Figure FDA0003726295250000046
Figure FDA0003726295250000047
Obtaining a hidden unit state of a backward GRU for an initial backward GRU hidden unit state
Figure FDA0003726295250000048
Is composed of
Figure FDA0003726295250000049
Then, the hidden unit state of the forward GRU is set
Figure FDA00037262952500000410
And hidden cell states of backward GRUs
Figure FDA00037262952500000411
Splicing to obtain the hidden unit state h of the Bi-GRU network at the t moment t Is composed of
Figure FDA00037262952500000412
The hidden state H obtained by the output of the Bi-GRU network is H = [ H = 1 ,h 2 ,...,h t ,...,h T ];
Finally, learning from the hidden state H using a local attention mechanism to obtain a contextual characterization comprising the significance of the clinical event of the ICU patient; in specific implementation, a layer 1 feedforward network is used, and then the local attention weight a of the tth clinical event is learned by adopting a softmax function t Is a t =σ((W a ) T h t +b a ) Where σ () is the softmax function, W a For the learned weight vectors, b a The learned offset value; according to local attention weight a t Computing a context characterization vector c t Is c t =a t ·h t (ii) a Finally, a contextual characterization C of C = [ C ] is obtained 1 ,c 2 ,...,c t ,...,c T ]。
7. The ICU medical record data-based hospital death risk prediction method according to claim 6, wherein said step B inputs the context characterization obtained in step A to a global timing characterization learning module to obtain a comprehensive characterization, comprising the steps of:
inputting the context representation obtained in the step A into a global time sequence representation learning module, learning an enhanced representation containing global time sequence dependence, and combining local time sequence dependence and global time sequence dependence to obtain a comprehensive representation;
the global time sequence representation learning module learns global time sequence dependence from context representation by adopting a Transformer network with stacked L layers;
the Transformer network comprises position codes and L continuous blocks, wherein each block comprises a multi-head self-attention mechanism MHSA and a two-layer FFN module;
in specific implementation, the position code is first added to the context vector representation by the following formula:
e t =c t +p t
in the formula e t Characterizing a vector for the encoded context; c. C t Characterizing a vector for a context; p is a radical of t For position coding, and odd-numbered position coding p t,2k-1 Is composed of
Figure FDA0003726295250000051
Position coding p of even bits t,2k Is composed of
Figure FDA0003726295250000052
n is a context characterization vector c t The dimension size of (d);
then, e is added t Packed into matrix E = [ E ] 1 ,e 2 ,...,e t ,...,e T ]Then, the initial matrix is generated by sending the initial matrix to the linear mapping layer
Figure FDA0003726295250000053
Subscript 0 represents the first layer of the Transformer network;
then, a multi-headed self-attentive mechanism MHSA with h attentional heads was employed to capture hidden dependencies between clinical events:
Figure FDA0003726295250000054
in the formula
Figure FDA0003726295250000055
Is a hidden dependency between clinical events; MHSA () is a multi-head self-attention mechanism function; norm () is a batch normalization layer processing function;
Figure FDA0003726295250000056
l is more than or equal to 1 and less than or equal to L, and L is the number of layers of the Transformer network;
next, a hidden dependency relationship between clinical events using two layers of FFN modules
Figure FDA0003726295250000057
And (3) carrying out nonlinear conversion:
Figure FDA0003726295250000058
in the formula
Figure FDA0003726295250000059
Is the output of the first layer of Transformer network; FFN () is a processing function, and FFN (x) = W 2 (ReLU(W 1 x+b 1 )+b 2 ) Wherein W is 1 And W 2 Mapping matrices, b, being two layers of FFN modules, respectively 1 And b 2 Respectively are offset vectors of two layers of FFN modules, and ReLU () is a linear rectification unit function;
finally, the result obtained by the last layer of the Transformer network is taken
Figure FDA0003726295250000061
As the global timing dependence of the final clinical event, and in combination with the contextual characterization, the overall characterization of the ICU patient, U, is obtained as
Figure FDA0003726295250000062
8. The ICU medical record data-based hospital death risk prediction method according to claim 7, wherein said step C uses a gate control mechanism-based multi-view characterization fusion module to perform time-step aggregation on the comprehensive characterization obtained in step B, and to fuse with the result obtained in step A to obtain a target characterization vector, specifically comprising the steps of:
a multi-view characterization fusion module based on a gating mechanism is adopted to aggregate the comprehensive characterization obtained in the step B in a time step to obtain a characterization vector of the dynamic characteristics, and the characterization vector is fused with the embedded characterization of the demographic data sequence obtained in the step A to obtain a target characterization vector;
in specific implementation, the characterization vector of the dynamic characteristic adopts a Bi-GRU network, and dynamically aggregates the comprehensive characterization of a plurality of time steps from two directions to form a stable unified dynamic characteristic characterization vector g T Is g T = Bi-GRU (U), where Bi-GRU () is a Bi-directional gated cyclic unit function and U is a comprehensive characterization of ICU patients;
then, a splicing operation is adopted to fuse the dynamic characteristic representation vectors g T And embedding the characterization d of the demographic data sequence to obtain a final target characterization vector z of z = [ g ] T ,d]。
9. The method of claim 8, wherein the step D of inputting the target characterization vector obtained in the step C into a classifier for prediction to obtain a final mortality risk prediction result comprises the following steps:
inputting the target characterization vector z obtained in the step C into a classifier containing a sigmoid activation function for prediction to obtain a final death prediction risk result;
in specific implementation, the classifier adopts a full connection layer containing a sigmoid activation function for prediction, and the calculation formula is as follows:
Figure FDA0003726295250000071
in the formula
Figure FDA0003726295250000072
Predicting a risk outcome for the final death; w y And b y Are all parameters obtained by learning.
10. The method for predicting the risk of nosocomial death based on ICU medical record data of claim 9, wherein the training of step S4 comprises the steps of:
in the training process, calculating cross entropy loss according to the final death prediction risk result and a real death risk value, and optimizing model parameters according to the cross entropy result;
in specific implementation, the cross entropy loss function is:
Figure FDA0003726295250000073
wherein θ represents all trainable parameters; n is the number of samples; y is i A label for the sample authenticity;
Figure FDA0003726295250000074
and predicting the obtained prediction label for the model.
CN202210774604.6A 2022-07-01 2022-07-01 Intra-hospital death risk prediction method based on ICU (intensive care unit) medical record data Pending CN115831377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210774604.6A CN115831377A (en) 2022-07-01 2022-07-01 Intra-hospital death risk prediction method based on ICU (intensive care unit) medical record data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210774604.6A CN115831377A (en) 2022-07-01 2022-07-01 Intra-hospital death risk prediction method based on ICU (intensive care unit) medical record data

Publications (1)

Publication Number Publication Date
CN115831377A true CN115831377A (en) 2023-03-21

Family

ID=85522748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210774604.6A Pending CN115831377A (en) 2022-07-01 2022-07-01 Intra-hospital death risk prediction method based on ICU (intensive care unit) medical record data

Country Status (1)

Country Link
CN (1) CN115831377A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116364290A (en) * 2023-06-02 2023-06-30 之江实验室 Hemodialysis characterization identification and complications risk prediction system based on multi-view alignment
CN117435918A (en) * 2023-12-20 2024-01-23 杭州市特种设备检测研究院(杭州市特种设备应急处置中心) Elevator risk early warning method based on spatial attention network and feature division

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116364290A (en) * 2023-06-02 2023-06-30 之江实验室 Hemodialysis characterization identification and complications risk prediction system based on multi-view alignment
CN116364290B (en) * 2023-06-02 2023-09-08 之江实验室 Hemodialysis characterization identification and complications risk prediction system based on multi-view alignment
CN117435918A (en) * 2023-12-20 2024-01-23 杭州市特种设备检测研究院(杭州市特种设备应急处置中心) Elevator risk early warning method based on spatial attention network and feature division
CN117435918B (en) * 2023-12-20 2024-03-15 杭州市特种设备检测研究院(杭州市特种设备应急处置中心) Elevator risk early warning method based on spatial attention network and feature division

Similar Documents

Publication Publication Date Title
Honda et al. Smiles transformer: Pre-trained molecular fingerprint for low data drug discovery
Guo et al. A survey on deep learning based face recognition
CN109471895B (en) Electronic medical record phenotype extraction and phenotype name normalization method and system
García-Ordás et al. Diabetes detection using deep learning techniques with oversampling and feature augmentation
CN115831377A (en) Intra-hospital death risk prediction method based on ICU (intensive care unit) medical record data
CN111370084A (en) Electronic health record representation learning method and system based on BilSTM
CN109960732B (en) Deep discrete hash cross-modal retrieval method and system based on robust supervision
CN113807318A (en) Action identification method based on double-current convolutional neural network and bidirectional GRU
Wang et al. LiSSA: Localized stochastic sensitive autoencoders
Li et al. Robust and structural sparsity auto-encoder with L21-norm minimization
Liu et al. Information recovery-driven deep incomplete multiview clustering network
CN111027681B (en) Time sequence data processing model training method, data processing method, device and storage medium
CN117196763A (en) Commodity sequence recommending method based on time sequence perception self-attention and contrast learning
Tavakoli Seq2image: Sequence analysis using visualization and deep convolutional neural network
CN116596150A (en) Event prediction method of transform Hoxwell process model based on multi-branch self-attention
Wang et al. A novel multiface recognition method with short training time and lightweight based on ABASNet and H-softmax
CN109887606B (en) Attention-based diagnosis and prediction method for bidirectional recurrent neural network
Wu et al. MEGACare: Knowledge-guided multi-view hypergraph predictive framework for healthcare
Deng et al. Evolutionary neural architecture search for facial expression recognition
CN117094451B (en) Power consumption prediction method, device and terminal
Zhu et al. Associative learning mechanism for drug‐target interaction prediction
Guo et al. Protein ensemble learning with atrous spatial pyramid networks for secondary structure prediction
CN116955650A (en) Information retrieval optimization method and system based on small sample knowledge graph completion
CN116092668A (en) Prediction method for heart failure patient readmission fused with multi-element heterogeneous data
Wu et al. A feature optimized deep learning model for clinical data mining

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