A training method of a venous thromboembolism risk prediction model
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE FIRST AFFILIATED HOSPITAL ZHEJIANG UNIV COLLEGE OF MEDICINE
- Filing Date
- 2026-05-07
- Publication Date
- 2026-06-02
Smart Images

Figure CN122136006A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and medical data processing, specifically to a training method for a venous thrombosis risk prediction model. Background Technology
[0002] In the daily diagnosis and treatment of critical care patients, a large amount of multimodal physiological data is generated. The medical system analyzes and processes this data through risk prediction models to avoid serious consequences caused by venous thrombosis. The effectiveness of risk assessment largely depends on the accuracy of the risk prediction model when processing non-aligned time series data.
[0003] In traditional methods, risk prediction models mainly use discretization to extract data from observation points at fixed intervals and output risk probabilities. However, when faced with inconsistent sampling frequencies or data sparsity caused by equipment interruptions, the models are prone to losing nonlinear change information, resulting in low accuracy in risk warnings. Summary of the Invention
[0004] The purpose of this invention is to provide a training method for a venous thrombosis risk prediction model, thereby solving the following technical problems:
[0005] It avoids the risk of information loss and underreporting due to inconsistent sampling frequency or sparse data of patients' physiological data, and can provide more accurate risk warning in the early stage of thrombosis, and output a dynamic intervention window matrix to directly assist clinical decision-making.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] A training method for a venous thrombosis risk prediction model includes:
[0008] Acquire multimodal unaligned time series feature data, and extract discrete and continuous sampling features from the multimodal unaligned time series feature data;
[0009] Discrete and continuous sampling features are input into the neural ordinary differential equation to reconstruct the continuous state. Based on the reconstruction result of the neural ordinary differential equation, the continuous hidden state and the evolution rate vector are dynamically generated.
[0010] By combining continuous hidden states and evolution rate vectors, a two-branch competitive risk prediction network is used to generate the cumulative baseline hazard rate of the target event and the hazard rate of the competing event;
[0011] Based on the cumulative baseline risk rate of the target event and the risk rate of competing events, a time-sensitive and cost-sensitive joint loss function is constructed. The parameters of the two-branch competitive risk prediction network are updated through the time-sensitive and cost-sensitive joint loss function to form a closed loop for risk prediction model training.
[0012] The trained risk prediction model is used to infer from real-time input features and output a dynamic intervention window matrix.
[0013] In one possible implementation, extracting discrete and continuous sampling features from multimodal unaligned time series feature data includes:
[0014] Extract discrete sampling data and static attribute data of objects from heterogeneous data sources as discrete sampling features;
[0015] Continuous sampling data and operation records are extracted from continuous monitoring equipment and used as continuous sampling characteristics.
[0016] Timestamp alignment and irregular sampling labels are applied to discrete and continuous sampling features to extract the temporal evolution dependencies between multimodal unaligned time series feature data.
[0017] In one possible implementation, discrete and continuous sampling features are input into a neural ordinary differential equation to reconstruct the continuous state. Based on the reconstruction result of the neural ordinary differential equation, a continuous hidden state and an evolution rate vector are dynamically generated, including:
[0018] The continuous state change trajectory of discrete sampling features between two adjacent irregular sampling time points is fitted using the constant differential equation of the psychic.
[0019] Based on the continuous state change trajectory and continuous sampling characteristics, the nonlinear dynamic derivative of the system is calculated.
[0020] The nonlinear dynamic derivative is used as the evolution rate vector, and the intermediate layer states in the fitting process are represented as continuous hidden states.
[0021] In one possible implementation, by combining continuous hidden states and evolution rate vectors, a two-branch competitive risk prediction network is used to generate the cumulative baseline hazard rate of the target event and the hazard rate of the competing event, including:
[0022] The continuous hidden states and evolution rate vectors are used as shared features input into a two-branch competitive risk prediction network;
[0023] The shared features are processed by the first prediction branch of the two-branch competitive risk prediction network, and the cumulative risk rate of the target event is output as the cumulative baseline hazard rate of the target event.
[0024] The shared features are processed by the second prediction branch of the two-branch competitive risk prediction network, and the risk rate of the competitive event is output as the hazard rate of the competitive event.
[0025] In one possible implementation, constructing the time-sensitive and cost-sensitive joint loss function includes constructing a time-sensitive penalty term. The steps for constructing the time-sensitive penalty term include:
[0026] Calculate the time difference between the predicted event time and the actual event time;
[0027] Construct an exponential decay function based on time difference;
[0028] An exponential decay function is used to weight the prediction error to generate a time-delay penalty term, where the penalty weight of the time-delay penalty term increases exponentially as the time difference becomes smaller.
[0029] In one possible implementation, constructing the time-sensitive and cost-sensitive joint loss function further includes constructing a cost game term, wherein the step of constructing the cost game term includes: quantifying the cost weight of the competing event caused by false positive prediction and the cost weight of the target event caused by false negative prediction;
[0030] The cost weights of the competing events and the target event are used as dynamic adjustment factors and introduced into the cross-entropy calculation process. The prediction errors of the target event and the competing events are weighted based on the dynamic adjustment factors to generate the cost game term.
[0031] In one possible implementation, the aggregation calculation logic for the time-sensitive and cost-sensitive joint loss function includes:
[0032] The time-limited penalty term and the cost game term are linearly combined;
[0033] Introduce a regularization term into the linear combination to prevent model overfitting;
[0034] The sum of the linear combination and the regularization term is calculated, and the sum is used as the final output value of the time-sensitive and cost-sensitive joint loss function. The final output value is then used to update the network weights of the bi-branch competitive risk prediction network and the neural ordinary differential equation through the backpropagation algorithm.
[0035] In one possible implementation, the trained risk prediction model is used to infer from real-time input features, and the output dynamic intervention window matrix includes:
[0036] Acquire real-time multimodal unaligned time series feature data of the object to be tested and input them into the trained risk prediction model;
[0037] The risk prediction model outputs the estimated critical occurrence time of the target event.
[0038] The risk-reward ratio is calculated in different time periods using a risk prediction model, and the time periods with a risk-reward ratio greater than a preset safety threshold are extracted as the optimal intervention time window.
[0039] The estimated critical occurrence time of the target event, the optimal intervention time window, and the risk-reward ratio at the current moment are matrixed and combined to generate a dynamic intervention window matrix.
[0040] In one possible implementation, after outputting the dynamic intervention window matrix, a dynamic feedback step based on a preset risk-reward ratio threshold is also included:
[0041] Preset upper and lower thresholds for the risk-reward ratio;
[0042] If the risk-reward ratio at the current moment is not less than the upper limit threshold of the risk-reward ratio, then it is determined that the current situation is in an absolutely safe intervention window, and an intervention command is output.
[0043] If the risk-reward ratio at the current moment is less than the upper limit threshold of the risk-reward ratio but not less than the lower limit threshold of the risk-reward ratio, then it is determined that the current situation is in the observation and warning window, and an instruction to increase the sampling frequency is output.
[0044] If the risk-reward ratio at the current moment is less than the lower limit threshold of the risk-reward ratio, it is determined that the current period is a taboo period for intervention, and a stop intervention command is output.
[0045] The beneficial effects of this invention are:
[0046] 1. This invention reconstructs the continuous state by inputting discrete and continuous sampling features into the neural ordinary differential equation, and uses its continuous integral characteristics to fit the state change trajectory between adjacent irregular sampling points. This method effectively overcomes the information loss problem of traditional discretization methods when processing irregular sampling or equipment interruption data, and can capture the subtle nonlinear dynamic changes of vital signs in the sampling gap, thereby significantly improving the accuracy and continuity of risk warning.
[0047] 2. This invention utilizes a bi-branch competitive risk prediction network, combining continuous hidden states and evolution rate vectors, to independently generate the cumulative baseline risk rate of the target event and the risk rate of competing events. This architecture clearly distinguishes between the risk of venous thrombosis and competing risks such as severe bleeding caused by anticoagulation therapy, avoiding the statistical bias caused by simply treating competing events as truncated in traditional analysis. It can accurately identify the two opposing outcomes of high embolism and high bleeding, providing more accurate risk assessment for clinical practice.
[0048] 3. This invention constructs a time-sensitive and cost-sensitive joint loss function. By using an exponential decay function to weight the prediction error, the model is forced to maintain high sensitivity as the event approaches, thus solving the problem of ambiguous prediction time. At the same time, a cost game term is introduced to quantify the clinical costs of false positives and false negatives and calculate the risk scissors difference. This shifts the model optimization objective from simply achieving statistical accuracy to maximizing clinical net benefits, effectively balancing the medical costs of false positives with the health risks of underreporting.
[0049] 4. This invention transforms complex probability prediction into an intuitive optimal intervention time window by outputting a dynamic intervention window matrix and establishing a dynamic feedback mechanism based on the risk-benefit ratio. The system can automatically determine the intervention, observation, or contraindication status based on the risk-benefit ratio and automatically output an instruction to increase the sampling frequency in the observation warning window. This mechanism reduces the difficulty of clinical decision-making while realizing the on-demand allocation of medical resources and monitoring accuracy, thus improving the system's operational efficiency and safety. Attached Figure Description
[0050] The invention will now be further described with reference to the accompanying drawings.
[0051] Figure 1 This is a flowchart illustrating a training method for a venous thrombosis risk prediction model provided in an embodiment of this application. Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] Please see Figure 1 As shown, a training method for a venous thrombosis risk prediction model includes: acquiring multimodal unaligned time series feature data, and extracting discrete sampling features and continuous sampling features from the multimodal unaligned time series feature data;
[0054] Discrete and continuous sampling features are input into the neural ordinary differential equation to reconstruct the continuous state. Based on the reconstruction result of the neural ordinary differential equation, the continuous hidden state and the evolution rate vector are dynamically generated.
[0055] By combining continuous hidden states and evolution rate vectors, a two-branch competitive risk prediction network is used to generate the cumulative baseline hazard rate of the target event and the hazard rate of the competing event;
[0056] Based on the cumulative baseline risk rate of the target event and the risk rate of competing events, a time-sensitive and cost-sensitive joint loss function is constructed. The parameters of the two-branch competitive risk prediction network are updated through the time-sensitive and cost-sensitive joint loss function to form a closed loop for training the risk prediction model. The trained risk prediction model is used to infer real-time input features and output a dynamic intervention window matrix.
[0057] This embodiment details the overall architecture and execution process of the training method, which aims to solve the problem of delayed risk assessment caused by inconsistent sampling frequency of patient physiological data in intensive care scenarios; the system executes the data acquisition step, acquiring multimodal data through the hospital information system and bedside monitors;
[0058] To address the temporal irregularity of the data, the system utilizes the continuity property of neural ordinary differential equations to fill the state gaps between discrete observation points; it constructs a bi-branch network structure to simulate the probability evolution of competing events such as thrombotic events and severe bleeding events caused by anticoagulation therapy; based on this, a cost-sensitive optimization strategy is introduced to construct a loss function to balance the timeliness of prediction and the cost of false alarms; the output dynamic intervention window matrix provides medical staff with specific suggestions on the timing of anticoagulation drug use.
[0059] This embodiment effectively overcomes the information loss problem of traditional discretization methods when processing irregular sampled data by introducing neural ordinary differential equations to process multimodal unaligned data. In the complex clinical scenario of the intensive care unit, it can capture the subtle nonlinear changes in the patient's vital signs between two samplings, thereby providing more accurate risk warning in the early stage of thrombosis and avoiding the risk of missed reports due to data sparsity.
[0060] In a preferred embodiment of the present invention, extracting discrete and continuous sampling features of multimodal unaligned time series feature data includes: extracting discrete sampling data and static attribute data of objects from heterogeneous data sources as discrete sampling features; extracting continuous sampling data and operation records from continuous monitoring equipment as continuous sampling features; performing timestamp alignment and irregular sampling marking on the discrete and continuous sampling features to extract the temporal evolution dependency between multimodal unaligned time series feature data.
[0061] This embodiment further refines the preprocessing logic for multimodal data; the system uses ETL tools to extract low-frequency discrete data such as complete blood count and coagulation parameters from the laboratory information system, and extracts static attributes such as age and gender from electronic medical records; simultaneously, it reads high-frequency continuous waveform data such as heart rate and blood oxygen saturation from bedside monitors in real time through an IoT interface; the system constructs a unified time axis. Map all features onto this axis;
[0062] During this process, the system counts the total number of all discrete and continuous sampling features, denoted as . And assign a unique index to each feature. ( Based on this, the dimension is constructed as follows: mask matrix ,in This represents the total number of time points on the timeline. Representation of features At any moment If there is an observation, then it is 0; otherwise, it is 0. This mask matrix clarifies the sparse structure of the data and provides a topological basis for subsequent models to distinguish between true observations and missing values.
[0063] This embodiment explicitly marks irregular sampling points by constructing a mask matrix, enabling the model to distinguish between unsampled and zero values, which is crucial in medical data processing. This mechanism ensures that when processing heterogeneous data output from monitoring devices of different brands, the system can accurately align the time dimension, preventing the reversal of causal relationships caused by time misalignment, thereby improving the model's ability to understand clinical event sequences.
[0064] In a preferred embodiment of the present invention, the discrete sampling features and continuous sampling features are input into a neural network constant differential equation (NCE) for continuous state reconstruction. Based on the NCE reconstruction result, the continuous hidden state and evolution rate vector are dynamically generated, including: fitting the continuous state change trajectory of the discrete sampling features between two adjacent irregular sampling time points using the NCE; calculating the nonlinear dynamic derivative of the system based on the continuous state change trajectory and continuous sampling features; using the nonlinear dynamic derivative as the evolution rate vector, and representing the intermediate layer state in the fitting process as the continuous hidden state.
[0065] This embodiment elaborates on the state reconstruction mechanism based on neuronormal differential equations; the system assumes that the evolution of the patient's physiological state follows a controlled first-order ordinary differential equation, and explicitly combines the continuous sampling features of the embodiment, the calculation formula of which is:
[0066] ,
[0067] in, Indicates time The potential physiological state originates from the state at the previous moment through integration derivation by the ODE solver; particularly, in irregular discrete observation moments... The system uses a gated recurrent unit (GRU) to record the discrete sampling features as... The hidden state is incorporated, and the continuous integral trajectory is calibrated using discrete sampling features. State updates are then performed, and the calculation formula is as follows:
[0068] ,
[0069] in, To reach the integral The prior state at any given moment. The posterior state after fusing discrete features is used as the initial value for the next integral. It is a moment The continuously sampled feature vectors are used as external control inputs to directly act on the derivative field, ensuring that the dynamic evolution is constrained by real-time vital signs;
[0070] Specifically, continuous sampling features Instead of the original high-frequency sampling points, the system uses preprocessed feature vectors. It divides the original high-frequency waveform signal from the real-time monitor into frames within fixed time windows, extracting time-domain statistical features and frequency-domain features within each window, and then concatenating them to form a fixed-dimensional feature vector as the data for that moment. of This transforms actual continuous monitoring equipment data into inputs usable by the model;
[0071] Addressing issues arising from equipment interruptions or signal loss in clinical settings At a specific moment In the case of missing functions The missing value handling logic is preset: missing values are filled using a zero vector. At the same time, add a layer to the input layer that is similar to... The binary mask vector corresponding to the dimension sets the mask value of missing time steps to 0 and the mask value of existing time steps to 1. This tells the neural network that the input at that time step is a filler value rather than the actual observation, thus ensuring... Valid numerical input is available at any time to prevent calculation interruption; It is determined by the parameters of the neural network The parameterized derivative function, in physical terms, represents the rate of change field of physiological indicators;
[0072] Its corresponding derivative function The network structure specifically adopts a multilayer perceptron, including an input layer, i.e., a receiving layer. and The concatenated vector, at least one hidden layer, and an output layer are used, and smooth activation functions such as Tanh are used in the hidden layer to ensure the smoothness and stability of the nonlinear dynamic derivative output in continuous time.
[0073] Using the ODE solver from the observation time Points to Fill in the sampling gaps; integrate the current state. With real-time reading Input network Calculate the derivative of nonlinear dynamics in the continuous time domain This derivative characterizes the instantaneous velocity of disease deterioration or improvement; based on a preset future prediction time series grid, the calculated continuous integral trajectory is discretized and sampled at a preset time step, and the corresponding grid nodes are extracted. State vector on The resulting sequence serves as a continuous hidden state, which integrates historical observation information with dynamic evolution trends;
[0074] Meanwhile, to ensure that the tensor dimension matches the subsequent prediction network, the state vectors extracted from the grid nodes are... Continuous sampling features at corresponding times Re-entering the network The discrete nonlinear dynamic derivative sequence of the corresponding grid nodes is calculated and used as the evolution rate vector. Specifically, to ensure the stability of numerical integration and the accuracy of gradient backpropagation, the ODE solver adopts the Dormand-Princedopri5 adaptive step-size algorithm and sets the relative error tolerance rtol to [value missing]. The absolute error tolerance atol is ;
[0075] This embodiment utilizes the continuous integral properties of neural ordinary differential equations to achieve seamless reconstruction of the patient's physiological state. In clinical practice, even if the monitoring of the patient's vital signs is interrupted, such as during transport and examination, the model can still reasonably extrapolate the intermediate state based on the dynamic laws, ensuring the continuity of risk assessment and effectively solving the problem of a significant decrease in prediction accuracy of traditional discrete models when the time interval is not fixed.
[0076] In a preferred embodiment of the present invention, generating the cumulative baseline hazard rate of the target event and the hazard rate of the competing event using a two-branch competitive risk prediction network by combining the continuous hidden state and the evolution rate vector includes: inputting the continuous hidden state and the evolution rate vector as shared features into the two-branch competitive risk prediction network;
[0077] The shared features are processed by the first prediction branch of the two-branch competitive risk prediction network, which outputs the cumulative risk rate of the target event as the cumulative baseline hazard rate of the target event; the shared features are processed by the second prediction branch of the two-branch competitive risk prediction network, which outputs the risk rate of the competing events as the hazard rate of the competing events.
[0078] This embodiment constructs a deep learning architecture for competitive risk scenarios; for each discrete time step in the prediction time series, the continuous hidden states and evolution rate vectors generated in the preceding steps are concatenated point by point to form a high-dimensional shared feature vector sequence containing the time dimension; this high-dimensional shared feature vector sequence is split point by point into two independent fully connected neural network branches at each time step.
[0079] The first prediction branch focuses on venous thrombosis (VTE) events, outputting the cumulative risk rate at a specific time point, which physically represents the conditional probability of thrombosis occurring in the absence of competing events. The second prediction branch focuses on specific competing events, specifically limited to severe bleeding events caused by anticoagulation therapy, to ensure strict consistency with the bleeding risk assessment logic in subsequent cost-sensitive and risk-benefit ratio calculations, outputting the instantaneous hazard rate of competing events.
[0080] In this process, the two branches share the underlying feature extraction layer, but different activation functions are used in the output layer to ensure the non-negativity constraint of the risk value. Specifically, both the first and second prediction branches adopt a multilayer perceptron (MLP) network structure containing at least two hidden layers, and both use the Softplus activation function (a non-linear function) in the output layer. The feature data is processed to ensure that the output risk accumulation rate and competitive event hazard rate have strict non-negativity constraints;
[0081] This embodiment clearly distinguishes between target risk and competing risk through a dual-branch architecture, avoiding the statistical bias caused by simply treating competing events as truncated in traditional survival analysis. In critical care medicine scenarios, this design can accurately distinguish between two distinctly different opposing outcomes: high embolism risk and high bleeding risk, thereby providing doctors with risk assessment results that are more consistent with pathophysiological logic.
[0082] In a preferred embodiment of the present invention, constructing a time-sensitive and cost-sensitive joint loss function includes constructing a time-sensitive penalty term. The steps of constructing the time-sensitive penalty term include: calculating the time difference between the predicted event time and the actual event time; constructing an exponential decay function based on the time difference; and using the exponential decay function to weight the prediction error to generate a time-sensitive penalty term, wherein the smaller the time difference, the exponentially increasing the penalty weight of the time-sensitive penalty term.
[0083] This embodiment details a penalty mechanism for prediction timeliness; this mechanism aims to force the model to provide extremely high-precision predictions close to the event's occurrence; the time difference is calculated using the following formula:
[0084] ,
[0085] in, For the event time point predicted by the model, i.e., the moment of risk surge in the model output, considering that the baseline hazard rate in the model output is the sequence value on the discrete-time grid, its specific calculation method adopts the finite difference approximation method, that is, through the formula...
[0086] ,
[0087] Calculate each time step The discrete derivative values are calculated, and the time step at which the maximum derivative occurs is identified by traversing the difference sequence. This allows for code-level extraction of the onset time point. The actual time of the event, i.e., the moment of clinical diagnosis, is used as the basis for defining the time-sensitivity weighting function:
[0088] ,
[0089] in, It is a natural constant. As the base penalty coefficient, in actual model training, its value is determined by a grid search algorithm combined with historical validation set data within a preset range of positive real numbers, such as... Internal optimization is determined. This is the basic weight constant, usually set to 1, to ensure the gradient penalty strength in large error intervals, in order to adapt to the fault tolerance of different datasets;
[0090] This is the decay rate constant, used to control how quickly time-sensitive information decays. Its setting logic is based on the clinical golden intervention window span for specific thrombotic diseases, and is dynamically derived by calculating the decay half-life. For example, for VTE events requiring a 12-hour advance warning... Set as This weight is applied to loss calculation; specifically, the time-sensitivity penalty term. The mathematical expression for it is defined as:
[0091] ,
[0092] in, This is the training batch size; it's worth noting that this formula incorporates an exponential enhancement term. A precision trap mechanism was constructed: when the prediction error... When the base weight is large, Dominantly, it maintains a gradient penalty similar to that of traditional MSE, forcing the model to converge quickly to near the true value; while when the prediction error... When entering a tiny range, the weight of the exponential term increases significantly, forcing the model to continue to maintain high-intensity parameter updates during the one-kilometer sprint phase, thereby achieving microsecond-level precise locking of the onset time, rather than just giving a vague time range;
[0093] The exponential time-sensitivity penalty term introduced in this embodiment effectively solves the problem of fuzzy prediction of when a thrombus will occur in traditional models. In emergency rescue scenarios, this mechanism enables the model to maintain extremely high sensitivity within the critical time window before thrombosis, ensuring that nurses receive early warnings at the optimal intervention time. This avoids alarm fatigue caused by early warnings and prevents treatment delays caused by late warnings.
[0094] In a preferred embodiment of the present invention, constructing the time-sensitive and cost-sensitive joint loss function further includes constructing a cost game term. The steps of constructing the cost game term include: quantifying the cost weight of the competing event caused by false positive prediction and the cost weight of the target event caused by false negative prediction; introducing the cost weight of the competing event and the cost weight of the target event as dynamic adjustment factors into the cross-entropy calculation process; and weighting the prediction errors of the target event and the competing event based on the dynamic adjustment factors to generate the cost game term.
[0095] This embodiment introduces a sensitivity constraint based on medical costs; a cost matrix is defined as follows: This represents the weight of competing events resulting from false positive predictions, such as the risk of bleeding due to anticoagulation. The weight representing the cost of the target event resulting from a false negative prediction, such as fatal pulmonary embolism; specifically, the weight. and The quantification method involves extracting the average additional treatment costs and length of hospital stay caused by corresponding adverse events from the clinical history database, normalizing them, and combining them with domain expert scores to obtain a comprehensive quantification.
[0096] The cumulative baseline hazard rate of the target event output from the aforementioned steps is used to calculate its instantaneous rate of change at the current moment through finite difference, and is denoted as the instantaneous hazard rate of the target event. The risk rate of competitive events is denoted as To ensure that both are instantaneous risk representations at the current time step, the risk scissors difference is calculated as follows:
[0097] ,
[0098] This difference reflects the net significance of the current tendency to thrombosis relative to competing risks such as severe bleeding; based on the risk scissor difference and dynamic adjustment factor, an improved cross-entropy formula including positive and negative sample weights is constructed to generate a cost-sensitive term. The calculation formula is as follows:
[0099] ,
[0100] in, To maintain the same training batch size as in the aforementioned embodiments, the sub-item We employ a weighted binary cross-entropy approach to fully cover the loss calculation for both positive sample hits and negative sample false positives:
[0101] ,
[0102] in, Represents the event type. For real labels, To predict probabilities; considering the risk rate output by the aforementioned network through the Softplus activation function. and The range of values is Directly substituting into the cross-entropy formula will lead to a situation where the risk rate is greater than 1. A mathematical error occurred while calculating the logarithm of a negative number. To ensure the mathematical correctness of exponential operations in terms of physical dimensions, the system sets the danger rate output by the network before performing the exponential conversion. and Multiply by a fixed unit time step factor For example, if we take one unit of time and convert it into a dimensionless cumulative risk index, the system uses the following conversion formula based on the incidence rate:
[0103] ,
[0104] ,
[0105] The dimensionless hazard rate is rigorously mapped to Within the probability interval, substitute the values into the cross-entropy formula above for calculation; during this process, to prevent the risk rate from being within a certain range... The value is too large. It approaches 1 infinitely, making The tendency towards negative infinity can lead to gradient explosion or numerical overflow. Therefore, the system introduces numerical stabilization before calculating the logarithm: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] At that time, the actual adoption Perform the calculation, where For a very small constant, such as Or directly address the risk rate. Perform upper limit truncation to ensure It will not underflow to the machine zero value, thus ensuring the numerical stability of the loss function in actual calculation;
[0106] Dynamic weights The calculation logic is as follows: in response to the occurrence of the target event indicated by the real label, i.e. Regardless of the current predicted value, set the positive sample weights for the target event. This forces the model to pay attention to the cost of underreporting;
[0107] Responding to the true label indicating whether a competing event has occurred or not, i.e. Set negative sample weights for the target event. This forces the model to pay attention to the cost of false positives;
[0108] Similarly, to maintain the symmetry between competitive risk prediction and target event prediction in the cost game, the dynamic weights of the competitive event branch are set as follows: in response to the true label indicating the occurrence of the competitive event, i.e. Set positive sample weights for competitive events. This forces the model to be highly sensitive to competing risks such as bleeding; it responds to the true label indicating that the target event has occurred or no competing event has occurred, i.e. Set negative sample weights for competitive events This is to prevent the model from suppressing necessary anticoagulation therapy by overemphasizing the risk of bleeding;
[0109] This causes the model to produce false positives, i.e. but The higher the value, the amplified loss value is forced to reduce the false positive rate of the model; this process simulates the decision-making trade-off between anticoagulation and hemostasis by clinicians, and solves the problem that traditional loss functions cannot respond to clinical asymmetric costs through mathematical form.
[0110] This embodiment quantifies the clinical costs of false positives and false negatives, shifting the model's optimization objective from simply achieving statistical accuracy to maximizing net clinical benefit. When processing data from elderly patients with multiple complications, this mechanism can automatically suppress ineffective thrombosis warnings when patients are at risk of death, i.e., high competitive risk, demonstrating the model's deep understanding of medical ethics and actual clinical resource allocation.
[0111] In a preferred embodiment of the present invention, the aggregation calculation logic of the time-sensitive and cost-sensitive joint loss function includes: linearly combining the time-sensitive penalty term and the cost-sensitive term; introducing a regularization term in the linear combination to prevent model overfitting; calculating the sum of the linear combination and the regularization term, using the sum as the final output value of the time-sensitive and cost-sensitive joint loss function, and using the final output value to update the network weights of the bi-branch competitive risk prediction network and the neural ordinary differential equation through the backpropagation algorithm.
[0112] This embodiment details the aggregation of multi-task loss functions and model training strategies; it defines the total loss function. The calculation formula is as follows:
[0113] ,
[0114] in, Derived from the calculation results of the time-limited penalty item construction step. Derived from the calculation results of the cost game term construction step, To constrain network weights The complexity of L2 regularization terms, while , , These are the balancing hyperparameters for the corresponding loss terms, whose values are determined either by optimizing on the independent validation set using a grid search algorithm combined with the model's historical training logs, or by dynamically updating them during training using an adaptive weight learning mechanism based on task homoscedasticity uncertainty; the Adam optimizer is used to calculate... Gradients of all parameters of the constant differential equation and the dual-branch network are calculated; backpropagation is performed to synchronously update the weights of the feature extraction layer and the risk prediction layer until the loss function converges to the preset threshold.
[0115] This embodiment achieves a dynamic balance between timeliness, clinical cost, and generalization ability of the model through the linear aggregation of multi-objective loss functions. This training strategy ensures that the final model not only fits well mathematically, but also has extremely high robustness in clinical applications, and can adapt to different departments' different tolerance requirements for false positive and false negative rates.
[0116] In a preferred embodiment of the present invention, the process of using a trained risk prediction model to infer real-time input features and output a dynamic intervention window matrix includes: acquiring real-time multimodal unaligned time series feature data of the target object and inputting it into the trained risk prediction model; outputting a critical occurrence time estimate of the target event through the risk prediction model; calculating the risk-reward ratio in different time periods through the risk prediction model, and extracting the time period with a risk-reward ratio greater than a preset safety threshold as the optimal intervention time window; and matrix-concatenating the critical occurrence time estimate of the target event, the optimal intervention time window, and the risk-reward ratio at the current moment to generate a dynamic intervention window matrix.
[0117] This embodiment describes the execution logic of the model during the inference and decoding phases; the real-time unaligned data stream of the patient to be tested is input into the trained network; the model outputs the thrombosis probability density curves for each future time step; and the system calculates the risk-benefit ratio. The calculation formula is as follows:
[0118] ,
[0119] in, For a moment The thrombosis prediction probability is determined by the cumulative baseline hazard rate of the target event output by the aforementioned dual-branch competitive risk prediction network. The value may be greater than 1. To meet the probability domain requirement, its value is determined by a transformation function. Mapping retrieval;
[0120] The potential benefit coefficient for treatment; Similarly, to address the probability of bleeding that may result from treatment, a transformation function is used. Risk rate of specific competitive events inferred from competitive branches Mapping retrieval;
[0121] The damage coefficient caused by bleeding is equivalent in both physical concept and numerical quantification to the cost weight of competing events caused by the aforementioned false positive predictions. ;
[0122] It is a very small positive constant, such as set as This is used to prevent computational overflow anomalies where the denominator is zero when the predicted bleeding probability is zero; where the parameter and The risk-benefit ratio was obtained by analyzing historical electronic medical records to quantify the differences in survival outcomes and complication rates between patients who received anticoagulation therapy and those who did not. During the quantification process, all values were divided by the same benchmark medical cost, such as the weighted sum of the average cost per hospitalization and the number of days, and were dimensionless, converting both values into dimensionless relative weighting coefficients to ensure the calculated risk-benefit ratio was accurate. It is a dimensionless pure numerical value;
[0123] The system scans the timeline for the next 24 hours and filters out those that meet the requirements. Continuous time segments, preset safety threshold The logic behind this approach is based on the minimum benefit ratio standard determined by clinical intervention guidelines, such as a fixed empirical value greater than 1.0 (e.g., 1.2), to ensure that the expected treatment benefits strictly cover potential risks. The selected continuous time segments are defined as the optimal intervention time window. Simultaneously, the estimated critical occurrence time of the target event is... The calculation method involves identifying the moment corresponding to the maximum rate of change of the differential of the discrete sequence of the cumulative baseline hazard rate of the target event. In other words, at the code level, this is calculated using the finite difference formula.
[0124] ,
[0125] This represents the moment when risk accelerates most rapidly; it includes the critical time point, the start and end points of the time window, and... Peak values are structured and organized, with the following dimensions: The dynamic intervention window matrix is output, where To extract the optimal number of intervention time windows, each row of the dynamic intervention window matrix corresponds to an independent time window, and the four columns from left to right store the estimated critical occurrence time of the target event, the start time of the time window, the end time of the time window, and the maximum risk-reward ratio within the current time window, thereby eliminating dimensional ambiguity in matrix splicing.
[0126] This embodiment transforms complex probability outputs into an intuitive dynamic intervention window matrix, directly assisting clinical decision-making. In the high-pressure working environment of the intensive care unit, doctors do not need to interpret complex probability curves; they only need to issue anticoagulation instructions based on the high-benefit time window recommended by the system. This achieves a leap from data prediction to action guidelines, significantly reducing the difficulty of decision-making.
[0127] In a preferred embodiment of the present invention, after outputting the dynamic intervention window matrix, a dynamic feedback step based on a preset risk-reward ratio threshold is further included: a preset upper limit threshold for the risk-reward ratio and a lower limit threshold for the risk-reward ratio; if the risk-reward ratio at the current moment is not less than the upper limit threshold for the risk-reward ratio, it is determined that the current situation is in an absolutely safe intervention window, and an intervention command is output.
[0128] If the risk-reward ratio at the current moment is less than the upper limit threshold but not less than the lower limit threshold, it is determined that the current situation is in the observation and warning window, and an instruction to increase the sampling frequency is output; if the risk-reward ratio at the current moment is less than the lower limit threshold, it is determined that the current situation is in the intervention taboo period, and an instruction to stop intervention is output.
[0129] This embodiment constructs a closed-loop clinical decision support logic; the system sets dual thresholds: an upper threshold and a lower threshold. and lower threshold The upper and lower thresholds are set based on a comprehensive assessment of the hospital's historical adverse event statistics and average clinical management capabilities; specifically, the upper threshold... A threshold value of 2.0 or higher is typically set, representing a statistically significant advantage where the expected therapeutic benefit is at least twice the risk of bleeding damage. The lower limit threshold... Typically set as an interval The empirical critical value within the range represents a state where risk and return tend to be in equilibrium; the system compares the current risk-return ratio with the threshold in real time.
[0130] In response to The system determines that the patient is in a high-risk-for-thrombosis-low-risk-for-bleeding state and immediately sends anticoagulant medication recommendations; in response to The system determines that the current situation is unclear and automatically triggers a command to adjust the sampling frequency of the monitoring equipment, increasing the monitoring cycle from once per hour to once every 15 minutes to capture more granular feature changes; in response to The system identified a high risk of bleeding, issued an intervention contraindication alert, and recommended suspending anticoagulation.
[0131] This embodiment achieves refined management of clinical risks through a three-level threshold control strategy; in particular, the design of automatic encrypted sampling in the observation and early warning window cleverly solves the contradiction between medical resources and monitoring accuracy—consuming more computing and hardware resources only in critical risk states. This on-demand allocation mechanism greatly improves the operational efficiency and security of the smart healthcare system.
[0132] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A training method for a venous thrombosis risk prediction model, characterized in that, include: Acquire multimodal unaligned time series feature data, and extract discrete sampling features and continuous sampling features from the multimodal unaligned time series feature data; The discrete sampling features and the continuous sampling features are input into the neural ordinary differential equation to reconstruct the continuous state. Based on the reconstruction result of the neural ordinary differential equation, the continuous hidden state and the evolution rate vector are dynamically generated. Combining the continuous hidden states and the evolution rate vector, a dual-branch competitive risk prediction network is used to generate the cumulative baseline hazard rate of the target event and the hazard rate of the competing event; Based on the cumulative baseline risk rate of the target event and the risk rate of competing events, a time-sensitive and cost-sensitive joint loss function is constructed. The parameters of the dual-branch competitive risk prediction network are updated through the time-sensitive and cost-sensitive joint loss function to form a closed loop for risk prediction model training. The trained risk prediction model is used to infer from real-time input features and output a dynamic intervention window matrix.
2. The training method for a venous thrombosis risk prediction model according to claim 1, characterized in that, Extracting the discrete and continuous sampling features of the multimodal unaligned time series feature data includes: Extract discrete sampling data and static attribute data of objects from heterogeneous data sources as the discrete sampling features; Continuous sampling data and operation records are extracted from the continuous monitoring equipment and used as the continuous sampling features; The discrete and continuous sampling features are time-stamp aligned and irregularly sampled to extract the temporal evolution dependencies between multimodal unaligned time series feature data.
3. The training method for a venous thrombosis risk prediction model according to claim 2, characterized in that, The discrete sampling features and the continuous sampling features are input into the neural ordinary differential equation to reconstruct the continuous state. Based on the reconstruction result of the neural ordinary differential equation, the continuous hidden state and the evolution rate vector are dynamically generated, including: The discrete sampling features are fitted using a regular differential equation to determine the continuous state change trajectory between two adjacent irregular sampling time points. Based on the continuous state change trajectory and the continuous sampling characteristics, the nonlinear dynamic derivative of the system is calculated; The nonlinear dynamic derivative is used as the evolution rate vector, and the intermediate layer states during the fitting process are represented as the continuous hidden states.
4. The training method for a venous thrombosis risk prediction model according to claim 3, characterized in that, Combining the continuous hidden states and the evolution rate vector, the dual-branch competitive risk prediction network generates the cumulative baseline hazard rate of the target event and the hazard rate of the competing event, including: The continuous hidden states and the evolution rate vector are input as shared features into the two-branch competitive risk prediction network; The shared features are processed by the first prediction branch of the dual-branch competitive risk prediction network, and the risk accumulation rate of the target event is output as the cumulative baseline hazard rate of the target event. The shared features are processed by the second prediction branch of the dual-branch competitive risk prediction network, and the risk rate of the competitive event is output as the danger rate of the competitive event.
5. The training method for a venous thrombosis risk prediction model according to claim 4, characterized in that, Constructing a time-sensitive and cost-sensitive joint loss function includes constructing a time-sensitive penalty term, the steps of which include: Calculate the time difference between the predicted event time and the actual event time; An exponential decay function is constructed based on the time difference; The prediction error is weighted using the exponential decay function to generate the time-sensitivity penalty term, wherein the smaller the time difference, the exponentially increasing penalty weight of the time-sensitivity penalty term.
6. The training method for a venous thrombosis risk prediction model according to claim 5, characterized in that, Constructing a time-sensitive and cost-sensitive joint loss function also includes constructing a cost game term. The steps for constructing the cost game term include: quantifying the cost weight of the competing event caused by false positive predictions and the cost weight of the target event caused by false negative predictions. The cost weights of the competing events and the target event are used as dynamic adjustment factors and introduced into the cross-entropy calculation process. The prediction errors of the target event and the competing events are weighted based on the dynamic adjustment factors to generate the cost game term.
7. The training method for a venous thrombosis risk prediction model according to claim 6, characterized in that, The aggregation calculation logic of the time-sensitive and cost-sensitive joint loss function includes: The time-limited penalty term is linearly combined with the cost game term; A regularization term is introduced into the linear combination to prevent the model from overfitting. The sum of the linear combination and the regularization term is calculated, and the sum is used as the final output value of the time-sensitive and cost-sensitive joint loss function. The final output value is then used to update the network weights of the bi-branch competitive risk prediction network and the neural ordinary differential equation through the backpropagation algorithm.
8. The training method for a venous thrombosis risk prediction model according to claim 7, characterized in that, The trained risk prediction model is used to infer from real-time input features, and the output dynamic intervention window matrix includes: Acquire real-time multimodal unaligned time series feature data of the object to be tested and input them into the trained risk prediction model; The risk prediction model outputs an estimated critical occurrence time of the target event. The risk prediction model is used to calculate the risk-reward ratio in different time periods, and the time periods with risk-reward ratios greater than preset safety thresholds are extracted as the optimal intervention time windows. The dynamic intervention window matrix is generated by matrixing and combining the estimated critical occurrence time of the target event, the optimal intervention time window, and the risk-reward ratio at the current moment.
9. The training method for a venous thrombosis risk prediction model according to claim 8, characterized in that, After outputting the dynamic intervention window matrix, a dynamic feedback step based on a preset risk-reward ratio threshold is also included: Preset upper and lower thresholds for the risk-reward ratio; If the risk-reward ratio at the current moment is not less than the upper limit threshold of the risk-reward ratio, then it is determined that the current situation is in an absolutely safe intervention window, and an intervention command is output. If the risk-reward ratio at the current moment is less than the upper limit threshold of the risk-reward ratio and not less than the lower limit threshold of the risk-reward ratio, then it is determined that the current situation is in the observation and warning window, and an instruction to increase the sampling frequency is output. If the risk-reward ratio at the current moment is less than the lower limit threshold of the risk-reward ratio, it is determined that the current period is a taboo period for intervention, and a stop intervention command is output.