A method for predicting anesthesia depth based on recurrent neural network combined with transfer learning and knowledge distillation
Through the method of recurrent neural network combining transfer learning and knowledge distillation, the problem of insufficient generalization ability in anesthesia depth prediction is solved, and higher prediction accuracy and safety are achieved, adapting to the data distribution differences of different anesthetized patients.
Patent Information
- Application Number
- CN202211400249.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-11-09
AI Technical Summary
The prior art has problems with poor generalization ability and insufficient robustness in the prediction of anesthesia depth, especially when facing the differences in data distribution of different anesthesia data, it affects the accuracy and safety of the dose.
A method based on recurrent neural network combined with transfer learning and knowledge distillation is adopted to compress the model size through teacher-student knowledge distillation, public knowledge for different time periods is learned, and the domain adaptation method is used to solve the data distribution differences, improving the generalization ability and robustness of the model.
It improves the accuracy of anesthesia depth prediction and the degree of lightweighting of the model, can better adapt to the data distribution differences of different anesthetized people, and improves the accuracy and safety of the prediction.
Smart Images

Figure CN115641966B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of anesthesia depth prediction combining artificial intelligence with anesthesia medicine, and specifically to an anesthesia depth prediction method based on a recurrent neural network combined with transfer learning and knowledge distillation. Background Art
[0002] With the continuous innovation of science and technology, automated target-controlled infusion systems have gradually been widely used. After the anesthesiologist sets the initial infusion rate, the system can adjust the infusion rate according to the anesthesia depth of the anesthetized patient. However, since the most accurate EEG measurement is currently limited by the equipment and processing speed, the measurement results cannot be directly fed back to the target-controlled infusion system, which places higher requirements on the effect of anesthesia depth prediction.
[0003] The technology for predicting the depth of anesthesia in clinical surgery is still mainly based on the compartmental model of pharmacokinetics and pharmacodynamics. In 1985, Alvis et al. first designed a relatively complete microcomputer-controlled infusion pump system based on the three-compartment pharmacokinetic model of fentanyl, and applied it to the induction and maintenance of anesthesia in coronary artery surgery. Later, many infusion pumps adopted the pharmacokinetic-pharmacodynamic model (PK-PD model) as the algorithmic basis for estimating drug effects and calculating the depth of anesthesia of the anesthetized patient, such as the classic Minto model and Schnider model. With the continuous development of deep learning, in 2018, Hyung-Chul Lee proposed the first deep learning model for anesthesia depth prediction, and the effect was greatly improved compared with the traditional PK-PD model.
[0004] PK-PD models, exemplified by the compartmental model, view the body as a system composed of units with varying drug distribution rates, establishing a linear kinetic model for each unit. While theoretically consistent with the physiological parameters of most people, the PK-PD model's prediction target is the effect-spatial concentration of propofol. Studies have shown that this concentration does not fully reflect the clinically used depth of anesthesia (BIS) indicator, leading to prediction errors that affect drug dosage and potentially threaten the life of the anesthetized patient.
[0005] The Chinese invention patent with a publication date of January 8, 2021: In an anesthesia depth estimation system, an attempt is made to learn the relationship between anesthetic drug dosage and anesthesia depth in clinical surgery through a deep model using a deep learning method. However, the generalization ability of the model is relatively poor, because the model does not deal with the situation where the data distribution of different anesthetized persons is significantly different. The model can only respond well to the learned content. If the data of an anesthetized person is too different from the training data, the model performance will be greatly reduced. In addition, the parameter space of deep models is often relatively large, which is not conducive to deployment on equipment, making industrialization a problem. Summary of the Invention
[0006] In view of the limitations of the existing technology, the present invention proposes a method for predicting the depth of anesthesia based on a recurrent neural network combined with transfer learning and knowledge distillation. The technical solution adopted by the present invention is:
[0007] A method for predicting anesthesia depth based on a recurrent neural network combined with transfer learning and knowledge distillation includes the following steps:
[0008] S1, obtaining the medication dosage data of the subject to be predicted and the static covariate information including the age, gender, height and weight of the subject to be predicted;
[0009] S2, inputting the medication dosage data and static covariate information of the subject to be predicted into a preset anesthesia depth prediction model to obtain an anesthesia depth index value of the subject to be predicted;
[0010] The anesthesia depth prediction model is obtained by training a preset training set based on a recurrent neural network combined with transfer learning and knowledge distillation;
[0011] During the model training process, a recurrent neural network is used to extract time series feature information from the drug infusion history data of the training set. The extracted time series feature information is distributed and matched in different time periods to learn the common knowledge shared in different time periods. Static covariate information of the sample objects in the training set is added to allow the recurrent neural network to learn the relationship between various dynamic and static information.
[0012] Compared with the existing technology, the present invention takes into account the problem of large differences in data distribution of different objects during model training, and uses domain adaptation methods to solve this problem, so that the model has stronger generalization ability and robustness when facing new data; the knowledge distillation method of teacher-student classes is used to compress the size of our model and make it lightweight, and by making the student's intermediate feature representation mimic the teacher's intermediate feature representation, the student model's accuracy in predicting anesthesia depth is further improved.
[0013] As a preferred solution, during the model training process, the size of the model is compressed by the knowledge distillation method of the teacher and student classes, that is, two networks are trained: the teacher model M t And student model M s , including recurrent neural networks, bottleneck networks and fully connected neural networks;
[0014] During the model training process, let the student model M s The output of the recurrent neural network imitates the teacher model M t The output of the recurrent neural network; let the student model M s The output of the bottleneck network imitates the teacher model M t Output of the bottleneck network.
[0015] Furthermore, the training set includes static covariate information of several sample subjects and anesthetic drug dosage data and anesthesia depth index values of the sample subjects at historical moments;
[0016] The training set was preprocessed as follows:
[0017] Missing data of anesthetic drug dosage data were filled by linear interpolation; the data with record errors were modified by taking the mean of the previous and next moments; the anesthesia depth index values were smoothed by local weighted scatter plot smoothing;
[0018] After preprocessing, the anesthetic drug dosage data is sampled at preset time intervals; the cumulative dosage of each sampling point within a preset time length is used as a feature, and a time window of a preset sequence length is established as the student model M s The input data of the model is: the cumulative amount of medication at each sampling point within the preset time and the anesthesia depth index value of the sample object at the historical moment are used as features, and a time window of the preset sequence length is established as the teacher model M t The input data.
[0019] Furthermore, during the model training process, the teacher model M is trained in the following way t And student model M s The input data is quantified by time series distribution:
[0020] For input data n is the total length of the data, p is the number of features of the data, m i is the sequence length of each sampling point; the input data D is evenly divided into 10 segments, and the cosine similarity is used to measure the size of the data distribution difference between two time periods. The 10-segment input data is divided into 5 time periods with the largest data distribution differences between any two time periods through a greedy algorithm: D = {D1, D2, D3, D4, D5}.
[0021] Furthermore, the recurrent neural network is a gated recurrent unit. During the model training process, the result obtained after quantizing the time series distribution is input into the gated recurrent unit, so that the gated recurrent unit learns the time series feature information of the cumulative medication amount and learns the prediction knowledge for each period.
[0022] The teacher model M t And student model M s The outputs of the gated recurrent unit are G teacher ∈R B×L×H ,G student ∈R B×L×H , where B represents the batch size of training, L represents the time series window length, and H represents the hidden state size of GRU; take G teacher and G student The final moment of the gated recurrent unit is represented as the intermediate feature of G tmid ∈R 256×64 ,G smid ∈R 256×64 , the cosine similarity is used to calculate the difference in the intermediate layer features of the gated recurrent unit of the teacher model and the student model and is used as the regular term of the student model loss function, denoted as L G :
[0023] L G =d(G tmid G smid )
[0024] d(G tmid G smid ) represents the cosine similarity calculation.
[0025] Furthermore, during the model training process, the time series distribution matching is performed in the following way, so that the student model M s The output of the recurrent neural network imitates the teacher model M t Output of the recurrent neural network:
[0026] Merge the output dimensions of the gated recurrent unit into G teacher ∈R 256×7680 ,G student ∈R 256×7680 , passes through a fully connected layer with an output dimension of 120, then passes through a sigmoid activation function, and then is normalized by Softmax to obtain the importance vector α; the output of the gated recurrent unit and α are used to calculate the distribution difference between different hidden states as the loss function regularization term L of the model t :
[0027]
[0028] in, Indicates that D is in state t i and D j Importance of two-time period distribution Represents cosine similarity calculation.
[0029] Furthermore, during the model training process, the student model M is trained in the following way s The output of the bottleneck network imitates the teacher model M t Output of the bottleneck network:
[0030] The intermediate feature representation of the output of the gated recurrent unit is G tmid ∈R 256×64 , G smid ∈R 256×64 With the static covariate information S∈R of the sample object 256×4 Splice to T teacher ∈R 256×68 , T student ∈R 256×68 , through a fully connected neural network with an output dimension of 128, and then through a Relu activation function, we get T tout ,T sout ∈R 256×128 , including dynamic time series information features and static covariate information of sample objects; using cosine similarity to calculate the teacher model M t And student model M s The bottleneck network output T tout ,T sout ∈R 256×128 The similarity of , also as the student model M s The regularization term L of the loss function S :
[0031] L S =d(T tout, T sout );
[0032] Among them, d(T tout ,T sout ) is the cosine similarity calculation;
[0033] The output of the bottleneck network is passed through a fully connected neural network with an output dimension of 1 to obtain the anesthesia depth index y i , the predicted BIS value and the true label are subjected to L2 loss, respectively denoted as L tpred , L spred :
[0034]
[0035]
[0036] θ is the model parameter.
[0037] Furthermore, during model training:
[0038] The teacher model M t The loss function is L teacher =L t +L tpred ;
[0039] The loss function of the student model is L student =L t +L spred +L G +L S .
[0040] The present invention also includes the following contents:
[0041] A storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the aforementioned method for predicting depth of anesthesia based on a recurrent neural network combined with transfer learning and knowledge distillation are implemented.
[0042] A computer device includes a storage medium, a processor, and a computer program stored in the storage medium and executable by the processor. When the computer program is executed by the processor, the steps of the aforementioned anesthesia depth prediction method based on a recurrent neural network combined with transfer learning and knowledge distillation are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of the steps of a method for predicting depth of anesthesia based on a recurrent neural network combined with transfer learning and knowledge distillation provided in Example 1 of the present invention;
[0044] Figure 2 A schematic diagram of the model principle of a method for predicting depth of anesthesia based on a recurrent neural network combined with transfer learning and knowledge distillation, provided in Example 1 of the present invention;
[0045] Figure 3 This is a graph showing the anesthesia depth prediction results of the test sample in Example 1 of the present invention. DETAILED DESCRIPTION
[0046] The accompanying drawings are for illustrative purposes only and are not to be construed as limiting this patent;
[0047] It should be clear that the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the embodiments of the present application.
[0048] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the embodiments of the present application. The singular forms "a," "the," and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0049] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0050] In addition, in the description of this application, unless otherwise specified, "plurality" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship. The present invention is further described below with reference to the accompanying drawings and examples.
[0051] In order to solve the limitations of the prior art, this embodiment provides a technical solution, which will be further described below in conjunction with the accompanying drawings and embodiments.
[0052] Example 1
[0053] See also Figure 1 as well as Figure 2 , a method for predicting anesthesia depth based on recurrent neural network combined with transfer learning and knowledge distillation, including the following steps:
[0054] S1, obtaining the medication dosage data of the subject to be predicted and the static covariate information including the age, gender, height and weight of the subject to be predicted;
[0055] S2, inputting the medication dosage data and static covariate information of the subject to be predicted into a preset anesthesia depth prediction model to obtain an anesthesia depth index value of the subject to be predicted;
[0056] The anesthesia depth prediction model is obtained by training a preset training set based on a recurrent neural network combined with transfer learning and knowledge distillation;
[0057] During the model training process, a recurrent neural network is used to extract time series feature information from the drug infusion history data of the training set. The extracted time series feature information is distributed and matched in different time periods to learn the common knowledge shared in different time periods. Static covariate information of the sample objects in the training set is added to allow the recurrent neural network to learn the relationship between various dynamic and static information.
[0058] Compared with the existing technology, the present invention takes into account the problem of large differences in data distribution of different objects during model training, and uses domain adaptation methods to solve this problem, so that the model has stronger generalization ability and robustness when facing new data; the knowledge distillation method of teacher-student classes is used to compress the size of our model and make it lightweight, and by making the student's intermediate feature representation mimic the teacher's intermediate feature representation, the student model's accuracy in predicting anesthesia depth is further improved.
[0059] The solution of this embodiment can be applied to the prediction of anesthesia depth under the combined use of propofol (PPF) and remifentanil (RFTN).
[0060] As a preferred embodiment, during the model training process, the size of the model is compressed by the knowledge distillation method of the teacher and student classes, that is, two networks are trained: the teacher model M t And student model M s , including recurrent neural networks, bottleneck networks and fully connected neural networks;
[0061] During the model training process, let the student model M s The output of the recurrent neural network imitates the teacher model M t The output of the recurrent neural network; let the student model M s The output of the bottleneck network imitates the teacher model M t Output of the bottleneck network.
[0062] Furthermore, the training set includes static covariate information of several sample subjects and anesthetic drug dosage data and anesthesia depth index values of the sample subjects at historical moments;
[0063] The training set was preprocessed as follows:
[0064] Missing data of anesthetic drug dosage data were filled by linear interpolation; the data with record errors were modified by taking the mean of the previous and next moments; the anesthesia depth index values were smoothed by local weighted scatter plot smoothing;
[0065] After preprocessing, the anesthetic drug dosage data is sampled at preset time intervals; the cumulative dosage of each sampling point within a preset time length is used as a feature, and a time window of a preset sequence length is established as the student model M s The input data of the model is: the cumulative amount of medication at each sampling point within the preset time and the anesthesia depth index value of the sample object at the historical moment are used as features, and a time window of the preset sequence length is established as the teacher model M t The input data.
[0066] Specifically, in the laboratory phase, this example randomly selected data from an open-source database for total intravenous anesthesia on 600 patients. These data were processed as follows: from the start of propofol or remifentanil infusion to the end of BIS measurement, data containing the following conditions were discarded:
[0067] 1. The BIS value is less than 80 when the drug infusion is started.
[0068] 2. Data exceeding 300s is lost.
[0069] 3. When the first BIS is recorded, the cumulative amount of drug injected is not 0.
[0070] Finally, the data of 332 patients were left and randomly divided into training set, validation set and test set, with 180 cases in the training set and 76 cases in the validation set and test set respectively.
[0071] Patient sample data in the training set may contain a small number of missing values. Since PPF and RFTN exhibit a linear relationship over time, this embodiment uses linear interpolation to fill in the small number of missing values in patient samples. The total dosage of both PPF and RFNT is monotonically non-decreasing. Therefore, if there is a decrease in the total dosage in the sample data due to instrument recording issues or data export problems, this embodiment uses the average of the previous and next moments to fill in the missing values.
[0072] The target-controlled injection pump records the cumulative injection volume. The injection history data retrieved from the target-controlled injection pump is updated every 10 seconds. Therefore, this embodiment uses the cumulative dosage of PPF and RFTN within 10 seconds as features to establish a time window with a sequence length of 120. Since the data changes of different sample objects vary greatly, it is not conducive to network learning. At the same time, to save computing resources, this embodiment downsamples the training data, that is, selects a sampling point every 10 seconds. And because the BIS values of different sample objects have different changing trends, and the BIS values of each sample object change frequently, this embodiment smoothes the BIS values of the training set, using local weighted scatter plot smoothing (LOWESS) with a smoothing parameter of 0.03 to reduce calculation errors during training. In addition, this embodiment also introduces the BIS values of historical moments as features in the teacher model, which can guide the teacher model to learn the trend of BIS value changes; the BIS values of the validation set and test set are not processed.
[0073] Furthermore, during the model training process, the teacher model M is trained in the following way t And student model M s The input data is quantified by time series distribution:
[0074] For input data n is the total length of the data, p is the number of features of the data, m i is the sequence length of each sampling point (in this embodiment, the number of features of the teacher model is 3, the number of features of the student model is 2, and the sequence length is 120); the input data D is evenly divided into 10 segments, and the cosine similarity is used to measure the size of the data distribution difference between two time periods. The 10 segments of input data are divided into 5 time periods with the largest data distribution differences between any two segments through a greedy algorithm: D = {D1, D2, D3, D4, D5}.
[0075] Specifically, according to the maximum entropy principle, without making any prior assumptions about the segmentation of time series data, it is reasonable to make the distribution of each period as diverse as possible in order to maximize the entropy of the total distribution. This allows for more general and flexible modeling of future data. Furthermore, to maximize the shared knowledge within the time series, this can be achieved by finding periods with the lowest mutual similarity.
[0076] Therefore, the problem can be expressed as follows:
[0077]
[0078] Where d is a distribution metric such as Euclidean distance or cosine similarity, Δ1 and Δ2 are predefined parameters to avoid missing distribution information, and K0 is a hyperparameter. The goal of the above problem is to divide the input medication dosage data into K periods, where the distribution of medication dosage data in each period is the most different. We use a greedy algorithm to solve for the value of K.
[0079] Furthermore, the recurrent neural network is a gated recurrent unit (GRU). In this embodiment, the teacher model M t The number of GRU hidden layers is 5, the size of each hidden state is 64, and the student model M s The number of hidden layers in the GRU is 1, and the hidden state size is 64. During the model training process, the results of the quantized time series distribution are input into the gated recurrent unit, so that the gated recurrent unit learns the time series feature information of the cumulative drug dosage and learns the prediction knowledge for each period.
[0080] The teacher model M t And student model M s The outputs of the gated recurrent unit are G teacher ∈R B×L×H ,G student ∈R B×L×H , where B represents the batch size of training, L represents the time series window length, and H represents the hidden state size of GRU; take G teacher and G student The final moment of the gated recurrent unit is represented as the intermediate feature of G tmid ∈R 256×64 ,G smid ∈R 256×64 , the cosine similarity is used to calculate the difference in the intermediate layer features of the gated recurrent unit of the teacher model and the student model and is used as the regular term of the student model loss function, denoted as L G :
[0081] L G =d(G tmid G smid )
[0082] d(G tmid G smid ) represents the cosine similarity calculation.
[0083] Furthermore, during the model training process, GRU can only learn the prediction knowledge of each period and cannot reduce the distribution differences between different periods to utilize common knowledge. In order to perform time series distribution matching, this implementation first introduces the importance vector α to evaluate the importance of each hidden state. Through α, the network can pay attention to the distribution differences between different periods, thereby reducing the distribution differences between different periods and achieving time series distribution matching. Therefore, time series distribution matching is performed in the following way, so that the student model M s The output of the recurrent neural network imitates the teacher model M t Output of the recurrent neural network:
[0084] Merge the output dimensions of the gated recurrent unit into G teacher ∈R 256×7680 ,G student ∈R 256×7680 , passes through a fully connected layer with an output dimension of 120, then passes through a sigmoid activation function, and then is normalized by Softmax to obtain the importance vector α; the output of the gated recurrent unit and α are used to calculate the distribution difference between different hidden states as the loss function regularization term L of the model t :
[0085]
[0086] in, Indicates that D is in state t i and D j Importance of two-time period distribution Represents cosine similarity calculation.
[0087] According to the updated α, the distribution differences between different periods are calculated as regular terms, which enables the network to shift from only learning the prediction knowledge of each period to focusing on the prediction knowledge within each time period and the differences and common features between different periods.
[0088] Furthermore, during the model training process, the student model M is trained in the following way s The output of the bottleneck network imitates the teacher model M t Output of the bottleneck network:
[0089] The intermediate feature representation of the output of the gated recurrent unit is G tmid ∈R 256×64 , G smid ∈R 256×64 With the static covariate information S∈R of the sample object 256×4 Splice to T teacher ∈R 256×68 , T student ∈R 256×68, through a fully connected neural network with an output dimension of 128, and then through a Relu activation function, we get T tout ,T sout ∈R 256×128 , including dynamic time series information features and static covariate information of sample objects; using cosine similarity to calculate the teacher model M t And student model M s The bottleneck network output T tout, T sout ∈R 256×128 The similarity of , also as the student model M s The regularization term L of the loss function S :
[0090] L S =d(T tout ,T sout );
[0091] Among them, d(T tout ,T sout ) is the cosine similarity calculation;
[0092] The output of the bottleneck network is passed through a fully connected neural network with an output dimension of 1 to obtain the anesthesia depth index y i , the predicted BIS value and the true label are subjected to L2 loss, respectively denoted as L tpred , L spred :
[0093]
[0094]
[0095] θ is the model parameter.
[0096] Furthermore, during model training:
[0097] The teacher model M t The loss function is L teacher =L t +L tpred ;
[0098] The loss function of the student model is L student =L t +L spred +L G +L S .
[0099] More specifically, in the laboratory stage, the number of model iterations can be set to 100, the number of early stopping iterations can be set to 40, and the teacher model M t and student model M sTraining is performed simultaneously, and the model parameters are updated according to the corresponding loss function until the number of iterations is greater than 40 and the validation set loss no longer decreases or the number of iterations reaches 100. The student model parameters with the lowest validation set loss are taken as the final model, and then the student model is used to test the test set data.
[0100] The teacher model M trained in this embodiment t and student model M s , all have the same framework, and the training process is executed according to the above process. The difference is that the teacher model not only inputs the history of drug infusion, but also inputs the BIS values at historical moments to obtain a richer intermediate layer feature representation of temporal information. Therefore, this embodiment performs knowledge distillation based on the intermediate layer feature representation. Specifically, this embodiment allows the GRU output of the student model to imitate the GRU output of the teacher model to obtain a more accurate feature representation of the BIS value change trend, and this embodiment allows the distribution of the output feature representation of the bottleneck network of the student model and the distribution of the output feature representation of the bottleneck network of the teacher model to be as similar as possible. The teacher model has historical BIS data features and can more accurately reflect the impact of static physiological information and dynamic drug information on BIS. Therefore, this embodiment imitates the feature representation of the output of the student bottleneck network to reduce the distribution difference between the two. In addition, the structural complexity and number of layers of the student model are lighter than those of the teacher model. Specifically, the number of GRU layers of the teacher model is 5, while the number of GRU network layers of the student model is only 1. The prediction results obtained by the test sample of this embodiment can be referred to. Figure 3 .
[0101] Example 2
[0102] A storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the anesthesia depth prediction method based on a recurrent neural network combined with transfer learning and knowledge distillation as described in Example 1 are implemented.
[0103] Example 3
[0104] A computer device includes a storage medium, a processor, and a computer program stored in the storage medium and executable by the processor. When the computer program is executed by the processor, the steps of the anesthesia depth prediction method based on a recurrent neural network combined with transfer learning and knowledge distillation as described in Example 1 are implemented.
[0105] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.
Claims
1. A method for predicting anesthesia depth based on recurrent neural network combined with transfer learning and knowledge distillation, characterized in that: The following steps are involved: S1, obtaining the medication dosage data of the subject to be predicted and the static covariate information including the age, gender, height and weight of the subject to be predicted; S2, inputting the medication dosage data and static covariate information of the subject to be predicted into a preset anesthesia depth prediction model to obtain an anesthesia depth index value of the subject to be predicted; The anesthesia depth prediction model is obtained by training a preset training set based on a recurrent neural network combined with transfer learning and knowledge distillation; During the model training process, a recurrent neural network is used to extract time series feature information from the drug infusion history data in the training set. The extracted time series feature information is then distributed and matched in different time periods to learn the common knowledge shared by different time periods. Static covariate information of the sample objects in the training set is added to allow the recurrent neural network to learn the relationship between various dynamic and static information. During the model training process, the size of the model is compressed by the knowledge distillation method of the teacher and student classes, that is, two networks are trained: the teacher model M t And student model M s , including recurrent neural networks, bottleneck networks and fully connected neural networks; During the model training process, let the student model M s The output of the recurrent neural network imitates the teacher model M t The output of the recurrent neural network; let the student model M s The output of the bottleneck network imitates the teacher model M t The output of the bottleneck network; During the model training process, the time series distribution matching is performed in the following way, so that the student model M s The output of the recurrent neural network imitates the teacher model M t Output of the recurrent neural network: Merge the output dimensions of the gated recurrent unit into G teacher ∈R 256×7680 ,G student ∈R 256×7680 , passes through a fully connected layer with an output dimension of 120, then passes through a sigmoid activation function, and then is normalized by Softmax to obtain the importance vector α; the output of the gated recurrent unit and α are used to calculate the distribution difference between different hidden states as the loss function regularization term L of the model t : in, Indicates that D is in state t i and D j The importance of the two time period distributions, Represents cosine similarity calculation.
2. The anesthesia depth prediction method based on recurrent neural network combined with transfer learning and knowledge distillation according to claim 1 is characterized in that: The training set includes static covariate information of several sample subjects and anesthetic drug dosage data and anesthesia depth index values of the sample subjects at historical moments; The training set was preprocessed as follows: Missing data of anesthetic drug dosage data were filled by linear interpolation; the data with record errors were modified by taking the mean of the previous and next moments; the anesthesia depth index values were smoothed by local weighted scatter plot smoothing; After preprocessing, the anesthetic drug dosage data is sampled at preset time intervals; the cumulative dosage of each sampling point within a preset time length is used as a feature, and a time window of a preset sequence length is established as the student model M s The input data of the model is: the cumulative amount of medication at each sampling point within the preset time and the anesthesia depth index value of the sample object at the historical moment are used as features, and a time window of the preset sequence length is established as the teacher model M t Input data.
3. The anesthesia depth prediction method based on recurrent neural network combined with transfer learning and knowledge distillation according to claim 2 is characterized in that: During the model training process, the teacher model M is trained in the following way t And student model M s The input data is quantified by time series distribution: For input data n is the total length of the data, p is the number of features of the data, m i is the sequence length of each sampling point; the input data D is evenly divided into 10 segments, and the cosine similarity is used to measure the size of the data distribution difference between two time periods. The 10-segment input data is divided into 5 time periods with the largest data distribution differences between any two time periods through a greedy algorithm: D = {D1, D2, D3, D4, D5}.
4. The method for predicting depth of anesthesia based on a recurrent neural network combined with transfer learning and knowledge distillation according to claim 3, characterized in that: The recurrent neural network is a gated recurrent unit. During the model training process, the results obtained after quantizing the time series distribution are input into the gated recurrent unit, so that the gated recurrent unit learns the time series feature information of the cumulative medication amount and learns the prediction knowledge for each period. The teacher model M t And student model M s The outputs of the gated recurrent unit are G teacher ∈R B×L×H ,G student ∈R B×L×H , where B represents the batch size of training, L represents the time series window length, and H represents the hidden state size of GRU; take G teacher and G student The final moment of the gated recurrent unit is represented as the intermediate feature of G tmid ∈R 256×64 ,G smid ∈R 256×64 , the cosine similarity is used to calculate the difference in the intermediate layer features of the gated recurrent unit of the teacher model and the student model and is used as the regular term of the student model loss function, denoted as L G : L G =d(G tmid ,G smid ) d(G tmid , G smid ) represents the cosine similarity calculation.
5. The method for predicting depth of anesthesia based on a recurrent neural network combined with transfer learning and knowledge distillation according to claim 4, characterized in that: During the model training process, the student model M is trained in the following ways: s The output of the bottleneck network imitates the teacher model M t Output of the bottleneck network: The intermediate feature representation of the output of the gated recurrent unit is G tmid ∈R 256×64 , G smid ∈R 256×64 With the static covariate information S∈R of the sample object 256×4 Splice to T teacher ∈R 256×68 , T student ∈R 256×68 , through a fully connected neural network with an output dimension of 128, and then through a Relu activation function, we get T tout and T sout , T tout ∈R 256×128 ,T sout ∈R 256×128 , including dynamic time series information features and static covariate information of sample objects; using cosine similarity to calculate the teacher model M t And student model M s The bottleneck network output T tout and T sout The similarity of , also as the student model M s The regularization term L of the loss function S : L S =d(T tout ,T sout ); Among them, d(T tout ,T sout ) is the cosine similarity calculation; The output of the bottleneck network is passed through a fully connected neural network with an output dimension of 1 to obtain the anesthesia depth index y i , the predicted BIS value and the true label are subjected to L2 loss, respectively denoted as L tpred , L spred : θ is the model parameter.
6. The method for predicting depth of anesthesia based on a recurrent neural network combined with transfer learning and knowledge distillation according to claim 5, characterized in that: During model training: The teacher model M t The loss function is L teac h er =L t +L tpred ; The student model M s The loss function is L student =L t +L spred +L G +L S .
7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the anesthesia depth prediction method based on a recurrent neural network combined with transfer learning and knowledge distillation are implemented as described in any one of claims 1 to 6.
8. A computer device, characterized in that: It includes a storage medium, a processor, and a computer program stored in the storage medium and executable by the processor, wherein when the computer program is executed by the processor, the steps of the anesthesia depth prediction method based on a recurrent neural network combined with transfer learning and knowledge distillation as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Real-time anesthesia depth monitoring system based on deep learning
CN115040140A
Model training method and device, electronic equipment and storage medium
CN115049074A