Sepsis vasoactive drug efficacy prediction method based on balanced representation learning

By constructing a sepsis vasoactive drug efficacy prediction system based on balanced representation learning, the problems of irregular sampling, missing information, and interference with treatment-related information in existing technologies are solved. This system enables stable prediction of SOFA outcome trajectories for multi-step treatment conditions in sepsis patients and traceable simulation of treatment pathways.

CN122392794APending Publication Date: 2026-07-14CENT SOUTH UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2026-06-15
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing medical time-series data processing methods struggle to simultaneously address issues such as irregular sampling and missing information, strong coupling between treatment variables and patient condition status, interference of treatment allocation mechanism information on outcome prediction, insufficient stability of SOFA outcome trajectory prediction for multi-step treatment conditions, and lack of traceable single-patient step-by-step treatment path simulation output when dealing with longitudinal electronic health record data from sepsis ICUs.

Method used

A system for predicting the efficacy of vasoactive drugs in sepsis based on balanced representation learning was constructed, including a data acquisition and sample construction module, a data preprocessing module, a spatiotemporal graph feature reconstruction module, a gated relative position temporal encoding module, a balanced autoregressive decoding module, a training optimization module, and a stepwise treatment path simulation module. Through spatiotemporal graph feature reconstruction, decoupling of treatment-related information, and stepwise treatment path simulation, the SOFA outcome trajectory under conditions of vasoactive drug use or non-use was predicted.

Benefits of technology

It enables the prediction of future SOFA outcome trajectories under binary treatment action conditions of vasoactive drugs within a given patient historical observation window, forming a traceable step-by-step treatment path simulation output, thus improving the stability and accuracy of the prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122392794A_ABST
    Figure CN122392794A_ABST
Patent Text Reader

Abstract

This invention discloses a method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning, aiming to address the problems of existing methods, such as difficulty in simultaneously handling irregular sampling and missing information, and insufficient prediction stability. The technical solution involves constructing a sepsis vasoactive drug efficacy prediction system based on balanced representation learning, comprising a data acquisition and sample construction module, a data preprocessing module, a spatiotemporal graph feature reconstruction module, a gated relative position temporal encoding module, a balanced autoregressive decoding module, a training and optimization module, and a stepwise treatment path simulation module. The prediction system is trained using a training set to obtain a set of candidate parameter combinations. A validation set is used to evaluate the candidate parameter combinations to determine the target parameter combination, resulting in a post-trained prediction system. The post-trained prediction system is then used to predict the efficacy of the target patient's ICU electronic health record, yielding the prediction results. This invention improves prediction stability and ensures the traceability of prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer and medical data processing technology, specifically to a method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning. Background Technology

[0002] Sepsis is a life-threatening organ dysfunction caused by infection and is one of the most common critical illnesses in the Intensive Care Unit (ICU), with a high in-hospital mortality rate. Vasoactive drugs (such as norepinephrine, epinephrine, vasopressin, dopamine, and dobutamine) are widely used in circulatory support for sepsis patients. However, their use is both necessary and carries the risk of adverse reactions. The Sequential Organ Failure Assessment (SOFA) can be used to reflect changes in a patient's organ function status over time. In medical time-series data processing and decision support scenarios, in addition to obtaining a risk score at a specific moment, it is also necessary to predict the SOFA outcome trajectory under conditions of vasoactive drug use or non-use at multiple future time steps based on the patient's past condition, thereby forming a traceable prediction of treatment conditions.

[0003] However, ICU longitudinal electronic health records (EHR) data exhibit strong irregularities: the sampling frequencies of different variables are inconsistent; whether a variable is recorded is related to the severity of the patient's condition, meaning that the absence itself is informative; and there is a temporal coupling relationship between static characteristics, vital signs, laboratory indicators, treatment variables, and outcome variables. Conventional forward imputation or mean imputation does not erase the clue that "missing information is informative," thus disrupting the structural relationships between variables and along the time dimension.

[0004] Existing prediction methods can be divided into two categories: time-series prediction methods and dynamic treatment condition outcome modeling.

