A clinical risk prediction system based on multi-task learning
Through the soft parameter sharing multi-task learning model, the problem of overfitting the existing model in the case of sample imbalance and small sample size is solved, and more accurate clinical risk warning and decision-making assistance is achieved.
Patent Information
- Application Number
- CN202210144438.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-17
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-02-17
AI Technical Summary
The existing clinical risk prediction models have problems such as sample imbalance, small sample size, high noise and large missing values when processing medical data, which leads to the inability to fully learn data characterization of single-task learning and easily leads to model overfitting.
The soft parameter shared multi-task learning model is adopted, and the data is embedded in the same semantic space through the sharing layer. Combined with the sub-task specific embedding layer, probability sampling network and multiple attention mechanism, the information transmission characteristics between tasks and time steps are extracted, and the prediction results of each clinical prediction task are finally output.
The robustness of training on an unbalanced small sample dataset is achieved, potential correlation characteristics between tasks are explored, and more accurate clinical risk warning is provided to assist doctors in making decisions in advance.
Smart Images

Figure CN114611879B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical structured clinical data processing, and in particular relates to a clinical risk prediction system based on multi-task learning. Background Art
[0002] The development of medicine has gone through a process from empirical models to evidence-based medicine to data medicine. With the advent of the big data era, data storage, acquisition and analysis have become very convenient, creating technical conditions for the development of precision medicine.
[0003] Clinical risk prediction is an important research work in the medical field. Clinical risk prediction refers to the use of clinical data and multi-factor analysis to analyze the probability of a patient having a certain medical outcome. Common clinical risk prediction tasks include death prediction, disease warning, and hospitalization duration prediction. Clinical prediction can allow doctors to predict the probability of a patient having a certain outcome in advance and help doctors take early warning measures.
[0004] In the past, clinical risk prediction mainly focused on simple mathematical statistics, and various scoring models were designed based on experience to represent the patient's condition. Common scoring models include the Simple Acute Physiology Score (SAPS), the Acute Physiology and Chronic Health Score (APACH), the Sequential Organ Failure Assessment (SOFA) and other commonly used models. However, the scoring model has great limitations. The scoring model can only model the linear relationship between the data, and the scoring model is aimed at analyzing the patient's overall physiological condition, and cannot be changed for specific scenarios (such as assessing the risk of developing a certain disease).
[0005] In recent years, machine learning has developed rapidly, allowing us to construct specific models for specific scenarios. Machine learning models have effectively overcome the shortcomings of scoring models. Machine learning models can capture more complex nonlinear relationships, capture higher-order relationships, and extract suitable representations for specific tasks. At present, machine learning models are widely used in clinical risk prediction, including regression models, decision trees, Bayesian networks, random forests, etc. The rapid development of deep learning in recent years has brought great breakthroughs in clinical risk prediction. Compared with traditional machine learning models, deep learning models have higher computational efficiency and have significant advantages in processing irregular time series data and multimodal data. At present, basic deep learning prediction models include common time series processing models such as CNN, RNN, LSTM, and GRU.
[0006] At present, more and more medical data sets in real environments are open to the public and researchers, which also provides necessary data support for our research. Among them, the MIMIC dataset is the most widely used dataset. The database was jointly released by the Computational Physiology Laboratory of the Massachusetts Institute of Technology, Beth Israel Deacon Medical Center (BIDMC) and Philips Healthcare in 2006. The data of 53,423 adult patients admitted to the ICU between 2001 and 2012 and 7,870 newborns during their visits from 2001 to 2008 are collected. The MIMIC dataset covers structured data such as patient visits, monitored physiological signals of patients, patient diagnosis records, medication records, patient turnover, patient admission and exit of the ICU, and unstructured data such as doctor's orders.
[0007] Compared with data in other industrial fields, medical clinical data has the following notable characteristics: sample imbalance (cases with a certain disease or death account for a small number), small sample size (high cost of obtaining labeled medical data), high noise (clinical measurement values have errors), and many missing values. In this case, single-task learning cannot fully learn the representation of medical data, and the small amount of data can easily lead to model overfitting. Summary of the invention
[0008] The present invention provides a clinical risk prediction system based on multi-task learning, which can provide early warning of risks and help doctors make decisions.
[0009] A clinical risk prediction system based on multi-task learning, comprising a computer memory, a computer processor, and a computer program stored in the computer memory and executable on the computer processor, wherein the computer memory stores a trained clinical risk prediction model;
[0010] The clinical risk prediction model adopts a soft parameter sharing multi-task learning model. First, the data of all subtasks are embedded into the same semantic space through the bottom shared layer, and then the unique features of each subtask are extracted through the subtask specific embedding layer. Then, the extracted features are mapped to a probability space through the probability sampling network; then, the features learned from different subtasks are transferred through the multi-attention mechanism to form composite features; finally, each subtask specific output layer outputs the prediction result;
[0011] When the computer processor executes the computer program, the following steps are implemented:
[0012] Extract clinical sequence data and static characteristics of patients from EHR data 48 hours before admission to ICU;
[0013] Preprocess the data and divide the clinical sequence data extracted from the 48-hour EHR data into hours;
[0014] The preprocessed data is input into the trained clinical risk prediction model to output the prediction results of each clinical prediction task.
[0015] The present invention constructs a soft parameter sharing multi-task learning model to enable task representations to be transferred between different tasks. First, the data is embedded into the same semantic space through a shared layer, and then sub-networks are set up to learn the representations of the tasks themselves. Then, the importance of the information weights transferred between tasks and between different time steps of tasks is obtained through the attention mechanism at the task level and the time step level.
[0016] Furthermore, in the soft parameter sharing multi-task learning model, when the features learned from different subtasks are transferred to form composite features through multiple attention mechanisms, the size of information transfer between different tasks and different time steps at different levels is obtained through coarse-grained task-level attention and fine-grained time-step-level attention.
[0017] The prediction results of each clinical prediction task are output as binary classification predictions. For patients predicted to be potentially ill or dead, doctors are required to implement preventive measures.
[0018] The training process of the clinical risk prediction model is as follows:
[0019] (1) Clinical sequence data from EHR data within the first 48 hours were extracted from the MIMIC database for each patient case admitted to the ICU;
[0020] (2) Preprocess the extracted clinical sequence data and divide the extracted 48-hour clinical time series data into hours;
[0021] (3) Extract static features of each patient, including gender and age;
[0022] (4) For each clinical prediction task, a patient label is set, where 1 represents that the patient will have the clinical outcome during this hospitalization, and 0 represents that the patient will not have the clinical outcome;
[0023] (5) Divide the patient data into training set, validation set and test set. The training set is used to iteratively train the model, the validation set is used to select the optimal model parameters, and the test set is used to verify the model effect.
[0024] (6) Build a soft parameter sharing multi-task learning model, train multiple tasks simultaneously, and add the cross entropy losses of all tasks as the total loss until the model training is completed.
[0025] The clinical sequence data in the EHR data includes red blood cell count, white blood cell count, oxygen fraction, heart rate, systolic blood pressure, diastolic blood pressure, body temperature, and respiratory rate.
[0026] When preprocessing the data, if multiple measurements occur within an hour, the average value is taken. For patients admitted to the ICU, the data is expected to be accurate to the hour, so the data is divided by hours. Because clinical variables are continuous values, the average value represents the overall situation within an hour.
[0027] In step (6), the cross entropy losses of all tasks are summed up as the total loss, and training is performed with the total loss, and the gradients of the sub-network parts of different tasks are updated back and forth respectively.
[0028] During the iterative training process, the model with the smallest loss on the validation set is selected as the final trained model.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] 1. Most existing technologies are single-task prediction models. However, the present invention jointly trains multiple related clinical risk prediction tasks, allowing features to be shared between tasks, thereby mining potential related features between tasks.
[0031] 2. The model of the present invention integrates the multi-level attention mechanism at the task level and the time step level, so that the task features can autonomously learn the transferred weights at different levels.
[0032] 3. The present invention introduces the idea of probabilistic model to make the model more robust, so that the model can be trained on unbalanced small sample data sets.
[0033] 4. The model prediction results of the present invention can provide doctors with more accurate warnings and assist them in making decisions in advance.
[0034] 5. The model of the present invention provides a general multi-task learning clinical risk prediction framework, which can be applied in different medical scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is the overall structural diagram of the clinical risk prediction model in the present invention. DETAILED DESCRIPTION
[0036] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be pointed out that the embodiments described below are intended to facilitate the understanding of the present invention and do not have any limiting effect on the present invention.
[0037] A clinical risk prediction system based on multi-task learning includes a computer memory, a computer processor, and a computer program stored in the computer memory and executable on the computer processor. The computer memory stores a trained clinical risk prediction model.
[0038] like Figure 1 As shown in the figure, the clinical risk prediction model adopts a soft parameter sharing multi-task learning model. First, the data of all subtasks are embedded into the same semantic space through the bottom shared layer, and then the unique features of each subtask are extracted through the subtask specific embedding layer. The extracted features are then mapped to a probability space through a probability sampling network. Then, the features learned from different subtasks are transferred through multiple attention mechanisms to form composite features. Finally, each subtask specific output layer outputs the prediction results.
[0039] Specifically, the training process of the clinical risk prediction model is as follows:
[0040] 1) Data preprocessing
[0041] For each time a patient enters the ICU, this embodiment selects the clinical data of the patient in the first 48 hours after entering the ICU (mainly selecting common biochemical indicators from the chartevents and labevents tables) as a predictive indicator. The data of the first 48 hours are divided by hours to form 48 time steps. When there are multiple measurement data within an hour, the average value of the variable is taken. Subsequently, the patient's death record is obtained from the admission table. If there is a corresponding death record, it means that the patient died during hospitalization, which is recorded as 1, otherwise it is 0. Subsequently, the data set is divided into a training set, a validation set, and a test set with a ratio of 0.6:0.2:0.2.
[0042] This embodiment mainly conducts experiments on three task groups (infection prediction, heart failure prediction, and respiratory failure prediction). Among them, infection prediction selects indicators such as plasma protein and serum protein; heart failure prediction selects indicators such as systolic blood pressure, diastolic blood pressure, B-type natriuretic peptide, also known as brain natriuretic peptide, creatinine, etc.; respiratory failure prediction selects indicators such as arteriovenous blood oxygen content, oxygen delivery, positive end-expiratory pressure ventilation, and pulmonary capillary wedge pressure. Heart failure prediction sets up four subtasks: ischemic heart disease, valvular heart disease, heart failure, and death; respiratory failure sets up seven related tasks: hypoxemia, hypercapnia, ventilation-perfusion mismatch, acidosis, respiratory failure, cyanosis, and death; infection prediction sets up three related tasks: fever, infection, and death. For each subtask, an outcome label is set based on prior medical knowledge to indicate whether such an event will occur to the patient during his stay in the ICU. For example, PH<7.35 means that the patient has experienced an acidosis event.
[0043] 2) Preliminary feature processing
[0044] Several shared linear layers are set at the first few layers of the model to embed the input data into the same semantic space. Then the shared underlying features are passed through the shared LSTM layer to obtain the preprocessed features. The design of the shared part of the model uses the idea of transfer learning. All low-level information of tasks is not particularly related to specific tasks. This design can reduce some parameter calculations and reduce the overfitting problem of the model.
[0045] Then, the model structure is differentiated through a series of independent linear layers to obtain independent features after preliminary processing for each task.
[0046] 3) Constructing model probability sampling network and quantifying uncertainty
[0047] Medical datasets have the characteristics of small number of samples and imbalance, so most deterministic prediction models are not very ideal. This paper considers introducing a probabilistic model, assuming that the posterior probability of each task hidden variable conforms to the following Gaussian distribution: P(Z i |x)~N(μ i ,σ i ). We use a neural network to autonomously learn the mean and variance μ of the distribution hypothesis i ,σ i Here we borrow the idea of generative model: we let the input data pass through several linear layers and nonlinear activation functions to fit the mean and variance. After fitting the mean and variance, we get the distribution of the latent variable, and then get a specific value of the latent variable through a random sampling.
[0048] There are two main types of uncertainty in the Bayesian model: aleatoric uncertainty and epistemic uncertainty. Aleatoric uncertainty focuses on modeling data uncertainty, which to some extent represents the impact of noise interference on input data. Therefore, the model of the present invention adds a random noise at the output stage of the sampling network to introduce aleatoric uncertainty.
[0049] Epistemic uncertainty focuses on modeling the uncertainty of model parameters. The model of the present invention introduces some existing work as theoretical support. Some scholars have proposed that the Dropout technology can be regarded as variational inference in Bayesian networks, and proposed that in practice, epistemic uncertainty can be quantified by Monte Carlo sampling. Monte Carlo Dropout performs multiple forward propagations on the same input, and obtains the output of "different network parameters correspond to different structures" according to the Dropout operation. Through statistical variance, it can be regarded as the epistemic uncertainty of the model. In this model, the experimental data is passed through T probability sampling subnetworks and the Dropout operation is performed. At the same time, T sampling is performed. The variance value Var is calculated for the T samples sampled, which can be regarded as the quantified value of the uncertainty in the model. The calculated uncertainty and the latent variable features generated by sampling are connected together as the sampling feature F i enter.
[0050] 4) Attention Mechanism
[0051] Using the common multi-head attention mechanism, the source task feature is regarded as K, the target task feature is regarded as Q, and then the source task feature and the subtask feature are mapped to N subspaces respectively, and then according to Attention(K,Q)=Leaky_Relu(QK T ) obtains the weights transferred between N subspaces K and Q, and performs overall calculation by splicing multiple attention heads.
[0052] The attention mechanism is introduced at both the task level and the time step level. At the task level, the features of the task at all time steps can be weighted as the overall features of the task. Then, information is shared between tasks based on the attention weights.
[0053] Considering the information transfer at the time step level raises the information transfer between tasks to a more fine-grained level. On the one hand, the direction of information transfer between different tasks may change with the time step transfer. For example, in the early stage of a patient entering the ICU, the fever symptoms monitored are an important feature for predicting whether the patient is infected. At this time, the time step information of the fever task needs to be transferred to the subsequent infection task; on the contrary, in the later stage, when the patient's infection symptoms disappear, it may also indicate that the fever has subsided. At this time, the infection task is needed to assist the prediction of the subsequent fever task. On the other hand, the change trends of different tasks are different, and some tasks have lags. Simply taking the task features obtained by weighting different time steps as the transfer ignores the important dimension of time. Similar to the attention mechanism at the task level, it is only necessary to calculate the weights transferred between the time steps between two tasks, and then let the information be transferred at the time step level.
[0054] 5) Model training and testing
[0055] The model was trained in batches of 1000 times on the MIMIC-III training set, where the sum of the cross entropy losses of all tasks was used as the total loss for training. The Adam optimizer was used, and the learning rate was set to 0.001 and batch_size was set to 128. During the iterative training process, the model with the smallest loss on the validation set was selected as the final model. We tested the trained model on the test set and used AUROC and ACC as evaluation indicators.
[0056] 6) Model Migration
[0057] The present invention provides a general multi-task learning framework. The model can be initially trained on the MIMIC dataset and then migrated to other structured medical databases for fine-tuning. The model can also be directly trained in other medical scenarios.
[0058] The embodiments described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A clinical risk prediction system based on multi-task learning, comprising a computer memory, a computer processor, and a computer program stored in the computer memory and executable on the computer processor, characterized in that: The computer memory stores a trained clinical risk prediction model; The clinical risk prediction model adopts a soft parameter sharing multi-task learning model, which first embeds the data of all subtasks into the same semantic space through the bottom shared layer, then extracts the unique features of each subtask through the subtask specific embedding layer, and then maps the extracted features to a probability space through the probability sampling network; then, the features learned from different subtasks are transferred through the multi-attention mechanism to form composite features; Finally, each subtask-specific output layer outputs the prediction results; In the soft parameter sharing multi-task learning model, when the features learned from different subtasks are transferred to form composite features through multiple attention mechanisms, the size of information transfer between different tasks and different time steps at different levels is obtained through coarse-grained task-level attention and fine-grained time-step-level attention; During model training, multiple tasks are trained simultaneously, and the cross entropy losses of all tasks are summed up as the total loss. Training is performed with the total loss, and the gradients of the sub-networks of different tasks are updated back and forth respectively. When the computer processor executes the computer program, the following steps are implemented: Extract clinical sequence data and static characteristics of patients from EHR data 48 hours before admission to ICU; Preprocess the data and divide the clinical sequence data extracted from the 48-hour EHR data into hours; The preprocessed data is input into the trained clinical risk prediction model to output the prediction results of each clinical prediction task.
2. The clinical risk prediction system based on multi-task learning according to claim 1, characterized in that: The prediction results of each clinical prediction task are output as binary classification predictions. For patients predicted to be potentially ill or dead, doctors are required to implement preventive measures.
3. The clinical risk prediction system based on multi-task learning according to claim 1, characterized in that: The training process of the clinical risk prediction model is as follows: (1) Clinical sequence data from EHR data within the first 48 hours were extracted from the MIMIC database for each patient admitted to the ICU; (2) Preprocess the extracted clinical sequence data and divide the extracted 48-hour clinical time series data into hours; (3) Extract static features of each patient, including gender and age; (4) For each clinical prediction task, a patient label is set, where 1 represents that the patient will have the clinical outcome during this hospitalization, and 0 represents that the patient will not have the clinical outcome; (5) Divide the patient data into training set, validation set and test set. The training set is used to iteratively train the model, the validation set is used to select the optimal model parameters, and the test set is used to verify the model effect. (6) Build a soft parameter sharing multi-task learning model, train multiple tasks simultaneously, and add the cross entropy losses of all tasks as the total loss until the model training is completed.
4. The clinical risk prediction system based on multi-task learning according to claim 1 or 3, characterized in that: The clinical sequence data in the EHR data includes red blood cell count, white blood cell count, oxygen fraction, heart rate, systolic blood pressure, diastolic blood pressure, body temperature, and respiratory rate.
5. The clinical risk prediction system based on multi-task learning according to claim 1 or 3, characterized in that: When preprocessing the data, when multiple measurements occur within an hour, the average is taken.
6. The clinical risk prediction system based on multi-task learning according to claim 3, characterized in that: In step (6), during the iterative training process, the model with the smallest loss on the validation set is selected as the final trained model.
Citation Information
Patent Citations
Intestinal cancer diagnosis electronic medical record attribute value extraction method based on multi-task learning
CN111666762A
Face attribute recognition method and system based on parallel shared multi-task network
CN113569732A