Remazolam anesthetic dose ai prediction system
By using an improved StochDiff time-series prediction model, combined with a bidirectional long short-term memory network and a conditional diffusion generation module, the problem of individualized and accurate prediction of remimazolam dosage in multiple local advanced cervical cancer radiotherapy sessions was solved, achieving individualized dosing and full-process safety assurance, and reducing the incidence of adverse anesthetic events.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN CANCER HOSPITAL
- Filing Date
- 2026-04-17
- Publication Date
- 2026-06-19
Smart Images

Figure CN122050688B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interdisciplinary technology of anesthesiology and artificial intelligence, specifically to an AI prediction system for remimazolam anesthesia dosage in the context of multiple interstitial radiotherapy for cervical cancer. Background Technology
[0002] Standardized treatment for locally advanced cervical cancer often includes intracavitary brachytherapy combined with interstitial brachytherapy. These procedures require invasive steps such as speculum insertion and needle placement, which can cause severe pain and fear in patients. Therefore, intravenous sedation anesthesia is routinely used to ensure successful treatment. Clinically, patients often need to undergo three or more consecutive radiotherapy sessions, making the safety and effectiveness of multiple anesthesia a core clinical concern.
[0003] Currently, propofol, a commonly used anesthetic drug in clinical practice, has the advantages of rapid onset and strong sedative effect, but it also has obvious drawbacks: repeated use can easily lead to drug resistance, requiring gradual increases in dosage to achieve the desired sedative effect, and it has the potential for addiction; at the same time, propofol has a significant inhibitory effect on the respiratory and circulatory systems, with a high incidence of adverse reactions such as hypotension and respiratory depression. In particular, for cervical cancer patients undergoing concurrent chemoradiotherapy, chemotherapy drugs may cause liver and kidney damage, further increasing the risks associated with propofol use.
[0004] Remimazolam, a novel benzodiazepine, exerts its sedative effect through specific action on GABA receptors. It is characterized by rapid onset of action, short recovery time, and mild respiratory and circulatory depression. Furthermore, its metabolism is independent of liver and kidney function, making it more suitable for patients undergoing concurrent chemoradiotherapy for cervical cancer. However, current clinical administration of remimazolam still relies heavily on the anesthesiologist's clinical experience, lacking individualized and precise dosing regimens for multiple radiotherapy scenarios. This fails to fully consider individual patient differences (such as age, BMI, liver and kidney function), previous anesthetic responses, and dynamic changes in intraoperative status, easily leading to insufficient or excessive sedation and increasing the risk of adverse anesthetic events.
[0005] Existing AI-based anesthesia dose prediction models mostly employ a single LSTM, Transformer, or traditional diffusion model architecture, which has significant technical limitations: First, clinical anesthesia data is characterized by high randomness, strong individual heterogeneity, and long-term time dependence due to multiple dosings, making it difficult for traditional models to effectively capture such complex data distributions; Second, existing models mostly use fixed Gaussian priors, which cannot adapt to the multimodal characteristics of heterogeneous data; Third, the model prediction results are mostly single dose values, lacking quantitative analysis of drug efficacy uncertainty, resulting in insufficient clinical interpretability and safety; Fourth, there is a lack of or detachment from clinical reality in response to rare intraoperative adverse events (such as laryngospasm and allergic reactions), making it difficult to meet clinical safety requirements.
[0006] Therefore, developing an AI system that is suitable for multiple interstitial radiotherapy scenarios for cervical cancer, can accurately predict the dosage of remimazolam, and ensure anesthesia safety has become a pressing technical problem to be solved in clinical practice. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide an AI prediction system for remimazolam anesthesia dosage, which is especially suitable for tumor radiotherapy patients who require short-term multiple sedation anesthesia, to achieve individualized and precise drug delivery and ensure anesthesia safety.
[0008] To achieve the above objectives, the following technical solution is adopted:
[0009] This invention provides an AI prediction system for remimazolam anesthesia dosage, the system comprising:
[0010] The data acquisition module is used to collect multi-dimensional clinical data from the target patient;
[0011] The feature engineering module, connected to the data acquisition module, is used to preprocess the multi-dimensional clinical data, perform feature screening and time-series feature construction, and generate a standardized feature dataset.
[0012] An improved StochDiff time-series prediction module, connected to the feature engineering module, is used to output an initial individualized dosing regimen for remimazolam based on the standardized feature dataset and a pre-trained improved StochDiff time-series prediction model, and to output the predicted distribution of patients' vital signs and sedation depth after dosing.
[0013] The dose dynamic correction module, connected to the improved StochDiff time-series prediction module, is used to perform online dynamic correction of the initial individualized dosing regimen based on real-time patient data collected during the operation, and to update the dosing parameters in real time.
[0014] The safety early warning module, connected to the improved StochDiff time-series prediction module and the dose dynamic correction module, is used to implement advance graded early warning of adverse anesthesia events based on model prediction results and real-time intraoperative data, and to set up emergency takeover and contingency plan triggering mechanisms for rare events.
[0015] Furthermore, the improved StochDiff time series prediction module includes:
[0016] A bidirectional long short-term memory network is used for temporal modeling backbone network to extract long-short-term dependency features from multiple anesthesia time series data.
[0017] A stepwise data-driven prior learning module is used to learn a data-driven prior distribution at each time step, replacing the fixed standard Gaussian prior.
[0018] The conditional diffusion generation module is used to generate predicted drug dosage values based on learned prior latent variables as conditions through a process of positive noise addition and reverse noise reduction.
[0019] An attention network data prediction network is used to predict the original noise-free data during the inverse denoising process;
[0020] The improved StochDiff time series prediction module is trained using a bi-objective optimization function, which simultaneously optimizes the variational lower bound of prior learning and the denoising loss of the diffusion process.
[0021] Furthermore, the improved StochDiff time series prediction module has at least one of the following improvements:
[0022] A bidirectional long short-term memory network was used instead of a unidirectional long short-term memory network as the backbone of temporal modeling, while capturing the historical dependence of previous drug administration and the trend of drug efficacy changes in the current operation.
[0023] Patient baseline characteristics, procedural characteristics, and multiple anesthesia history data are incorporated as conditional variables into the conditional diffusion generation module;
[0024] The prediction target simultaneously outputs the induction dose, maintenance infusion rate, and total dose of remimazolam, as well as the predicted distribution of bispectral index values and vital signs after administration.
[0025] During the inference phase, a Gaussian mixture model is used to fit the predicted distribution, and the output point estimates are compared with the confidence intervals of the preset confidence level.
[0026] Furthermore, the bidirectional long short-term memory network temporal modeling backbone network is configured to: capture temporal dependencies from the forward direction through the forward long short-term memory network, capture temporal dependencies from the backward direction through the reverse long short-term memory network, and concatenate the forward hidden state and the reverse hidden state to obtain the final hidden state at each time step, which serves as the input to the subsequent prior learning and conditional diffusion generation module.
[0027] Furthermore, the stepwise data-driven prior learning module includes:
[0028] The prior encoder is used to output the Gaussian mean and standard deviation of the prior distribution at the current time step based on the hidden state at the previous time step.
[0029] The posterior encoder is used to output the Gaussian mean and standard deviation of an approximate posterior distribution based on the hidden state of the previous time step and the feature set of the current time step.
[0030] Both the prior distribution and the approximate posterior distribution follow a Gaussian distribution, which are used to infer the distribution of the constraint latent variables through variational inference during model training.
[0031] Furthermore, the conditional diffusion generation module is configured as follows:
[0032] At each time step, Gaussian noise is progressively added to the original dosing dose label data, and after forward diffusion for a preset total number of steps, it is converted into standard Gaussian noise.
[0033] Using the prior latent variables output by the stepwise data-driven prior learning module as conditions, the attention network data prediction network learns the reverse denoising process to gradually restore the real drug dosage data from standard Gaussian noise.
[0034] The attention network data prediction network directly outputs the predicted value of the original noiseless data to adapt to data generation tasks with conditional constraints.
[0035] Furthermore, the attention network data prediction network is built based on the attention mechanism and is used to fuse prior latent variables with noisy data features and output the final predicted data value.
[0036] Furthermore, the bi-objective optimization function includes:
[0037] The first loss term, KL divergence loss, is used to constrain the difference between the prior distribution and the approximate posterior distribution;
[0038] The second loss term is the mean squared error loss, which measures the deviation between the model-predicted dosage and the actual dosage.
[0039] During model training, the sum of the first and second loss terms is minimized using gradient descent.
[0040] Furthermore, the dose dynamic correction module includes:
[0041] The intraoperative real-time data acquisition unit is used to acquire the patient's bispectral index value and vital signs data at a preset frequency.
[0042] An online feature update unit is used to input real-time acquired data into the feature engineering module to update the input feature sequence;
[0043] The real-time dose correction unit is used to output the corrected remimazolam maintenance infusion rate and recommended additional dose values at a preset period based on the updated feature sequence.
[0044] The clinical safety constraint unit is used to set the single dose adjustment range not to exceed a preset percentage of the preceding infusion rate, and the total dose of a single operation not to exceed the clinical safety limit for remimazolam.
[0045] The calibration trigger unit is used to trigger the dose correction process when the patient's bispectral index value exceeds the target range for a preset time or when the vital signs show abnormal fluctuations.
[0046] The takeover linkage control unit is used to suspend the output of the automatic dose correction function when the safety warning module triggers the manual priority takeover mechanism.
[0047] Furthermore, the security early warning module includes:
[0048] The routine adverse event pre-classification early warning unit is used to predict the distribution of vital signs and bispectral index values after drug administration based on the output of the improved StochDiff time-series prediction module. When the confidence interval of the predicted value exceeds the warning threshold, a graded warning is triggered according to the probability of exceeding the threshold, and a corresponding intervention plan is output.
[0049] The rare event emergency takeover unit is used to pause the output of the automatic dose correction function and display a standardized anesthesia emergency plan on the monitoring interface when a preset rare event characteristic is detected or a manual trigger command is received.
[0050] The rare event data closed-loop unit is used to automatically retain time-series data of the entire rare event handling process and incorporate it into the incremental training dataset of subsequent models.
[0051] Compared to existing technologies, this invention achieves the following significant technical effects through modular architecture design and the core application of an improved stochastic diffusion time series prediction model:
[0052] (1) Significantly improved prediction accuracy and robustness: This invention is the first to apply an improved stochastic diffusion time-series prediction model to the field of anesthetic drug dosage prediction. Through an innovative combination of a bidirectional long short-term memory network time-series backbone, a stepwise data-driven prior, and a conditional diffusion generation module, it effectively captures the complex characteristics of clinical anesthesia data. Performance tests show that compared with mainstream baseline models such as LSTM, Transformer, and traditional diffusion models, the normalized root mean square error and mean absolute percentage error of this invention are significantly reduced, and the continuous sorting probability score is optimized by more than 9%, fully verifying the model's advantages in dosage prediction accuracy and distribution fitting ability.
[0053] (2) Achieving personalized and precise drug delivery: This invention fully considers key factors such as individual differences among cervical cancer patients (age, BMI, liver and kidney function), the impact of concurrent chemoradiotherapy, and the cumulative effect of multiple anesthesias. Through precise screening of core features and time-series modeling, it achieves personalized drug delivery design. Clinical validation shows that the model's sedation depth achievement rate is significantly higher than that of traditional empirical drug delivery methods, effectively avoiding the problems of insufficient or excessive sedation.
[0054] (3) Constructing a full-process anesthesia safety assurance system that conforms to clinical practice: The “preoperative prediction-intraoperative dynamic correction-early warning of routine events-emergency assistance for rare events” mechanism designed in this invention significantly improves anesthesia safety. Among them, the incidence of anesthesia-related adverse events is significantly reduced compared with the traditional propofol regimen; the emergency assistance mechanism for rare events adopts the design concept of prioritizing manual takeover and providing system-assisted prompts, avoiding mandatory locking operations that are detached from clinical practice, and providing humane full-process safety support for clinical anesthesia.
[0055] (4) High clinical feasibility and promotional value: The improved stochastic diffusion time series prediction model of this invention has a fast inference speed, which can meet the needs of real-time decision-making during surgery; the model output includes dose recommendation values, confidence intervals and risk warning results, which are highly interpretable in clinical practice and facilitate rapid decision-making by anesthesiologists. At the same time, each module of the system complies with the requirements for medical data privacy protection and AI model supervision, and has the conditions for promotion and application in multi-center hospitals, providing a standardized precision drug delivery solution for multiple anesthesia scenarios.
[0056] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of the present invention, nor is it intended to restrict the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0057] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the invention. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0058] Figure 1 This is a schematic diagram of the architecture of the AI prediction system for remimazolam anesthesia dosage provided in an embodiment of the present invention;
[0059] Figure 2 This is a schematic diagram of the structure of the improved StochDiff time series prediction module in an embodiment of the present invention;
[0060] Figure 3 This is a schematic diagram of the residual block structure of the attention network data prediction network in an embodiment of the present invention. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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.
[0062] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0063] To address the shortcomings of existing technologies, this invention provides an AI-based remimazolam anesthesia dosage prediction system, specifically solving the following technical problems: First, it overcomes the limitations of traditional models in modeling highly random and heterogeneous clinical anesthesia data. Based on an improved stochastic diffusion time-series prediction model, it achieves accurate prediction of remimazolam dosage in cervical cancer multiple interstitial radiotherapy scenarios, improving prediction accuracy and robustness. Second, it constructs a comprehensive drug delivery system encompassing "preoperative prediction - intraoperative correction - safety early warning - emergency assistance." Combining individual patient characteristics, historical anesthesia data, and real-time intraoperative monitoring information, it outputs individualized drug delivery plans, avoiding reliance on experience. The system addresses several issues: First, it addresses the problem of insufficient or excessive sedation caused by remimazolam administration. Second, it establishes a tiered early warning mechanism and an emergency support mechanism for rare events that align with actual clinical workflows. This ensures patient safety without interfering with anesthesiologists' clinical decisions, reduces the incidence of common adverse events such as hypoxemia and hypotension, and provides rapid support for rare events such as laryngospasm and allergic reactions, thereby improving the safety of multiple anesthesias. Third, it adapts the pharmacological characteristics of remimazolam to the clinical characteristics of patients undergoing concurrent chemoradiotherapy for cervical cancer, avoiding the risks of drug resistance and addiction associated with multiple propofol administrations, and providing a standardized and scalable precision drug delivery solution for clinical multiple anesthesia scenarios.
[0064] Figure 1 This is a schematic diagram of the architecture of the remimazolam anesthesia dosage AI prediction system provided in an embodiment of the present invention. Figure 1 As shown, the remimazolam anesthesia dose AI prediction system of the present invention has a modular architecture, and the modules establish one-way or two-way communication connections, specifically including:
[0065] Data acquisition module 110 is used to collect multi-dimensional clinical data of the target patient;
[0066] Step S1: Design and implementation of data acquisition module 110:
[0067] The data acquisition module 110 is used to collect multi-dimensional clinical data of the target patient, complete the desensitization, storage and preliminary verification of the raw data, and provide a data foundation for subsequent modules.
[0068] S11, Data Collection Scope:
[0069] All data collected by the data acquisition module 110 has been approved by the hospital's ethics committee, with signed informed consent forms from patients and complete de-identification processing throughout the entire process. The data is categorized into five main types, as follows:
[0070] (1) Patient baseline static data: including demographic characteristics (age, height, weight, body mass index (BMI)), American Society of Anesthesiologists (ASA) anesthesia classification, past medical history, history of drug allergies, preoperative liver and kidney function, complete blood count, coagulation function, concurrent chemoradiotherapy regimen and cycle, FIGO staging;
[0071] (2) Time-series data of multiple anesthesias: For completed radiotherapy operations, collect the remimazolam administration regimen (induction dose, maintenance infusion rate, total dose, booster dose), administration time points, corresponding vital sign data, sedation depth data, and intraoperative adverse events for each operation;
[0072] (3) Intraoperative dynamic time-series data: including heart rate, invasive / non-invasive blood pressure, blood oxygen saturation (SpO2), respiratory rate, end-tidal carbon dioxide partial pressure (PETCO2), and bispectral index (BIS) collected at a frequency of 1 Hz during this / previous operation.
[0073] (4) Operational characteristic data: including the expected duration of this radiotherapy operation, the number of needles inserted into the applicator, the difficulty level of the operation, whether opioid analgesics were used in combination and their dosage;
[0074] (5) Label data: The core labels are the induction dose of remimazolam to achieve the target sedation depth (BIS value maintained at 40-60) in actual clinical administration, the maintenance infusion rate, and the total dose of a single operation. The auxiliary labels are the changes in vital signs and the occurrence of adverse events after administration.
[0075] S12, Data Source:
[0076] (1) Multicenter retrospective clinical dataset: Anesthesia and clinical treatment data of patients with locally advanced cervical cancer who underwent three sessions of interstitial radiotherapy were collected from three tertiary hospitals between 2022 and 2025, with a sample size of no less than 1,000 cases;
[0077] (2) Prospective clinical trial dataset: Through single-center prospective clinical trials, the full-process diagnosis and treatment data of patients who meet the inclusion criteria are collected simultaneously for model fine-tuning, incremental updates and external validation.
[0078] S13. Data inclusion and exclusion criteria:
[0079] (1) Inclusion criteria: ① Pathologically confirmed locally advanced cervical cancer, meeting the indications for intracavitary combined interstitial radiotherapy; ② Intended to undergo 3 or more interstitial radiotherapy procedures, with intravenous sedation and anesthesia for each procedure; ③ ASA anesthesia grade I-III; ④ Age 18-75 years; ⑤ Complete clinical diagnosis and treatment data;
[0080] (2) Exclusion criteria: ① Allergy to benzodiazepines or remimazolam excipients; ② Severe dysfunction of vital organs such as heart, liver, kidney, and lungs; ③ History of drug abuse, mental illness, or cognitive impairment; ④ Clinical data missing rate exceeding 30%.
[0081] The feature engineering module 120, connected to the data acquisition module 110, is used to preprocess multi-dimensional clinical data, perform feature screening and time-series feature construction, and generate a standardized feature dataset.
[0082] Step S2, Design and implementation of feature engineering module 120:
[0083] The feature engineering module 120 is unidirectionally connected to the data acquisition module 110 and is used to preprocess, screen features, and construct temporal features from raw multidimensional clinical data to generate a standardized feature dataset that meets the model input requirements.
[0084] Specifically, the feature engineering module 120 performs full-process processing on the raw data output by the data acquisition module 110 to generate a standardized time-series feature dataset. The specific steps are as follows:
[0085] S21. Data Preprocessing:
[0086] (1) Missing value handling: For features with a missing rate of <5%, linear interpolation is used to fill the time-series continuous features and the mode is used to fill the classification features; for features with a missing rate of 5%-30%, multiple imputation based on random forest is used to fill the features; features with a missing rate of >30% are directly removed.
[0087] (2) Outlier handling: The 3σ principle is used to identify outliers in continuous features. Outliers exceeding the threshold are handled by upper and lower truncation methods to retain extreme values within the clinically reasonable range.
[0088] (3) Data standardization and coding: Z-Score standardization is used for continuous features; one-hot coding is used for categorical features (such as ASA anesthesia grade and FIGO tumor staging); and label coding is used for ordered categorical features (such as operation difficulty grade).
[0089] S22, Feature Filtering:
[0090] A two-stage feature selection strategy of Maximum Information Coefficient (MIC) + L1 regularization (Lasso) is adopted to ultimately retain 32 core features. The specific process is as follows:
[0091] (1) First stage: Calculate the nonlinear correlation between each original feature and the dosage label through MIC, remove weakly correlated features with MIC value < 0.2, and initially retain 48 candidate features;
[0092] (2) Second stage: Feature compression was performed using L1 regularization (Lasso), with a penalty coefficient set to 0.01. Redundant features with a regression coefficient of 0 and highly collinear features were removed. The final 32-dimensional core features and core sub-features are as follows: ① Static features (12 dimensions): The core features are age, BMI, ASA anesthesia grade, preoperative creatinine clearance rate, number of concurrent chemoradiotherapy cycles, and FIGO stage of the tumor. The rest are auxiliary static features such as comorbidities, history of drug allergies, hemoglobin, and albumin. ② Dynamic time-series features (18 dimensions): The core features are the total dose of remimazolam in previous operations, the mean and fluctuation range of BIS in previous operations, the lowest SpO2 after previous administration, the amplitude of mean arterial pressure change in previous operations, and the time sequence of basic vital signs before this operation. The rest are auxiliary time-series features such as the time node of previous operation administration, the occurrence of adverse events, and the dose of opioids used in combination. ③ Operation features (2 dimensions): The expected duration of this operation and the number of needles applied to the applicator.
[0093] The 32-dimensional core features were calculated using a two-stage screening strategy of MIC+Lasso, based on multicenter clinical data from no fewer than 1000 cases. Since the specific weighting coefficients vary with the dataset, those skilled in the art can calculate them themselves using the method described in this embodiment, and will not be elaborated further.
[0094] S23. Construction of temporal features:
[0095] A sliding window method was used to construct a time-series feature sequence adapted for three-stage implantation radiotherapy in cervical cancer. The window size was set to 3 (corresponding to 3 radiotherapy operations), and the step size was 1. The time-series sequence format for each sample was as follows:
[0096]
[0097] in, For the completed radiotherapy procedure time steps, For the first The feature set corresponding to each time step operation; for the first radiotherapy operation. The input features are the patient's baseline static data and the features of the current operation; for the second and third radiotherapy operations, the input features include complete time-series data of all previous operations, enabling time-dependent modeling of multiple dosing.
[0098] The improved StochDiff time series prediction module 130, connected to the feature engineering module 120, is used to output the initial individualized dosing regimen of remimazolam based on the standardized feature dataset and through the pre-trained improved StochDiff time series prediction model, and output the predicted distribution of the patient's vital signs and sedation depth after dosing.
[0099] S3, Design and Implementation of Improved StochDiff Timing Prediction Module 130:
[0100] The improved StochDiff time-series prediction module 130, as the core unit of the system, is unidirectionally connected to the feature engineering module. It is used to output the initial individualized dosing regimen for remimazolam based on a pre-trained improved StochDiff time-series prediction model using a standardized feature dataset. Simultaneously, it outputs the predicted distribution of the patient's vital signs and sedation depth after dosing. For example... Figure 2 The diagram shown is a structural schematic of the improved StochDiff time series prediction module 130 in an embodiment of the present invention.
[0101] Specifically, the improved StochDiff (Stochastic Diffusion) temporal prediction model proposed in this invention is specifically adapted to clinical scenarios involving multiple dose prediction of remimazolam. By specifically improving the original StochDiff model, it addresses the modeling challenges of high randomness, high individual heterogeneity, and long-term temporal dependence of clinical anesthesia data, achieving accurate prediction of individualized dosing regimens. This model uses a bidirectional long short-term memory network (BiLSTM) as the backbone of temporal modeling, integrating four core units: a stepwise data-driven prior learning module, a conditional diffusion generation module, and an attention-Net data prediction network. A dual-objective optimization function is used to complete model training.
[0102] The improved StochDiff time-series prediction model proposed in this invention integrates four technical units: BiLSTM, stepwise data-driven prior, conditional diffusion generation, and Attention-Net. This is determined by the inherent characteristics of the clinical task of predicting multiple anesthesia doses for cervical cancer. Patients require three consecutive radiotherapy sessions. The dosage, efficacy, and adverse events of pre-treatment medications directly influence subsequent anesthesia protocols. The model needs to capture both forward (history-dependent) and backward (trend evolution) temporal features, hence the design of BiLSTM. Patients exhibit significant differences in age, BMI, liver and kidney function, and radiotherapy / chemotherapy regimens. Fixed priors cannot accommodate multimodal distributions. The model needs to adaptively learn the prior distribution for each patient and each time step from the data. Traditional diffusion models use fixed standard Gaussian priors, which cannot characterize dose-response differences among patients, resulting in overly smooth predicted distributions. Therefore, a stepwise data-driven prior and conditional diffusion generation approach is designed. Furthermore, intraoperative vital signs and sedation depth are influenced by various factors (such as patient emotions and intensity of operative stimuli), exhibiting nonlinear random fluctuations. The model needs probability generation capabilities, outputting predicted distributions rather than point estimates to quantify uncertainty. Common regression models (LSTM, Transformer) output single dose values and cannot provide confidence intervals, making it difficult for clinicians to assess risk. Therefore, Attention-Net is designed. The specific design is as follows:
[0103] S31. Improvements to the model's clinical adaptability: To address the clinical needs of remimazolam anesthesia dose prediction, four core improvements were made to the original StochDiff model, specifically:
[0104] Temporal modeling backbone replacement: BiLSTM is used to replace the original unidirectional long short-term memory network (LSTM), which can simultaneously capture the historical temporal dependence of previous drug administration and the trend of drug efficacy changes in the current operation, and is suitable for drug administration scenarios with multiple anesthesia.
[0105] Multi-dimensional conditional constraint integration: Patient baseline characteristics, operational characteristics, and multiple anesthesia history data are integrated into the conditional variables of the conditional diffusion generation module to achieve dose prediction under multi-dimensional feature constraints;
[0106] Multi-objective prediction design: The prediction target simultaneously outputs three core indicators: induction dose of remimazolam, maintenance infusion rate, and total dose, as well as the predicted distribution of bispectral index (BIS value) and vital signs after administration, thus meeting the dual needs of dose prediction and safety warning.
[0107] Improved clinical interpretability: The inference stage uses a Gaussian mixture model (GMM) to fit the predicted distribution and outputs point estimates and 95% confidence intervals that can be directly applied in clinical practice, solving the problem that the diffusion model's prediction results are distributions that are difficult to apply directly in clinical practice.
[0108] S32. Core unit design of the model:
[0109] Furthermore, the improved StochDiff time-series prediction module 130 includes: a bidirectional long short-term memory network time-series modeling backbone network for extracting long- and short-term dependency features from multiple anesthesia time-series data; a stepwise data-driven prior learning module for learning a data-driven prior distribution at each time step to replace a fixed standard Gaussian prior; a conditional diffusion generation module for generating predicted drug dosage values based on learned prior latent variables as conditions through a forward noise addition and reverse denoising process; and an attention network data prediction network for predicting the original noise-free data during the reverse denoising process. The improved StochDiff time-series prediction module is trained using a bi-objective optimization function, which simultaneously optimizes the variational lower bound of the prior learning and the denoising loss of the diffusion process. Specifically:
[0110] S321, Bidirectional Long Short-Term Memory (BiLSTM) network, time-series modeling backbone network:
[0111] A bidirectional long short-term memory (LSTM) network is used as the backbone network for temporal modeling to extract long- and short-term dependency features from multiple anesthesia time-series data, providing feature support for subsequent modules. This includes: capturing temporal dependencies forward using a forward LSM network and backward using a backward LSM network; concatenating the forward and backward hidden states to obtain the final hidden state at each time step, which serves as input for subsequent prior learning and conditional diffusion generation modules. Specifically:
[0112] (1) Input and output definition: The input is the standardized time series feature sequence output by the feature engineering module. ( (For each observation time step), the output is the hidden state at each time step. ;
[0113] (2) Calculation process:
[0114]
[0115] in, : No. t Hidden states of a forward long short-term memory (LSTM) network at each time step are used to capture forward temporal dependency features of cervical cancer multiple anesthesia time series data. : The operation function of the feedforward Long Short-Term Memory (LSTM) network, the input is the first... t Feature set at each time step Forward hidden state of the previous time step Output the forward hidden state at the current time step. . : No.t The standardized feature set corresponding to each time step includes patient baseline characteristics, operational characteristics, and historical anesthesia time sequence characteristics in the context of cervical cancer radiotherapy anesthesia. : No. t -1 hidden state of the forward LSTM, providing historical timing information for the forward LSTM operation at the current time step. : No. t Hidden states of a time-step backward long short-term memory network (LSTM) are used to capture backward temporal dependency features of cervical cancer multiple anesthesia time-series data. : Inverse Long Short-Term Memory (LSTM) network operation function, the input is the first... t Feature set at each time step and the reverse hidden state of the next time step Output the reverse hidden state at the current time step. ; : No. t+ The hidden state of the reverse LSTM at one time step provides subsequent timing information for the reverse LSTM operation at the current time step; : No. t The final hidden state (128-dimensional) at each time step is formed by concatenating the forward and backward hidden states, serving as the input to the prior learning and conditional diffusion modules; Concat: a feature concatenation operation function used to concatenate the forward hidden states. and reverse hidden state spliced together to the final hidden state .
[0116] S322, Stepwise Data-Driven Prior Learning Module:
[0117] The stepwise data-driven prior learning module learns a data-driven prior distribution at each time step of the time series, replacing the fixed standard Gaussian prior of traditional diffusion models, effectively capturing the high randomness and individual heterogeneity of clinical anesthesia data. Furthermore, the stepwise data-driven prior learning module includes: a prior encoder, used to output the Gaussian mean and standard deviation of the prior distribution at the current time step based on the hidden state of the previous time step; and a posterior encoder, used to output the Gaussian mean and standard deviation of an approximate posterior distribution based on the hidden state of the previous time step and the feature set of the current time step. Both the prior distribution and the approximate posterior distribution follow a Gaussian distribution, used to infer the distribution of constrained latent variables through variational inference during model training. Specifically:
[0118] (1) Prior distribution learning: at each time step t Hidden state based on previous time steps The mean and variance of the prior distribution are learned through a prior encoder. The prior distribution follows a Gaussian distribution, and the formula is:
[0119]
[0120] in, The prior encoder consists of two fully connected layers, which output the mean and standard deviation of the prior distribution, respectively. These are 128-dimensional prior latent variables, which serve as the conditional inputs for the subsequent conditional diffusion generation module. : No. t The prior latent variables (128-dimensional) at each time step follow a data-driven Gaussian prior distribution and serve as the conditional input to the conditional diffusion generation module. : No. t Prior latent variables at each time step The probability distribution function, with the input being the previous... t Feature sequence at -1 time step and latent variable sequence Output The Gaussian prior distribution; : Gaussian distribution function, used to describe the probability characteristics of the prior / approximate posterior distribution in cervical cancer anesthesia scenarios. The input is the mean and standard deviation, and the output is the corresponding Gaussian distribution; The a priori distribution mean output by the prior encoder is generated by a two-layer fully connected network based on the first... t -1 time step final hidden state Calculated; The standard deviation of the prior distribution output by the prior encoder is determined by a two-layer fully connected network based on the first... t -1 time step final hidden state Calculated; :forward t -1 time step of standardized feature sequence, containing historical temporal features of anesthesia for multiple radiotherapy treatments for cervical cancer; :forward t The sequence of prior latent variables for -1 time steps provides historical latent variable information for learning the prior distribution at the current time step.
[0121] (2) Approximate posterior distribution learning: based on the observation data at the current time step With hidden state An approximate posterior distribution is learned through a posterior encoder and used for variational inference during model training. The formula is as follows:
[0122]
[0123] in, It is a posterior encoder consisting of two fully connected layers, which outputs the mean and standard deviation of an approximate posterior distribution. : No. Prior latent variables at each time step The approximate posterior distribution function, with the input being the previous... Feature sequences at each time step and before A sequence of latent variables at each time step Output The approximate posterior distribution; The approximate posterior distribution mean of the posterior encoder output is derived from a two-layer fully connected network based on the first... The final hidden state at each time step and the Feature set at each time step Calculated; The approximate posterior distribution standard deviation of the posterior encoder output is determined by a two-layer fully connected network based on the first... The final hidden state at each time step and the Feature set at each time step Calculated; :forward The standardized feature sequence of each time step provides complete temporal feature information for learning approximate posterior distribution.
[0124] S323, Conditional Diffusion Generation Module:
[0125] The conditional diffusion generation module integrates the diffusion process into each time step of time series modeling, based on learned prior latent variables. As a condition, the forward noise addition and reverse denoising processes are completed to achieve the generation and prediction of drug dosage. Specifically, the conditional diffusion generation module is configured to: progressively add Gaussian noise to the original drug dosage label data at each time step, converting it into standard Gaussian noise after a preset total number of forward diffusion steps; using the prior latent variables output by the progressive data-driven prior learning module as conditions, the Attention-Net data prediction network learns the reverse denoising process to progressively restore the true drug dosage data from the standard Gaussian noise; wherein, the Attention-Net data prediction network directly outputs the predicted value of the original noise-free data to adapt to the data generation task with conditional constraints. The specific process is as follows:
[0126] (1) Forward diffusion process: at each time step t For the original label data (actual dosage) Gaussian noise is gradually added, and then... N After step diffusion, it is converted into standard Gaussian noise, as shown in the formula:
[0127]
[0128] in, : The number of single steps in forward / reverse diffusion, serving as a step size indicator for the diffusion process, with a value range of . ; : The total number of steps in the diffusion process. In this model, the value is 1000, which is a fixed hyperparameter for predicting the diffusion process using remimazolam dose. N=1000 is a common setting for diffusion models, and it has been verified that convergence is achieved under this setting. : No. The fundamental coefficient of forward diffusion is a core parameter for calculating forward diffusion. , , For the first The noise scheduling coefficient for step diffusion is a preset value, which is used in this model. A linear scheduling strategy is employed to control the noise addition intensity in each forward diffusion step, with a value range of [value range missing]. Up to 0.02; : No. At each time step, the original label data is processed... The conditional probability distribution function after forward diffusion characterizes the distribution characteristics of the noisy data after forward noise addition. : No. At each time step, the original label data undergoes... The noisy data after forward diffusion are the noisy predicted values of remimazolam dosage; : No. t The original label data at each time step, namely the actual dose of remimazolam administered to achieve the target sedation depth during radiotherapy anesthesia for cervical cancer. Gaussian distribution function: used to describe the probability distribution characteristics of data in the forward diffusion and reverse denoising processes. The input is the mean and variance, and the output is the corresponding Gaussian distribution. : No. The cumulative coefficient of step diffusion, from the previous Step The product is obtained by multiplying the results together, and is used to calculate the mean and variance of the forward diffusion process; : The identity matrix, used to maintain the dimensional consistency of the Gaussian distribution variance, and to adapt the characteristic dimension of the remimazolam dosing dose.
[0129] (2) Reverse denoising process: using prior latent variables As a condition, the denoising process is learned through a neural network to gradually reconstruct the true drug dosage data from standard Gaussian noise. The conditional distribution formula for the reverse process is:
[0130]
[0131] in, This is used as the Attention-Net data prediction network to learn the mean value for the denoising process. : No. At each time step, with prior latent variables As a condition, after Step-by-step reverse denoising to obtain The conditional probability distribution function of the step data characterizes the distribution features of the inverse denoising. : No. At this point in time, The result after reverse denoising The noise-reduced data are intermediate predicted values for remimazolam dosage; : No. The 128-dimensional prior latent variables at each time step are used as conditional constraints for the inverse denoising process and are obtained by the stepwise data-driven prior learning module. The mean of the inverse denoising process of the Attention-Net data prediction network output is obtained from the noisy data. diffusion steps and prior latent variables Calculated together; The fixed variance parameter for the inverse denoising process, with a value of [value missing]. This is used to simplify model training and maintain the stability of the inverse denoising distribution; : No. The cumulative noise figure of step diffusion is calculated using the following formula: This serves as the core basis for determining the variance in reverse denoising. : No. The cumulative coefficient of step diffusion, from the previous Step The product is obtained by multiplying the samples together and used for inverse denoising sampling and variance calculation.
[0132] (3) Reverse denoising sampling: The sampling formula for the reverse denoising process is:
[0133]
[0134] in, It generates predicted data values for the Attention-Net data prediction network, replacing the noise prediction of the traditional diffusion model, and is suitable for the data generation task with conditional constraints in this scenario. The Attention-Net data prediction network outputs the original noiseless data prediction value, which is then converted from noisy data. diffusion steps and prior latent variables The calculations show that the conditional dose generation task adapted to this patent replaces traditional noise prediction.
[0135] S324, Attention-Net data prediction network:
[0136] The Attention-Net data prediction network is the core execution unit of the reverse denoising process, used for noisy data... diffusion steps With conditional latent variables Predicting the original noiseless data Specifically, the Attention-Net data prediction network is built on an attention mechanism to fuse prior latent variables with noisy data features and output the final predicted data value. Specifically:
[0137] (1) Network structure: It consists of 3 residual blocks. Each residual block contains a self-attention layer, a cross-attention layer and a feedforward network. The functions of each layer are: ① Self-attention layer: learns the feature correlation between multi-dimensional prediction targets (induction dose, maintenance rate, total dose, BIS value, vital signs); ② Cross-attention layer: integrates conditional latent variables. ③ Feedforward network: Based on the fused features, it outputs the final predicted data value, such as... Figure 3 The diagram shown is a schematic diagram of the residual block structure of the attention network data prediction network in an embodiment of the present invention.
[0138] (2) Output: Directly output the predicted value of the original noiseless data. , which serves as the core input for inverse denoising sampling.
[0139] S33. Design of the bi-objective optimization function for the model:
[0140] This model employs a dual-objective optimization function for training, simultaneously optimizing the variational lower bound of prior learning and the denoising loss of the diffusion process, thereby achieving a dual improvement in model feature learning and prediction accuracy. The optimization function formula is as follows:
[0141]
[0142] in, The improved StochDiff time series prediction model uses a bi-objective optimization loss function to simultaneously optimize the prior learning effect and the denoising accuracy of the diffusion process, which is the core optimization objective for model training. The summation operator iterates through elements from the first to the last element. All time steps ( The observation time step for anesthesia during multiple radiotherapy sessions for cervical cancer is 3 (corresponding to 3 radiotherapy operations), and the KL divergence loss of each time step is accumulated. KL divergence (relative entropy) loss function, used to measure the prior distribution With approximate posterior distribution The difference constrains the feature fitting effect of the prior learning module; : No. Prior latent variables at each time step The approximate posterior distribution is obtained by the posterior encoder based on the anterior distribution. The feature sequence at each time step and the previous The latent variable sequence at each time step is calculated; : No. Prior latent variables at each time step The prior distribution is determined by the prior encoder based on the previous... The feature sequence and latent variable sequence at each time step are calculated; : Expected operator, for the original dose diffusion steps Prior latent variables The expectation is calculated based on all possible values of the vector, which is used to measure the overall level of denoising loss in the diffusion process. : No. The original label data for each time step, i.e. the actual dose of remimazolam administered to achieve the target sedation depth during radiotherapy anesthesia for cervical cancer. The L2 norm square operator is used to calculate the actual dosage. Compared with model predictions The mean square error between them; The original noiseless data prediction value output by the Attention-Net data prediction network, i.e. the model prediction value of the remimazolam dosage; : No. The original dosage at each time step was... Noisy data after forward diffusion; : No. The 128-dimensional prior latent variables at each time step serve as conditional constraints for the inverse denoising process. Mean squared error (MSE) loss term, used to measure the deviation between the model's predicted remimazolam dosage and the actual dosage, to optimize the denoising prediction accuracy of the diffusion process.
[0143] In this bi-objective optimization function: the first loss term is the KL divergence loss, which is used to constrain the difference between the prior distribution and the approximate posterior distribution; the second loss term is the mean squared error (MSE) loss, which is used to measure the deviation between the model-predicted dosage and the actual dosage, and to optimize the denoising prediction accuracy of the diffusion process; during model training, the sum of the first and second loss terms is minimized by the gradient descent method to update the network parameters.
[0144] The dose dynamic correction module 140 is connected to the improved StochDiff time-series prediction module and is used to perform online dynamic correction of the initial individualized dosing regimen based on the patient data collected in real time during the operation and to update the dosing parameters in real time.
[0145] Step S4: Design and implementation of the dose dynamic correction module 140:
[0146] The dose dynamic correction module 140 is bidirectionally connected to the improved StochDiff timing prediction module 130 to perform online dynamic correction of the initial individualized dosing regimen based on the patient data collected in real time during the operation, and to update the dosing parameters in real time.
[0147] Specifically, the dose dynamic correction module 140 achieves online dynamic correction of the dosing regimen based on real-time intraoperative data, resolving the discrepancy between the preoperative predicted dose and the patient's actual drug response during surgery. Simultaneously, it collaborates with the safety early warning module to achieve takeover control. The specific implementation logic is as follows:
[0148] S41. Intraoperative real-time data acquisition:
[0149] The intraoperative real-time data acquisition unit is used to acquire the patient's bispectral index (BIS value) and vital signs data at a preset frequency (e.g., 1Hz). A real-time time sequence of length 60 is constructed through a sliding window (corresponding to the monitoring data of the first 60 seconds).
[0150] S42. Online Feature Update:
[0151] The online feature update unit inputs the real-time collected time-series data into the feature engineering module, completes the standardization and feature filtering processes, and then updates the input feature sequence of the improved StochDiff time-series prediction model.
[0152] S43. Real-time dose correction:
[0153] The real-time dose correction unit outputs the corrected remimazolam maintenance infusion rate and recommended supplemental dose values at a preset period (e.g., once every 5 seconds) based on the updated feature sequence.
[0154] S44. Clinical safety constraints:
[0155] To ensure drug administration safety, a dual dose constraint is set up, with a clinical safety constraint unit used to set the single dose adjustment range not to exceed a preset percentage (e.g., 20%) of the preceding infusion rate, and the total dose of a single operation not to exceed the clinical safe upper limit of remimazolam (preferably 30 mg).
[0156] S45, Interlocking Control:
[0157] The takeover linkage control unit is used to pause the output of the automatic dose correction function and stop all dosing dose recommendations when the safety warning module 150 triggers the manual priority takeover mechanism, retaining only the data acquisition and transmission functions.
[0158] S46. Correction trigger condition:
[0159] The calibration trigger unit is used to trigger the dose correction process when the patient's bispectral index value exceeds the target range for a preset time (e.g., when the patient's bispectral index value exceeds the target range (40-60) for 10 seconds), or when the vital signs show abnormal fluctuations (e.g., the mean arterial pressure drops by more than 20% of the baseline value).
[0160] The safety early warning module 150 is connected to the improved StochDiff time-series prediction module and the dose dynamic correction module. It is used to realize the early warning of adverse anesthesia events based on the model prediction results and real-time intraoperative data, and to set up an emergency takeover and contingency plan triggering mechanism for rare events.
[0161] Step S5: Design and implementation of the safety early warning module 150:
[0162] The safety early warning module 150, the improved StochDiff time-series prediction module 130, and the dose dynamic correction module 140 are all bidirectional communication connections. They are used to realize the early warning of adverse anesthesia events based on model prediction results and real-time intraoperative data. At the same time, they are set up with emergency takeover and contingency plan triggering mechanisms for rare events, providing anesthesiologists with full-process decision support.
[0163] Specifically, the safety early warning module 150 uses the predicted distribution of the improved StochDiff time series prediction model and real-time intraoperative monitoring data to achieve early warning of adverse anesthesia events. At the same time, it designs an emergency takeover and contingency plan triggering mechanism for rare events to make up for the model's lack of learning of rare events.
[0164] Furthermore, the safety early warning module 150 includes: a routine adverse event pre-classification early warning unit, used to predict the distribution of post-drug vital signs and bispectral index values based on the output of the improved StochDiff time-series prediction module; when the confidence interval of the predicted value exceeds the early warning threshold, it triggers a graded early warning based on the probability of exceeding the threshold and outputs a corresponding intervention plan; a rare event emergency takeover unit, used to pause the output of the automatic dose correction function and display a standardized anesthesia emergency plan on the monitoring interface when a preset rare event characteristic is detected or a manual trigger command is received; and a rare event data closed-loop unit, used to automatically retain the time-series data of the entire rare event handling process and incorporate it into the incremental training dataset of subsequent models. Specifically designed as follows:
[0165] S51. Early warning and tiered alert for routine adverse events:
[0166] Key warning indicators: hypoxemia (SpO2 < 95%), hypotension (mean arterial pressure < 65 mmHg or a decrease of more than 20% from baseline), respiratory depression (respiratory rate < 8 breaths / min or PETCO2 > 50 mmHg), excessive sedation (BIS < 40), and insufficient sedation (BIS > 60).
[0167] The advance warning logic is based on the predicted distribution of patients' vital signs and BIS values after drug administration, output by the improved StochDiff time-series prediction model. When the lower limit / upper limit of the 95% confidence interval of the predicted value exceeds the warning threshold, the advance warning is triggered.
[0168] Tiered early warning mechanism: ① Low risk warning: The probability of the predicted value exceeding the threshold is <30%, and only a text prompt is displayed on the system interface without mandatory intervention; ② Medium risk warning: The probability of the predicted value exceeding the threshold is 30%-70%, and an early warning prompt window pops up, while simultaneously outputting recommended intervention plans (such as adjusting the drug administration rate or oxygen inhalation); ③ High risk warning: The probability of the predicted value exceeding the threshold is >70%, or the real-time monitoring data has exceeded the threshold, triggering both light and sound alarms, and simultaneously outputting an emergency intervention plan to assist anesthesiologists in rapid handling.
[0169] S52. Emergency takeover and contingency plan triggering mechanism for rare events:
[0170] To address rare adverse anesthesia events that occur suddenly during surgery and are not adequately covered by the training dataset (including laryngospasm, remimazolam allergic reactions, severe airway obstruction, acute cardiac dysfunction, etc.), a mandatory manual takeover and standardized emergency plan triggering chain is established, specifically as follows:
[0171] Forced manual takeover trigger conditions: When any of the following situations occur in real-time monitoring data: ① The patient's SpO2 drops sharply to below 90% and lasts for more than 5 seconds, and routine oxygen intervention does not improve the situation; ② The patient exhibits characteristic monitoring data changes of severe airway spasm and respiratory arrest; ③ The patient exhibits signs of allergic reaction (such as a sudden drop in blood pressure exceeding the baseline value by 40%, a sudden increase in airway pressure, and skin and mucous membrane allergic manifestations); or when the anesthesiologist manually triggers the emergency takeover button, the system will suspend the automatic dose recommendation function, but will continue to monitor and display data, and all drug administration operations must be performed manually by the physician;
[0172] Emergency response plan linkage: When forced manual takeover is triggered, the system automatically pops up the standardized anesthesia emergency plan for the corresponding rare event, including clinical operation guidelines such as airway management, emergency drug recommendations, and circulatory support, to assist anesthesiologists in rapid response;
[0173] Rare event data closed loop: After the rare event is handled, the system automatically retains the time-series data of the entire event process. After ethical approval and data anonymization, the data is incorporated into the incremental training dataset of the model for subsequent model iterations, gradually improving the model's ability to identify and warn of rare events.
[0174] In a preferred embodiment of the invention, the dose dynamic correction module 140 and the safety warning module 150 are linked: when the dose dynamic correction module 140 outputs a dose adjustment suggestion, the safety warning module 150 simultaneously assesses the risk of adverse events that may be caused by the adjustment, and if the risk exceeds a threshold, the adjustment range is limited.
[0175] Step S6: Model Training and Inference Methods
[0176] The improved StochDiff time-series prediction model of this invention is implemented using Python and the PyTorch deep learning framework for both training and inference, employing a GPU-accelerated deep learning hardware environment. The specific training and inference process is as follows:
[0177] S61. Dataset Construction and Partitioning:
[0178] S611, Dataset Construction:
[0179] The retrospective and prospective clinical data collected by the data acquisition module are integrated, and after data desensitization and quality control, a total dataset for model training is constructed.
[0180] S612, Dataset Partitioning:
[0181] The total dataset was randomly divided into training, validation, and test sets in a 7:2:1 ratio, following a patient-level division principle, meaning that all time-series data from the same patient were assigned to only one dataset to avoid data leakage. The training set was used for model parameter learning, the validation set was used for hyperparameter tuning and early termination mechanism triggering, and the test set was used for final model performance evaluation. Meanwhile, an independent prospective clinical trial external dataset was used to validate the model's generalization ability.
[0182] S62. Model training steps:
[0183] Model training is divided into two stages: pre-training and fine-tuning. After the fine-tuning stage, model iteration and update rules are set to ensure that model performance is continuously optimized as clinical data accumulates. Specifically:
[0184] S621, Pre-training phase:
[0185] The basic parameters of the model were learned based on a multicenter retrospective clinical dataset. The steps were as follows:
[0186] (1) Parameter initialization: The weights of the BiLSTM time-series modeling backbone network, prior encoder, posterior encoder and Attention-Net data prediction network are initialized with Xavier uniform distribution, and the bias term is initialized to 0.
[0187] (2) Hyperparameter settings: Batch size (batch_size) is 32, and the initial learning rate is 1×10. -4 The optimizer uses adaptive moment estimation for weight decay (AdamW), with a weight decay coefficient of 1×10⁻⁶. -4 The training consists of 200 epochs with a gradient clipping threshold of 1.0. A learning rate decay strategy is employed, where the learning rate decays by 50% when the validation set loss does not decrease for 10 consecutive epochs.
[0188] (3) Forward propagation: Input the temporal feature sequence of the training set into the model, extract the hidden state through the BiLSTM temporal modeling backbone network, learn the latent variable distribution through the prior encoder and the posterior encoder, complete the forward noise addition and reverse noise reduction process through the conditional diffusion generation module, output the predicted drug dosage data and the predicted distribution of vital signs, and calculate the loss value of the bi-objective optimization function.
[0189] (4) Backpropagation and parameter update: Backpropagation is performed based on the calculated loss value to calculate the gradient of the network parameters and update the network parameters through the AdamW optimizer;
[0190] (5) Early stopping mechanism: When the validation set loss does not decrease for 20 consecutive rounds, training is terminated and the model weights with the lowest validation set loss are saved as pre-trained weights;
[0191] (6) Pre-training objectives: Complete the model’s general feature extraction and diffusion process learning of anesthesia time series data, and establish the basic mapping relationship between drug dosage and patient characteristics and operation characteristics.
[0192] S622, Fine-tuning stage:
[0193] The basic intervention training weights were used to fine-tune the model's clinical scenario adaptability using a prospective clinical trial dataset. The steps were as follows:
[0194] (1) Parameter freezing: Freeze the low-level parameters of the BiLSTM time-series modeling backbone network and only update the high-level parameters of the prior encoder and the Attention-Net data prediction network to avoid model overfitting;
[0195] (2) Fine-tuning hyperparameter settings: Batch size is set to 16, and the initial learning rate is 1×10. -5 The training rounds consisted of 50 rounds, with all other hyperparameters remaining the same as those used in the pre-training phase.
[0196] (3) Performance evaluation: After fine-tuning, the model performance was evaluated using the test set and the external validation set. The core evaluation indicators included: ① Regression prediction indicators: normalized root mean square error (NRMSE) and mean absolute percentage error (MAPE), used to evaluate the accuracy of dose prediction; ② Probability prediction indicators: continuous ranking probability score (CRPS), used to evaluate the accuracy of the model's predicted distribution; ③ Clinical indicators: sedation depth achievement rate (the percentage of time that the BIS value is maintained at 40-60) and the incidence of anesthesia-related adverse events, used to evaluate the clinical application value of the model.
[0197] S623. Model input and output definitions:
[0198] (1) Input: The standardized time-series feature sequence output by the feature engineering module, with dimensions [batch_size, seq_len, feature_dim], where batch_size is the batch size, seq_len is the length of the time-series sequence (maximum 3, corresponding to 3 radiotherapy operations), and feature_dim is the feature dimension (32-dimensional).
[0199] (2) Training phase output: predicted induction dose of remimazolam, maintenance infusion rate, total dose of a single operation, corresponding BIS value after administration, predicted distribution of vital signs, and loss value of the bi-objective optimization function;
[0200] (3) Output of the reasoning stage: ① Core output: Individualized dosing regimen of remimazolam for the target patient in this radiotherapy operation, including induction dose, initial maintenance infusion rate, maximum recommended dose for a single operation, and recommended supplementary dose regimen; ② Auxiliary output: BIS value of the patient after administration, predicted values and 95% confidence intervals of vital signs, probability of adverse event occurrence, and graded early warning results.
[0201] S624. Iterative update rules for the model:
[0202] Model updates adhere to medical AI model compliance requirements, employing both fixed-period batch updates and threshold-triggered automatic updates. A model version management mechanism is also established, specifically as follows:
[0203] (1) Fixed-cycle batch update: The full model fine-tuning update is completed once a month on a calendar month basis; at the beginning of each month, the data of newly added cases in prospective clinical trials that have been desensitized and approved by ethics in the previous month are summarized, and after data quality control and feature engineering, they are included in the fine-tuning dataset. The model parameters are updated according to the fine-tuning process of S622; the updated model must be verified by the performance of the test set and the internal validation set to ensure that the core indicators such as NRMSE and MAPE are not lower than the original model and the sedation depth compliance rate is not lower than 95% before it can be launched to replace the original model.
[0204] (2) Threshold-triggered automatic update: When the model reaches any of the following performance degradation thresholds, incremental fine-tuning update is automatically triggered: ① The intraoperative sedation depth achievement rate of 30 consecutive cases is less than 90%; ② The prediction accuracy of anesthesia-related adverse events decreases by more than 10% from the baseline; ③ The cumulative number of newly added rare adverse event cases exceeds 5; After triggering the automatic update, the system automatically extracts qualified case data from the past 3 months, completes incremental fine-tuning, and completes model iteration after performance verification.
[0205] (3) Model version management: All updated models retain complete version numbers, training dataset information, performance verification reports, and update timestamps to ensure that the entire model update process is traceable and complies with the regulatory requirements for medical data and AI models.
[0206] S63. The inference process of the model:
[0207] The model inference is divided into two stages: preoperative prediction and intraoperative real-time inference, achieving full-process dose prediction and dynamic correction, specifically as follows:
[0208] S631, Preoperative Prediction Stage:
[0209] Collect baseline static data, historical data of previous radiotherapy procedures, and characteristic data of this procedure for the target patient;
[0210] The feature engineering module performs preprocessing, feature filtering, and temporal feature sequence construction on the collected data;
[0211] The standardized feature sequence is input into the pre-trained improved StochDiff time series prediction model. 100 sets of prediction samples are generated through backdiffusion sampling. The distribution of the prediction samples is fitted by GMM. The largest cluster center is selected as the point estimate and the initial individualized dosing regimen is output. At the same time, the risk warning result of adverse event occurrence is also output.
[0212] S632, Intraoperative Real-Time Reasoning Stage:
[0213] During the operation, the patient's vital signs and BIS value data are collected in real time at a preset frequency, and the temporal feature sequence is continuously updated. The preset frequency is preferably 0.5Hz to 2Hz, and more preferably 1Hz. The 1Hz acquisition frequency is based on the standard output frequency of the clinical anesthesia monitor.
[0214] The model performs inference every 5 seconds and outputs the corrected recommended values for the maintenance infusion rate and booster dose of remimazolam; the correction every 5 seconds is based on a combination of the pharmacokinetic half-life and clinical response time of remimazolam.
[0215] Based on model inference results and real-time monitoring data, the probability of adverse events is calculated in real time, triggering the corresponding graded early warning mechanism. If the rare event triggering conditions are met, the manual priority takeover mechanism and emergency plan linkage are immediately activated.
[0216] The remimazolam anesthesia dose AI prediction system according to the above embodiments of the present invention, through modular architecture design and the core application of an improved StochDiff time-series prediction model, solves the technical challenge of accurate remimazolam administration during multiple interstitial radiotherapy for cervical cancer, and has the following core beneficial effects:
[0217] 1. Significantly improved model prediction accuracy and robustness: This invention is the first to apply the improved StochDiff time-series prediction model to the field of anesthetic drug dosage prediction, which specifically solves the modeling pain points of high randomness, high individual heterogeneity and long time-series dependence of clinical anesthesia data. The performance comparison results of the improved StochDiff model of this invention and the mainstream baseline algorithm are shown in Table 1. In terms of the core prediction performance of the algorithm, the NRMSE and MAPE of the model of this invention are reduced by 6.22% and 23.07% respectively compared with the best-performing baseline model TMDM[1], and the CRPS index is improved by 9.75%. This verifies that the prediction accuracy and probability distribution fitting ability of this invention for remimazolam dosage are significantly better than the existing mainstream time-series prediction and diffusion models, which greatly improves the accuracy and robustness of remimazolam dosage prediction.
[0218] Table 1. Performance comparison of different models in the task of predicting anesthetic dose for cervical cancer implantation radiotherapy.
[0219]
[0220] Note: ↓ indicates that the lower the index value, the better the performance; ↑ indicates that the higher the index value, the better the performance; all results are the mean ± standard deviation of 10 repeated experiments on the test set.
[0221] [1]Yuxin Li,Wenchao Chen,Xinyue Hu,et al.Transformer-ModulatedDiffusion Models for Probabilistic Multivariate Time Series Forecasting[C] / / The Twelfth International Conference on Learning Representations.2024.
[0222] 2. Achieving truly individualized and precise drug delivery: This invention fully adapts to the pharmacological characteristics of remimazolam, which has mild respiratory and circulatory depression and is not dependent on liver and kidney function for metabolism, as well as the clinical characteristics of patients undergoing concurrent chemoradiotherapy for cervical cancer. It models the long-term dependence and cumulative effect of multiple anesthetic administrations, while also considering the impact of potential liver and kidney toxicity of chemotherapy drugs on drug metabolism, effectively avoiding the problems of insufficient or excessive sedation caused by empirical drug delivery.
[0223] 3. Constructing a comprehensive anesthesia safety assurance system: This invention designs a comprehensive drug administration protocol that includes "precise preoperative prediction - dynamic intraoperative correction - early warning of routine events - emergency takeover for rare events". Compared with the traditional propofol anesthesia protocol, it can significantly reduce the incidence of anesthesia-related adverse events such as respiratory and circulatory depression, hypotension, and hypoxemia, while avoiding the drug resistance and potential addiction risks of multiple propofol administrations, and greatly improving the safety and patient comfort of multiple anesthesia operations.
[0224] 4. High clinical feasibility and promotional value of the model: The improved StochDiff time-series prediction model of this invention requires only 0.98 seconds for single-sample sampling during the inference stage, which can meet the clinical needs of real-time inference during surgery; at the same time, the model provides a 95% confidence interval and risk warning while outputting prediction results, providing clear decision support for anesthesiologists, and all modules of the system comply with medical data supervision requirements, which has extremely high clinical promotion value.
[0225] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0226] It should also be noted that, in the embodiments of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0227] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in the embodiments of this application may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown in this application, but is to be accorded the widest scope consistent with the principles and novel features disclosed in the embodiments of this application.
Claims
1. A remazepam anesthetic dose Al prediction system, characterized by, The system includes: The data acquisition module is used to collect multi-dimensional clinical data from the target patient; The feature engineering module, connected to the data acquisition module, is used to preprocess the multi-dimensional clinical data, perform feature screening and time-series feature construction, and generate a standardized feature dataset. An improved StochDiff time-series prediction module, connected to the feature engineering module, is used to output an initial individualized dosing regimen for remimazolam based on the standardized feature dataset and a pre-trained improved StochDiff time-series prediction model, and to output the predicted distribution of patients' vital signs and sedation depth after dosing. The improved StochDiff time series prediction module includes: A bidirectional long short-term memory network is used for temporal modeling backbone network to extract long-short-term dependency features from multiple anesthesia time series data. A stepwise data-driven prior learning module is used to learn a data-driven prior distribution at each time step, replacing the fixed standard Gaussian prior. The conditional diffusion generation module is used to generate predicted drug dosage values based on learned prior latent variables as conditions through a process of positive noise addition and reverse noise reduction. An attention network data prediction network is used to predict the original noise-free data during the inverse denoising process; The improved StochDiff time series prediction module is trained using a bi-objective optimization function, which simultaneously optimizes the variational lower bound of prior learning and the denoising loss of the diffusion process. The stepwise data-driven prior learning module includes: The prior encoder is used to output the Gaussian mean and standard deviation of the prior distribution at the current time step based on the hidden state at the previous time step. The posterior encoder is used to output the Gaussian mean and standard deviation of an approximate posterior distribution based on the hidden state of the previous time step and the feature set of the current time step. Both the prior distribution and the approximate posterior distribution follow a Gaussian distribution, which are used to infer the distribution of the constraint latent variables through variational inference during model training. The conditional diffusion generation module is configured as follows: At each time step, Gaussian noise is progressively added to the original dosing dose label data, and after forward diffusion for a preset total number of steps, it is converted into standard Gaussian noise. Using the prior latent variables output by the stepwise data-driven prior learning module as conditions, the attention network data prediction network learns the reverse denoising process to gradually restore the real drug dosage data from standard Gaussian noise. The attention network data prediction network directly outputs the predicted value of the original noiseless data to adapt to the data generation task with conditional constraints. The dose dynamic correction module, connected to the improved StochDiff time-series prediction module, is used to perform online dynamic correction of the initial individualized dosing regimen based on real-time patient data collected during the operation, and to update the dosing parameters in real time. The safety early warning module, connected to the improved StochDiff time-series prediction module and the dose dynamic correction module, is used to implement advance graded early warning of adverse anesthesia events based on model prediction results and real-time intraoperative data, and to set up emergency takeover and contingency plan triggering mechanisms for rare events.
2. The remimazolam anesthesia dosage AI prediction system according to claim 1, characterized in that, The improved StochDiff time series prediction module has at least one of the following improvements: A bidirectional long short-term memory network was used instead of a unidirectional long short-term memory network as the backbone of temporal modeling, while capturing the historical dependence of previous drug administration and the trend of drug efficacy changes in the current operation. Patient baseline characteristics, procedural characteristics, and multiple anesthesia history data are incorporated as conditional variables into the conditional diffusion generation module; The prediction target simultaneously outputs the induction dose, maintenance infusion rate, and total dose of remimazolam, as well as the predicted distribution of bispectral index values and vital signs after administration. During the inference phase, a Gaussian mixture model is used to fit the predicted distribution, and the output point estimates are compared with the confidence intervals of the preset confidence level.
3. The remimazolam anesthesia dosage AI prediction system according to claim 1, characterized in that, The bidirectional long short-term memory network temporal modeling backbone network is configured as follows: it captures temporal dependencies from the forward direction through the forward long short-term memory network and from the backward direction through the reverse long short-term memory network. The forward hidden state and the reverse hidden state are concatenated to obtain the final hidden state at each time step, which serves as the input for the subsequent prior learning and conditional diffusion generation modules.
4. The remimazolam anesthesia dosage AI prediction system according to claim 1, characterized in that, The attention network data prediction network is built based on the attention mechanism and is used to fuse prior latent variables with noisy data features and output the final predicted data value.
5. The remimazolam anesthesia dose AI prediction system according to claim 1, characterized in that, The bi-objective optimization function includes: The first loss term, KL divergence loss, is used to constrain the difference between the prior distribution and the approximate posterior distribution; The second loss term is the mean squared error loss, which measures the deviation between the model-predicted dosage and the actual dosage. During model training, the sum of the first and second loss terms is minimized using gradient descent.
6. The remimazolam anesthesia dose AI prediction system according to claim 1, characterized in that, The dose dynamic correction module includes: The intraoperative real-time data acquisition unit is used to acquire the patient's bispectral index value and vital signs data at a preset frequency. An online feature update unit is used to input real-time collected data into the feature engineering module to update the input feature sequence; The real-time dose correction unit is used to output the corrected remimazolam maintenance infusion rate and recommended additional dose values at a preset period based on the updated feature sequence. The clinical safety constraint unit is used to set the single dose adjustment range not to exceed a preset percentage of the preceding infusion rate, and the total dose of a single operation not to exceed the clinical safety limit for remimazolam. The calibration trigger unit is used to trigger the dose correction process when the patient's bispectral index value exceeds the target range for a preset time or when the vital signs show abnormal fluctuations. The takeover linkage control unit is used to suspend the output of the automatic dose correction function when the safety warning module triggers the manual priority takeover mechanism.
7. The remimazolam anesthesia dose AI prediction system according to claim 1, characterized in that, The security early warning module includes: The routine adverse event pre-classification early warning unit is used to predict the distribution of vital signs and bispectral index values after drug administration based on the output of the improved StochDiff time-series prediction module. When the confidence interval of the predicted value exceeds the warning threshold, a graded warning is triggered according to the probability of exceeding the threshold, and a corresponding intervention plan is output. The rare event emergency takeover unit is used to pause the output of the automatic dose correction function and display a standardized anesthesia emergency plan on the monitoring interface when a preset rare event characteristic is detected or a manual trigger command is received. The rare event data closed-loop unit is used to automatically retain time-series data of the entire rare event handling process and incorporate it into the incremental training dataset of subsequent models.
Citation Information
Patent Citations
Radiotherapy dose prediction method based on prior guidance adversarial diffusion model
CN118767343A
Dynamic optimization method for individualized dosage of low-molecular heparin of cancer patient based on reinforcement learning
CN121617545A