[0005] (1) Time series forecasting methods. Time series forecasting methods typically learn the patterns of variable changes over time from historical observation sequences to output future risks, future indicator values, or interpolation results for missing variables. These methods mainly model the time dependence in the trajectory of already occurred facts, and mainly include TimeCHEAT. TimeCHEAT (see Liu, J., Cao, M., and Chen, S. “TimeCHEAT: A Channel Harmony Strategy for Irregularly Sampled Multivariate Time Series Analysis.” Proceedings of the AAAI Conference on Artificial Intelligence, 2025, 39(18): 18861-18869. Liu J et al.'s paper: TimeCHEAT: A Channel Harmony Strategy for Irregularly Sampled Multivariate Time Series Analysis) is designed for irregularly sampled multivariate time series data. It uses a channel harmony strategy that combines local channel dependence and global channel independence to learn time series representations and can be used for tasks such as prediction and interpolation. However, this type of method mainly focuses on predicting the correlation of the time series variables themselves. It does not compare the treatment condition outcomes for the two treatment variables of vasoactive drug use and non-use in the same patient's historical state, nor does it constrain the coupling between the treatment allocation mechanism information and the outcome representation.

[0006] (2) Dynamic treatment condition outcome modeling. Dynamic treatment condition outcome modeling usually takes the patient's historical state and historical treatment as input, and predicts the subsequent outcome trajectory given future treatment conditions or treatment strategies. It is used to deal with the problem of the interaction between treatment variables and the patient's condition over time, such as G-Net and Causal Transformer. G-Net (see Li, R., Hu, S., Lu, M., Utsumi, Y., Chakraborty, P., Sow, DM, Madan, P., Li, J., Ghalwash, M., Shahn, Z., and Lehman, LH, “G-Net: A Recurrent Network Approach to G-Computation for Counterfactual Prediction Under a Dynamic Treatment Regime.” Proceedings of Machine Learning for Health. PMLR, 2021, 158: 282-299. The paper by Li R et al., “G-Net: A Recurrent Network Approach to G-Computation for Counterfactual Prediction Under a Dynamic Treatment Regime,” introduces recurrent neural networks into the sequential g-computation framework, estimating the distribution of subsequent covariates given the patient's medical history and treatment history; Causal Transformer (see Melnychuk, V., Frauen, D., and Feuerriegel, S., “Causal Transformer for Estimating Counterfactual…”) introduces recurrent neural networks into the sequential g-computation framework, estimating the distribution of subsequent covariates given the patient's medical history and treatment history; Outcomes.” Proceedings of the 39th International Conference on Machine Learning. PMLR, 2022, 162: 15293-15329. Melnychuk V et al.’s paper: Causal Transformer: A Causal Transformer for Estimating Counterfactual Outcomes) learns treatment-related representations in longitudinal observation data through multiple Transformer subnetworks and domain confusion loss to handle time-varying confounding; however, this type of method may still be limited by factors such as insufficient informational representation, stability of sequential simulation or adversarial balance training, implementation complexity, and accumulation of multi-step prediction errors when applied to irregular ICU longitudinal data.

[0007] In general, existing prediction methods rarely integrate irregular missing data reconstruction, treatment-related information decoupling, multi-step treatment condition prediction, and single-patient pathway simulation into a continuous processing flow, making it difficult to simultaneously address irregular missing data, treatment-related information interference, and multi-step treatment condition outcome prediction. Currently, no publicly available technical solutions have been found that combine spatiotemporal graph feature reconstruction, treatment-related information decoupling, and step-by-step treatment pathway simulation to predict SOFA outcome trajectories under conditions of vasoactive drug use or non-use in sepsis. Summary of the Invention

[0008] The technical problem this invention aims to solve is as follows: Existing medical time-series data processing methods, when dealing with longitudinal electronic health record data from sepsis ICUs, struggle to simultaneously handle irregular sampling and missing information, strong coupling between treatment variables and patient condition status, interference of treatment allocation mechanism information on outcome prediction representation, insufficient stability of SOFA outcome trajectory prediction under multi-step treatment conditions, and a lack of traceable single-patient step-by-step treatment path simulation output. This invention provides a method for predicting the efficacy of vasoactive drugs in sepsis based on balanced representation learning. Given a patient's historical observation window, this method can predict the future SOFA outcome trajectory under binary treatment action conditions (whether or not vasoactive drugs are used), generating a step-by-step treatment path simulation output.

[0009] To address the aforementioned technical problems, the technical solution of this invention is as follows: First, a sepsis vasoactive drug efficacy prediction system based on balanced representation learning is constructed. This system comprises a data acquisition and sample construction module, a data preprocessing module, a spatiotemporal graph feature reconstruction module, a gated relative position temporal encoding module, a balanced autoregressive decoding module, a training and optimization module, and a stepwise treatment path simulation module. Then, a patient temporal sample set required for training the sepsis vasoactive drug efficacy prediction system is constructed, and this set is divided into a training set, a validation set, and a test set. The training set is used to train the sepsis vasoactive drug efficacy prediction system, obtaining a set of candidate parameter combinations. The validation set is used to evaluate the candidate parameter combinations, determining the target parameter combination, resulting in the trained sepsis vasoactive drug efficacy prediction system. Finally, the trained sepsis vasoactive drug efficacy prediction system is used to perform a stepwise treatment path simulation on the target patient's ICU electronic health record input by the user, obtaining the simulated treatment action sequence and the predicted SOFA trajectory under the treatment path.

[0010] This invention includes the following steps:

[0011] The first step involved constructing a system for predicting the efficacy of vasoactive drugs for sepsis. This system comprises a data acquisition and sample construction module, a data preprocessing module, a spatiotemporal graph feature reconstruction module, a gated relative position temporal encoding module, a balanced autoregressive decoding module, a training and optimization module, and a stepwise treatment path simulation module. Specifically, the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module are neural networks, operating both during training and when predicting based on user-inputted target patient ICU electronic health records. The data acquisition and sample construction module and the data preprocessing module operate both during training and when predicting based on user-inputted target patient ICU electronic health records. The training and optimization module is used to train and validate parameter selection and operates only during training. The stepwise treatment path simulation module does not operate during training but operates when predicting based on user-inputted target patient ICU electronic health records.

[0012] The data acquisition and sample construction module is connected to the data preprocessing module. It receives raw patient data from the patients' electronic health records in the ICU. This raw data includes static characteristics, time-varying covariates, time-varying records, vasoactive drug usage records, and SOFA score records. Static characteristics include age, gender, weight, and height; time-varying covariates include clinically observed variables such as vital signs and laboratory indicators that change over time. The data acquisition and sample construction module slices the time-varying electronic health records of the patients' ICU according to preset historical observation windows and prediction windows, constructing a pre-processed patient time-series sample containing both historical and future prediction windows. This pre-processed patient time-series sample is then sent to the data preprocessing module.

[0013] The data preprocessing module is connected to the data acquisition and sample construction module, the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, the balanced autoregressive decoding module, and the training optimization module. It receives patient time-series samples from the data acquisition and sample construction module before preprocessing. It standardizes continuous variables (including age, weight, and height) of static features in the preprocessed patient time-series samples; encodes categorical variables (including gender); cleans and standardizes abnormal records for vital signs and laboratory indicators in time-varying covariates; constructs a time index based on the time records; constructs an observation mask based on whether there are valid and resolvable measurements within the corresponding time window; and constructs a binary treatment variable from the vasoactive drug usage records. This binary treatment variable indicates whether vasoactive drugs were used at the corresponding time point, without involving the dosage or specific drug intensity. The data preprocessing module preprocesses the time-varying covariates within the historical observation window, forming historical treatment sequences based on vasoactive drug usage records and historical SOFA score record sequences based on SOFA score records within the historical observation window. It also forms the current decoding starting point based on the binary treatment variable and SOFA score record corresponding to the end of the historical observation window. Furthermore, it forms future treatment sequences based on vasoactive drug usage records and future SOFA score record sequences within the future prediction window. The data preprocessing module then combines the preprocessed static features, historical time-series observation inputs, historical treatment sequences, historical SOFA score record sequences, the current decoding starting point, future treatment sequences, and future SOFA score record sequences into a preprocessed patient time-series sample. This patient time-series sample is then sent to the spatiotemporal graph feature reconstruction module, the gated relative position time-series encoding module, the balanced autoregressive decoding module, and the training optimization module. The spatiotemporal graph feature reconstruction module will use historical time series observation input, the gated relative position time series encoding module will use preprocessed static features, historical treatment sequences, and historical SOFA score record sequences, the balanced autoregressive decoding module will use the current decoding starting point, preprocessed static features, and future treatment sequences, and the training optimization module will use future SOFA score record sequences and future treatment sequences.

[0014] The spatiotemporal graph feature reconstruction module is connected to the data preprocessing module and the gated relative position temporal coding module, and consists of a graph construction submodule, a bidirectional message passing submodule, and a covariate reconstruction submodule. The graph construction submodule includes a learnable channel correlation matrix, a time-varying covariate channel node linear layer, a time event node linear layer, and an edge representation linear layer; the bidirectional message passing submodule consists of… Each graph message passing layer is composed of stacked layers, where Each graph message passing layer includes a stitching layer, a multi-head attention layer, an edge update linear layer, an activation function, and residual connection units; the covariate reconstruction submodule includes a stitching layer and a linear output layer. In the graph construction submodule, the learnable channel correlation matrix has the following dimensions: The input dimension of the linear layer with time-varying covariate channel nodes is 21, and the output dimension is... The linear layer of time event nodes has an input dimension of 1 and an output dimension of 1. An edge indicates that the input dimension of the linear layer is 2 and the output dimension is 1. The multi-head attention layer of the bidirectional message passing submodule includes 4 attention heads, with a hidden dimension of 128 for both node and edge representations; the linear output layer of the covariate reconstruction submodule has an input dimension of 384 and an output dimension of... The graph construction submodule receives historical time-series observation input from the data preprocessing module. Its time-varying covariate channel node linear layer works in conjunction with the learnable channel correlation matrix to generate initial time-varying covariate channel node representations based on the time-varying covariate channels determined after preprocessing. The time event node linear layer generates initial time event node representations based on historical time indices. The edge representation linear layer generates initial edge representations based on preprocessed observations, observation masks, and time indices, resulting in a spatiotemporal graph formed by the initial time-varying covariate channel node representations, initial time event node representations, and initial edge representations. The bidirectional message passing submodule receives the spatiotemporal graph from the graph construction submodule. Its first graph message passing layer's splicing layer concatenates adjacent node and edge representations, which are then processed sequentially by a multi-head attention layer, an edge update linear layer, an activation function, and a residual connection unit to obtain updated time-varying covariate channel node representations, time event node representations, and edge representations. After the message passing layer of the graph outputs the first... Layer-specific time-varying covariate channel node representation, time event node representation, and edge representation. The covariate reconstruction submodule receives the first... Layered time-varying covariate channel node representation, time event node representation, and edge representation, with its internal splicing layer being the first... The layer time-varying covariate channel node representation, time event node representation, and edge representation are concatenated, processed by the linear output layer inside to obtain the reconstructed covariate sequence, and then sent to the gated relative position timing coding module.

[0015] The gated relative position temporal coding module is connected to the spatiotemporal graph feature reconstruction module, data preprocessing module, and balanced autoregressive decoding module. It consists of a dynamic input construction submodule, a relative position attention submodule, an input dependency gating submodule, a static feature conditionalization submodule, and a first position feedforward submodule. The dynamic input construction submodule includes a concatenation layer and an input linear layer; the relative position attention submodule includes a query linear layer, a key linear layer, a value linear layer, a multi-head attention layer, a learnable relative position bias unit, and an output linear layer; the input dependency gating submodule includes a gated linear layer, a sigmoid gated layer, and an element-wise multiplication unit; the static feature conditionalization submodule includes a static feature linear layer; and the first position feedforward submodule includes a concatenation layer, a linear layer, an activation function, a linear layer, a residual connection unit, and a LayerNorm unit. The input linear layer of the dynamic input construction submodule has an input dimension of 23 and an output dimension of [missing information]. In the relative position attention submodule, the input dimension of the query linear layer, key linear layer, value linear layer, and output linear layer is 128, and the output dimension is also 128. The multi-head attention layer consists of four attention heads, each with a hidden layer feature dimension of 32. The maximum relative position of the learnable relative position bias unit is 36. The static feature linear layer has an input dimension of 4 and an output dimension of [missing information]. In the first position feedforward submodule, the input dimension of the first linear layer is 160, and the output dimension is... The second linear layer has an input dimension of 512 and an output dimension of... The activation function used is the GELU function. The dynamic input construction submodule receives the reconstructed covariate sequence from the spatiotemporal graph feature reconstruction module and the historical treatment sequence and historical SOFA score record sequence from the data preprocessing module. At each historical time step, the concatenation layer of the dynamic input construction submodule concatenates the reconstructed covariates, historical treatment variables, and historical SOFA score records according to the feature dimension, and then processes them through the input linear layer to obtain the encoded input sequence. The relative position attention submodule receives the encoded input sequence from the dynamic input construction submodule. Its query linear layer, key linear layer, and value linear layer process the encoded input sequence in parallel to obtain the query representation, key representation, and value representation, respectively. The learnable relative position bias unit in the relative position attention submodule generates a learnable relative position bias. The multi-head attention layer performs attention calculation based on the query representation, key representation, value representation, and learnable relative position bias to obtain the attention head output. The output linear layer in the relative position attention submodule processes the attention head output to obtain the relative position attention output. The input-dependent gating submodule receives the encoded input sequence from the dynamic input construction submodule and the attention head output from the relative position attention submodule. Its gating linear layer generates a gating vector based on the encoded input sequence, and a sigmoid gating layer processes the gating vector to obtain gating weights. An element-wise multiplication unit multiplies the gating weights with the attention head output to obtain the gated attention output. The static feature conditionalization submodule receives preprocessed static features from the data preprocessing module. Its static feature linear layer generates a static feature conditional representation based on the preprocessed static features. The first position feedforward submodule receives the gated attention output from the input-dependent gating submodule and the static feature conditional representation from the static feature conditionalization submodule. The first position feedforward submodule's concatenation layer concatenates the gated attention output with the static feature conditional representation, which is then processed sequentially through a linear layer, activation function, linear layer again, residual connection unit, and LayerNorm unit to obtain the patient's historical memory representation. This patient historical memory representation is then sent to the balanced autoregressive decoding module.

[0016] The balanced autoregressive decoding module is connected to the gated relative position temporal coding module, data preprocessing module, training optimization module, and stepwise treatment path simulation module. It consists of an autoregressive decoding unit, a causal self-attention submodule, a cross-attention submodule, a second position feedforward submodule, a balanced representation splitting submodule, a SOFA prediction branch, a treatment prediction branch, a training output branch, and an application output branch. The autoregressive decoding unit comprises a splicing layer and a linear layer for decoding input; the causal self-attention submodule comprises a multi-head causal self-attention layer, an attention head gating layer, a residual connection unit, and a LayerNorm unit; the cross-attention submodule comprises a multi-head cross-attention layer, an attention head gating layer, a residual connection unit, and a LayerNorm unit; the second-position feedforward submodule comprises a linear layer, an activation function, a linear layer, a residual connection unit, and a LayerNorm unit; the balanced representation splitting submodule comprises a result representation linear layer, an activation function, and a LayerNorm unit, as well as a treatment representation linear layer, an activation function, and a LayerNorm unit; the SOFA prediction branch comprises a splicing layer, a linear layer, an activation function, and a linear output layer; the treatment prediction branch comprises a linear layer, an activation function, and a linear output layer; the training output branch and the application output branch belong to the output function layer, not the trainable neural network prediction layer. The input dimension of the linear layer for decoding input of the autoregressive decoding unit is 6, and the output dimension is... The multi-head attention layers in both the causal self-attention submodule and the cross-attention submodule include four attention heads, each with a hidden layer feature dimension of 32. The attention head gating layers employ scalar gating. In the second position feedforward submodule, the input dimension of the first linear layer is 128, and the output dimension is... The second linear layer has an input dimension of 512 and an output dimension of... The activation function used is the ReLU function; in the balanced representation splitting submodule, the input dimension of the result representation linear layer is 128, and the output dimension is 128; the input dimension of the treatment representation linear layer is 128, and the output dimension is... The activation function used is the ELU function; in the SOFA prediction branch, the input dimension of the linear layer is 129, and the output dimension is... The linear output layer has an input dimension of 128 and an output dimension of [missing information]. In the treatment prediction branch, the linear layer has an input dimension of 128 and an output dimension of... The linear output layer has an input dimension of 64 and an output dimension of [missing information]. The activation functions for both the SOFA prediction branch and the treatment prediction branch are ReLU functions. The autoregressive decoding unit receives the current decoding starting point, preprocessed static features, and future treatment sequences from the data preprocessing module during training. Its concatenation layer uses the current decoding starting point as the initial state, concatenating the previous treatment input, the previous SOFA input, and the preprocessed static features along the feature dimension. This concatenation is then processed by its decoding input linear layer to obtain the decoded representation sequence formed up to the current prediction step. When predicting the target patient's ICU electronic health record input by the user, the autoregressive decoding unit receives the previous simulated treatment action, the previous SOFA prediction state, and the binary candidate treatment conditions constructed by the stepwise treatment path simulation module, written back by the module, and obtains the decoded representation sequence under the current candidate treatment conditions in the same way. The causal self-attention submodule receives the decoded representation sequence from the autoregressive decoding unit. Its multi-head causal self-attention layer performs causal self-attention calculation on the decoded representation sequence, and the attention head gating layer adjusts the attention head output. The result is then processed sequentially by the residual connection unit and the LayerNorm unit to obtain the causal self-attention result. The cross-attention submodule receives causal self-attention results from the causal self-attention submodule and patient historical memory representations from the gated relative position temporal coding module. Its multi-head cross-attention layer uses the causal self-attention results as queries to perform cross-attention calculations on the patient historical memory representations. The attention head gating layer adjusts the attention head outputs, which are then processed sequentially by the residual connection unit and the LayerNorm unit to obtain the cross-attention results. The second-position feedforward submodule receives the cross-attention results from the cross-attention submodule and processes them sequentially through a linear layer, activation function, linear layer again, residual connection unit, and LayerNorm unit to obtain the decoded hidden state for each prediction step. The balanced representation splitting submodule receives the decoded hidden state from the second-position feedforward submodule and processes it sequentially through the result representation linear layer, activation function, and LayerNorm unit to obtain the result representation. Simultaneously, it processes the decoded hidden state sequentially through the treatment representation linear layer, activation function, and LayerNorm unit to obtain the treatment representation. The balanced autoregressive decoding module generates result representation sequences and treatment representation sequences through the balanced representation splitting submodule (the result representation sequence consists of result representations from multiple prediction steps, and the treatment representation sequence consists of treatment representations from multiple prediction steps), so that the training optimization module can learn the balanced representations of the result representation sequences and treatment representation sequences based on the balanced loss constraint.The SOFA prediction branch receives the result representation from the balanced representation splitting submodule and the target treatment conditions. Its concatenation layer concatenates the result representation with the target treatment conditions, and then processes them sequentially through a linear layer, activation function, and linear output layer to obtain the SOFA prediction sequence within the future prediction window. The target treatment conditions during training are derived from the future treatment sequence, while the target treatment conditions for predicting the user-input ICU electronic health record are derived from the binary candidate treatment conditions constructed by the stepwise treatment path simulation module. The treatment prediction branch receives the treatment representation from the balanced representation splitting submodule and processes it sequentially through a linear layer, activation function, and linear output layer to obtain the treatment prediction sequence within the future prediction window. The training output branch sends the SOFA prediction sequence, treatment prediction sequence, result representation sequence, and treatment representation sequence within the future prediction window to the training optimization module; the application output branch sends the SOFA prediction result for the next prediction step under the current binary candidate treatment conditions to the stepwise treatment path simulation module.

[0017] The training optimization module is connected to the balanced autoregressive decoding module and applies training loss backpropagation to the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module. This module receives SOFA prediction sequences, treatment prediction sequences, outcome representation sequences, and treatment representation sequences within the future prediction window from the training output branch of the balanced autoregressive decoding module. It also receives real future SOFA score record sequences and real future treatment sequences from the training samples from the data preprocessing module. Based on the errors between the SOFA prediction sequences and real future SOFA score record sequences, the errors between the treatment prediction sequences and real future treatment sequences, and the correlation between the outcome representation sequences and treatment representation sequences, it calculates outcome prediction loss, treatment prediction loss, and balance loss. These losses are combined into a joint loss and used to update the parameters of the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module.

[0018] The stepwise treatment path simulation module is connected to the balanced autoregressive decoding module. After the trained efficacy prediction system completes the preprocessing, spatiotemporal graph feature reconstruction, and temporal encoding of the target patient's ICU electronic health record input by the user, it receives the current decoding starting point and the target patient's historical memory representation. In each prediction step, it constructs two binary candidate treatment conditions. Under the two binary candidate treatment conditions, it calls the balanced autoregressive decoding module and receives the corresponding SOFA prediction value for the next step sent by the application output branch of the balanced autoregressive decoding module. It compares the SOFA prediction values ​​corresponding to the two binary candidate treatment conditions, writes the simulated treatment action selected in the current step and its corresponding SOFA prediction value back to the decoding state of the next prediction step, and obtains the simulated treatment action sequence and the predicted SOFA trajectory under the simulated path, which serves as the prediction result of the efficacy of sepsis vasoactive drugs for the target patient's ICU electronic health record input by the user.

[0019] The second step involves the data acquisition and sample construction module and the data preprocessing module working together to organize the ICU electronic health record data into a time-series sample set of patients, and then dividing it into training, validation, and test sets. The method is as follows:

[0020] Step 2.1 The data acquisition and sample construction module initializes the patient index. and initialize the patient time series sample set. Empty. The de-identified Medical Information Mart for Intensive Care IV (MIMIC-IV) dataset (see Johnson, AEW, Bulgarelli, L., Shen, L. et al. "MIMIC-IV, a freely accessible electronic health record dataset." Scientific Data, 2023, 10:1. Johnson et al.'s paper: MIMIC-IV, a freely accessible electronic health record dataset) or the de-identified eICU Collaborative Research Database (eICU) dataset (see Pollard, TJ, Johnson, AEW, Raffa, JD et al. "The eICU Collaborative Research Database, a freely available multi-center database for critical care research." Scientific Data, 2018, 5:180178. Pollard et al.'s paper: eICU Collaborative Research Database, a freely accessible multi-center database for critical care research) or a semi-synthetic dataset generated based on MIMIC-IV was used as the data source to extract the ICU electronic health records of sepsis patients. The number of sepsis patients extracted was set to [missing information]. , is a positive integer; each patient's ICU electronic health record includes raw static characteristics, time-varying covariates, time records, vasoactive drug use records, and SOFA score records. Let the historical observation window length be . , The prediction window length is , .

[0021] Step 2.2 Data Acquisition and Sample Construction Module starts from the first... Read the first patient's ICU electronic health record Original static characteristics of the patient Construct the original static feature vector. Including the The patient's age, gender, weight, and height are considered as four static feature dimensions. Denotes the length of the static feature vector, where The data acquisition and sample construction module will use the original static features As the first Each patient's individual background information field was incorporated into the patient time series sample before preprocessing to characterize the differences in baseline status among different patients.

[0022] Step 2.3 Initialize the historical observation window time step index in the data acquisition and sample construction module. .

[0023] Step 2.4 The data acquisition and sample construction module in the historical observation window The first time step constructs the first The historical timeline records of each patient. The data acquisition and sample construction module starts from the first... Read the first patient's ICU electronic health record A patient in historical time step Time-varying covariates , Including the Clinical observation variables such as vital signs and laboratory indicators of each patient changing over time; when no valid, resolvable measurement value exists within the corresponding time window, the data acquisition and sample construction module retains... The missing state. The data acquisition and sample construction module constructs the first... The patient in Time index of each historical time step , used to represent the relative temporal position of the corresponding observation in the patient time series sample before preprocessing; construct the first The patient in A binary treatment variable indicating whether vasoactive drugs were used at each historical time step. , , if the patient In the Within a historical timeframe, receiving any vasoactive drug would... Otherwise ; Construct the first The patient in The outcome variable at each historical time step , Indicates the first The patient in SOFA rating records at each historical time step, , Indicates length is The real vector space, where ,Right now This is a single-dimensional SOFA score record.

[0024] Step 2.5 If ,make Proceed to step 2.4; if Then the data acquisition and sample construction module obtains the first... Historical time-varying covariates of each patient , Historical Time Index Historical treatment sequence Historical SOFA rating record sequence And the current decoding starting point. Wherein, , The current decoding starting point is , For the first The patient in time step Treatment status, For the first The patient in time step SOFA rating records.

[0025] Step 2.6 The data acquisition and sample construction module initializes the future prediction window step index. .

[0026] Step 2.7 The data acquisition and sample construction module constructs the first sample within the future prediction window. The future labeling record for each patient. For the first patient within the future prediction window... There are 1 prediction step, corresponding to 1 time step. The data acquisition and sample construction module starts from the first... The vasoactive drug use record at that time step was read from the patient's ICU electronic health record, and future treatment variables were constructed. , if the patient Administer any vasoactive drug within the corresponding time window, Otherwise The data acquisition and sample construction module reads the SOFA rating record at this time step and constructs future SOFA rating records. The SOFA score is obtained by summing sub-scores from multiple organ systems and is used to characterize the change in the degree of organ dysfunction in a patient over time.

[0027] Step 2.8 If ,make Proceed to step 2.7; if Then the data acquisition and sample construction module obtains the first... Future treatment sequence for each patient And future SOFA rating record sequence .in, , This forms the first preprocessing step. Time series samples of patients , Including patient index Original static features Historical time-varying covariates Historical Time Index Historical treatment sequence Historical SOFA rating record sequence Current decoding starting point, future treatment sequence And future SOFA rating record sequence .

[0028] Step 2.9 The data acquisition and sample construction module will... Send to the data preprocessing module.

[0029] Step 2.10 The data preprocessing module uses data preprocessing methods to... Preprocessing is performed to obtain the first... Time series samples of patients ;right middle The continuous variables (age, weight, and height) were standardized, and the categorical variables were coded to obtain the preprocessed static features. ; time-varying covariates within the historical observation window Abnormal records were cleaned and standardized from vital signs and laboratory indicators to obtain preprocessed time-varying covariates. , ,in The length of the time-varying covariate vector represents the number of fields in the time-varying covariates, such as vital signs and laboratory indicators. , Indicates length is The real vector space. The data preprocessing module uses the ICU electronic health records from the [number]th [year] [item]. Constructing and determining whether there are valid, resolvable measurements within each time step's corresponding time window. Corresponding observation mask ;like If the dimension has been observed, then If the value is 1, If the dimension is missing or cannot be parsed, then The value is 0. The data preprocessing module combines the preprocessed time-varying covariates, observation masks, and time indices into historical time-series observation inputs. , For missing time-varying covariates, the data preprocessing module does not directly replace the original observations as simple zero-value or mean-filled results, but rather... The data preprocessing module retains preprocessed observations, observation masks, and time indices in each patient time series sample, enabling the patient time series samples to fully represent irregular sampling and missing information features. , , , , , , , The first part after preprocessing Time series samples of patients , It is an octet, as shown in formula (1):

[0030] , formula (1);

[0031] The data preprocessing module will Add to patient time series sample set .

[0032] Step 2.11 If ,make Proceed to step 2.2; if Then we obtain the patient time series sample set. , Proceed to step 2.12.

[0033] Step 2.12 Data preprocessing module according to The proportion will Divided into training set Validation set and test set That is, the time series sample set of patients middle The samples were included in the training set. The samples were included in the validation set. The samples were assigned to the test set, and the total number of samples in the training set was recorded. Total number of validation set samples and the total number of test set samples ,in .

[0034] The third step is to use the training set. The sepsis vasoactive drug efficacy prediction system was trained to obtain a set of candidate parameter combinations: a spatiotemporal graph feature reconstruction module, a gated relative position temporal encoding module, and a balanced autoregressive decoding module cooperated to determine the optimal parameters based on the given information. The system predicts SOFA prediction sequences, treatment prediction sequences, outcome representation sequences, and treatment representation sequences for each patient's time series sample. The training and optimization module calculates outcome prediction loss, treatment prediction loss, and balance loss based on these prediction and representation sequences, along with the future SOFA score record sequences and future treatment sequences in the corresponding patient time series samples. These are combined into a joint loss, and the trainable parameters of the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module are updated based on this joint loss to obtain a candidate parameter combination set. The method is:

[0035] Step 3.1 The spatiotemporal graph feature reconstruction module receives the training set from the data preprocessing module. Set the training parameters. Training parameters include batch size. Maximum number of training rounds Continuous stable rounds Training stopping threshold Treatment prediction loss weight and balancing loss weights ,in , , 20, , , The training optimization module uses the Adam optimizer to optimize the trainable parameters of the three core neural network modules. The training optimization module initializes the training epoch index. Initialize the candidate parameter combination index Initialize the set of candidate parameter combinations The value is empty, and the average joint loss record is initialized to be empty.

[0036] Step 3.2 The spatiotemporal graph feature reconstruction module is in the first step. The training set will be used in each training round. Divided into Each training batch initializes the batch index. and initialize the local sample index. and training batch forward prediction result set Empty. (Number) The training round # Each training batch is denoted as .in, For the first In the training rounds, the first The number of samples in each training batch, and ; This represents the local sample index within the current training batch.

[0037] Step 3.3 Reading the spatiotemporal graph feature reconstruction module Local sample index Corresponding patient time series samples The spatiotemporal graph feature reconstruction module starts from... Read historical time series observation input The spatiotemporal graph feature reconstruction method is used to... Spatiotemporal graph construction, bidirectional message passing, and covariate reconstruction are performed using time-varying covariates, observation masks, and time indices to obtain... Reconstructed covariate sequence The method is:

[0038] Step 3.3.1 Reading the graph construction submodule Historical time series observation input ,from The time-varying covariate channels are determined by the preprocessed time-varying covariate fields, and time-varying covariate channel nodes are constructed based on these channels; according to Determine the historical time step, based on Construct initial time event node representations; construct initial edge representations based on the observations and observation masks corresponding to the same time-varying covariate channel and the same historical time step, thus obtaining initial time-varying covariate channel node representations, initial time event node representations, and initial edge representations, forming a spatiotemporal graph. The method is as follows:

[0039] Step 3.3.1.1 Reading the graph construction submodule Historical time series observation input Using graph construction methods from The time-varying covariate channels are determined by the preprocessed time-varying covariate fields. Time-varying covariate channel nodes are then constructed based on these channels. The method is as follows:

[0040] Step 3.3.1.1.1 Graph Construction Submodule: Let the number of graph message passing layers be... ,in Let the time-varying covariate channel index be... =1.

[0041] Step 3.3.1.1.2 Graph Construction Submodule from The t-th historical time step The common first The time-varying covariate field determines the first The time-varying covariate channel, and the first The time-varying covariate channel nodes are constructed based on the time-varying covariate channel nodes of the graph construction submodule, and the linear layer of the time-varying covariate channel nodes is based on the corresponding nodes in the learnable channel correlation matrix. The parameters of each time-varying covariate channel are linearly encoded to generate an initial time-varying covariate channel node representation. , .

[0042] in, This indicates that the learnable channel correlation matrix corresponds to the first... Parameters of each time-varying covariate channel This represents the linear layer of the time-varying covariate channel node.

[0043] Step 3.3.1.1.3 If ,make Proceed to step 3.3.1.1.2; if Then the graph construction submodule is obtained A set of time-varying covariate channel nodes and their initial time-varying covariate channel node representations. , Proceed to step 3.3.1.2. (The superscript is not included.) This represents a time-varying covariate channel.

[0044] Step 3.3.1.2 Graph Construction Submodule Based on The method for constructing the initial time event node representation is as follows:

[0045] Step 3.3.1.2.1 Initialize the historical time step index in the graph construction submodule. .

[0046] Step 3.3.1.2.2 The graph construction submodule starts from... Take the first one from the middle Group The historical observation location corresponding to this set of data is determined as the [number]. A historical time step, and on the first Constructing time event nodes for each historical time step: The linear layer of the graph construction submodule's time event node is based on the time index of that historical time step. Perform linear encoding to generate an initial time event node representation. ,in, This represents a linear layer of time-event nodes.

[0047] Step 3.3.1.2.3 If ,make Proceed to step 3.3.1.2.2; if Then the graph construction submodule is obtained A set of time event nodes and their initial time event node representation. , Among them, superscript Indicates a time event.

[0048] Step 3.3.1.3 The graph construction submodule constructs the initial edge representation based on the observations and observation masks corresponding to the same time-varying covariate channel and the same historical time step. The method is as follows:

[0049] Step 3.3.1.3.1 Initialize the time-varying covariate channel index in the graph construction submodule. And initialize the historical time step index. .

[0050] Step 3.3.1.3.2 Graph Construction Submodule from Take the first one from the middle A historical time step and ,Will The The component is used as the first Observations corresponding to each time-varying covariate field ,Will The Each component serves as the corresponding observation mask. The observed value and the observation mask represent the first... The time-varying covariate channel node and the first The observation relationships between time event nodes. The edges of the graph construction submodule represent linear layer pairs. and The concatenated results are linearly encoded to generate an initial edge representation. ,in, An edge represents a linear layer.

[0051] Step 3.3.1.3.3 If ,make Proceed to step 3.3.1.3.2; if Proceed to step 3.3.1.3.4;

[0052] Step 3.3.1.3.4 If ,make and order Proceed to step 3.3.1.3.2; if The graph construction submodule then obtains the initial edge representation set. , Proceed to step 3.3.1.4.

[0053] Step 3.3.1.4 The graph construction submodule represents the initial time-varying covariate channel node representation set. Initial time event node representation set and the initial edge representation set Form a spacetime graph, where each initial edge represents Connect the corresponding first Each time-varying covariate channel node represents With the Each time event node represents The spatiotemporal graph is then sent to the bidirectional message passing submodule.

[0054] Step 3.3.2 The bidirectional message passing submodule receives the spatiotemporal graph from the graph construction submodule and uses the bidirectional message passing method to update the initial time-varying covariate channel node representation, initial time event node representation, and initial edge representation in the spatiotemporal graph layer by layer, obtaining the first... Layer time-varying covariate channel node representation set , No. Layered time event node representation set and the Layer edge represents a set The method is:

[0055] Step 3.3.2.1 Initialize the bidirectional message passing submodule graph and set the message passing layer index. .

[0056] Step 3.3.2.2 The bidirectional message passing submodule is in the... Layer initialization time-varying covariate channel index .

[0057] Step 3.3.2.3 The splicing layer of the bidirectional message passing submodule is based on the first... Layer Each time-varying covariate channel node represents As a query representation, it will be related to the first The time event nodes adjacent to each time-varying covariate channel node represent and corresponding edge representation By concatenating the features, the first information to be aggregated is obtained; the multi-head attention layer of the bidirectional message passing submodule... Under the constraints, multi-head attention aggregation is performed on the query representation and the first information to be aggregated to obtain the first... Layer Each time-varying covariate channel node represents :

[0058] , formula (2);

[0059] in, This refers to message aggregation operations based on a multi-head attention layer (see Vaswani A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, AN, Kaiser, Ł., and Polosukhin, I. “Attention Is All You Need.” Advances in Neural Information Processing Systems, 2017, 30. Vaswani A et al.'s paper: Attention Is All You Need: Attention Mechanisms Are All You Need). Indicates the relationship with the first A set of time event nodes adjacent to a time-varying covariate channel node. This represents the visibility mask of the time-varying covariate channel, determined by the relationship between adjacent time event nodes in the spatiotemporal graph. This represents vector concatenation. Indicates the first Layer The time-varying covariate channel node and the first Edge representation between time event nodes.

[0060] Step 3.3.2.4 If ,make Proceed to step 3.3.2.3; if Then the bidirectional message passing submodule completes the first... All time-varying covariate channel nodes of the layer are updated to obtain the first... Layer time-varying covariate channel node representation set , Proceed to step 3.3.2.5.

[0061] Step 3.3.2.5 The bidirectional message passing submodule is in the... Layer initialization historical time step index .

[0062] Step 3.3.2.6 The splicing layer of the bidirectional message passing submodule is based on the first... Layer Each time event node represents As a query representation, it will be related to the first The time-varying covariate channel nodes adjacent to each time event node represent and corresponding edge representation By concatenating the features, the second information to be aggregated is obtained; the multi-head attention layer of the bidirectional message passing submodule... Under the constraints, multi-head attention aggregation is performed on the query representation and the second information to be aggregated to obtain the first... Layer Each time event node represents :

[0063] , formula (3);

[0064] in, Indicates the relationship with the first A set of time-varying covariate channel nodes adjacent to each time event node. This represents the visibility mask of time events determined by the relationship between adjacent time-varying covariate channel nodes in the spatiotemporal graph.

[0065] Step 3.3.2.7 If ,make Proceed to step 3.3.2.6; if Then the bidirectional message passing submodule completes the first... All time event nodes in the layer are updated to obtain the first... Layered time event node representation set , .

[0066] Step 3.3.2.8 The bidirectional message passing submodule is in the... Layer initialization time-varying covariate channel index and initialize the historical time step index. .

[0067] Step 3.3.2.9 The bidirectional message passing submodule receives the first... Layer The time-varying covariate channel node and the first The edges between time event nodes represent , No. Layer Each time-varying covariate channel node represents and the Layer Each time event node represents The edge update linear layer of the bidirectional message passing submodule , and The concatenated result is linearly encoded, and the activation function performs nonlinear processing on the linearly encoded result. The residual connection unit is then processed based on the nonlinear processing result and the first... Layer edge representation generates the first Layer edge representation :

[0068] , formula (4);

[0069] in, This represents the edge update operation, which consists of an edge-updated linear layer, an activation function, and residual connection units.

[0070] Step 3.3.2.10 If ,make Proceed to step 3.3.2.9; if Proceed to step 3.3.2.11;

[0071] Step 3.3.2.11 If ,make and order Proceed to step 3.3.2.9; if Then the bidirectional message passing submodule completes the first... Update all edge representations of the layer to obtain the first layer. Layer edge represents a set , Proceed to step 3.3.2.12.

[0072] Step 3.3.2.12 If ,make Proceed to step 3.3.2.2; if , obtained the Layer time-varying covariate channel node representation set , No. Layered time event node representation set and the Layer edge represents a set The three are then sent to the covariate reconstruction submodule. , , For the Lth layer Each time-varying covariate channel node represents a time-varying covariate. For the first Layer Each time event node represents a time event node. For the first Layer The time-varying covariate channel node and the first Edge representation between time event nodes.

[0073] Step 3.3.3 The covariate reconstruction submodule receives data from the bidirectional message passing submodule. , and The covariate reconstruction method is used to generate reconstructed values ​​for each historical time step and each time-varying covariate channel, resulting in... Reconstructed covariate sequence The method is:

[0074] Step 3.3.3.1 Initialize the historical time step index in the covariate reconstruction submodule. and initialize the time-varying covariate channel index. .

[0075] Step 3.3.3.2 The splicing layer of the covariate reconstruction submodule will... Layer Each time-varying covariate channel node represents , No. Layer Each time event node represents and the Layer The time-varying covariate channel node and the first The edges between time event nodes represent The input vector is concatenated to obtain the reconstructed input vector; the linear output layer processes the reconstructed input vector into a linear output to obtain the first... The first historical time step, the Reconstructed values ​​of each time-varying covariate channel , ,in, This represents the linear output layer of the covariate reconstruction submodule.

[0076] Step 3.3.3.3 If ,make Proceed to step 3.3.3.2; if Then the covariate reconstruction submodule will be the first A historical time step The reconstructed values ​​are combined according to the time-varying covariate channel dimension to obtain the first... Reconstruction covariates at each historical time step , .

[0077] Step 3.3.3.4 If ,make and order Proceed to step 3.3.3.2; if The covariate reconstruction submodule then combines the reconstructed covariates of all historical time steps according to the time step to obtain... Reconstructed covariate sequence ,, .

[0078] Step 3.3.3.5 The covariate reconstruction submodule will reconstruct the covariate sequence. Send to the gating relative position timing encoding module.

[0079] Step 3.4 The gated relative position timing coding module receives data from the covariate reconstruction submodule of the spatiotemporal graph feature reconstruction module. Reconstructed covariate sequence ,from Read historical treatment sequences Historical SOFA rating record sequence and static features The gated relative position timing coding method is used to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates The method is:

[0080] Step 3.4.1 The dynamic input construction submodule receives data from the gating relative position timing coding module. ,from Read and The coded input sequence is obtained by using a dynamic input construction method. The method is as follows:

[0081] Step 3.4.1.1 Initialize the historical time step index in the dynamic input construction submodule. and initialize the encoded input sequence. Empty.

[0082] Step 3.4.1.2 Dynamic Input Construction Submodule from Read the first Reconstruction covariates at each historical time step ,from Read the first Historical treatment variables aligned to a historical time step ,from Read the first Historical SOFA rating records aligned to each historical time step The splicing layer of the dynamic input construction submodule will , and By splicing, we obtain the first... Dynamic input of each historical time step , .

[0083] in, Indicates the relationship with the first Historical treatment variables aligned to a historical time step Indicates the relationship with the first Historical SOFA rating records aligned to each historical time step.

[0084] Step 3.4.1.3 Dynamic Input Construction Submodule Input Linear Layer Pair Perform linear encoding to obtain the first... Encoded input representation of each historical time step , .in, This indicates the input linear layer. The dynamic input construction submodule will... Write the encoded input sequence .

[0085] Step 3.4.1.4 If ,make Proceed to step 3.4.1.2; if Then the dynamic input construction submodule obtains Encoded input sequence , Proceed to step 3.4.2.

[0086] Step 3.4.2 The relative position attention submodule receives input from the dynamic input construction submodule. The relative position attention calculation method is used to... The relative positional relationships between the encoded input representations at each historical time step are modeled to obtain the relative positional attention output sequence. The method is as follows:

[0087] Step 3.4.2.1 The query linear layer, key linear layer, and value linear layer of the relative position attention submodule encode the input sequence in parallel. Linear encoding is performed to obtain the query representation, key representation, and value representation, respectively.

[0088] Step 3.4.2.2: The learnable relative position bias unit of the relative position attention submodule generates a learnable relative position bias based on the relative position index between any two historical time steps; the multi-head attention layer calculates the attention head output based on the query representation, key representation, value representation, and learnable relative position bias; the output linear layer performs linear encoding on the attention head output to obtain... Relative position attention output sequence , .in, This refers to the computation of relative position attention, which includes a query linear layer, a key linear layer, a value linear layer, a multi-head attention layer, a learnable relative position bias unit, and an output linear layer (see Shaw, P., Uszkoreit, J., and Vaswani, A. “Self-Attention with Relative Position Representations.” Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2018. Shaw P et al.'s paper: Self-Attention with Relative Position Representations).

[0089] Step 3.4.3 The input dependency gating submodule receives the encoded input sequence from the dynamic input construction submodule. Receive the relative position attention output sequence from the relative position attention submodule. The input dependency gating method is adopted according to Generate a gated vector sequence and then... Gating is performed to obtain the gated attention output sequence. The method is:

[0090] Step 3.4.3.1 Encode the input sequence using the gated linear layer of the input-dependent gated submodule. Linear encoding is performed to obtain a gated vector; a sigmoid gating layer performs gating processing on the gated vector to obtain... Gated vector sequence , .in, Indicates a gated linear layer. This indicates a sigmoid gate layer.

[0091] Step 3.4.3.2 The element-wise multiplication unit of the input-dependent gating submodule will... and Element-by-element multiplication yields Gated attention output sequence , .in, This indicates element-wise multiplication.

[0092] Step 3.4.4 Static Feature Conditioning Submodule from Reading static features The static feature linear layer within it Perform linear encoding to obtain Static feature condition representation , .in, This represents a static feature linear layer. The static feature conditionalization submodule represents the static feature conditional layer. Send to the first position feedforward submodule.

[0093] Step 3.4.5 The first position feedforward submodule receives the gated attention output sequence from the input dependency gating submodule. Receive static feature condition representation from the static feature conditionation submodule The first position feedforward processing method is used to process... and Perform position feedforward processing to obtain Patient historical memory indicates The method is:

[0094] Step 3.4.5.1 Initialize the historical time step index of the first position feedforward submodule and initialize Patient historical memory indicates Empty.

[0095] Step 3.4.5.2 The first position feedforward submodule reads the first... Attention output after gating at each historical time step The splicing layer of the first position feedforward submodule will Representation of static feature conditions By splicing, we obtain the first... Conditional splicing representation of a historical time step , .

[0096] Step 3.4.5.3 The first linear layer, activation function, and second linear layer of the first position feedforward submodule are sequentially conditionally concatenated. The residual connection unit performs processing based on the results of the second linear layer and the gated attention output. The residual update representation is generated, and the LayerNorm cell normalizes the residual update representation to obtain the th... Encoding vectors for each historical time step , .in, and This represents two linear layers in the first position feedforward submodule. This represents the activation function. This represents a LayerNorm cell. The first position feedforward submodule will... Writing into the patient's historical memory indicates .

[0097] Step 3.4.5.4 If ,make Proceed to step 3.4.5.2; if Then the first position feedforward submodule obtains Patient historical memory indicates , .

[0098] Step 3.4.5.5 The first position feedforward submodule will Send to the balanced autoregressive decoding module.

[0099] Step 3.5 The balanced autoregressive decoding module receives data from the first position feedforward submodule of the gated relative position timing coding module. ,from Read the current decoding start point and static features and future treatment sequences as target treatment conditions The balanced autoregressive decoding prediction method is used to perform autoregressive decoding, causal self-attention calculation, cross-attention calculation, second-position feedforward submodule processing, balanced representation decomposition, SOFA prediction, and treatment prediction on the future prediction window, resulting in... The SOFA prediction sequence, treatment prediction sequence, outcome characterization sequence, and treatment characterization sequence are four sequences, and the method is as follows:

[0100] Step 3.5.1 Initialize the future prediction step index of the autoregressive decoding unit and initialize the SOFA prediction sequence. Treatment prediction sequence Result characterization sequence Treatment characterization sequence and decoding representation sequence Empty.

[0101] Step 3.5.2 Autoregressive decoding unit determines the first The current target treatment condition and the previous input for each prediction step. The current target treatment condition for each prediction step From Future treatment sequences The corresponding future treatment variables ,Right now ;like The previous treatment input Equal to the current decoding starting point Previous SOFA input Equal to the current decoding starting point ;like The previous treatment input Equals the current target treatment condition corresponding to the previous prediction step, and the previous SOFA input. It equals the SOFA prediction value from the previous prediction step. Indicates the first The previous treatment input used in each prediction step Indicates the first The previous SOFA input used in the prediction step. The first prediction step will use... The current target treatment condition for each prediction step is sent to the SOFA prediction branch.

[0102] Step 3.5.3 The balanced autoregressive decoding module uses a single-step decoding method to... , Current prediction step Previous treatment input Previous SOFA input and current target treatment conditions Perform basic single-step decoding operations to obtain the first... Prediction Steps SOFA predictions Treatment predictive value Result characterization and treatment symptoms The method is:

[0103] Step 3.5.3.1 The splicing layer of the autoregressive decoding unit will , and By splicing, we obtain the first... Decoding input for each prediction step , Decoding input linear layer pairs Perform linear encoding to obtain the first... Decoding representation of each prediction step , and will Write the decoded representation sequence .in, This indicates the decoding input linear layer. (The text abruptly ends here.) Send to the causal self-attention submodule.

[0104] Step 3.5.3.2 The causal self-attention submodule receives data from the autoregressive decoding unit. up to the 1st The decoded representation sequence formed in each prediction step Using a causal self-attention computation method to... Perform causal self-attention calculation to obtain the first... One prediction step Causal self-attention results The method is:

[0105] Step 3.5.3.2.1 Multi-head causal self-attention layer of the causal self-attention submodule Perform multi-head causal self-attention computation to obtain the causal self-attention head output.

[0106] Step 3.5.3.2.2 The attention head gating layer of the causal self-attention submodule performs gating processing on the causal self-attention head output to obtain the gated causal self-attention output.

[0107] Step 3.5.3.2.3 The residual connection unit of the causal self-attention submodule is based on the gated causal self-attention output and the first... Decoding representation of each prediction step Generate a causal self-attention residual update representation; the LayerNorm unit normalizes the causal self-attention residual update representation to obtain the ... Prediction Steps Causal self-attention results , .in, This represents causal self-attention computation that includes a multi-head causal self-attention layer, an attention head gating layer, residual connection units, and LayerNorm units. Decoding represents the sequence up to the 1st The prefix sequence of each prediction step. Send to the cross-attention submodule.

[0108] Step 3.5.3.3 The cross-attention submodule receives data from the causal self-attention submodule. The patient's historical memory representation is received from the first position feedforward submodule of the gated relative position timing coding module. The cross-attention calculation method is used to... and Perform cross-attention calculation to obtain the first... Cross-attention results for each prediction step The method is:

[0109] Step 3.5.3.3.1 The multi-head cross-attention layer of the cross-attention submodule... For query representation, using Multi-head cross-attention calculation is performed on the key-value memory representation to obtain the cross-attention head output.

[0110] Step 3.5.3.3.2 The attention head gating layer of the cross attention submodule performs gating processing on the cross attention head output to obtain the gated cross attention output.

[0111] Step 3.5.3.3.3 The residual connection unit of the cross-attention submodule is based on the gated cross-attention output and the causal self-attention result. Generate the cross-attention residual update representation; the LayerNorm unit normalizes the cross-attention residual update representation to obtain the th... Prediction Steps Cross-attention results , .in, This represents the cross-attention computation, which includes a multi-head cross-attention layer, an attention-head gating layer, residual connection units, and LayerNorm units. Send to the second position feedforward submodule.

[0112] Step 3.5.3.4 The second position feedforward submodule receives the first... Cross-attention results for each prediction step The second position feedforward processing method is used to process... Perform position feedforward processing to obtain the first... Decoding hidden state in each prediction step The method is:

[0113] Step 3.5.3.4.1 The first linear layer, activation function, and second linear layer of the second position feedforward submodule are sequentially applied to... The data is processed to obtain the decoded and updated representation.

[0114] Step 3.5.3.4.2 The residual connection unit of the second position feedforward submodule updates the representation and cross-attention results based on the decoding. Generate the decoded residual update representation; the LayerNorm unit normalizes the decoded residual update representation to obtain the first... Prediction Steps Decoding hidden state , .in, and This represents the two linear layers in the second position feedforward submodule of the balanced autoregressive decoding module. Send to the Balanced Representation Splitting Submodule.

[0115] Step 3.5.3.5 The balance representation splitting submodule receives data from the second position feedforward submodule. The balanced characterization decomposition method is used to decompose the characters. Decomposed into outcome representation and treatment representation, resulting in the first The result of each prediction step is characterized and treatment symptoms The method is:

[0116] Step 3.5.3.5.1 Balance the representation of the sub-modules. Represent the linear layer, ELU activation function, and LayerNorm unit in sequence. Processing is performed to obtain the first... The result of each prediction step is characterized :

[0117] , formula (5);

[0118] Step 3.5.3.5.2 The treatment representation linear layer, ELU activation function, and LayerNorm unit of the balanced representation split submodule are sequentially applied... Processing is performed to obtain the first... Treatment characteristics of each predicted step :

[0119] , formula (6);

[0120] in, The result represents a linear layer. Indicates the linear layer representing the treatment. This represents the ELU activation function. This represents the LayerNorm unit.

[0121] Step 3.5.3.5.3 The balanced representation splitting submodule will Send to the SOFA prediction branch and training output branch, Send to the treatment prediction branch and the training output branch.

[0122] Step 3.5.3.6 The SOFA prediction branch receives the first... The result representation of each prediction step Receive the first from the autoregressive decoding unit The current target treatment condition for each prediction step The SOFA prediction method was used to predict future SOFA score records under target treatment conditions, and the results were obtained. SOFA prediction values ​​for each prediction step The method is:

[0123] Step 3.5.3.6.1 The splicing layer of the SOFA prediction branch will and The data is then concatenated to obtain the SOFA prediction input.

[0124] Step 3.5.3.6.2 The linear layer, ReLU activation function, and linear output layer of the SOFA prediction branch sequentially perform prediction processing on the SOFA prediction input to obtain the first... Prediction Steps SOFA predictions , ,Will Send it to the training output branch. Among them, This represents the prediction operation consisting of a splicing layer, a linear layer, a ReLU activation function, and a linear output layer in the SOFA prediction branch.

[0125] Step 3.5.3.7 The treatment prediction branch receives the first submodule from the balanced representation splitting module. Treatment characteristics of each predicted step Treatment prediction methods were used to predict future treatment variables, resulting in the first... Treatment predictive value per predictive step The method involves sequentially applying the linear layer, ReLU activation function, and linear output layer of the treatment prediction branch. Perform prediction processing to obtain the first Treatment predictive value per predictive step , ,Will Send it to the training output branch. Among them, This represents the prediction operation consisting of a linear layer, a ReLU activation function, and a linear output layer in the treatment prediction branch.

[0126] Step 3.5.3.8 Training the output branch Write the SOFA prediction sequence ,Will Write into the treatment prediction sequence ,Will Write the result representation sequence ,Will Write the therapeutic characterization sequence .

[0127] Step 3.5.4 If ,make Proceed to step 3.5.2; if This indicates that the training output branch has been obtained. SOFA forecast sequence within the future forecast window , Treatment prediction sequence , , Result characterization sequence , and Therapeutic characterization sequence , Proceed to step 3.5.5.

[0128] Step 3.5.5 Training the output branch , , , Send it to the training optimization module.

[0129] Step 3.6 The training optimization module will receive data from the training output branch. , , , Write to the training batch forward prediction result set .like ,make Proceed to step 3.3 and continue training; if This indicates that the training optimization module has achieved... The set of training batch forward prediction results for all patients , .

[0130] Step 3.7 The training optimization module is based on The outcome prediction loss, treatment prediction loss, and balance loss are calculated by combining the future SOFA score record sequence and future treatment sequence in the corresponding patient time series sample, and then combined into a joint loss. The method is as follows:

[0131] Step 3.7.1 Training optimization module from Reading local sample index Corresponding real future SOFA rating record sequence and real future treatment sequence , and Align with patient and prediction step, calculate Predicting the outcome loss :

[0132] , formula (7);

[0133] in, Indicates the first In the training rounds, the first Local sample index within each training batch The corresponding patient time series sample is in the first SOFA predictions for each prediction step. This represents the corresponding actual SOFA rating record.

[0134] Step 3.7.2 Training optimization module calculation Treatment prediction loss :

[0135] , formula (8);

[0136] in, Indicates the first In the training rounds, the first Local sample index within each training batch The corresponding patient time series sample is in the first Treatment prediction value for each prediction step, This represents the corresponding actual treatment variable.

[0137] Step 3.7.3 The training optimization module calculates based on the result representation sequence and the treatment representation sequence. Balance loss :

[0138] , formula (9);

[0139] in, This represents the vector inner product. The balanced loss is used to constrain the correlation between the outcome representation and the treatment representation at the same prediction step, achieving balanced representation learning for the outcome representation sequence and the treatment representation sequence.

[0140] Step 3.7.4 The training optimization module calculates the training batch. joint losses :

[0141] , formula (10);

[0142] Step 3.8 The training optimization module is based on the joint loss. Backpropagation is performed to backpropagate the loss gradient to the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module, and to update the trainable parameters of the three core neural network modules.

[0143] Step 3.9 If ,make and initialize the local sample index. The training batch forward prediction results set Set to empty, proceed to step 3.3; if Then the first After the training rounds are completed, proceed to step 3.10;

[0144] Step 3.10 The training optimization module, based on the first... Calculation of the joint loss of all training batches within the training epoch. Average joint loss over training rounds , The training optimization module saves the first... The current system parameters after each training round form candidate parameter combinations. and combine candidate parameters Add to the candidate parameter combination set The candidate parameter combination includes at least trainable parameters from the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module. Each candidate parameter combination corresponds to a parameter state of the efficacy prediction system that can execute the forward processing described in steps 3.3 to 3.5.

[0145] Step 3.11 If Then the training optimization module calculates the nearest Average joint loss change over adjacent training rounds ,in .like ,or and right If all conditions are met, the training and optimization module stops training and obtains a set of candidate parameter combinations. ;in, Given the number of candidate parameter combinations, proceed to step four. If... ,make ,make Proceed to step 3.2.

[0146] Fourth, the training and optimization module uses the validation set. For the set of candidate parameter combinations The evaluation process involves determining the target parameter combination based on the SOFA prediction error on the validation set to obtain a trained efficacy prediction system. The method is as follows:

[0147] Step 4.1 Initialize the candidate parameter combination index And initialize the candidate parameter combination evaluation result set. Empty.

[0148] Step 4.2 [The following appears to be a separate, unrelated sentence:] ...the first... Candidate parameter combinations Loading the data into the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module, we obtain the first... A therapeutic efficacy prediction system corresponding to a combination of candidate parameters.

[0149] Step 4.3 Let the verification set ,in This is the index of the sample location within the validation set. Indicates the first One validation sample is used in the second step of the patient time series sample set. The original patient index in the database.

[0150] Step 4.4 Initialize the internal sample location index of the validation set in the training and optimization module. and initialize the first The set of forward prediction results for the validation set under each candidate parameter combination Empty.

[0151] Step 4.5 The spatiotemporal graph feature reconstruction module reads the verification set. The Middle Time series samples of patients Historical time series observation input The spatiotemporal graph feature reconstruction method described in step 3.3 is used to... Spatiotemporal graph construction, bidirectional message passing, and covariate reconstruction are performed using time-varying covariates, observation masks, and time indices to obtain... Reconstructed covariate sequence ;

[0152] 4.6 The gated relative position timing coding module receives data from the covariate reconstruction submodule of the spatiotemporal graph feature reconstruction module. Reconstructed covariate sequence ,from Read historical treatment sequences Historical SOFA rating record sequence and static features The gating relative position timing coding method described in step 3.4 is used to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates ;

[0153] Step 4.7 The balanced autoregressive decoding module receives data from the first position feedforward submodule of the gated relative position timing coding module. ,from Read the current decoding start point and static features and future treatment sequences as target treatment conditions The balanced autoregressive decoding prediction method described in step 3.5 is used to perform autoregressive decoding, causal self-attention calculation, cross-attention calculation, second position feedforward submodule processing, balanced representation decomposition, SOFA prediction, and treatment prediction on the future prediction window, resulting in... SOFA prediction sequence Treatment prediction sequence Result characterization sequence and therapeutic characterization sequence .

[0154] Step 4.8 Training the output branch , , , Send it to the training optimization module.

[0155] Step 4.9 The training optimization module will receive data from the training output branch. , , , Write the forward prediction result set to the validation set .

[0156] Step 4.10 If ,make Proceed to step 4.5; if Then the training optimization module obtains the first... The set of forward prediction results for the validation set under each candidate parameter combination . It consists of SOFA prediction sequences, treatment prediction sequences, outcome characterization sequences, and treatment characterization sequences for each patient's time series sample in the validation set; in subsequent step 4.11, only the SOFA prediction sequences are read from this set to calculate the validation error.

[0157] Step 4.11 Training the optimization module from the validation set Read the future SOFA score record sequence corresponding to each patient's time series sample, and based on the first... The future SOFA prediction sequence and corresponding future SOFA score record sequence of each patient time series sample in the validation set under the candidate parameter combination are calculated. Validation error of candidate parameter combinations :

[0158] , formula (11);

[0159] in, Indicates the first Under the nth candidate parameter combination, the th The verification sample is at the ... SOFA predictions for each prediction step. This represents the future SOFA score record corresponding to the validation sample. The training optimization module will... Record to the candidate parameter combination evaluation result set .

[0160] Step 4.12 If ,make Proceed to step 4.2; if Then all candidate parameter combinations have been evaluated, and the training and optimization module compares the evaluation results of the candidate parameter combinations. The candidate parameter combination with the smallest verification error recorded in the data is determined as the target parameter combination. .

[0161] Step 4.13 The training and optimization module combines the target parameters. The system was loaded into the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module to obtain the sepsis vasoactive drug efficacy prediction system with the best prediction performance after training.

[0162] The fifth step involves using the trained, high-performance sepsis vasoactive drug efficacy prediction system to predict the target patient's ICU electronic health record input by the user, generating a simulated treatment action sequence and a predicted SOFA trajectory along the simulated path. The method is as follows:

[0163] Step 5.1 The data acquisition and sample construction module receives the target patient's historical ICU electronic health record input by the user. This is to distinguish it from the original patient index in step two. Record the target patients as The target patient's ICU electronic health record includes the target patient's static characteristics, historical time-series observation input, historical treatment sequence, and historical SOFA score record sequence.

[0164] Step 5.2 The data preprocessing module uses the data preprocessing method described in step 2.10 to preprocess the target patient's ICU electronic health record to obtain a time-series sample of the target patient. The target patient time series sample Including static features Historical time series observation input Historical treatment sequence Historical SOFA rating record sequence and the current decoding starting point This excludes future real-world treatment sequences and future real-world SOFA score recording sequences.

[0165] Step 5.3 The spatiotemporal graph feature reconstruction module reads the time series samples of the target patient. Historical time series observation input , The spatiotemporal graph feature reconstruction method described in step 3.3 is used to... Spatiotemporal graph construction, bidirectional message passing, and covariate reconstruction are performed using time-varying covariates, observation masks, and time indices to obtain... Reconstructed covariate sequence .

[0166] Step 5.4 The gated relative position timing coding module receives data from the covariate reconstruction submodule of the spatiotemporal graph feature reconstruction module. Reconstructed covariate sequence ,from Read historical treatment sequences Historical SOFA rating record sequence and static features The gating relative position timing coding method described in step 3.4 is used to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates ;

[0167] Step 5.5 Initialize the predicted step index for the stepwise treatment path simulation module. Initialize the simulated treatment action sequence Predicted SOFA trajectory under simulated path Empty, using time series samples of the target patient Current treatment status And current SOFA rating records As the starting point for simulating a stepwise treatment pathway, that is... , .

[0168] Step 5.6 The stepwise treatment pathway simulation module will be used in the future... Each prediction step is constructed separately. and Two binary candidate treatment conditions Corresponding to the absence of vasoactive drugs, The appropriate vasoactive drug should be used. This is for the current binary candidate treatment criteria. The step-by-step treatment pathway simulation module will As the current target treatment condition in the single-step decoding method described in step 3.5.3, the following will be used: As the previous treatment input in the single-step decoding method described in step 3.5.3, the As the previous SOFA input in the single-step decoding method described in step 3.5.3, the current binary candidate treatment condition, the previous treatment input, the previous SOFA input, and the static features are used. and the target patient's historical memory representation Send it to the balanced autoregressive decoding module.

[0169] Step 5.7 The balanced autoregressive decoding module uses the single-step decoding method described in step 3.5.3 to represent the target patient's historical memory. Static characteristics Current prediction step Previous treatment input Previous SOFA input and current binary candidate treatment conditions Basic single-step decoding is performed to obtain the SOFA prediction value, treatment prediction value, outcome representation, and treatment representation under the current binary candidate treatment conditions; the SOFA prediction value is then used as the SOFA prediction value for the next step. :

[0170] , formula (12);

[0171] in, This represents the combination of target parameters determined in the fourth step. This indicates that the efficacy prediction system after loading the target parameter combination uses the conditional prediction method executed by the single-step decoding method described in step 3.5.3. Indicates the first Each prediction step employs binary candidate treatment conditions. The SOFA prediction value obtained at that time Indicates the first The previous treatment input for the predicted step, when At that time, it is the healing state in the current decoding starting point. At that time, it was a simulated treatment action written back from the previous prediction step; Indicates the first The previous SOFA input for the prediction step, when At that time, it is the SOFA score record in the current decoding starting point, when At that time, it was the SOFA prediction state of the simulated path written back from the previous prediction step. This represents the static characteristics of the target patient.

[0172] Step 5.8 The application output branch sends the next SOFA prediction values ​​under the two binary candidate treatment conditions to the stepwise treatment path simulation module.

[0173] Step 5.9 The stepwise treatment pathway simulation module compares binary candidate treatment conditions. and The corresponding SOFA prediction value is used to select the binary candidate treatment condition with the lower SOFA prediction value in the current prediction step as the simulated treatment action for that step. This simulated treatment action and its corresponding SOFA prediction value are then written back to the decoding input of the next prediction step.

[0174] , formula (13);

[0175] in, Indicates the first A simulated therapeutic action for each predicted step. This indicates the SOFA prediction state after writing back the simulation path. Writing back means using the selected simulated treatment action and corresponding SOFA prediction value in the current prediction step as the previous treatment action and previous SOFA input in the decoding input of the next prediction step. The above process is only used to generate a traceable step-by-step treatment path simulation output and is not used as clinical treatment instructions.

[0176] Step 5.10 The stepwise treatment pathway simulation module will... Write the simulated treatment action sequence ,Will Write the predicted SOFA trajectory under the simulation path .like ,make Proceed to step 5.6; if Then, the simulated treatment action sequence within the future prediction window of the target patient is obtained. Predicted SOFA trajectory under simulated path Simulated treatment action sequence This is used to display the simulated treatment actions written back by the system at each step after comparing two binary candidate treatment conditions, and the predicted SOFA trajectory under the simulated path, per predicted step. The simulated action sequence is used to display the predicted changes in organ function status. Together, they constitute a traceable, step-by-step treatment path simulation output for a single patient, providing data processing results for auxiliary display and decision support reference at the single patient level.

[0177] The following technical effects can be achieved by using this invention:

[0178] 1. This invention, through the second step of preprocessing patient time-series sample data and constructing a training set, the third step of reconstructing spatiotemporal graph features, encoding and balanced autoregressive decoding of gated relative position time series, the fourth step of joint loss training, and the fifth step of determining target parameter combinations, organizes irregular sampling, missing information, historical treatment status, historical SOFA score records, and static individual differences in ICU electronic health records into a continuous treatment condition prediction chain. This enables the prediction system constructed in the first step to output the SOFA trajectory for multiple prediction steps given a patient's historical observation window. MSE represents the mean squared error between the predicted SOFA value and the actual SOFA score record; a lower value indicates a smaller prediction error. The invention is evaluated using a test set constructed from patient time-series samples in the second step. Experiments show that the invention achieves a 7-step average MSE of [value missing] on the MIMIC-IV dataset. The 7-step average MSE on the eICU dataset is The 7-step average MSE on the semi-synthetic dataset is Compared to other methods such as TimeCHEAT, G-Net, and Causal Transformer, this invention exhibits lower prediction errors, demonstrating its ability to improve the stability of multi-step SOFA predictions on different ICU datasets.

[0179] 2. This invention incorporates observations, observation masks, and time indices into spatiotemporal graph message passing in the third step, and extracts patient historical memory representations that simultaneously reflect dynamic changes in disease condition, relative temporal position, and individual differences through gated relative position temporal coding. Furthermore, it decomposes the decoded hidden state into outcome representation and treatment representation, and reduces the interference of treatment allocation mechanism information on outcome prediction representation through the balance loss in the third step, achieving balanced representation learning. In the semi-synthetic embodiment, the same patient sample simultaneously has SOFA outcomes under both vasoactive drug use and non-vasoactive drug use conditions, thus enabling the calculation of the true efficacy, which is the difference between the SOFA outcomes under vasoactive drug use and non-vasoactive drug use conditions. However, in the MIMIC-IV and eICU datasets, the same patient cannot simultaneously be in both vasoactive drug use and non-vasoactive drug use states at the same time step, making it impossible to directly obtain the aforementioned true efficacy. PEHE represents the error between the true efficacy and the predicted efficacy; a lower value indicates a smaller prediction error for the treatment effect. Experiments on the semi-synthetic dataset show that the PEHE of this invention is... Compared to the G-Net method, which performed better among the comparison methods, Reduce approximately This demonstrates that the present invention, through balanced characterization learning, can effectively predict the therapeutic effect under conditions of vasoactive drug use.

[0180] 3. This invention, through a fifth-step stepwise treatment path simulation module, constructs two local action branches—one for treatment and one for no treatment—at each future prediction step. It compares the SOFA prediction values ​​under the two action conditions and writes the selected simulated treatment action and its corresponding predicted SOFA back to the decoding state of the next prediction step. This allows for the acquisition of a simulated treatment action sequence and SOFA prediction trajectory with a stepwise generation process. Through this process, not only are the patient's prediction results obtained, but the stepwise comparison and state write-back process are also preserved, making the prediction results of the stepwise treatment path simulation traceable and facilitating adjustments to the auxiliary treatment plan. Attached Figure Description

[0181] Figure 1 is a flowchart of the overall process of this invention.

[0182] Figure 2 is a logical structure diagram of the sepsis vasoactive drug efficacy prediction system constructed in the first step of this invention.

[0183] Figure 3 is a graph showing the MSE prediction performance evaluation results provided in an embodiment of the present invention. Figure 3 (a) shows the single-step MSE prediction performance evaluation results on the MIMIC-IV dataset; Figure 3 (b) shows the single-step MSE prediction performance test results on the eICU dataset; Figure 3 (c) shows the MSE prediction performance evaluation results on the semi-synthetic dataset.

[0184] Figure 4 This is an MSE ablation evaluation result diagram provided in an embodiment of the present invention, comprising three sub-diagrams: Figure 4 (a) shows the MSE ablation evaluation results on the MIMIC-IV dataset; Figure 4 (b) shows the MSE ablation evaluation results on the eICU dataset; Figure 4 (c) shows the MSE ablation evaluation results on the semi-synthetic dataset.

[0185] Figure 5 is a graph showing the evaluation results of the therapeutic effect of semi-synthetic PEHE provided in the embodiments of the present invention.

[0186] Figure 6 is a graph showing the ablation evaluation results of semi-synthetic PEHE provided in the embodiments of the present invention.

[0187] Figure 7 is a schematic diagram of the simulated output of a single patient treatment pathway provided in an embodiment of the present invention. Detailed Implementation

[0188] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0189] like Figure 1 As shown, Embodiment 1 of the present invention includes the following steps:

[0190] The first step is to construct a system for predicting the efficacy of vasoactive drugs for sepsis. As shown in Figure 2, the system consists of a data acquisition and sample construction module, a data preprocessing module, a spatiotemporal graph feature reconstruction module, a gated relative position temporal encoding module, a balanced autoregressive decoding module, a training and optimization module, and a stepwise treatment path simulation module. Among these, the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module are neural networks.

[0191] The data acquisition and sample construction module is connected to the data preprocessing module. It receives raw patient data from the patient's ICU electronic health record, which includes static characteristics, time-varying covariates, time records, vasoactive drug use records, and SOFA score records. Static characteristics include age, sex, weight, and height; time-varying covariates include clinically observed variables such as vital signs and laboratory indicators that change over time. Vital signs include heart rate, systolic blood pressure, diastolic blood pressure, mean arterial pressure, respiratory rate, body temperature, and blood oxygen saturation; laboratory indicators include anion gap, bicarbonate, bilirubin, creatinine, glucose, hematocrit, hemoglobin, lactate, platelets, potassium, prothrombin time, sodium, blood urea nitrogen, and white blood cell count. The data acquisition and sample construction module slices the patient's ICU electronic health record according to preset historical observation windows and prediction windows, constructing a pre-processed patient time-series sample containing historical observation windows and future prediction windows. This pre-processed patient time-series sample is then sent to the data preprocessing module.

[0192] The data preprocessing module is connected to the data acquisition and sample construction module, the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, the balanced autoregressive decoding module, and the training optimization module. It receives patient time-series samples from the data acquisition and sample construction module before preprocessing, standardizes continuous variables (including age, weight, and height) of static features in the preprocessed patient time-series samples, encodes categorical variables (including gender), cleans and standardizes abnormal records for vital signs and laboratory indicators in time-varying covariates, constructs an observation mask based on the existence of valid and resolvable measurements within the corresponding time window, and constructs binary treatment variables from vasoactive drug usage records. These binary treatment variables represent whether vasoactive drugs were used at the corresponding time point, without involving the dosage or specific drug intensity. The data preprocessing module preprocesses the time-varying covariates within the historical observation window, forming historical treatment sequences based on vasoactive drug usage records and historical SOFA score record sequences based on SOFA score records within the historical observation window. It also forms the current decoding starting point based on the binary treatment variable and SOFA score record corresponding to the end of the historical observation window. Furthermore, it forms future treatment sequences based on vasoactive drug usage records and future SOFA score record sequences within the future prediction window. The data preprocessing module then combines the preprocessed static features, historical time-series observation inputs, historical treatment sequences, historical SOFA score record sequences, the current decoding starting point, future treatment sequences, and future SOFA score record sequences into a preprocessed patient time-series sample. This patient time-series sample is then sent to the spatiotemporal graph feature reconstruction module, the gated relative position time-series encoding module, the balanced autoregressive decoding module, and the training optimization module. The spatiotemporal graph feature reconstruction module will use historical time series observation input, the gated relative position time series encoding module will use preprocessed static features, historical treatment sequences, and historical SOFA score record sequences, the balanced autoregressive decoding module will use the current decoding starting point, preprocessed static features, and future treatment sequences, and the training optimization module will use future SOFA score record sequences and future treatment sequences.

[0193] The spatiotemporal graph feature reconstruction module is connected to the data preprocessing module and the gated relative position temporal coding module, and consists of a graph construction submodule, a bidirectional message passing submodule, and a covariate reconstruction submodule. The graph construction submodule includes a learnable channel correlation matrix, a time-varying covariate channel node linear layer, a time event node linear layer, and an edge representation linear layer; the bidirectional message passing submodule consists of… Each graph message passing layer is composed of stacked layers, where Each graph message passing layer includes a stitching layer, a multi-head attention layer, an edge update linear layer, an activation function, and residual connection units; the covariate reconstruction submodule includes a stitching layer and a linear output layer. In the graph construction submodule, the learnable channel correlation matrix has the following dimensions: The input dimension of the linear layer with time-varying covariate channel nodes is 21, and the output dimension is... The linear layer of time event nodes has an input dimension of 1 and an output dimension of 1. An edge indicates that the input dimension of the linear layer is 2 and the output dimension is 1. Attention layer Four attention heads; the hidden dimension of both node and edge representations is 128; the input dimension of the linear output layer of the covariate reconstruction submodule is 384, and the output dimension is... The graph construction submodule receives historical time-series observation input from the data preprocessing module. Its time-varying covariate channel node linear layer works in conjunction with the learnable channel correlation matrix to generate initial time-varying covariate channel node representations based on the time-varying covariate channels determined after preprocessing. The time event node linear layer generates initial time event node representations based on historical time indices. The edge representation linear layer generates initial edge representations based on preprocessed observations, observation masks, and time indices, resulting in a spatiotemporal graph formed by the initial time-varying covariate channel node representations, initial time event node representations, and initial edge representations. The bidirectional message passing submodule receives the spatiotemporal graph from the graph construction submodule. Its first graph message passing layer's splicing layer concatenates adjacent node and edge representations, which are then processed sequentially through a multi-head attention layer, an edge update linear layer, an activation function, and a residual connection unit to obtain updated time-varying covariate channel node representations, time event node representations, and edge representations. After the message passing layer of the graph outputs the first... Layer-specific time-varying covariate channel node representation, time event node representation, and edge representation. The covariate reconstruction submodule receives the first... Layered time-varying covariate channel node representation, time event node representation, and edge representation, with its internal splicing layer being the first... The layer time-varying covariate channel node representation, time event node representation, and edge representation are concatenated, processed by the linear output layer inside to obtain the reconstructed covariate sequence, and then sent to the gated relative position timing coding module.

[0194] The gated relative position temporal coding module is connected to the spatiotemporal graph feature reconstruction module, data preprocessing module, and balanced autoregressive decoding module. It consists of a dynamic input construction submodule, a relative position attention submodule, an input dependency gating submodule, a static feature conditionalization submodule, and a first position feedforward submodule. The dynamic input construction submodule includes a concatenation layer and an input linear layer; the relative position attention submodule includes a query linear layer, a key linear layer, a value linear layer, a multi-head attention layer, a learnable relative position bias unit, and an output linear layer; the input dependency gating submodule includes a gated linear layer, a sigmoid gated layer, and an element-wise multiplication unit; the static feature conditionalization submodule includes a static feature linear layer; and the first position feedforward submodule includes a concatenation layer, a linear layer, an activation function, a linear layer, a residual connection unit, and a LayerNorm unit. The input linear layer of the dynamic input construction submodule has an input dimension of 23 and an output dimension of [missing information]. ,key The input dimension and output dimension of each layer are both 128. The multi-head attention layer includes 4 attention heads, each with a hidden layer feature dimension of 32. The maximum relative position of the learnable relative position bias unit is 36. The input dimension of the static feature linear layer is 4, and the output dimension is 32. In the first position feedforward submodule, the input dimension of the first linear layer is 160, and the output dimension is... The second linear layer has an input dimension of 512 and an output dimension of... The GELU function is used. The dynamic input construction submodule receives the reconstructed covariate sequence from the spatiotemporal graph feature reconstruction module and the historical treatment sequence and historical SOFA score record sequence from the data preprocessing module. At each historical time step, the concatenation layer of the dynamic input construction submodule concatenates the reconstructed covariates, historical treatment variables, and historical SOFA score records according to the feature dimension. This concatenation is then processed by the input linear layer to obtain the encoded input sequence. The relative position attention submodule receives the encoded input sequence from the dynamic input construction submodule. Its query linear layer, key linear layer, and value linear layer process the encoded input sequence in parallel, obtaining the query representation, key representation, and value representation, respectively. The learnable relative position bias unit in the relative position attention submodule generates a learnable relative position bias. The multi-head attention layer performs attention calculations based on the query representation, key representation, value representation, and learnable relative position bias to obtain the attention head output. The output linear layer in the relative position attention submodule processes the attention head output to obtain the relative position attention output. The input-dependent gating submodule receives the encoded input sequence from the dynamic input construction submodule and the attention head output from the relative position attention submodule. Its gating linear layer generates a gating vector based on the encoded input sequence, and a sigmoid gating layer processes the gating vector to obtain gating weights. An element-wise multiplication unit multiplies the gating weights with the attention head output to obtain the gated attention output. The static feature conditionalization submodule receives preprocessed static features from the data preprocessing module. Its static feature linear layer generates a static feature conditional representation based on the preprocessed static features. The first position feedforward submodule receives the gated attention output from the input-dependent gating submodule and the static feature conditional representation from the static feature conditionalization submodule. The first position feedforward submodule's concatenation layer concatenates the gated attention output with the static feature conditional representation, which is then processed sequentially through a linear layer, activation function, linear layer again, residual connection unit, and LayerNorm unit to obtain the patient's historical memory representation. This patient historical memory representation is then sent to the balanced autoregressive decoding module.

[0195] The balanced autoregressive decoding module is connected to the gated relative position temporal coding module, data preprocessing module, training optimization module, and stepwise treatment path simulation module. It consists of an autoregressive decoding unit, a causal self-attention submodule, a cross-attention submodule, a second position feedforward submodule, a balanced representation splitting submodule, a SOFA prediction branch, a treatment prediction branch, a training output branch, and an application output branch. The system comprises the following components: an autoregressive decoding unit (ARMU) and a linear layer for decoding input; a causal self-attention submodule (CSI) consisting of a multi-head causal self-attention layer, an attention head gating layer, a residual connection unit, and a LayerNorm unit; a cross-attention submodule consisting of a multi-head cross-attention layer, an attention head gating layer, a residual connection unit, and a LayerNorm unit; a second-position feedforward submodule consisting of a linear layer, an activation function, a linear layer, a residual connection unit, and a LayerNorm unit; a balanced representation splitting submodule consisting of a result representation linear layer, an activation function, and a LayerNorm unit, as well as a treatment representation linear layer, an activation function, and a LayerNorm unit; a SOFA prediction branch consisting of an ARMU, a linear layer, an activation function, and a linear output layer; a treatment prediction branch consisting of a linear layer, an activation function, and a linear output layer; and training output branches and application output branches, which belong to the output function layer and are not trainable neural network prediction layers. The autoregressive decoding unit's decoding input linear layer has an input dimension of 6 and an output dimension of 128. The multi-head attention layers in both the causal self-attention submodule and the cross-attention submodule include four attention heads, each with a hidden layer feature dimension of 32. The attention head gating layer uses scalar gating. In the second position feedforward submodule, the first linear layer has an input dimension of 128 and an output dimension of... The second linear layer has an input dimension of 512 and an output dimension of... The ReLU function; the input dimension of the result representation linear layer in the balanced representation splitting submodule is 128, and the output dimension is 128, and the input dimension of the treatment representation linear layer is 128, and the output dimension is... The ELU function; in the SOFA prediction branch, the input dimension of the linear layer is 129, and the output dimension is... The linear output layer has an input dimension of 128 and an output dimension of [missing information]. In the treatment prediction branch, the linear layer has an input dimension of 128 and an output dimension of... The linear output layer has an input dimension of 64 and an output dimension of 1. The activation functions for both the SOFA prediction branch and the treatment prediction branch are ReLU functions. The autoregressive decoding unit receives the current decoding starting point, preprocessed static features, and future treatment sequences from the data preprocessing module during training. Its concatenation layer uses the current decoding starting point as its initial state, concatenating the previous treatment input, the previous SOFA input, and the preprocessed static features according to their feature dimensions. This concatenation is then processed by its linear decoding input layer to obtain the decoded representation sequence formed up to the current prediction step. When predicting the target patient's ICU electronic health record input by the user, the autoregressive decoding unit receives the previous simulated treatment action, the previous SOFA prediction state, and the binary candidate treatment conditions constructed by the stepwise treatment path simulation module, written back by the module, and obtains the decoded representation sequence under the current candidate treatment conditions in the same manner. The causal self-attention submodule receives the decoded representation sequence from the autoregressive decoding unit. Its multi-head causal self-attention layer performs causal self-attention calculation on the decoded representation sequence, and the attention head gating layer adjusts the attention head output. The sequence is then processed sequentially by the residual connection unit and the LayerNorm unit to obtain the causal self-attention result. The cross-attention submodule receives the causal self-attention result from the causal self-attention submodule and receives the patient's historical memory representation from the gated relative position temporal encoding module. Its multi-head cross-attention layer uses the causal self-attention result as a query to perform cross-attention calculation on the patient's historical memory representation. The attention head gating layer adjusts the attention head output, and the sequence is then processed sequentially by the residual connection unit and the LayerNorm unit to obtain the cross-attention result. The second position feedforward submodule receives the cross-attention result from the cross-attention submodule and processes it sequentially through a linear layer, an activation function, another linear layer, a residual connection unit, and the LayerNorm unit to obtain the decoded hidden state for each prediction step. The Balanced Representation Decomposition Submodule receives the decoded hidden state from the second-position feedforward submodule. It processes the decoded hidden state sequentially through a result representation linear layer, activation function, and LayerNorm unit to obtain the result representation. Simultaneously, it processes the decoded hidden state sequentially through a treatment representation linear layer, activation function, and LayerNorm unit to obtain the treatment representation. The Balanced Autoregressive Decoding Submodule generates the result representation sequence and treatment representation sequence through the Balanced Representation Decomposition Submodule. The SOFA prediction branch receives the result representation and target treatment conditions from the Balanced Representation Decomposition Submodule. Its concatenation layer concatenates the result representation and target treatment conditions, then processes them sequentially through a linear layer, activation function, and linear output layer to obtain the SOFA prediction sequence within the future prediction window. The target treatment conditions during training are derived from the future treatment sequence, while the target treatment conditions for predicting the user-input ICU electronic health record are derived from the stepwise treatment path simulation module. The treatment representation is processed sequentially through a linear layer, an activation function, and a linear output layer within the treatment prediction branch to obtain the treatment prediction sequence within the future prediction window. The training output branch sends the SOFA prediction sequence, treatment prediction sequence, result representation sequence, and treatment representation sequence within the future prediction window to the training optimization module; the application output branch sends the SOFA prediction result for the next prediction step under the current binary candidate treatment condition to the stepwise treatment path simulation module.

[0196] The training optimization module is connected to the balanced autoregressive decoding module and applies training loss backpropagation to the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module. This module receives SOFA prediction sequences, treatment prediction sequences, outcome representation sequences, and treatment representation sequences within the future prediction window from the training output branch of the balanced autoregressive decoding module. It also receives real future SOFA score record sequences and real future treatment sequences from the training samples from the data preprocessing module. Based on the errors between the SOFA prediction sequences and real future SOFA score record sequences, the errors between the treatment prediction sequences and real future treatment sequences, and the correlation between the outcome representation sequences and treatment representation sequences, it calculates outcome prediction loss, treatment prediction loss, and balance loss. These losses are combined into a joint loss and used to update the parameters of the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module.

[0197] The stepwise treatment path simulation module is connected to the balanced autoregressive decoding module. After the trained efficacy prediction system completes the preprocessing, spatiotemporal graph feature reconstruction, and temporal encoding of the target patient's ICU electronic health record input by the user, it receives the current decoding starting point and the target patient's historical memory representation. In each prediction step, it constructs two binary candidate treatment conditions. Under the two binary candidate treatment conditions, it calls the balanced autoregressive decoding module and receives the corresponding SOFA prediction value for the next step sent by the application output branch of the balanced autoregressive decoding module. It compares the SOFA prediction values ​​corresponding to the two binary candidate treatment conditions, writes the simulated treatment action selected in the current step and its corresponding SOFA prediction value back to the decoding state of the next prediction step, and obtains the simulated treatment action sequence and the predicted SOFA trajectory under the simulated path, which serves as the prediction result of the efficacy of sepsis vasoactive drugs for the target patient's ICU electronic health record input by the user.

[0198] In this embodiment, the server running the sepsis vasoactive drug efficacy prediction system is equipped with an Ubuntu 20.04 operating system, a Tesla V100 graphics processor with 32GB of video memory, and the Python 3.10 programming language environment and the PyTorch 2.5.1 deep learning framework.

[0199] The second step involves the data acquisition and sample construction module and the data preprocessing module working together to organize the ICU electronic health record data into a time-series sample set of patients, and then dividing it into training, validation, and test sets. The method is as follows:

[0200] Step 2.1 The data acquisition and sample construction module initializes the patient index. and initialize the patient time series sample set. Empty. Using the de-identified MIMIC-IV dataset, the de-identified eICU dataset, or a semi-synthetic dataset generated based on MIMIC-IV as the data source, extract the ICU electronic health records of sepsis patients. Let the number of extracted sepsis patients be [value missing]. , positive integer ICU electronic health records include raw static features, time-varying covariates, time-series data, vasoactive drug use records, and SOFA score records. The semi-synthetic dataset generated based on MIMIC-IV is a time-series dataset of patients generated from real patient ICU electronic health records in MIMIC-IV, and SOFA outcomes under vasoactive drug use and without vasoactive drug use are generated for the same patient sample. The historical observation window length is set to... , The prediction window length is ,

[0201] Step 2.2 Data Acquisition and Sample Construction Module starts from the first... Read the first patient's ICU electronic health record Original static characteristics of the patient Construct the original static feature vector. Including the The patient's age, gender, weight, and height are considered as four static feature dimensions. Denotes the length of the static feature vector, where The data acquisition and sample construction module will use the original static features As the first Each patient's individual background information field was incorporated into the patient time series sample before preprocessing to characterize the differences in baseline status among different patients.

[0202] Step 2.3 Initialize the historical observation window time step index in the data acquisition and sample construction module. .

[0203] Step 2.4 The data acquisition and sample construction module in the historical observation window The first time step constructs the first The historical timeline records of each patient. The data acquisition and sample construction module starts from the first... Read the first patient's ICU electronic health record A patient in historical time step Time-varying covariates , Including the Clinical observation variables such as vital signs and laboratory indicators of each patient changing over time; when no valid, resolvable measurement value exists within the corresponding time window, the data acquisition and sample construction module retains... The missing state. The data acquisition and sample construction module constructs the first... The patient in Time index of each historical time step , used to represent the relative temporal position of the corresponding observation in the patient time series sample before preprocessing; construct the first The patient in A binary treatment variable indicating whether vasoactive drugs were used at each historical time step. , , if the patient In the Within a historical timeframe, receiving any vasoactive drug would... Otherwise ; Construct the first The patient in The outcome variable at each historical time step , Indicates the first The patient in SOFA rating records at each historical time step, , Indicates length is The real vector space, where ,Right now This is a single-dimensional SOFA score record.

[0204] Step 2.5 If ,make Proceed to step 2.4; if Then the data acquisition and sample construction module obtains the first... Historical time-varying covariates of each patient , Historical Time Index Historical treatment sequence Historical SOFA rating record sequence And the current decoding starting point. Wherein, , The current decoding starting point is , For the first The patient in time step Treatment status, For the first The patient in time step SOFA rating records.

[0205] Step 2.6 The data acquisition and sample construction module initializes the future prediction window step index. .

[0206] Step 2.7 The data acquisition and sample construction module constructs the first sample within the future prediction window. The future labeling record for each patient. For the first patient within the future prediction window... There are 1 prediction step, corresponding to 1 time step. The data acquisition and sample construction module starts from the first... The vasoactive drug use record at that time step was read from the patient's ICU electronic health record, and future treatment variables were constructed. , if the patient Administer any vasoactive drug within the corresponding time window, Otherwise The data acquisition and sample construction module reads the SOFA rating record at this time step and constructs future SOFA rating records. The SOFA score is obtained by summing sub-scores from multiple organ systems and is used to characterize the change in the degree of organ dysfunction in a patient over time.

[0207] Step 2.8 If ,make Proceed to step 2.7; if Then the data acquisition and sample construction module obtains the first... Future treatment sequence for each patient And future SOFA rating record sequence .in, , This forms the first preprocessing step. Time series samples of patients , Including patient index Original static features Historical time-varying covariates Historical Time Index Historical treatment sequence Historical SOFA rating record sequence Current decoding starting point, future treatment sequence And future SOFA rating record sequence .

[0208] Step 2.9 The data acquisition and sample construction module will... Send to the data preprocessing module.

[0209] Step 2.10 The data preprocessing module uses data preprocessing methods to... Preprocessing is performed to obtain the first... Time series samples of patients ;right middle The continuous variables (age, weight, and height) are standardized, and the categorical variable (gender) is encoded to obtain the preprocessed static features. ; time-varying covariates within the historical observation window Abnormal records were cleaned and standardized from vital signs and laboratory indicators to obtain preprocessed time-varying covariates. , ,in The length of the time-varying covariate vector represents the number of fields in the time-varying covariates, such as vital signs and laboratory indicators. , Indicates length is The real vector space. The data preprocessing module uses the ICU electronic health records from the [number]th [year] [item]. Constructing and determining whether there are valid, resolvable measurements within each time step's corresponding time window. Corresponding observation mask ;like If the dimension has been observed, then If the value is 1, If the dimension is missing or cannot be parsed, then The value is 0. The data preprocessing module combines the preprocessed time-varying covariates, observation masks, and time indices into historical time-series observation inputs. , For missing time-varying covariates, the data preprocessing module does not directly replace the original observations as simple zero-value or mean-filled results, but rather... The data preprocessing module retains preprocessed observations, observation masks, and time indices in each patient time series sample, enabling the patient time series samples to fully represent irregular sampling and missing information features. , , , , , , , The first part after preprocessing Time series samples of patients , It is an octet, as shown in formula (1):

[0210] , formula (1);

[0211] The data preprocessing module will Add to patient time series sample set .

[0212] Step 2.11 If ,make Proceed to step 2.2; if Then we obtain the patient time series sample set. , Proceed to step 2.12.

[0213] Step 2.12 Data preprocessing module according to The proportion will Divided into training set Validation set and test set That is, the time series sample set of patients middle The samples were included in the training set. The samples were included in the validation set. The samples were assigned to the test set, and the total number of samples in the training set was recorded. Total number of validation set samples and the total number of test set samples ,in .

[0214] The third step is to use the training set. The sepsis vasoactive drug efficacy prediction system was trained to obtain a set of candidate parameter combinations: Cooperate with each other, according to The system predicts SOFA prediction sequences, treatment prediction sequences, outcome representation sequences, and treatment representation sequences for each patient's time series sample. The training and optimization module calculates outcome prediction loss, treatment prediction loss, and balance loss based on these prediction and representation sequences, along with the future SOFA score record sequences and future treatment sequences in the corresponding patient time series samples. These are combined into a joint loss, and the trainable parameters of the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module are updated based on this joint loss to obtain a candidate parameter combination set. The method is:

[0215] Step 3.1 The spatiotemporal graph feature reconstruction module receives the training set from the data preprocessing module. Set the training parameters. Training parameters include batch size. Maximum number of training rounds Continuous stable rounds Training stopping threshold Treatment prediction loss weight and balancing loss weights ,in , , 20, , , The training optimization module uses the Adam optimizer to optimize the trainable parameters of the three core neural network modules. The betas parameter of the Adam optimizer is... The eps parameter is The training optimization module initializes the training round index. Initialize the candidate parameter combination index Initialize the set of candidate parameter combinations The value is empty, and the average joint loss record is initialized to be empty.

[0216] Step 3.2 The spatiotemporal graph feature reconstruction module is in the first step. The training set will be used in each training round. Divided into Each training batch initializes the batch index. and initialize the local sample index. and training batch forward prediction result set Empty. (Number) The training round # Each training batch is denoted as .in, For the first In the training rounds, the first The number of samples in each training batch, and ; This represents the local sample index within the current training batch.

[0217] Step 3.3 Reading the spatiotemporal graph feature reconstruction module Local sample index Corresponding patient time series samples Read historical time series observation input The spatiotemporal graph feature reconstruction method is used to... Spatiotemporal graph construction, bidirectional message passing, and covariate reconstruction are performed using time-varying covariates, observation masks, and time indices to obtain... Reconstructed covariate sequence The method is:

[0218] Step 3.3.1 Reading the graph construction submodule Historical time series observation input ,from The time-varying covariate channels are determined by the preprocessed time-varying covariate fields, and time-varying covariate channel nodes are constructed based on these channels; according to according to Construct initial time event node representations; and construct initial edge representations based on the observations and observation masks corresponding to the same time-varying covariate channel and the same historical time step, thus obtaining initial time-varying covariate channel node representations, initial time event node representations, and initial edge representations, forming a spatiotemporal graph. The method is as follows:

[0219] Step 3.3.1.1 Reading the graph construction submodule Historical time series observation input Using graph construction methods from The time-varying covariate channels are determined by the preprocessed time-varying covariate fields. Time-varying covariate channel nodes are then constructed based on these channels. The method is as follows:

[0220] Step 3.3.1.1.1 Graph Construction Submodule: Let the number of graph message passing layers be... ,in Let the time-varying covariate channel index be... =1

[0221] Step 3.3.1.1.2 Graph Construction Submodule from The t-th historical time step The common first The time-varying covariate field determines the first The time-varying covariate channel, and the first The time-varying covariate channel nodes are constructed based on the time-varying covariate channel nodes of the graph construction submodule, and the linear layer of the time-varying covariate channel nodes is based on the corresponding nodes in the learnable channel correlation matrix. The parameters of each time-varying covariate channel are linearly encoded to generate an initial time-varying covariate channel node representation. , .

[0222] in, This indicates that the learnable channel correlation matrix corresponds to the first... Parameters of each time-varying covariate channel This represents the linear layer of the time-varying covariate channel node.

[0223] Step 3.3.1.1.3 If ,make Proceed to step 3.3.1.1.2; if Then the graph construction submodule is obtained A set of time-varying covariate channel nodes and their initial time-varying covariate channel node representations. , Proceed to step 3.3.1.2. (The superscript is not included.) This represents a time-varying covariate channel.

[0224] Step 3.3.1.2 Graph Construction Submodule Based on The method for constructing the initial time event node representation is as follows:

[0225] Step 3.3.1.2.1 Initialize the historical time step index in the graph construction submodule. .

[0226] Step 3.3.1.2.2 The graph construction submodule starts from... Take the first one from the middle Group The historical observation location corresponding to this set of data is determined as the [number]. A historical time step, and on the first Constructing time event nodes for each historical time step: The linear layer of the graph construction submodule's time event node is based on the time index of that historical time step. Perform linear encoding to generate an initial time event node representation. ,in, This represents a linear layer of time-event nodes.

[0227] Step 3.3.1.2.3 If ,make Proceed to step 3.3.1.2.2; if Then the graph construction submodule is obtained A set of time event nodes and their initial time event node representation. , Among them, superscript Indicates a time event.

[0228] Step 3.3.1.3 The graph construction submodule constructs the initial edge representation based on the observations and observation masks corresponding to the same time-varying covariate channel and the same historical time step. The method is as follows:

[0229] Step 3.3.1.3.1 Initialize the time-varying covariate channel index in the graph construction submodule. And initialize the historical time step index. .

[0230] Step 3.3.1.3.2 Graph Construction Submodule from Take the first one from the middle A historical time step and ,Will The The component is used as the first Observations corresponding to each time-varying covariate field ,Will The Each component serves as the corresponding observation mask. The observed value and the observation mask represent the first... The time-varying covariate channel node and the first The observation relationships between time event nodes. The edges of the graph construction submodule represent linear layer pairs. and The concatenated results are linearly encoded to generate an initial edge representation. ,in, An edge represents a linear layer.

[0231] Step 3.3.1.3.3 If ,make Proceed to step 3.3.1.3.2; if Proceed to step 3.3.1.3.4;

[0232] Step 3.3.1.3.4 If ,make and order Proceed to step 3.3.1.3.2; if The graph construction submodule then obtains the initial edge representation set. , Proceed to step 3.3.1.4.

[0233] Step 3.3.1.4 The graph construction submodule represents the initial time-varying covariate channel node representation set. Initial time event node representation set and the initial edge representation set Form a spacetime graph, where each initial edge represents Connect the corresponding first Each time-varying covariate channel node represents With the Each time event node represents The spatiotemporal graph is then sent to the bidirectional message passing submodule.

[0234] Step 3.3.2 The bidirectional message passing submodule receives the spatiotemporal graph from the graph construction submodule and uses the bidirectional message passing method to update the initial time-varying covariate channel node representation, initial time event node representation, and initial edge representation in the spatiotemporal graph layer by layer, obtaining the first... Layer time-varying covariate channel node representation set , No. Layered time event node representation set and the Layer edge represents a set The method is:

[0235] Step 3.3.2.1 Initialize the bidirectional message passing submodule graph and set the message passing layer index. .

[0236] Step 3.3.2.2 The bidirectional message passing submodule is in the... Layer initialization time-varying covariate channel index .

[0237] Step 3.3.2.3 The splicing layer of the bidirectional message passing submodule is based on the first... Layer Each time-varying covariate channel node represents As a query representation, it will be related to the first The time event nodes adjacent to each time-varying covariate channel node represent and corresponding edge representation By concatenating the features, the first information to be aggregated is obtained; the multi-head attention layer of the bidirectional message passing submodule... Under the constraints, multi-head attention aggregation is performed on the query representation and the first information to be aggregated to obtain the first... Layer Each time-varying covariate channel node represents :

[0238] , formula (2);

[0239] in, This indicates message aggregation operations based on a multi-head attention layer. Indicates the relationship with the first A set of time event nodes adjacent to a time-varying covariate channel node. This represents the visibility mask of the time-varying covariate channel, determined by the relationship between adjacent time event nodes in the spatiotemporal graph. This represents vector concatenation. Indicates the first Layer The time-varying covariate channel node and the first Edge representation between time event nodes.

[0240] Step 3.3.2.4 If ,make Proceed to step 3.3.2.3; if Then the bidirectional message passing submodule completes the first... All time-varying covariate channel nodes of the layer are updated to obtain the first... Layer time-varying covariate channel node representation set , Proceed to step 3.3.2.5.

[0241] Step 3.3.2.5 The bidirectional message passing submodule is in the... Layer initialization historical time step index .

[0242] Step 3.3.2.6 The splicing layer of the bidirectional message passing submodule is based on the first... Layer Each time event node represents As a query representation, it will be related to the first The time-varying covariate channel nodes adjacent to each time event node represent and corresponding edge representation By concatenating the features, the second information to be aggregated is obtained; the multi-head attention layer of the bidirectional message passing submodule... Under the constraints, multi-head attention aggregation is performed on the query representation and the second information to be aggregated to obtain the first... Layer Each time event node represents :

[0243] , formula (3);

[0244] in, Indicates the relationship with the first A set of time-varying covariate channel nodes adjacent to each time event node. This represents the visibility mask of time events determined by the relationship between adjacent time-varying covariate channel nodes in the spatiotemporal graph.

[0245] Step 3.3.2.7 If ,make Proceed to step 3.3.2.6; if Then the bidirectional message passing submodule completes the first... All time event nodes in the layer are updated to obtain the first... Layered time event node representation set , .

[0246] Step 3.3.2.8 The bidirectional message passing submodule is in the... Layer initialization time-varying covariate channel index and initialize the historical time step index. .

[0247] Step 3.3.2.9 The bidirectional message passing submodule receives the first... Layer The time-varying covariate channel node and the first The edges between time event nodes represent , No. Layer Each time-varying covariate channel node represents and the Layer Each time event node represents The edge update linear layer of the bidirectional message passing submodule , and The concatenated result is linearly encoded, and the activation function performs nonlinear processing on the linearly encoded result. The residual connection unit is then processed based on the nonlinear processing result and the first... Layer edge representation generates the first Layer edge representation :

[0248] , formula (4);

[0249] in, This represents the edge update operation, which consists of an edge-updated linear layer, an activation function, and residual connection units.

[0250] Step 3.3.2.10 If ,make Proceed to step 3.3.2.9; if Proceed to step 3.3.2.11;

[0251] Step 3.3.2.11 If ,make and order Proceed to step 3.3.2.9; if Update all edge representations of the layer to obtain the first layer. Layer edge represents a set , Proceed to step 3.3.2.12.

[0252] Step 3.3.2.12 If ,make Proceed to step 3.3.2.2; if , obtained the Layer time-varying covariate channel node representation set , No. Layered time event node representation set and the Layer edge represents a set And send the three to the covariate reconstruction submodule.

[0253] Step 3.3.3 The covariate reconstruction submodule receives the first... Layer time-varying covariate channel node representation set , No. Layered time event node representation set and the Layer edge represents a set The covariate reconstruction method is used to generate reconstructed values ​​for each historical time step and each time-varying covariate channel, resulting in... Reconstructed covariate sequence The method is:

[0254] Step 3.3.3.1 Initialize the historical time step index in the covariate reconstruction submodule. and initialize the time-varying covariate channel index. .

[0255] Step 3.3.3.2 The splicing layer of the covariate reconstruction submodule will... Layer Each time-varying covariate channel node represents , No. Layer Each time event node represents and the Layer The time-varying covariate channel node and the first The edges between time event nodes represent The input vector is concatenated to obtain the reconstructed input vector; the linear output layer processes the reconstructed input vector into a linear output to obtain the first... The first historical time step, the Reconstructed values ​​of each time-varying covariate channel , ,in, This represents the linear output layer of the covariate reconstruction submodule.

[0256] Step 3.3.3.3 If ,make Proceed to step 3.3.3.2; if Then the covariate reconstruction submodule will be the first A historical time step The reconstructed values ​​are combined according to the time-varying covariate channel dimension to obtain the first... Reconstruction covariates at each historical time step , .

[0257] Step 3.3.3.4 If ,make and order Proceed to step 3.3.3.2; if The covariate reconstruction submodule then combines the reconstructed covariates of all historical time steps according to the time step to obtain... Reconstructed covariate sequence ,, .

[0258] Step 3.3.3.5 The covariate reconstruction submodule will reconstruct the covariate sequence. Send to the gating relative position timing encoding module.

[0259] Step 3.4 The gated relative position timing coding module receives data from the covariate reconstruction submodule of the spatiotemporal graph feature reconstruction module. Reconstructed covariate sequence ,from Read historical treatment sequences Historical SOFA rating record sequence and static features The gated relative position timing coding method is used to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates The method is:

[0260] Step 3.4.1 The dynamic input construction submodule receives data from the gating relative position timing coding module. ,from Read and The coded input sequence is obtained by using a dynamic input construction method. The method is as follows:

[0261] Step 3.4.1.1 Initialize the historical time step index in the dynamic input construction submodule. and initialize the encoded input sequence. Empty.

[0262] Step 3.4.1.2 Dynamic Input Construction Submodule from Read the first Reconstruction covariates at each historical time step ,from Read the first Historical treatment variables aligned to a historical time step ,from Read the first Historical SOFA rating records aligned to each historical time step The splicing layer of the dynamic input construction submodule will , and By splicing, we obtain the first... Dynamic input of each historical time step , .

[0263] in, Indicates the relationship with the first Historical treatment variables aligned to a historical time step Indicates the relationship with the first Historical SOFA rating records aligned to each historical time step.

[0264] Step 3.4.1.3 Dynamic Input Construction Submodule Input Linear Layer Pair Perform linear encoding to obtain the first... Encoded input representation of each historical time step , .in, This indicates the input linear layer. The dynamic input construction submodule will... Write the encoded input sequence .

[0265] Step 3.4.1.4 If ,make Proceed to step 3.4.1.2; if Then the dynamic input construction submodule obtains Encoded input sequence , Proceed to step 3.4.2.

[0266] Step 3.4.2 The relative position attention submodule receives input from the dynamic input construction submodule. The relative position attention calculation method is used to... The relative positional relationships between the encoded input representations at each historical time step are modeled to obtain the relative positional attention output sequence. The method is as follows:

[0267] Step 3.4.2.1 The query linear layer, key linear layer, and value linear layer of the relative position attention submodule encode the input sequence in parallel. Linear encoding is performed to obtain the query representation, key representation, and value representation, respectively.

[0268] Step 3.4.2.2: The learnable relative position bias unit of the relative position attention submodule generates a learnable relative position bias based on the relative position index between any two historical time steps; the multi-head attention layer calculates the attention head output based on the query representation, key representation, value representation, and learnable relative position bias; the output linear layer performs linear encoding on the attention head output to obtain... Relative position attention output sequence , .in, This indicates the relative position attention computation, which includes the query linear layer, key linear layer, value linear layer, multi-head attention layer, learnable relative position bias unit, and output linear layer.

[0269] Step 3.4.3 The input dependency gating submodule receives the encoded input sequence from the dynamic input construction submodule. Receive the relative position attention output sequence from the relative position attention submodule. The input dependency gating method is adopted according to Generate a gated vector sequence and then... Gating is performed to obtain the gated attention output sequence. The method is:

[0270] Step 3.4.3.1 Encode the input sequence using the gated linear layer of the input-dependent gated submodule. Linear encoding is performed to obtain a gated vector; a sigmoid gating layer performs gating processing on the gated vector to obtain... Gated vector sequence , .in, Indicates a gated linear layer. This indicates a sigmoid gate layer.

[0271] Step 3.4.3.2 The element-wise multiplication unit of the input-dependent gating submodule will... and Element-by-element multiplication yields Gated attention output sequence , .in, This indicates element-wise multiplication.

[0272] Step 3.4.4 Static Feature Conditioning Submodule from Reading static features The static feature linear layer within it Perform linear encoding to obtain Static feature condition representation , .in, This represents a static feature linear layer. The static feature conditionalization submodule represents the static feature conditional layer. Send to the first position feedforward submodule.

[0273] Step 3.4.5 The first position feedforward submodule receives the gated attention output sequence from the input dependency gating submodule. Receive static feature condition representation from the static feature conditionation submodule The first position feedforward processing method is used to process... and Perform position feedforward processing to obtain Patient historical memory indicates The method is:

[0274] Step 3.4.5.1 Initialize the historical time step index of the first position feedforward submodule and initialize Patient historical memory indicates Empty.

[0275] Step 3.4.5.2 The first position feedforward submodule reads the first... Attention output after gating at each historical time step The splicing layer of the first position feedforward submodule will Representation of static feature conditions By splicing, we obtain the first... Conditional splicing representation of a historical time step , .

[0276] Step 3.4.5.3 The first linear layer, activation function, and second linear layer of the first position feedforward submodule are sequentially conditionally concatenated. The residual connection unit performs processing based on the results of the second linear layer and the gated attention output. The residual update representation is generated, and the LayerNorm cell normalizes the residual update representation to obtain the th... Encoding vectors for each historical time step , .in, and This represents two linear layers in the first position feedforward submodule. This represents the activation function. This represents a LayerNorm cell. The first position feedforward submodule will... Writing into the patient's historical memory indicates .

[0277] Step 3.4.5.4 If ,make Proceed to step 3.4.5.2; if Then the first position feedforward submodule obtains Patient historical memory indicates , .

[0278] Step 3.4.5.5 The first position feedforward submodule will Send to the balanced autoregressive decoding module.

[0279] Step 3.5 The balanced autoregressive decoding module receives data from the first position feedforward submodule of the gated relative position timing coding module. ,from Read the current decoding start point and static features and future treatment sequences as target treatment conditions The balanced autoregressive decoding prediction method is used to perform autoregressive decoding, causal self-attention calculation, cross-attention calculation, second-position feedforward submodule processing, balanced representation decomposition, SOFA prediction, and treatment prediction on the future prediction window, resulting in... The SOFA prediction sequence consists of four sequences: a treatment prediction sequence, an outcome characterization sequence, and a treatment characterization sequence.

[0280] Step 3.5.1 Initialize the future prediction step index of the autoregressive decoding unit and initialize the SOFA prediction sequence. Treatment prediction sequence Result characterization sequence Treatment characterization sequence and decoding representation sequence Empty.

[0281] Step 3.5.2 Autoregressive decoding unit determines the first The current target treatment condition and the previous input for each prediction step. The current target treatment condition for each prediction step From Future treatment sequences The corresponding future treatment variables ,Right now ;like At that time, the previous treatment input Equal to the current decoding starting point Previous SOFA input Equal to the current decoding starting point ;like The previous treatment input Equals the current target treatment condition corresponding to the previous prediction step, and the previous SOFA input. It equals the SOFA prediction value from the previous prediction step. Indicates the first The previous treatment input used in each prediction step Indicates the first The previous SOFA input used in the prediction step. The first prediction step will use... The current target treatment condition for each prediction step is sent to the SOFA prediction branch.

[0282] Step 3.5.3 The balanced autoregressive decoding module uses a single-step decoding method to... , Current prediction step Previous treatment input Previous SOFA input and current target treatment conditions Perform basic single-step decoding operations to obtain the first... Prediction Steps SOFA predictions Treatment predictive value Result characterization and treatment symptoms The method is:

[0283] Step 3.5.3.1 The splicing layer of the autoregressive decoding unit will , and By splicing, we obtain the first... Decoding input for each prediction step , Decoding input linear layer pairs Perform linear encoding to obtain the first... Decoding representation of each prediction step , and will Write the decoded representation sequence .in, This indicates the decoding input linear layer. (The text abruptly ends here.) Send to the causal self-attention submodule.

[0284] Step 3.5.3.2 The causal self-attention submodule receives data from the autoregressive decoding unit. up to the 1st The decoded representation sequence formed in each prediction step Using a causal self-attention computation method to... Perform causal self-attention calculation to obtain the first... One prediction step Causal self-attention results The method is:

[0285] Step 3.5.3.2.1 Multi-head causal self-attention layer of the causal self-attention submodule Perform multi-head causal self-attention computation to obtain the causal self-attention head output.

[0286] Step 3.5.3.2.2 The attention head gating layer of the causal self-attention submodule performs gating processing on the causal self-attention head output to obtain the gated causal self-attention output.

[0287] Step 3.5.3.2.3 The residual connection unit of the causal self-attention submodule is based on the gated causal self-attention output and the first... Decoding representation of each prediction step Generate a causal self-attention residual update representation; the LayerNorm unit normalizes the causal self-attention residual update representation to obtain the ... Prediction Steps Causal self-attention results , .in, This represents causal self-attention computation that includes a multi-head causal self-attention layer, an attention head gating layer, residual connection units, and LayerNorm units. Decoding represents the sequence up to the 1st The prefix sequence of each prediction step. Send to the cross-attention submodule.

[0288] Step 3.5.3.3 The cross-attention submodule receives data from the causal self-attention submodule. The patient's historical memory representation is received from the first position feedforward submodule of the gated relative position timing coding module. The cross-attention calculation method is used to... and Perform cross-attention calculation to obtain the first... Cross-attention results for each prediction step The method is:

[0289] Step 3.5.3.3.1 The multi-head cross-attention layer of the cross-attention submodule... For query representation, using Multi-head cross-attention calculation is performed on the key-value memory representation to obtain the cross-attention head output.

[0290] Step 3.5.3.3.2 The attention head gating layer of the cross attention submodule performs gating processing on the cross attention head output to obtain the gated cross attention output.

[0291] Step 3.5.3.3.3 The residual connection unit of the cross-attention submodule is based on the gated cross-attention output and the causal self-attention result. Generate the cross-attention residual update representation; the LayerNorm unit normalizes the cross-attention residual update representation to obtain the th... Prediction Steps Cross-attention results , .in, This represents the cross-attention computation, which includes a multi-head cross-attention layer, an attention-head gating layer, residual connection units, and LayerNorm units. Send to the second position feedforward submodule.

[0292] Step 3.5.3.4 The second position feedforward submodule receives the first... Cross-attention results for each prediction step The second position feedforward processing method is used to process... Perform position feedforward processing to obtain the first... Decoding hidden state in each prediction step The method is:

[0293] Step 3.5.3.4.1 The first linear layer, activation function, and second linear layer of the second position feedforward submodule are sequentially applied to... The data is processed to obtain the decoded and updated representation.

[0294] Step 3.5.3.4.2 The residual connection unit of the second position feedforward submodule updates the representation and cross-attention results based on the decoding. Generate the decoded residual update representation; the LayerNorm unit normalizes the decoded residual update representation to obtain the first... Prediction Steps Decoding hidden state , .in, and This represents the two linear layers in the second position feedforward submodule of the balanced autoregressive decoding module. Send to the Balanced Representation Splitting Submodule.

[0295] Step 3.5.3.5 The balance representation splitting submodule receives data from the second position feedforward submodule. The balanced characterization decomposition method is used to decompose the characters. Decomposed into outcome representation and treatment representation, resulting in the first The result representation of each prediction step and treatment symptoms The method is:

[0296] Step 3.5.3.5.1 Balance the representation of the sub-modules. Represent the linear layer, ELU activation function, and LayerNorm unit in sequence. Processing is performed to obtain the first... The result representation of each prediction step :

[0297] , formula (5);

[0298] Step 3.5.3.5.2 The treatment representation linear layer, ELU activation function, and LayerNorm unit of the balanced representation split submodule are sequentially applied... Processing is performed to obtain the first... Treatment characteristics of each predicted step :

[0299] , formula (6);

[0300] in, The result represents a linear layer. Indicates the linear layer representing the treatment. This represents the ELU activation function. This represents the LayerNorm unit.

[0301] Step 3.5.3.5.3 The balanced representation splitting submodule will Send to the SOFA prediction branch and training output branch, Send to the treatment prediction branch and the training output branch.

[0302] Step 3.5.3.6 The SOFA prediction branch receives the first... The result representation of each prediction step Receive the first from the autoregressive decoding unit The current target treatment condition for each prediction step The SOFA prediction method was used to predict future SOFA score records under target treatment conditions, and the results were obtained. SOFA prediction values ​​for each prediction step The method is:

[0303] Step 3.5.3.6.1 The splicing layer of the SOFA prediction branch will and The data is then concatenated to obtain the SOFA prediction input.

[0304] Step 3.5.3.6.2 The linear layer, ReLU activation function, and linear output layer of the SOFA prediction branch sequentially perform prediction processing on the SOFA prediction input to obtain the first... Prediction Steps SOFA predictions , ,Will Send it to the training output branch. Among them, This represents the prediction operation consisting of a splicing layer, a linear layer, a ReLU activation function, and a linear output layer in the SOFA prediction branch.

[0305] Step 3.5.3.7 The treatment prediction branch receives the first submodule from the balanced representation splitting module. Treatment characteristics of each predicted step Treatment prediction methods were used to predict future treatment variables, resulting in the first... Treatment predictive value per predictive step The method is:

[0306] Step 3.5.3.7.1 The linear layer, ReLU activation function, and linear output layer of the treatment prediction branch are sequentially applied... Perform prediction processing to obtain the first Treatment predictive value per predictive step , ,Will Send it to the training output branch. Among them, This represents the prediction operation consisting of a linear layer, a ReLU activation function, and a linear output layer in the treatment prediction branch.

[0307] Step 3.5.4 Training the output branch Write the SOFA prediction sequence ,Will Write into the treatment prediction sequence ,Will Write the result representation sequence ,Will Write the therapeutic characterization sequence .

[0308] Step 3.5.5 If ,make Proceed to step 3.5.2; if This indicates that the training output branch has been obtained. SOFA forecast sequence within the future forecast window , Treatment prediction sequence , , Result characterization sequence , and Therapeutic characterization sequence , Proceed to step 3.5.6.

[0309] Step 3.5.6 Training the output branch , , , Send it to the training optimization module.

[0310] Step 3.6 The training optimization module will receive data from the training output branch. , , , .like ,make Proceed to step 3.3 and continue training; if This indicates that the training optimization module has achieved... The set of training batch forward prediction results for all patients , .

[0311] Step 3.7 The training optimization module is based on The outcome prediction loss, treatment prediction loss, and balance loss are calculated by combining the future SOFA score record sequence and future treatment sequence in the corresponding patient time series sample, and then combined into a joint loss. The method is as follows:

[0312] Step 3.7.1 Training optimization module from Reading local sample index Corresponding real future SOFA rating record sequence and real future treatment sequence , and Align with patient and prediction step, calculate Predicting the outcome loss :

[0313] , formula (7);

[0314] in, Indicates the first In the training rounds, the first Local sample index within each training batch The corresponding patient time series sample is in the first SOFA predictions for each prediction step. This represents the corresponding actual SOFA rating record.

[0315] Step 3.8 Training and Optimization Module Calculation Treatment prediction loss :

[0316] , formula (8);

[0317] in, Indicates the first In the training rounds, the first Local sample index within each training batch The corresponding patient time series sample is in the first Treatment prediction value for each prediction step, This represents the corresponding true treatment variable. Step 3.9 The training and optimization module calculates based on the result representation sequence and the treatment representation sequence. Balance loss :

[0318] , formula (9);

[0319] in, This represents the vector inner product. The balanced loss is used to constrain the correlation between the outcome representation and the treatment representation at the same prediction step, achieving balanced representation learning for the outcome representation sequence and the treatment representation sequence.

[0320] Step 3.10 The training optimization module calculates the training batch. joint losses :

[0321] , formula (10);

[0322] Step 3.11 Training optimization module based on joint loss Backpropagation is performed to backpropagate the loss gradient to the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module, and to update the trainable parameters of the three core neural network modules.

[0323] Step 3.12 If ,make and initialize the local sample index. The training batch forward prediction results set Set to empty, proceed to step 3.3; if Then the first After the training rounds are completed, proceed to step 3.13;

[0324] Step 3.13 The training and optimization module, based on the first... Calculation of the joint loss of all training batches within the training epoch. Average joint loss over training rounds , The training optimization module saves the first... The current system parameters after each training round form candidate parameter combinations. and combine candidate parameters Add to the candidate parameter combination set The candidate parameter combination includes at least trainable parameters from the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module. Each candidate parameter combination corresponds to a parameter state of the efficacy prediction system that can execute the forward processing described in steps 3.3 to 3.5.

[0325] Step 3.14 If Then the training optimization module calculates the nearest Average joint loss change over adjacent training rounds ,in .like ,or and right If all conditions are met, the training and optimization module stops training and obtains a set of candidate parameter combinations. ;in, Given the number of candidate parameter combinations, proceed to step four. If... ,make ,make Proceed to step 3.2.

[0326] Fourth, the training and optimization module uses the validation set. For the set of candidate parameter combinations The evaluation process involves determining the target parameter combination based on the SOFA prediction error on the validation set to obtain a trained efficacy prediction system. The method is as follows:

[0327] Step 4.1 Initialize the candidate parameter combination index And initialize the candidate parameter combination evaluation result set. Empty.

[0328] Step 4.2 [The following appears to be a separate, unrelated sentence:] ...the first... Candidate parameter combinations Loading the data into the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module, we obtain the first... A therapeutic efficacy prediction system corresponding to a combination of candidate parameters.

[0329] Step 4.3 Let the verification set ,in This is the index of the sample location within the validation set. Indicates the first One validation sample is used in the second step of the patient time series sample set. The original patient index in the database.

[0330] Step 4.4 Initialize the internal sample location index of the validation set in the training and optimization module. and initialize the first The set of forward prediction results for the validation set under each candidate parameter combination Empty.

[0331] Step 4.5 The spatiotemporal graph feature reconstruction module reads the verification set. The Middle Time series samples of patients Historical time series observation input , The spatiotemporal graph feature reconstruction method described in step 3.3 is used to... Spatiotemporal graph construction, bidirectional message passing, and covariate reconstruction are performed using time-varying covariates, observation masks, and time indices to obtain... Reconstructed covariate sequence ;

[0332] 4.6 The gated relative position timing coding module receives data from the covariate reconstruction submodule of the spatiotemporal graph feature reconstruction module. Reconstructed covariate sequence ,from Read historical treatment sequences Historical SOFA rating record sequence and static features The gating relative position timing coding method described in step 3.4 is used to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates ;

[0333] Step 4.7 The balanced autoregressive decoding module receives data from the first position feedforward submodule of the gated relative position timing coding module. ,from Read the current decoding start point and static features and future treatment sequences as target treatment conditions The balanced autoregressive decoding prediction method described in step 3.5 is used to perform autoregressive decoding, causal self-attention calculation, cross-attention calculation, second position feedforward submodule processing, balanced representation decomposition, SOFA prediction, and treatment prediction on the future prediction window, resulting in... SOFA prediction sequence Treatment prediction sequence Result characterization sequence and therapeutic characterization sequence

[0334] Step 4.8 Training the output branch , , , Send it to the training optimization module.

[0335] Step 4.9 The training optimization module will receive from the training output branch , , , Write to the validation set for forward prediction .

[0336] Step 4.10 If ,make Proceed to step 4.5; if Then the training optimization module obtains the first... The set of forward prediction results for the validation set under each candidate parameter combination . It consists of SOFA prediction sequences, treatment prediction sequences, outcome characterization sequences, and treatment characterization sequences for each patient's time series sample in the validation set; in subsequent step 4.11, only the SOFA prediction sequences are read from this set to calculate the validation error.

[0337] Step 4.11 Training the optimization module from the validation set Read the future SOFA score record sequence corresponding to each patient's time series sample, and based on the first... The future SOFA prediction sequence and corresponding future SOFA score record sequence of each patient time series sample in the validation set under the candidate parameter combination are calculated. Validation error of candidate parameter combinations :

[0338] , formula (11);

[0339] in, Indicates the first Under the nth candidate parameter combination, the th The verification sample is at the ... SOFA predictions for each prediction step. This represents the future SOFA score record corresponding to the validation sample. The training optimization module will... Record to the candidate parameter combination evaluation result set .

[0340] Step 4.12 If ,make Proceed to step 4.2; if Then all candidate parameter combinations have been evaluated, and the training and optimization module compares the evaluation results of the candidate parameter combinations. The candidate parameter combination with the smallest verification error recorded in the data is determined as the target parameter combination. .

[0341] Step 4.13 The training and optimization module combines the target parameters. The system was loaded into the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module to obtain the sepsis vasoactive drug efficacy prediction system with the best prediction performance after training.

[0342] The fifth step involves using the trained, high-performance sepsis vasoactive drug efficacy prediction system to predict the target patient's ICU electronic health record input by the user, generating a simulated treatment action sequence and a predicted SOFA trajectory along the simulated path. The method is as follows:

[0343] Step 5.1 The data acquisition and sample construction module receives the target patient's historical ICU electronic health record input by the user. This is to distinguish it from the original patient index in step two. Record the target patients as The target patient's ICU electronic health record includes the target patient's static characteristics, historical time-series observation input, historical treatment sequence, and historical SOFA score record sequence.

[0344] Step 5.2 The data preprocessing module uses the data preprocessing method described in step 2.10 to preprocess the target patient's ICU electronic health record to obtain a time-series sample of the target patient. The target patient time series sample Including static features Historical time series observation input Historical treatment sequence Historical SOFA rating record sequence and the current decoding starting point This excludes future real-world treatment sequences and future real-world SOFA score recording sequences.

[0345] Step 5.3 target patient time series samples Historical time series observation input , The spatiotemporal graph feature reconstruction method described in step 3.3 is used to... Spatiotemporal graph construction, bidirectional message passing, and covariate reconstruction are performed using time-varying covariates, observation masks, and time indices to obtain... Reconstructed covariate sequence .

[0346] Step 5.4

[0347] Reconstructed covariate sequence ,from Read historical treatment sequences Historical SOFA rating record sequence and static features The gating relative position timing coding method described in step 3.4 is used to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates ;

[0348] Step 5.5 Initialize the predicted step index for the stepwise treatment path simulation module. Initialize the simulated treatment action sequence Predicted SOFA trajectory under simulated path Empty, using time series samples of the target patient Current treatment status And current SOFA rating records As the starting point for simulating a stepwise treatment pathway, that is... , .

[0349] Step 5.6 The stepwise treatment pathway simulation module will be used in the future... Each prediction step is constructed separately. and Two binary candidate treatment conditions Corresponding to the absence of vasoactive drugs, The appropriate vasoactive drug should be used. This is for the current binary candidate treatment criteria. The step-by-step treatment pathway simulation module will As the current target treatment condition in the single-step decoding method described in step 3.5.3, the following will be used: As the previous treatment input in the single-step decoding method described in step 3.5.3, the As the previous SOFA input in the single-step decoding method described in step 3.5.3, the current binary candidate treatment condition, the previous treatment input, the previous SOFA input, and the static features are used. and the target patient's historical memory representation Send it to the balanced autoregressive decoding module.

[0350] Step 5.7 The balanced autoregressive decoding module uses the single-step decoding method described in step 3.5.3 to represent the target patient's historical memory. Static characteristics Current prediction step Previous treatment input Previous SOFA input and current binary candidate treatment conditions Basic single-step decoding processing is performed to obtain the SOFA prediction value, treatment prediction value, outcome representation, and treatment representation under the current binary candidate treatment conditions; in the application stage, only the SOFA prediction value is used as the SOFA prediction value for the next step. : , formula (12);

[0351] in, This represents the combination of target parameters determined in the fourth step. This indicates that the efficacy prediction system after loading the target parameter combination uses the conditional prediction method executed by the single-step decoding method described in step 3.5.3. Indicates the first Each prediction step employs binary candidate treatment conditions. The SOFA prediction value obtained at that time Indicates the first The previous treatment input for the predicted step, when At that time, it is the healing state in the current decoding starting point. At that time, it was a simulated treatment action written back from the previous prediction step; Indicates the first The previous SOFA input for the prediction step, when At that time, it is the SOFA score record in the current decoding starting point, when At that time, it was the SOFA prediction state of the simulated path written back from the previous prediction step. This represents the static characteristics of the target patient.

[0352] Step 5.8 The application output branch sends the next SOFA prediction values ​​under the two binary candidate treatment conditions to the stepwise treatment path simulation module.

[0353] Step 5.9 The stepwise treatment pathway simulation module compares binary candidate treatment conditions. and The corresponding SOFA prediction value is used to select the binary candidate treatment condition with the lower SOFA prediction value in the current prediction step as the simulated treatment action for that step. This simulated treatment action and its corresponding SOFA prediction value are then written back to the decoding input of the next prediction step.

[0354] , formula (13);

[0355] in, Indicates the first A simulated therapeutic action for each predicted step. This indicates the SOFA prediction state after writing back the simulation path. Writing back means using the selected simulated treatment action and corresponding SOFA prediction value in the current prediction step as the previous treatment action and previous SOFA input in the decoding input of the next prediction step. The above process is only used to generate a traceable step-by-step treatment path simulation output and is not used as clinical treatment instructions.

[0356] Step 5.10 The stepwise treatment pathway simulation module will... Write the simulated treatment action sequence ,Will Write the predicted SOFA trajectory under the simulation path .like ,make Proceed to step 5.6; if Then, the simulated treatment action sequence within the future prediction window of the target patient is obtained. Predicted SOFA trajectory under simulated path Simulated treatment action sequence This is used to display the simulated treatment actions written back by the system at each step after comparing two binary candidate treatment conditions, and the predicted SOFA trajectory under the simulated path, per predicted step. The simulated action sequence is used to display the predicted changes in organ function status. Together, they constitute a traceable, step-by-step treatment path simulation output for a single patient, providing data processing results for auxiliary display and decision support reference at the single patient level.

[0357] To verify the technical effectiveness of this invention, the test sets corresponding to the MIMIC-IV dataset, eICU dataset, and semi-synthetic dataset generated based on MIMIC-IV, as described in step 2.10, were used to compare Embodiment 1 of this invention with three comparison methods: TimeCHEAT, G-Net, and Causal Transformer. The evaluation metric was the 7-step average MSE, and the results were the mean and standard deviation of 5 random runs. MSE represents the mean squared error between the SOFA predicted value and the actual SOFA score record; the lower the value, the smaller the SOFA prediction error. The results are shown in the table below:

[0358] method References MIMIC-IVMSE eICU MSE Semi-synthetic dataset MSE TimeCHEAT Liu, J., Cao, M. & Chen, S. TimeCHEAT: AChannel HarmonyStrategy for Irregularly Sampled Multivariate TimeSeries Analysis[C]. Proceedings of the AAAI Conference on Artificial Intelligence, 2025. 0.967 ±0.042 1.186 ±0.285 0.519 ±0.011 G-Net Li, R., Hu, S., Lu, M., Utsumi, Y., Chakraborty, P., Sow, DM, Madan, P., Li, J., Ghalwash, M., Shahn, Z. & Lehman, LH G-Net: a Recurrent Network Approach to G-Computation for Counterfactual Prediction Under a Dynamic Treatment Regime[C]. Proceedings of Machine Learning for Health (ML4H), PMLR, 2021, 158: 282-299. 1.032 ±0.033 1.226 ±0.028 0.187 ±0.002 CausalTransformer Melnychuk, V., Frauen, D. & Feuerriegel, S. Causal Transformer for Estimating Counterfactual Outcomes[C]. Proceedings of the 39th International Conference on Machine Learning (ICML), PMLR, 2022, 162. 0.804 ±0.022 1.024 ±0.014 0.188 ±0.002 This invention / 0.781 ±0.016 0.939 ±0.044 0.177 ±0.002

[0359] As shown in the table above, the 7-step average MSE of Embodiment 1 of the present invention is lower than that of the three comparison methods on the MIMIC-IV dataset, eICU dataset, and semi-synthetic dataset. As shown in Figure 3, Figures 3(a), 3(b), and 3(c) are the MSE prediction performance evaluation results on the corresponding test sets of the MIMIC-IV dataset, eICU dataset, and semi-synthetic dataset, respectively; the horizontal axis is the prediction step size, and the vertical axis is the MSE. The four curves represent the MSE of TimeCHEAT, G-Net, CausalTransformer, and Embodiment 1 of the present invention under different prediction step sizes. In Figure 3, the curve corresponding to Embodiment 1 of the present invention is lower than that of the three comparison methods, indicating that the present invention can reduce the multi-step SOFA prediction error.

[0360] To verify the technical contributions of the spatiotemporal graph feature reconstruction module and the balancing loss, the following ablation evaluation was conducted. Ablation evaluation refers to an evaluation method that removes a specified module or loss term from the system while keeping other training and evaluation settings unchanged, and compares the changes in evaluation metrics before and after removal. Example 2 first uses the MSE metric to evaluate the changes in SOFA prediction performance after removing the spatiotemporal graph feature reconstruction module or removing the balancing loss. As shown in Figure 4, Figure 4(a), Figure 4(b), and Figure 4 (c) The MSE ablation evaluation results on the MIMIC-IV dataset, eICU dataset and semi-synthetic dataset are respectively; the horizontal axis is the prediction step size and the vertical axis is MSE. The three sets of bars represent the MSE of the complete system, the MSE after removing the spatiotemporal graph feature reconstruction module and the MSE after removing the balance loss.

[0361] Example 1: The 7-step average MSE of the complete system built in the first step on the MIMIC-IV dataset, eICU dataset, and semi-synthetic dataset are as follows: , and After removing the spatiotemporal graph feature reconstruction module, the three were respectively elevated to , and After removing the balancing loss, the three increased to […]. , and The above results demonstrate that both the spatiotemporal graph feature reconstruction module and the balancing loss contribute technically to reducing SOFA prediction errors. Therefore, this invention can improve the stability of multi-step SOFA prediction under irregular ICU time-series data.

[0362] The above experiments demonstrate that this invention can reduce the interference of treatment allocation mechanism information on outcome prediction representation and improve the accuracy of vasoactive drug treatment effect prediction through balanced representation learning. This invention integrates observation values, observation masks, time indices, historical treatment states, historical SOFA score records, and static features into representation calculation. It also decomposes the hidden states obtained from balanced autoregressive decoding into outcome representations and treatment representations. Furthermore, by constraining the correlation between the outcome representation sequence and the treatment representation sequence through balanced loss, the outcome representation becomes more focused on SOFA outcome prediction information, reducing the interference of treatment allocation mechanism information on outcome prediction representation.

[0363] The semi-synthetic dataset generated by MIMIC-IV produces SOFA outcomes for the same patient sample under both vasoactive drug use and non-vasoactive drug use conditions, thus enabling the calculation of the true treatment effect; the true treatment effect is the difference between the SOFA outcome under vasoactive drug use and the SOFA outcome without vasoactive drug use. In the MIMIC-IV and eICU datasets, the same patient cannot simultaneously be in both vasoactive drug use and non-vasoactive drug use states at the same time step, making it impossible to directly obtain the aforementioned true treatment effect. PEHE represents the error between the true treatment effect and the predicted treatment effect; a lower value indicates a smaller prediction error.

[0364] As shown in Figure 5, the main results of PEHE on the semi-synthetic dataset indicate that the PEHE of Example 1 of this invention is... Lower than TimeCHEAT G-Net and CausalTransformer As shown in Figure 6, the PEHE ablation evaluation results on the semi-synthetic dataset indicate that the PEHE of the complete system is... After removing the spatiotemporal graph feature reconstruction module, PEHE rose to After removing the balance loss, PEHE rose to As shown in Figures 5 and 6, this invention can reduce the interference of treatment allocation mechanism information on outcome prediction representation through balanced representation learning, and effectively predict the treatment effect under vasoactive drug use conditions.

[0365] In addition to the above effects, this invention can output traceable simulation results of a single-patient stepwise treatment path for auxiliary display and decision support reference. This invention constructs two local action branches—treatment and no treatment—at each future prediction step through a fifth-step stepwise treatment path simulation module. A balanced autoregressive decoding module obtains the SOFA prediction value for the next step under two binary candidate treatment conditions. The stepwise treatment path simulation module compares the SOFA prediction values ​​under the two action conditions, selects the action with the lower predicted SOFA as the current step's simulated action, and writes the selected simulated treatment action and its corresponding SOFA prediction value back to the decoding state of the next prediction step until the prediction window ends, thereby obtaining a simulated treatment action sequence with a stepwise generation process and a predicted SOFA trajectory under the simulated path. Figure 7 shows the output diagram of the single-patient treatment path simulation. Figure 7 As shown, the horizontal axis represents the prediction step size, and the vertical axis represents SOFA. The black diamond-shaped broken line in the figure represents the actual SOFA score record, and the blue diamond-shaped broken line represents the predicted SOFA trajectory under the simulated path; Figure 7 The top row of dots represents actual treatment records, while the bottom row represents simulated treatment action sequences generated by the step-by-step treatment path simulation module; solid dots indicate the use of vasoactive drugs, and hollow dots indicate the absence of vasoactive drugs. Figure 7 It is understood that the present invention can not only obtain the SOFA prediction results of the target patient under the simulation path, but also retain the comparison of the two local action branches of treatment and non-treatment in each prediction step, the selection of simulated treatment actions, and the state write-back process, so that the prediction results of the step-by-step treatment path simulation are traceable and can be used as an auxiliary display and treatment plan adjustment reference at the single patient level.

[0366] Therefore, this invention achieves the effect of improving the stability of SOFA trajectory prediction under sepsis vasoactive drug treatment conditions and the traceability of single-patient stepwise treatment path simulation output by utilizing treatment equilibrium temporal representation, and can also improve the stability of multi-step SOFA prediction under irregular ICU temporal data. This invention organizes irregular sampling, missing information, historical treatment status, historical SOFA status and static individual differences in ICU electronic health records into a continuous treatment condition prediction chain by constructing multivariate temporal samples of patients, reconstructing spatiotemporal graph features, gated relative position temporal encoding and balanced autoregressive decoding, so that the system can output SOFA trajectories for multiple future prediction steps given a patient's historical observation window.

[0367] The foregoing has provided a detailed description of the method and system for predicting the therapeutic effect of vasoactive drugs in sepsis based on therapeutic equilibrium time-series characterization, as provided by this invention. The above description elucidates the principles and implementation methods of this invention, serving to aid in understanding its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the scope of protection of this invention.

Claims

1. A method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning, characterized in that... Includes the following steps: The first step is to construct a sepsis vasoactive drug efficacy prediction system. The sepsis vasoactive drug efficacy prediction system consists of a data acquisition and sample construction module, a data preprocessing module, a spatiotemporal graph feature reconstruction module, a gated relative position temporal encoding module, a balanced autoregressive decoding module, a training and optimization module, and a stepwise treatment path simulation module. Among them, the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module are neural networks. The second step involves the data acquisition and sample construction module and the data preprocessing module working together to organize the ICU electronic health record data into a time-series sample set of patients, and then dividing it into a training set. Validation set and test set The total number of training set samples is The total number of validation set samples is The total number of samples in the test set is , , The number of sepsis patients in the ICU electronic health records. The value is a positive integer; the patient time series sample set contains N preprocessed patient time series samples, where the i-th... Time series samples of patients , These are the preprocessed static features. Input for historical time series observations, For the preprocessed time-varying covariates, To and The corresponding observation mask, if If the dimension has been observed, then If the value is 1, If the dimension is missing or cannot be parsed, then The value is 0; For the first The patient's historical treatment sequence, For the first A sequence of historical SOFA score records for each patient. For the first The patient's time step is equal to the historical observation window length. Treatment status, For the first The patient at time step equals SOFA rating records, This forms the current decoding starting point. For the first The future treatment sequence for each patient For the first A sequence of future SOFA score records for each patient; The third step is to use the training set. The sepsis vasoactive drug efficacy prediction system was trained to obtain a set of candidate parameter combinations: a spatiotemporal graph feature reconstruction module, a gated relative position temporal encoding module, and a balanced autoregressive decoding module cooperated to determine the optimal parameters based on the given information. The system predicts SOFA prediction sequences, treatment prediction sequences, outcome representation sequences, and treatment representation sequences for each patient's time series sample. The training and optimization module calculates outcome prediction loss, treatment prediction loss, and balance loss based on the prediction sequences and representation sequences, along with the future SOFA score record sequences and future treatment sequences in the corresponding patient time series samples. These are combined into a joint loss, which is then used to update the trainable parameters of the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, and the balanced autoregressive decoding module, resulting in a candidate parameter combination set. The method is: Step 3.1 The spatiotemporal graph feature reconstruction module receives the training set from the data preprocessing module. Set the training parameters; training parameters include batch size. Maximum number of training rounds Continuous stable rounds Training stopping threshold Treatment prediction loss weight and balancing loss weights The training optimization module uses the Adam optimizer to optimize the trainable parameters of the three core neural network modules; the training optimization module initializes the training epoch index. Initialize the candidate parameter combination index Initialize the set of candidate parameter combinations The value is empty, and the average joint loss record is initialized to be empty; Step 3.2 The spatiotemporal graph feature reconstruction module is in the first step. The training set will be used in each training round. Divided into Each training batch initializes the batch index. and initialize the local sample index. and training batch forward prediction result set Empty; the first The training round # Each training batch is denoted as ;in, For the first In the training rounds, the first The number of samples in each training batch, and ; This represents a local sample index within the current training batch; Step 3.3 Reading the spatiotemporal graph feature reconstruction module Local sample index Corresponding patient time series samples The spatiotemporal graph feature reconstruction module starts from... Read historical time series observation input The spatiotemporal graph feature reconstruction method is used to... Spatiotemporal graph construction, bidirectional message passing, and covariate reconstruction are performed using time-varying covariates, observation masks, and time indices to obtain... Reconstructed covariate sequence The method is: Step 3.3.1 Reading the graph construction submodule Historical time series observation input ,from The time-varying covariate channels are determined by the preprocessed time-varying covariate fields, and time-varying covariate channel nodes are constructed based on these channels; according to Determine the historical time step, based on Construct an initial time event node representation; construct an initial edge representation based on the observation values ​​and observation masks corresponding to the same time-varying covariate channel and the same historical time step, and obtain the initial time-varying covariate channel node representation, initial time event node representation, and initial edge representation to form a spatiotemporal graph, and send the spatiotemporal graph to the bidirectional message passing submodule; Step 3.3.2 The bidirectional message passing submodule receives the spatiotemporal graph from the graph construction submodule and uses the bidirectional message passing method to update the initial time-varying covariate channel node representation, initial time event node representation, and initial edge representation of the spatiotemporal graph layer by layer, obtaining the first... Layer time-varying covariate channel node representation set , No. Layered time event node representation set and the Layer edge represents a set And send the three to the covariate reconstruction submodule, the , , For the Lth layer Each time-varying covariate channel node represents a time-varying covariate. For the first Layer Each time event node represents a time event node. For the first Layer The time-varying covariate channel node and the first The edge representation between time event nodes; It is a historical time step index. It is a time-varying covariate channel index; Step 3.3.3 The covariate reconstruction submodule receives data from the bidirectional message passing submodule. and The covariate reconstruction method is used to generate reconstructed values ​​for each historical time step and each time-varying covariate channel, resulting in... Reconstructed covariate sequence ,Will The signal is sent to the gating relative position timing encoding module. , , It is the first The first historical time step, the Reconstructed values ​​of each time-varying covariate channel, , This represents the linear output layer of the covariate reconstruction submodule; Step 3.4 The gated relative position timing coding module receives data from the covariate reconstruction submodule. ,from Read , and The gated relative position timing coding method is used to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates ,Will Send to the balanced autoregressive decoding module; , For the first Encoded vectors for each historical time step; Step 3.5 The balanced autoregressive decoding module receives data from the gated relative position timing coding module. ,from Read the current decoding start point, and as a condition for targeted treatment The balanced autoregressive decoding prediction method is used to perform autoregressive decoding, causal self-attention calculation, cross-attention calculation, second-position feedforward submodule processing, balanced representation decomposition, SOFA prediction, and treatment prediction on the future prediction window, resulting in... The SOFA prediction sequence, treatment prediction sequence, outcome characterization sequence, and treatment characterization sequence are four sequences, and the method is as follows: Step 3.5.1 Initialize the future prediction step index of the autoregressive decoding unit and initialize the SOFA prediction sequence. Treatment prediction sequence Result characterization sequence Treatment characterization sequence and decoding representation sequence Empty; Step 3.5.2 Autoregressive decoding unit determines the first The current target treatment condition and the previous input for the prediction step; the first step The current target treatment condition for each prediction step ;like The previous treatment input Equal to the current decoding starting point Previous SOFA input Equal to the current decoding starting point ;like The previous treatment input Equals the current target treatment condition corresponding to the previous prediction step, and the previous SOFA input. It equals the SOFA prediction value from the previous prediction step; where, Indicates the first The previous treatment input used in each prediction step Indicates the first The previous SOFA input used in the prediction step; the first prediction step will use the second SOFA input. The current target treatment condition for each prediction step is sent to the SOFA prediction branch; Step 3.5.3 The balanced autoregressive decoding module uses a single-step decoding method to... , Current prediction step Previous treatment input Previous SOFA input and current target treatment conditions Perform basic single-step decoding operations to obtain the first... Prediction Steps SOFA predictions Treatment predictive value Result characterization and treatment symptoms ; Step 3.5.4 If ,make Proceed to step 3.5.2; if This indicates that the training output branch has been obtained. SOFA forecast sequence within the future forecast window , Treatment prediction sequence , , Result characterization sequence , and Therapeutic characterization sequence , Proceed to step 3.5.5; Step 3.5.5 Training the output branch , , , Send to the training optimization module; Step 3.6 The training optimization module will receive data from the training output branch. , , , Write to the training batch forward prediction result set ;like ,make Proceed to step 3.3 and continue training; if This indicates that the training optimization module has achieved... The set of training batch forward prediction results for all patients , ; Step 3.7 The training optimization module is based on Calculate the future SOFA score record sequence and future treatment sequence in the corresponding patient time series sample. Predicting the outcome loss Treatment prediction loss and balance loss Combining joint losses ; Step 3.8 Training optimization module according to Perform backpropagation to backpropagate the loss gradient to the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module, and update the trainable parameters of the three core neural network modules; Step 3.9 If ,make and initialize the local sample index. The training batch forward prediction results set Set to empty, proceed to step 3.3; if Then the first After the training rounds are completed, proceed to step 3.10; Step 3.10 The training optimization module, based on the first... Calculation of the joint loss of all training batches within the training epoch. Average joint loss over training rounds , The training optimization module saves the first... The current system parameters after each training round form candidate parameter combinations. and combine candidate parameters Add to the candidate parameter combination set The candidate parameter combination includes trainable parameters from the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module. Step 3.11 If Then the training optimization module calculates the nearest Average joint loss change over adjacent training rounds ,in ;like ,or and right If all conditions are met, the training and optimization module stops training and obtains a set of candidate parameter combinations. ;in, To determine the number of candidate parameter combinations, proceed to step four; if ,make ,make Proceed to step 3.2; Fourth, the training and optimization module uses the validation set. For the set of candidate parameter combinations The evaluation was conducted, and the target parameter combination was determined based on the SOFA prediction error on the validation set to obtain the sepsis vasoactive drug efficacy prediction system with the best prediction performance after training. The fifth step involves using the trained, high-performance sepsis vasoactive drug efficacy prediction system to predict the target patient's ICU electronic health record input by the user, generating a simulated treatment action sequence and a predicted SOFA trajectory along the simulated path. The method is as follows: Step 5.1 The data acquisition and sample construction module receives the target patient's historical ICU electronic health record input by the user; and records the target patient as... The target patient's ICU electronic health record includes the target patient's static characteristics, historical time-series observation input, historical treatment sequence, and historical SOFA score record sequence. Step 5.2 The data preprocessing module preprocesses the target patient's ICU electronic health record to obtain a time-series sample of the target patient. The target patient time series sample Including static features Historical time series observation input Historical treatment sequence Historical SOFA rating record sequence and the current decoding starting point ; Step 5.3 The spatiotemporal graph feature reconstruction module reads the time series samples of the target patient. Historical time series observation input , The spatiotemporal graph feature reconstruction method described in step 3.3 is used to... Spatiotemporal graph construction, bidirectional message passing, and covariate reconstruction are performed using time-varying covariates, observation masks, and time indices to obtain... Reconstructed covariate sequence ; Step 5.4 The gated relative position timing coding module receives data from the covariate reconstruction submodule of the spatiotemporal graph feature reconstruction module. Reconstructed covariate sequence ,from Read historical treatment sequences Historical SOFA rating record sequence and static features The gating relative position timing coding method described in step 3.4 is used to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates ; Step 5.5 Initialize the predicted step index for the stepwise treatment path simulation module. Initialize the simulated treatment action sequence Predicted SOFA trajectory under simulated path Empty, using time series samples of the target patient Current treatment status And current SOFA rating records As the starting point for simulating a stepwise treatment pathway, that is... , ; Step 5.6 The stepwise treatment pathway simulation module will be used in the future... Each prediction step is constructed separately. and Two binary candidate treatment conditions Corresponding to the absence of vasoactive drugs, Correspondingly, vasoactive drugs should be used; for the current binary candidate treatment conditions. The step-by-step treatment pathway simulation module will As the current target treatment condition in the single-step decoding method described in step 3.5.3, the following will be used: As the previous treatment input in the single-step decoding method described in step 3.5.3, the As the previous SOFA input in the single-step decoding method described in step 3.5.3, the current binary candidate treatment condition, the previous treatment input, the previous SOFA input, and the static features are used. and the target patient's historical memory representation Send to the balanced autoregressive decoding module; Step 5.7 The balanced autoregressive decoding module uses the single-step decoding method described in step 3.5.3 to represent the target patient's historical memory. Static characteristics Current prediction step Previous treatment input Previous SOFA input and current binary candidate treatment conditions Basic single-step decoding is performed to obtain the SOFA prediction value, treatment prediction value, outcome representation, and treatment representation under the current binary candidate treatment conditions; the SOFA prediction value is then used as the SOFA prediction value for the next step. : , formula (12); in, This indicates that the efficacy prediction system after loading the target parameter combination uses the conditional prediction method executed by the single-step decoding method described in step 3.5.

3. Indicates the first Each prediction step employs binary candidate treatment conditions. The SOFA prediction value obtained at that time Indicates the first The previous treatment input for the predicted step, when At that time, it is the healing state in the current decoding starting point. At that time, it was a simulated treatment action written back from the previous prediction step; Indicates the first The previous SOFA input for the prediction step, when At that time, it is the SOFA score record in the current decoding starting point, when At that time, it was the SOFA prediction state of the simulated path written back from the previous prediction step. Indicates the static characteristics of the target patient; Step 5.8 The output branch is used to send the next SOFA prediction values ​​under the two binary candidate treatment conditions to the stepwise treatment path simulation module; Step 5.9 The stepwise treatment pathway simulation module compares binary candidate treatment conditions. and The corresponding SOFA prediction value is used to select the binary candidate treatment condition with the lower SOFA prediction value in the current prediction step as the simulated treatment action for that step. This simulated treatment action and its corresponding SOFA prediction value are then written back to the decoding input of the next prediction step. , formula (13); in, Indicates the first A simulated therapeutic action for each predicted step. This indicates the SOFA prediction state after writing back the simulation path; writing back means using the selected simulated treatment action and corresponding SOFA prediction value in the current prediction step as the previous treatment action and the previous SOFA input in the decoding input of the next prediction step. Step 5.10 The stepwise treatment pathway simulation module will... Write the simulated treatment action sequence ,Will Write the predicted SOFA trajectory under the simulation path ;like ,make Proceed to step 5.6; if Then, the simulated treatment action sequence within the future prediction window of the target patient is obtained. Predicted SOFA trajectory under simulated path Simulated treatment action sequence This is used to display the simulated treatment actions written back by the system at each step after comparing two binary candidate treatment conditions, and the predicted SOFA trajectory under the simulated path, per predicted step. The simulated action sequence is used to display the predicted changes in organ function status, and together they constitute a traceable single-patient step-by-step treatment path simulation output.

2. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... In the sepsis vasoactive drug efficacy prediction system described in the first step, the data acquisition and sample construction module is connected to the data preprocessing module. It receives raw patient data from the patient's ICU electronic health record. This raw data includes static features, time-varying covariates, time records, vasoactive drug usage records, and SOFA score records. Static features include age, gender, weight, and height. Time-varying covariates include vital signs and clinical observation variables that change over time. The data acquisition and sample construction module slices the patient's ICU electronic health record according to preset historical observation windows and prediction windows, constructing a pre-processed patient time-series sample containing historical observation windows and future prediction windows. This pre-processed patient time-series sample is then sent to the data preprocessing module. The data preprocessing module is connected to the data acquisition and sample construction module, the spatiotemporal graph feature reconstruction module, the gated relative position temporal encoding module, the balanced autoregressive decoding module, and the training optimization module. It receives patient time-series samples from the data acquisition and sample construction module before preprocessing. It standardizes the continuous variables of static features (age, weight, and height) in the preprocessed patient time-series samples; encodes the categorical variable of static features (gender); cleans and standardizes abnormal records for vital signs and laboratory indicators in the time-varying covariates; constructs a time index based on the time records; constructs an observation mask based on the existence of valid and resolvable measurements within the corresponding time window; constructs a binary treatment variable from the vasoactive drug usage records, which indicates whether vasoactive drugs were used at the corresponding time point; the data preprocessing module preprocesses the time-varying covariates within the historical observation window, forming a historical treatment sequence based on the vasoactive drug usage records within the historical observation window, and forming a historical SOFA score record sequence based on the SOFA score records within the historical observation window; and preprocesses the binary treatment variable and SOFA score at the end of the historical observation window. The scoring record forms the current decoding starting point; the future treatment sequence is formed based on the vasoactive drug use record within the future prediction window, and the future SOFA score record sequence is formed based on the SOFA score record within the future prediction window; the data preprocessing module combines the preprocessed static features, historical time-series observation input, historical treatment sequence, historical SOFA score record sequence, current decoding starting point, future treatment sequence, and future SOFA score record sequence into a preprocessed patient time-series sample, and sends the patient time-series sample to the spatiotemporal graph feature reconstruction module, the gated relative position time-series encoding module, the balanced autoregressive decoding module, and the training optimization module; The spatiotemporal graph feature reconstruction module is connected to the data preprocessing module and the gated relative position temporal coding module. It consists of a graph construction submodule, a bidirectional message passing submodule, and a covariate reconstruction submodule. The graph construction submodule includes a learnable channel correlation matrix, a time-varying covariate channel node linear layer, a time event node linear layer, and an edge representation linear layer. The bidirectional message passing submodule consists of… Each graph message passing layer is stacked, and each layer includes a stitching layer, a multi-head attention layer, an edge update linear layer, an activation function, and residual connection units. The covariate reconstruction submodule includes a stitching layer and a linear output layer. The graph construction submodule receives historical time-series observation input from the data preprocessing module. Its time-varying covariate channel node linear layer works in conjunction with the learnable channel correlation matrix to generate an initial time-varying covariate channel node representation based on the time-varying covariate channels determined after preprocessing. The time event node linear layer generates an initial time event node table based on the historical time index. The edge representation linear layer generates initial edge representations based on preprocessed observations, observation masks, and time indices, resulting in a spatiotemporal graph formed by initial time-varying covariate channel node representations, initial time event node representations, and initial edge representations. The bidirectional message passing submodule receives the spatiotemporal graph from the graph construction submodule. Its first graph message passing layer's splicing layer concatenates adjacent node and edge representations, which are then processed sequentially through a multi-head attention layer, an edge update linear layer, an activation function, and a residual connection unit to obtain updated time-varying covariate channel node representations, time event node representations, and edge representations. After the message passing layer of the graph outputs the first... Layer-time-varying covariate channel node representation, time event node representation, and edge representation; the covariate reconstruction submodule receives the first... Layered time-varying covariate channel node representation, time event node representation, and edge representation, with its internal splicing layer being the first... The layer time-varying covariate channel node representation, time event node representation and edge representation are concatenated, processed by the linear output layer inside to obtain the reconstructed covariate sequence, and then sent to the gated relative position timing coding module. The gated relative position temporal coding module is connected to the spatiotemporal graph feature reconstruction module, data preprocessing module, and balanced autoregressive decoding module. It consists of a dynamic input construction submodule, a relative position attention submodule, an input dependency gating submodule, a static feature conditionalization submodule, and a first position feedforward submodule. The dynamic input construction submodule includes a splicing layer and an input linear layer. The relative position attention submodule includes a query linear layer, a key linear layer, a value linear layer, a multi-head attention layer, a learnable relative position bias unit, and an output linear layer. The input dependency gating submodule includes a gated linear layer, a sigmoid gate layer, and an element-wise multiplication unit. The static feature conditionalization submodule includes a static feature linear layer. The first position feedforward submodule includes a splicing layer, a linear layer, an activation function, a linear layer, a residual connection unit, and a LayerNorm unit. The dynamic input construction submodule receives the reconstructed covariate sequence from the spatiotemporal graph feature reconstruction module and the historical treatment sequence and historical SOFA score record sequence from the data preprocessing module. At each historical time step, the splicing layer of the dynamic input construction submodule reconstructs the covariates, historical treatment variables, and historical SOFA scores. The scoring records are concatenated according to their feature dimensions and then processed by the input linear layer to obtain the encoded input sequence. The relative position attention submodule receives the encoded input sequence from the dynamic input construction submodule. Its query linear layer, key linear layer, and value linear layer process the encoded input sequence in parallel to obtain the query representation, key representation, and value representation, respectively. The learnable relative position bias unit in the relative position attention submodule generates a learnable relative position bias. The multi-head attention layer performs attention calculation based on the query representation, key representation, value representation, and learnable relative position bias to obtain the attention head output. The output linear layer in the relative position attention submodule processes the attention head output to obtain the relative position attention output. The input dependency gating submodule receives the encoded input sequence from the dynamic input construction submodule and the attention head output from the relative position attention submodule. Its gating linear layer generates a gating vector based on the encoded input sequence, and the sigmoid function is applied to it. The gating layer processes the gating vector to obtain gating weights. The element-wise multiplication unit multiplies the gating weights with the attention head output to obtain the gating attention output. The static feature conditionalization submodule receives the preprocessed static features from the data preprocessing module. Its static feature linear layer generates a static feature conditional representation based on the preprocessed static features. The first position feedforward submodule receives the gating attention output from the input-dependent gating submodule and the static feature conditional representation from the static feature conditionalization submodule. The first position feedforward submodule's concatenation layer concatenates the gating attention output with the static feature conditional representation. Then, it is processed sequentially through a linear layer, activation function, linear layer, residual connection unit, and LayerNorm unit to obtain the patient's historical memory representation. The patient's historical memory representation is then sent to the balanced autoregressive decoding module. The balanced autoregressive decoding module is connected to the gated relative position temporal coding module, data preprocessing module, training optimization module, and stepwise treatment path simulation module. It consists of an autoregressive decoding unit, a causal self-attention submodule, a cross-attention submodule, a second position feedforward submodule, a balanced representation splitting submodule, a SOFA prediction branch, a treatment prediction branch, a training output branch, and an application output branch. Specifically, the autoregressive decoding unit includes a splicing layer and a decoding input linear layer; the causal self-attention submodule includes a multi-head causal self-attention layer, an attention head gating layer, a residual connection unit, and a LayerNorm unit; the cross-attention submodule includes a multi-head cross-attention layer, an attention head gating layer, a residual connection unit, and a LayerNorm unit; the second position feedforward submodule includes a linear layer, an activation function, a linear layer, a residual connection unit, and a LayerNorm unit; the balanced representation splitting submodule includes an outcome representation linear layer, an activation function, a LayerNorm unit, and a treatment representation linear layer, an activation function, and a LayerNorm unit; SOFA... The prediction branch includes a splicing layer, a linear layer, an activation function, and a linear output layer; the treatment prediction branch includes a linear layer, an activation function, and a linear output layer; the training output branch and the application output branch belong to the output function layer; the autoregressive decoding unit receives the current decoding starting point, preprocessed static features, and future treatment sequences during training or validation from the data preprocessing module. Its splicing layer, with the current decoding starting point as its initial state, splices the previous treatment input, the previous SOFA input, and the preprocessed static features according to the feature dimension, and then processes them through its decoding input linear layer to obtain the decoded representation sequence formed up to the current prediction step; when predicting the target patient's ICU electronic health record input by the user, the autoregressive decoding unit receives the previous simulated treatment action and the previous SOFA written back by the stepwise treatment path simulation module. The prediction state and stepwise treatment path simulation module constructs binary candidate treatment conditions and obtains the decoded representation sequence under the current candidate treatment conditions in the same way. The causal self-attention submodule receives the decoded representation sequence from the autoregressive decoding unit. Its multi-head causal self-attention layer performs causal self-attention calculation on the decoded representation sequence, the attention head gating layer adjusts the attention head output, and then it is processed by the residual connection unit and the LayerNorm unit in sequence to obtain the causal self-attention result. The cross-attention submodule receives the causal self-attention result from the causal self-attention submodule and receives the patient's historical memory representation from the gated relative position temporal coding module. Its multi-head cross-attention layer uses the causal self-attention result as a query to perform cross-attention calculation on the patient's historical memory representation. The attention head gating layer adjusts the attention head output, and then it is processed by the residual connection unit and the LayerNorm unit in sequence to obtain the cross-attention result.The second position feedforward submodule receives the cross-attention results from the cross-attention submodule, and processes them sequentially through a linear layer, activation function, linear layer again, residual connection unit, and LayerNorm unit to obtain the decoded hidden state for each prediction step. The balanced representation splitting submodule receives the decoded hidden state from the second position feedforward submodule, processes it sequentially through a result representation linear layer, activation function, and LayerNorm unit to obtain the result representation, and simultaneously processes it sequentially through a treatment representation linear layer, activation function, and LayerNorm unit to obtain the treatment representation. The balanced autoregressive decoding module generates the result representation sequence and treatment representation sequence through the balanced representation splitting submodule. The result representation sequence consists of result representations from multiple prediction steps, and the treatment representation sequence consists of treatment representations from multiple prediction steps. The SOFA prediction branch receives the result representation from the balanced representation splitting submodule and receives the target treatment conditions. Its concatenation layer concatenates the result representation with the target treatment conditions, and then processes them sequentially through a linear layer, activation function, and linear output layer to obtain the SOFA prediction sequence within the future prediction window. The target treatment conditions during training are derived from the future treatment sequence, and the ICU input by the user is used for... The target treatment conditions for prediction using electronic health records are derived from binary candidate treatment conditions constructed by the stepwise treatment path simulation module. The treatment prediction branch receives treatment representations from the balanced representation splitting submodule, which are then processed sequentially through a linear layer, activation function, and linear output layer within the treatment prediction branch to obtain the treatment prediction sequence within the future prediction window. The training output branch sends the SOFA prediction sequence, treatment prediction sequence, result representation sequence, and treatment representation sequence within the future prediction window to the training optimization module. The application output branch sends the SOFA prediction result for the next prediction step under the current binary candidate treatment conditions to the stepwise treatment path simulation module. The training optimization module is connected to the balanced autoregressive decoding module and applies training loss backpropagation to the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module. This module receives SOFA prediction sequences, treatment prediction sequences, outcome representation sequences, and treatment representation sequences within the future prediction window from the training output branch of the balanced autoregressive decoding module, and receives real future SOFA score record sequences and real future treatment sequences from the data preprocessing module. Based on the errors between the SOFA prediction sequences and real future SOFA score record sequences, the errors between the treatment prediction sequences and real future treatment sequences, and the correlation between the outcome representation sequences and treatment representation sequences, it calculates outcome prediction loss, treatment prediction loss, and balance loss. After combining the above losses into a joint loss, it updates the parameters of the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module. The stepwise treatment path simulation module is connected to the balanced autoregressive decoding module. After the trained efficacy prediction system completes the preprocessing, spatiotemporal graph feature reconstruction, and temporal encoding of the target patient's ICU electronic health record input by the user, it receives the current decoding starting point and the target patient's historical memory representation. In each prediction step, it constructs two binary candidate treatment conditions. Under the two binary candidate treatment conditions, it calls the balanced autoregressive decoding module and receives the corresponding SOFA prediction value for the next step sent by the application output branch of the balanced autoregressive decoding module. It compares the SOFA prediction values ​​corresponding to the two binary candidate treatment conditions, writes the simulated treatment action selected in the current step and its corresponding SOFA prediction value back to the decoding state of the next prediction step, and obtains the simulated treatment action sequence and the predicted SOFA trajectory under the simulated path, which serves as the prediction result of the efficacy of sepsis vasoactive drugs for the target patient's ICU electronic health record input by the user.

3. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 2, characterized in that... The The dimension of the learnable channel correlation matrix in the graph construction submodule is... The input dimension of the linear layer with time-varying covariate channel nodes is 21, and the output dimension is... The linear layer of time event nodes has an input dimension of 1 and an output dimension of 1. An edge indicates that the input dimension of the linear layer is 2 and the output dimension is 1. The multi-head attention layer of the bidirectional message passing submodule includes four attention heads, with a hidden dimension of 128 for both node and edge representations; the linear output layer of the covariate reconstruction submodule has an input dimension of 384 and an output dimension of... The input dimension of the linear layer in the dynamic input construction submodule is 23, and the output dimension is... The input dimension of the query linear layer, key linear layer, value linear layer, and output linear layer in the relative position attention submodule is 128, and the output dimension is also 128. The multi-head attention layer includes 4 attention heads, each with a hidden layer feature dimension of 32, and the maximum relative position of the learnable relative position bias unit is 36. The static feature linear layer has an input dimension of 4 and an output dimension of . The first linear layer in the first position feedforward submodule has an input dimension of 160 and an output dimension of [missing information]. The second linear layer has an input dimension of 512 and an output dimension of... The activation function is the GELU function; the input dimension of the linear layer of the autoregressive decoding unit is 6, and the output dimension is... The multi-head attention layers in both the causal self-attention submodule and the cross-attention submodule include four attention heads, each with a hidden layer feature dimension of 32. The attention head gating layer uses scalar gating. The first linear layer in the second position feedforward submodule has an input dimension of 128 and an output dimension of... The second linear layer has an input dimension of 512 and an output dimension of... The activation function used is the ReLU function; the input dimension and output dimension of the result representation linear layer in the balanced representation decomposition submodule are both 128, and the input dimension and output dimension of the treatment representation linear layer are both 128. The activation function used is the ELU function; the input dimension of the linear layer in the SOFA prediction branch is 129, and the output dimension is... The linear output layer has an input dimension of 128 and an output dimension of [missing information]. The linear layer in the treatment prediction branch has an input dimension of 128 and an output dimension of [missing information]. The linear output layer has an input dimension of 64 and an output dimension of [missing information]. The activation functions for both the SOFA prediction branch and the treatment prediction branch are ReLU functions.

4. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... The second step involves the data acquisition and sample construction module and the data preprocessing module working together to organize the ICU electronic health record data into a patient time-series sample set, and dividing it into training, validation, and test sets. Step 2.1 The data acquisition and sample construction module initializes the patient index. and initialize the patient time series sample set. Empty; Using de-identified MIMIC-IV datasets, de-identified eICU datasets, or semi-synthetic datasets generated based on MIMIC-IV as data sources, we extracted the ICU electronic health records of sepsis patients, assuming the number of extracted sepsis patients is [number missing]. , For each patient, the ICU electronic health record includes raw static characteristics, time-varying covariates, time records, vasoactive drug use records, and SOFA score records. Step 2.2 The data acquisition and sample construction module starts from the user input... Read the first patient's ICU electronic health record Original static characteristics of the patient Construct the original static feature vector; Including the The patient's age, gender, weight, and height are considered as four static feature dimensions. Denotes the length of the static feature vector, where The data acquisition and sample construction module will use the original static features As the first Individual patient background information fields were incorporated into the patient time series samples before preprocessing to characterize the differences in baseline status among different patients; Step 2.3 Initialize the historical observation window time step index in the data acquisition and sample construction module. ; Step 2.4 The data acquisition and sample construction module in the historical observation window The first time step constructs the first Historical timeline records of each patient; the data acquisition and sample construction module starts from the first... Read the first patient's ICU electronic health record A patient in historical time step Time-varying covariates , Including the Clinical observation variables such as vital signs and laboratory indicators of each patient changing over time; when no valid, resolvable measurement value exists within the corresponding time window, the data acquisition and sample construction module retains... The missing state; the data acquisition and sample construction module constructs the first The patient in Time index of each historical time step , used to represent the relative temporal position of the corresponding observation in the patient time series sample before preprocessing; construct the first The patient in A binary treatment variable indicating whether vasoactive drugs were used at each historical time step. , , if the patient In the Within a historical timeframe, receiving any vasoactive drug would... Otherwise ; Construct the first The patient in The outcome variable at each historical time step , Indicates the first The patient in SOFA rating records at each historical time step, , Indicates length is The real vector space, where ,Right now This is a single-dimensional SOFA score record; Step 2.5 If ,make Proceed to step 2.4; if Then the data acquisition and sample construction module obtains the first... Historical time-varying covariates of each patient , Historical Time Index Historical treatment sequence Historical SOFA rating record sequence and the current decoding starting point; where, , The current decoding starting point is , For the first The patient in time step Treatment status, For the first The patient in time step SOFA rating records; Step 2.6 The data acquisition and sample construction module initializes the future prediction window step index. ; Step 2.7 The data acquisition and sample construction module constructs the first sample within the future prediction window. The future labeling record of the patient; for the first patient within the future prediction window There are 1 prediction step, corresponding to 1 time step. The data acquisition and sample construction module starts from the first... The vasoactive drug use record at that time step was read from the patient's ICU electronic health record, and future treatment variables were constructed. , if the patient Administer any vasoactive drug within the corresponding time window, Otherwise The data acquisition and sample construction module reads the SOFA rating record at this time step and constructs future SOFA rating records. The SOFA score is obtained by summing sub-scores from multiple organ systems and is used to characterize the change in the degree of organ dysfunction in patients over time. Step 2.8 If ,make Proceed to step 2.7; if Then the data acquisition and sample construction module obtains the first... Future treatment sequence for each patient And future SOFA rating record sequence ;in, , This forms the first preprocessing step. Time series samples of patients , Including patient index Original static features Historical time-varying covariates Historical Time Index Historical treatment sequence Historical SOFA rating record sequence Current decoding starting point, future treatment sequence And future SOFA rating record sequence ; Step 2.9 The data acquisition and sample construction module will... Send to the data preprocessing module; Step 2.10 The data preprocessing module uses data preprocessing methods to... Preprocessing is performed to obtain the first... Time series samples of patients ;right middle The continuous variables, namely age, weight, and height, are standardized, and the categorical variable, namely gender, is encoded to obtain the preprocessed static features. ; time-varying covariates within the historical observation window Abnormal records were cleaned and standardized from vital signs and laboratory indicators to obtain preprocessed time-varying covariates. , ,in The length of the time-varying covariate vector represents the number of fields in the time-varying covariates, such as vital signs and laboratory indicators. , Indicates length is The real vector space; the data preprocessing module, based on the ICU electronic health records in the first... Constructing and determining whether there are valid, resolvable measurements within each time step's corresponding time window. Corresponding observation mask ;like If the dimension has been observed, then If the value is 1, If the dimension is missing or cannot be parsed, then The value is 0; the data preprocessing module combines the preprocessed time-varying covariates, observation masks, and time indices into historical time-series observation inputs. , For missing time-varying covariates, the data preprocessing module does not directly replace the original observations as simple zero-value or mean-filled results, but rather... The data preprocessing module retains preprocessed observations, observation masks, and time indices in each patient time series sample, enabling the patient time series samples to fully express irregular sampling and missing information features; the data preprocessing module will... , , , , , , , The first part after preprocessing Time series samples of patients , It is an octet, as shown in formula (1): Formula (1); The data preprocessing module will Add to patient time series sample set ; Step 2.11 If ,make Proceed to step 2.2; if Then we obtain the patient time series sample set. , Proceed to step 2.12; Step 2.12 Data preprocessing module according to The proportion will Divided into training set Validation set and test set That is, the time series sample set of patients middle The samples were included in the training set. The samples were included in the validation set. The samples were assigned to the test set, and the total number of samples in the training set was recorded. Total number of validation set samples and the total number of test set samples ,in .

5. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... Step 3.3.1 The graph construction submodule starts from... The time-varying covariate channels are determined by the preprocessed time-varying covariate fields, and time-varying covariate channel nodes are constructed based on these channels; according to Determine the historical time step, based on Constructing initial time event node representations; constructing initial edge representations based on the observations and observation masks corresponding to the same time-varying covariate channel and the same historical time step, resulting in initial time-varying covariate channel node representations, initial time event node representations, and initial edge representations, forming a spatiotemporal graph is as follows: Step 3.3.1.1 Reading the graph construction submodule Historical time series observation input Using graph construction methods from The time-varying covariate channels are determined by the preprocessed time-varying covariate fields. Time-varying covariate channel nodes are then constructed based on these channels. The method is as follows: Step 3.3.1.1.1 Graph Construction Submodule: Let the number of graph message passing layers be... ; Let time-varying covariate channel index =1; Step 3.3.1.1.2 Graph Construction Submodule from The t-th historical time step The common first The time-varying covariate field determines the first The time-varying covariate channel, and the first The time-varying covariate channel nodes are constructed based on the time-varying covariate channel nodes of the graph construction submodule, and the linear layer of the time-varying covariate channel nodes is based on the corresponding nodes in the learnable channel correlation matrix. The parameters of each time-varying covariate channel are linearly encoded to generate an initial time-varying covariate channel node representation. , ; in, This indicates that the learnable channel correlation matrix corresponds to the first... Parameters of each time-varying covariate channel Represents a linear layer of time-varying covariate channel nodes; Step 3.3.1.1.3 If ,make Proceed to step 3.3.1.1.2; if Then the graph construction submodule is obtained A set of time-varying covariate channel nodes and their initial time-varying covariate channel node representations. , Proceed to step 3.3.1.2; where the superscript... Indicates a time-varying covariate channel; Step 3.3.1.2 Graph Construction Submodule Based on The method for constructing the initial time event node representation is as follows: Step 3.3.1.2.1 Initialize the historical time step index in the graph construction submodule. ; Step 3.3.1.2.2 The graph construction submodule starts from... Take the first one from the middle Group The historical observation location corresponding to this set of data is determined as the [number]. A historical time step, and on the first Constructing time event nodes for each historical time step: The linear layer of the graph construction submodule's time event node is based on the time index of that historical time step. Perform linear encoding to generate an initial time event node representation. ,in, Represents a linear layer of time event nodes; Step 3.3.1.2.3 If ,make Proceed to step 3.3.1.2.2; if Then the graph construction submodule is obtained A set of time event nodes and their initial time event node representation. , ; where superscript Indicates a time event; Step 3.3.1.3 The graph construction submodule constructs the initial edge representation based on the observations and observation masks corresponding to the same time-varying covariate channel and the same historical time step. The method is as follows: Step 3.3.1.3.1 Initialize the time-varying covariate channel index in the graph construction submodule. And initialize the historical time step index. ; Step 3.3.1.3.2 Graph Construction Submodule from Take the first one from the middle A historical time step and ,Will The The component is used as the first Observations corresponding to each time-varying covariate field ,Will The Each component serves as the corresponding observation mask. The observed value and the observation mask represent the first... The time-varying covariate channel node and the first The observation relationships between time event nodes; the edges of the graph construction submodule represent linear layer pairs. and The concatenated results are linearly encoded to generate an initial edge representation. ,in, Edges represent linear layers; Step 3.3.1.3.3 If ,make Proceed to step 3.3.1.3.2; if Proceed to step 3.3.1.3.4; Step 3.3.1.3.4 If ,make and order Proceed to step 3.3.1.3.2; if The graph construction submodule then obtains the initial edge representation set. , Proceed to step 3.3.1.4; Step 3.3.1.4 The graph construction submodule represents the initial time-varying covariate channel node representation set. Initial time event node representation set and the initial edge representation set Form a spacetime graph, where each initial edge represents Connect the corresponding first Each time-varying covariate channel node represents With the Each time event node represents The spatiotemporal graph is then sent to the bidirectional message passing submodule.

6. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... Step 3.3.2 The bidirectional message passing submodule uses a bidirectional message passing method to update the initial time-varying covariate channel node representation, initial time event node representation, and initial edge representation in the spatiotemporal graph layer by layer, obtaining the first... Layer time-varying covariate channel node representation set , No. Layered time event node representation set and the Layer edge represents a set The method is: Step 3.3.2.1 Initialize the bidirectional message passing submodule graph and set the message passing layer index. ; Step 3.3.2.2 The bidirectional message passing submodule is in the... Layer initialization time-varying covariate channel index ; Step 3.3.2.3 The splicing layer of the bidirectional message passing submodule is based on the first... Layer Each time-varying covariate channel node represents As a query representation, it will be related to the first The time event nodes adjacent to each time-varying covariate channel node represent and corresponding edge representation By concatenating the features, the first information to be aggregated is obtained; the multi-head attention layer of the bidirectional message passing submodule... Under the constraints, multi-head attention aggregation is performed on the query representation and the first information to be aggregated to obtain the first... Layer Each time-varying covariate channel node represents : Formula (2); in, This indicates message aggregation operations based on a multi-head attention layer. Indicates the relationship with the first A set of time event nodes adjacent to a time-varying covariate channel node. This represents the visibility mask of the time-varying covariate channel, determined by the relationship between adjacent time event nodes in the spatiotemporal graph. This represents vector concatenation. Indicates the first Layer The time-varying covariate channel node and the first The edge representation between time event nodes; Step 3.3.2.4 If ,make Proceed to step 3.3.2.3; if Then the bidirectional message passing submodule completes the first... All time-varying covariate channel nodes of the layer are updated to obtain the first... Layer time-varying covariate channel node representation set , Proceed to step 3.3.2.5; Step 3.3.2.5 The bidirectional message passing submodule is in the... Layer initialization historical time step index ; Step 3.3.2.6 The splicing layer of the bidirectional message passing submodule is based on the first... Layer Each time event node represents As a query representation, it will be related to the first The time-varying covariate channel nodes adjacent to each time event node represent and corresponding edge representation By concatenating the features, the second information to be aggregated is obtained; the multi-head attention layer of the bidirectional message passing submodule... Under the constraints, multi-head attention aggregation is performed on the query representation and the second information to be aggregated to obtain the first... Layer Each time event node represents : Formula (3); in, Indicates the relationship with the first A set of time-varying covariate channel nodes adjacent to each time event node. This represents a time event visibility mask determined by the relationship between adjacent time-varying covariate channel nodes in the spatiotemporal graph; Step 3.3.2.7 If ,make Proceed to step 3.3.2.6; if Then the bidirectional message passing submodule completes the first... All time event nodes in the layer are updated to obtain the first... Layered time event node representation set , ; Step 3.3.2.8 The bidirectional message passing submodule is in the... Layer initialization time-varying covariate channel index and initialize the historical time step index. ; Step 3.3.2.9 The bidirectional message passing submodule receives the first... Layer The time-varying covariate channel node and the first The edges between time event nodes represent , No. Layer Each time-varying covariate channel node represents and the Layer Each time event node represents The edge update linear layer of the bidirectional message passing submodule , and The concatenated result is linearly encoded, and the activation function performs nonlinear processing on the linearly encoded result. The residual connection unit is then processed based on the nonlinear processing result and the first... Layer edge representation generates the first Layer edge representation : , formula (4); in, This represents the edge update operation, which consists of an edge-update linear layer, an activation function, and residual connection units. Step 3.3.2.10 If ,make Proceed to step 3.3.2.9; if Proceed to step 3.3.2.11; Step 3.3.2.11 If ,make and order Proceed to step 3.3.2.9; if Then the bidirectional message passing submodule completes the first... Update all edge representations of the layer to obtain the first layer. Layer edge represents a set , Proceed to step 3.3.2.12; Step 3.3.2.12 If ,make Proceed to step 3.3.2.2; if , obtained the Layer time-varying covariate channel node representation set , No. Layered time event node representation set and the Layer edge represents a set And send the three to the covariate reconstruction submodule.

7. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... Step 3.3.1 The covariate reconstruction submodule uses the covariate reconstruction method to generate reconstructed values ​​for each historical time step and each time-varying covariate channel, thus obtaining... Reconstructed covariate sequence The method is: Step 3.3.3.1 Initialize the historical time step index in the covariate reconstruction submodule. and initialize the time-varying covariate channel index. ; Step 3.3.3.2 The splicing layer of the covariate reconstruction submodule will... Layer Each time-varying covariate channel node represents , No. Layer Each time event node represents and the Layer The time-varying covariate channel node and the first The edges between time event nodes represent The input vector is concatenated to obtain the reconstructed input vector; the linear output layer processes the reconstructed input vector into a linear output to obtain the first... The first historical time step, the Reconstructed values ​​of each time-varying covariate channel , ,in, This represents the linear output layer of the covariate reconstruction submodule; Step 3.3.3.3 If ,make Proceed to step 3.3.3.2; if Then the covariate reconstruction submodule will be the first A historical time step The reconstructed values ​​are combined according to the time-varying covariate channel dimension to obtain the first... Reconstruction covariates at each historical time step , ; Step 3.3.3.4 If ,make and order Proceed to step 3.3.3.2; if The covariate reconstruction submodule then combines the reconstructed covariates of all historical time steps according to the time step to obtain... Reconstructed covariate sequence ,, ; Step 3.3.3.5 The covariate reconstruction submodule will reconstruct the covariate sequence. Send to the gating relative position timing encoding module.

8. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... Step 3.4 The gated relative position timing coding module uses the gated relative position timing coding method to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates The method is: Step 3.4.1 The dynamic input construction submodule receives data from the gating relative position timing coding module. ,from Read and The coded input sequence is obtained by using a dynamic input construction method; the method is as follows: Step 3.4.1.1 Initialize the historical time step index in the dynamic input construction submodule. and initialize the encoded input sequence. Empty; Step 3.4.1.2 Dynamic Input Construction Submodule from Read the first Reconstruction covariates at each historical time step ,from Read the first Historical treatment variables aligned to a historical time step ,from Read the first Historical SOFA rating records aligned to each historical time step The splicing layer of the dynamic input construction submodule will , and By splicing, we obtain the first... Dynamic input of each historical time step , ; in, Indicates the relationship with the first Historical treatment variables aligned to a historical time step Indicates the relationship with the first Historical SOFA score records aligned to a single historical time step; Step 3.4.1.3 Dynamic Input Construction Submodule Input Linear Layer Pair Perform linear encoding to obtain the first... Encoded input representation of each historical time step , ;in, Indicates the input linear layer; the dynamic input construction submodule will Write the encoded input sequence ; Step 3.4.1.4 If ,make Proceed to step 3.4.1.2; if Then the dynamic input construction submodule obtains Encoded input sequence , Proceed to step 3.4.2; Step 3.4.2 The relative position attention submodule receives input from the dynamic input construction submodule. The relative position attention calculation method is used to... The relative positional relationships between the encoded input representations at each historical time step are modeled to obtain the relative positional attention output sequence. The method is as follows: Step 3.4.2.1 The query linear layer, key linear layer, and value linear layer of the relative position attention submodule encode the input sequence in parallel. Linear encoding is performed to obtain the query representation, key representation, and value representation, respectively. Step 3.4.2.2: The learnable relative position bias unit of the relative position attention submodule generates a learnable relative position bias based on the relative position index between any two historical time steps; the multi-head attention layer calculates the attention head output based on the query representation, key representation, value representation, and learnable relative position bias; the output linear layer performs linear encoding on the attention head output to obtain... Relative position attention output sequence , ;in, This indicates the relative position attention computation including the query linear layer, key linear layer, value linear layer, multi-head attention layer, learnable relative position bias unit, and output linear layer; Step 3.4.3 The input dependency gating submodule receives the encoded input sequence from the dynamic input construction submodule. Receive the relative position attention output sequence from the relative position attention submodule. The input dependency gating method is adopted according to Generate a gated vector sequence and then... Gating is performed to obtain the gated attention output sequence. The method is: Step 3.4.3.1 Encode the input sequence using the gated linear layer of the input-dependent gated submodule. Linear encoding is performed to obtain a gated vector; a sigmoid gating layer performs gating processing on the gated vector to obtain... Gated vector sequence , ;in, Indicates a gated linear layer. Indicates a sigmoid gate layer; Step 3.4.3.2 The element-wise multiplication unit of the input-dependent gating submodule will... and Element-by-element multiplication yields Gated attention output sequence , ;in, This indicates element-wise multiplication; Step 3.4.4 Static Feature Conditioning Submodule from Reading static features The static feature linear layer within it Perform linear encoding to obtain Static feature condition representation , ;in, Represents a static feature linear layer; the static feature conditionalization submodule represents the static feature conditional layer. Send to the first position feedforward submodule; Step 3.4.5 The first position feedforward submodule receives the gated attention output sequence from the input dependency gating submodule. Receive static feature condition representation from the static feature conditionation submodule The first position feedforward processing method is used to process... and Perform position feedforward processing to obtain Patient historical memory indicates The method is: Step 3.4.5.1 Initialize the historical time step index of the first position feedforward submodule and initialize Patient historical memory indicates Empty; Step 3.4.5.2 The first position feedforward submodule reads the first... Attention output after gating at each historical time step The splicing layer of the first position feedforward submodule will Representation of static feature conditions By splicing, we obtain the first... Conditional splicing representation of a historical time step , ; Step 3.4.5.3 The first linear layer, activation function, and second linear layer of the first position feedforward submodule are sequentially conditionally concatenated. The residual connection unit performs processing based on the results of the second linear layer and the gated attention output. The residual update representation is generated, and the LayerNorm cell normalizes the residual update representation to obtain the th... Encoding vectors for each historical time step , ;in, and This represents two linear layers in the first position feedforward submodule. This represents the activation function. This represents the LayerNorm unit; the first position feedforward submodule will... Writing into the patient's historical memory indicates ; Step 3.4.5.4 If ,make Proceed to step 3.4.5.2; if Then the first position feedforward submodule obtains Patient historical memory indicates , ; Step 3.4.5.5 The first position feedforward submodule will Send to the balanced autoregressive decoding module.

9. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... Step 3.5.3 The balanced autoregressive decoding module uses a single-step decoding method to... , Current prediction step Previous treatment input Previous SOFA input and current target treatment conditions Perform basic single-step decoding operations to obtain the first... Prediction Steps SOFA predictions Treatment predictive value Result characterization and treatment symptoms The method is: Step 3.5.3.1 The splicing layer of the autoregressive decoding unit will , and By splicing, we obtain the first... Decoding input for each prediction step , Decoding input linear layer pairs Perform linear encoding to obtain the first... Decoding representation of each prediction step , and will Write the decoded representation sequence ;in, Indicates decoding the input linear layer; Send to the causal self-attention submodule; Step 3.5.3.2 The causal self-attention submodule receives data from the autoregressive decoding unit. up to the 1st The decoded representation sequence formed in each prediction step Using a causal self-attention computation method to... Perform causal self-attention calculation to obtain the first... One prediction step Causal self-attention results The method is: Step 3.5.3.2.1 Multi-head causal self-attention layer of the causal self-attention submodule Perform multi-head causal self-attention computation to obtain the causal self-attention head output; Step 3.5.3.2.2 The attention head gating layer of the causal self-attention submodule performs gating processing on the causal self-attention head output to obtain the gated causal self-attention output; Step 3.5.3.2.3 The residual connection unit of the causal self-attention submodule is based on the gated causal self-attention output and the first... Decoding representation of each prediction step Generate a causal self-attention residual update representation; the LayerNorm unit normalizes the causal self-attention residual update representation to obtain the ... Prediction Steps Causal self-attention results , ;in, This represents causal self-attention computation that includes a multi-head causal self-attention layer, an attention head gating layer, residual connection units, and LayerNorm units. Decoding represents the sequence up to the 1st The prefix sequence of each prediction step; Send to the cross-attention submodule; Step 3.5.3.3 The cross-attention submodule receives data from the causal self-attention submodule. The patient's historical memory representation is received from the first position feedforward submodule of the gated relative position timing coding module. The cross-attention calculation method is used to... and Perform cross-attention calculation to obtain the first... Cross-attention results for each prediction step The method is: Step 3.5.3.3.1 The multi-head cross-attention layer of the cross-attention submodule... For query representation, using Perform multi-head cross-attention calculation on the key-value memory representation to obtain the cross-attention head output; Step 3.5.3.3.2 The attention head gating layer of the cross-attention submodule performs gating processing on the cross-attention head output to obtain the gated cross-attention output; Step 3.5.3.3.3 The residual connection unit of the cross-attention submodule is based on the gated cross-attention output and the causal self-attention result. Generate the cross-attention residual update representation; the LayerNorm unit normalizes the cross-attention residual update representation to obtain the th... Prediction Steps Cross-attention results , ;in, This represents the cross-attention computation, which includes a multi-head cross-attention layer, an attention-head gating layer, residual connection units, and LayerNorm units; Send to the second position feedforward submodule; Step 3.5.3.4 The second position feedforward submodule receives the first... Cross-attention results for each prediction step The second position feedforward processing method is used to process... Perform position feedforward processing to obtain the first... Decoding hidden state in each prediction step The method is: Step 3.5.3.4.1 The first linear layer, activation function, and second linear layer of the second position feedforward submodule are sequentially applied to... The data is processed to obtain the decoded and updated representation; Step 3.5.3.4.2 The residual connection unit of the second position feedforward submodule updates the representation and cross-attention results based on the decoding. Generate the decoded residual update representation; the LayerNorm unit normalizes the decoded residual update representation to obtain the first... Prediction Steps Decoding hidden state , ;in, and This represents the two linear layers in the second position feedforward submodule of the balanced autoregressive decoding module; Send to the Balanced Representation Splitting Submodule; Step 3.5.3.5 The balance representation splitting submodule receives data from the second position feedforward submodule. The balanced characterization decomposition method is used to decompose the characters. Decomposed into outcome representation and treatment representation, resulting in the first The result representation of each prediction step and treatment symptoms The method is: Step 3.5.3.5.1 Balance the representation of the resulting sub-modules. Represent the linear layer, ELU activation function, and LayerNorm unit in sequence. Processing is performed to obtain the first... The result representation of each prediction step : , formula (5); Step 3.5.3.5.2 The treatment representation linear layer, ELU activation function, and LayerNorm unit of the balanced representation split submodule are sequentially applied... Processing is performed to obtain the first... Treatment characteristics of each predicted step : Formula (6); in, The result represents a linear layer. Indicates the linear layer representing the treatment. This represents the ELU activation function. This represents a LayerNorm cell; Step 3.5.3.5.3 The balanced representation splitting submodule will Send to the SOFA prediction branch and training output branch, Send to the treatment prediction branch and the training output branch; Step 3.5.3.6 The SOFA prediction branch receives the first... The result representation of each prediction step Receive the first from the autoregressive decoding unit The current target treatment condition for each prediction step The SOFA prediction method was used to predict future SOFA score records under target treatment conditions, and the results were obtained. SOFA predictions for each prediction step The method is: Step 3.5.3.6.1 The splicing layer of the SOFA prediction branch will and The data is then concatenated to obtain the SOFA prediction input; Step 3.5.3.6.2 The linear layer, ReLU activation function, and linear output layer of the SOFA prediction branch sequentially perform prediction processing on the SOFA prediction input to obtain the... Prediction Steps SOFA predictions , ,Will Send to the training output branch; where, This represents the prediction operation consisting of the splicing layer, linear layer, ReLU activation function, and linear output layer in the SOFA prediction branch; Step 3.5.3.7 The treatment prediction branch receives the first submodule from the balanced representation splitting module. Treatment characteristics of each predicted step Treatment prediction methods were used to predict future treatment variables, resulting in the first... Treatment predictive value per predictive step The method is as follows: the linear layer, ReLU activation function, and linear output layer of the treatment prediction branch are sequentially applied... Perform prediction processing to obtain the first Treatment predictive value per predictive step , ,Will Send to the training output branch; where, This represents the prediction operation consisting of a linear layer, a ReLU activation function, and a linear output layer in the treatment prediction branch; Step 3.5.3.8 Training the output branch Write the SOFA prediction sequence ,Will Write into the treatment prediction sequence ,Will Write the result representation sequence ,Will Write the therapeutic characterization sequence .

10. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... Step 3.7 The training optimization module calculates the outcome prediction loss, treatment prediction loss, and balance loss, and combines them into a joint loss using the following method: Step 3.7.1 Training optimization module from Reading local sample index Corresponding real future SOFA rating record sequence and real future treatment sequence , and Align with patient and prediction step, calculate Predicting the outcome loss : , formula (7); in, Indicates the first In the training rounds, the first Local sample index within each training batch The corresponding patient time series sample is in the first SOFA predictions for each prediction step. This represents the corresponding actual SOFA rating record; Step 3.7.2 Training optimization module calculation Treatment prediction loss : , formula (8); in, Indicates the first In the training rounds, the first Local sample index within each training batch The corresponding patient time series sample is in the first Treatment prediction value for each prediction step, This represents the corresponding actual treatment variable; Step 3.7.3 The training optimization module calculates based on the result representation sequence and the treatment representation sequence. Balance loss : Formula (9); in, Represents the dot product of vectors; Step 3.7.4 The training optimization module calculates the training batch. joint losses : , Official (10).

11. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... The training optimization module described in step four uses a validation set. For the set of candidate parameter combinations The method for evaluating and determining the target parameter combination based on the SOFA prediction error on the validation set to obtain the best-performing sepsis vasoactive drug efficacy prediction system after training is as follows: Step 4.1 Initialize the candidate parameter combination index And initialize the candidate parameter combination evaluation result set. Empty; Step 4.2 [The following appears to be a separate, unrelated sentence:] ...the first... Candidate parameter combinations Loading the data into the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module, we obtain the first... A therapeutic efficacy prediction system corresponding to a combination of candidate parameters; Step 4.3 Let the verification set ,in This is the index of the sample location within the validation set. Indicates the first One validation sample is used in the second step of the patient time series sample set. The original patient index in the database; Step 4.4 Initialize the internal sample location index of the validation set in the training and optimization module. and initialize the first The set of forward prediction results for the validation set under each candidate parameter combination Empty; Step 4.5 The spatiotemporal graph feature reconstruction module reads the verification set. The Middle Time series samples of patients Historical time series observation input The spatiotemporal graph feature reconstruction method described in step 3.3 is used to... Spatiotemporal graph construction, bidirectional message passing, and covariate reconstruction are performed using time-varying covariates, observation masks, and time indices to obtain... Reconstructed covariate sequence ; Step 4.6 The gated relative position timing coding module receives data from the covariate reconstruction submodule of the spatiotemporal graph feature reconstruction module. ,from Read historical treatment sequences Historical SOFA rating record sequence and static features The gating relative position timing coding method described in step 3.4 is used to... , , and Dynamic input construction, relative position attention calculation, input dependency gating, static feature conditionalization, and first position feedforward processing are performed to obtain... Patient historical memory indicates ; Step 4.7 The balanced autoregressive decoding module receives data from the first position feedforward submodule of the gated relative position timing coding module. ,from Read the current decoding start point and static features and future treatment sequences as target treatment conditions The balanced autoregressive decoding prediction method described in step 3.5 is used to perform autoregressive decoding, causal self-attention calculation, cross-attention calculation, second position feedforward submodule processing, balanced representation decomposition, SOFA prediction, and treatment prediction on the future prediction window, resulting in... SOFA prediction sequence Treatment prediction sequence Result characterization sequence and therapeutic characterization sequence ; Step 4.8 Training the output branch , , , Send to the training optimization module; Step 4.9 The training optimization module will receive data from the training output branch. , , , Write the forward prediction result set to the validation set ; Step 4.10 If ,make Proceed to step 4.5; if Then the training optimization module obtains the first... The set of forward prediction results for the validation set under each candidate parameter combination ; It consists of SOFA prediction sequences, treatment prediction sequences, outcome characterization sequences, and treatment characterization sequences for each patient's time-series sample in the validation set; Step 4.11 Training the optimization module from the validation set Read the future SOFA score record sequence corresponding to each patient's time-series sample, and based on the... The future SOFA prediction sequence and corresponding future SOFA score record sequence of each patient time series sample in the validation set under the candidate parameter combination are calculated. Validation error of candidate parameter combinations : , formula (11); in, Indicates the first Under the nth candidate parameter combination, the th The verification sample is at the ... SOFA predictions for each prediction step. This represents the future SOFA score record corresponding to the validation sample; the training optimization module will... Record to the candidate parameter combination evaluation result set ; Step 4.12 If ,make Proceed to step 4.2; if Then all candidate parameter combinations have been evaluated, and the training and optimization modules have been compared. The candidate parameter combination with the smallest verification error recorded in the data is determined as the target parameter combination. ; Step 4.13 The training and optimization module combines the target parameters. The system was loaded into the spatiotemporal graph feature reconstruction module, the gated relative position temporal coding module, and the balanced autoregressive decoding module to obtain the sepsis vasoactive drug efficacy prediction system with the best prediction performance after training.

12. The method for predicting the efficacy of vasoactive drugs for sepsis based on balanced representation learning as described in claim 1, characterized in that... The , , 20, , , The length of the historical observation window Prediction window length .