Postoperative severe outcome risk assessment-oriented mixed type data generation method, system and electronic device

CN123033758APending Publication Date: 2026-11-03YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611148550.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing technologies struggle to generate high-fidelity surgical critical care risk data without directly exposing real patient records. This is especially true when dealing with mixed-type data, where it is difficult to effectively unify the modeling of continuous organ function indicators and discrete critical care classification variables. Furthermore, the generation process is complex and computationally costly, which affects the generalization ability and clinical application of critical care risk assessment models.

Method used

A dual-head architecture is constructed using heterogeneous feature tokenization and a shared Transformer backbone network. By combining linear interpolation paths and heterogeneous feature tokenizers with flow matching learning and joint distribution alignment, continuous and discrete variables are generated simultaneously, reducing sampling overhead and ensuring the clinical consistency and integrity of the generated data.

Benefits of technology

It enables the simultaneous processing of continuous and discrete variables within the same generative framework. The generated data can recover the marginal distribution of a single column and maintain the clinically relevant structure across columns, reducing computational costs. It is suitable for cross-institutional critical care research collaboration and training of critical care risk assessment models, and improves the reliability and fidelity of the generated data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033758A_ABST
    Figure CN123033758A_ABST
Patent Text Reader

Abstract

The application relates to a mixed type data generation method and system for postoperative severe outcome risk assessment, and an electronic device, and belongs to the technical field of medical risk assessment and artificial intelligence. The application comprises the following steps: collecting perioperative structured data of adult surgical patients, determining an anchor point for preoperative severe risk assessment; removing the collected data according to the patient level, and using only the training set to train a generation model; constructing a linear interpolation path from a standard Gaussian prior to a real value for continuous variables, and utilizing flow matching learning to determine the deterministic velocity field along the straight line path; constructing a heterogeneous feature Tokenization and shared Transformer backbone network; mixed flow joint training and auxiliary distribution alignment: in addition to the continuous flow matching loss and the classification mask diffusion loss, a joint and edge distribution alignment constraint is introduced; synchronous Euler sampling and synthetic record recovery. The application improves the reliability of synthetic data when used for severe early warning model training, external verification and algorithm reproduction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method, system, and electronic device for generating hybrid data for postoperative critical illness outcome risk assessment, belonging to the fields of medical risk assessment and artificial intelligence technology. Background Technology

[0002] Surgical critical care risk assessment is a core component of perioperative medical quality management and critical care resource allocation. Timely and accurate preoperative identification of adverse outcomes such as postoperative ICU transfer, occurrence of severe complications, in-hospital death of critically ill patients, and prolonged ICU stays helps medical staff develop individualized organ protection plans and anesthesia strategies in advance, pre-allocate ICU beds, specialized nursing staff, and organ function support resources, optimize the admission process and surgical scheduling for critically ill patients, and provide patients and their families with more accurate prognostic assessments and informed decision-making support. With the increasing proportion of level 3 and 4 surgeries and the growing number of elderly patients with underlying diseases, relying solely on experience or traditional scoring indicators is insufficient to fully characterize the risk of critical illness. Therefore, surgical critical care risk modeling based on multidimensional perioperative data has significant clinical value.

[0003] With the continuous development of medical informatization, hospitals have accumulated a large amount of perioperative critical care data in electronic medical record systems, surgical anesthesia systems, intensive care systems, and laboratory systems. This data includes both continuous organ function and physiological indicators, as well as discrete critical care risk factors, surgical trauma attributes, and outcome classification variables. It reveals complex relationships between patient baseline status, surgical stress, and critical care outcomes, serving as a crucial foundation for training and validating surgical critical care risk warning models and conducting multi-center collaborative research on critical care. However, perioperative critical care data contains more sensitive patient diagnosis, treatment, and prognosis information, and original records are difficult to transfer directly between different institutions. Furthermore, the low percentage of positive surgical critical care cases and the scarcity of rare critical care subtypes further lead to insufficient cross-institutional collaborative samples, difficulties in external validation, and weak data support for high-risk subgroup modeling, limiting the generalization ability and clinical application of critical care risk assessment models. Therefore, generating high-fidelity surgical critical care risk data without directly exposing real patient records has become a key technological direction for supporting cross-institutional critical care research collaboration and the optimization of warning models.

[0004] Existing data synthesis schemes still have significant shortcomings when dealing with mixed-type surgical critical care risk data. Interpolation-based methods mainly construct intermediate points between existing samples, making it difficult to recover the multimodal, skewed, and long-tailed marginal distributions common in critical care indicators, and they are also prone to disrupting the nonlinear dependencies between critical care features and outcomes. Generative adversarial networks and variational autoencoders may suffer from problems such as training instability, missing high-risk patterns of critical care, or insufficient handling of discrete critical care variables. While diffusion-based generative models have advantages in generation quality, they typically require a long process of progressive noise addition and denoising, resulting in complex generation paths and numerous sampling steps, leading to high training and sampling costs when processing large-scale perioperative critical care records from hospitals. In addition, existing schemes often forcibly unify different types of features through transformations, which may cause information loss of key critical care features; while methods that process different types of data separately are insufficient in terms of information exchange and correlation modeling between cross-type critical care features.

[0005] The following technical challenges remain in the development of data sharing and early warning models for surgical critical care risk assessment:

[0006] 1. How can we more effectively model and generate mixed-type data in surgical critical care risk assessment?

[0007] Surgical critical care risk assessment data typically includes both continuous organ function physiological indicators and discrete critical care clinical variables. These different types of variables differ significantly in their value spaces, statistical distributions, and clinical meanings. Using a uniform data type during generation can easily lead to the loss of key critical care characteristics, while generating them separately can result in a fragmented generation process for the two types of variables, thus affecting the completeness and clinical consistency of the entire critical care patient record. Therefore, a method is needed that can simultaneously process continuous numerical variables and discrete categorical variables within the same generation framework, enabling different types of surgical critical care risk fields to be uniformly represented, synchronously learned, and generated holistically.

[0008] 2. How to capture the correlation between organ function indicators, surgical trauma attributes, and critical illness outcomes during the data generation process?

[0009] Surgical critical illness outcomes are determined by the combined effects of multiple high-risk factors. Various physiological indicators and surgical characteristics may exhibit strong non-linear correlations with postoperative ICU admission, severe complications, and death. If the generative model focuses only on a single field and fails to fully learn the co-occurrence relationships and feature-outcome dependencies between fields, the generated data will be insufficient to support the training of a realistic surgical critical illness risk warning model. Therefore, it is necessary to jointly model the complex correlations between different clinical variables during the generation process, ensuring that the synthesized data retains the key discriminative information required for critical illness risk assessment.

[0010] 3. How to simultaneously maintain the marginal distribution of single columns, the clinically relevant structure across columns, and information on a few high-risk outcomes for severe illness? In the generation of surgical critical illness risk assessment data, the entire patient record must conform to the actual clinical logic of severe illness. Even if existing generation methods can approximately restore the value distribution of individual fields, they may still generate unreasonable combinations of severe illness variables; moreover, the proportion of positive surgical severe cases is low, and rare severe subtypes are scarce, making it easy to lose high-risk outcome patterns in limited sampling steps. Therefore, it is necessary to constrain both the single-field distribution and the cross-field statistical structure during the training of the generation model, so that the generated samples maintain the true distribution of each column, the clinical consistency of the entire record, and effectively preserve the characteristic patterns of a few high-risk outcomes for severe illness.

[0011] 4. How to reduce the cost of diffusion-based generation sampling to make it suitable for batch data generation tasks in hospital intensive care scenarios?

[0012] Hospital perioperative critical care databases typically contain a large number of patient records and more diverse organ function and critical care-related fields. Traditional multi-step random diffusion requires high computational costs, making it unsuitable for large-scale deployment in collaborative scenarios involving hospital intensive care units and surgical departments. Furthermore, complex pathways can lead to the accumulation of numerical errors, affecting the stability of synthesized critical care data. Therefore, a more direct generation pathway is needed to stably generate complete hybrid surgical critical care risk assessment data with fewer steps.

[0013] In summary, there is an urgent need for a high-fidelity generation method specifically designed for real-world surgical critical care risk data. This method should simultaneously handle the generation of continuous organ function indicators and discrete critical care categorical variables within the same generative framework, while reducing the sampling overhead caused by complex diffusion paths. It should generate high-fidelity surgical critical care risk data without directly exposing real patient records, maintaining the clinical relevance between various critical care-related features and their correlation with critical care outcomes. This would provide high-fidelity synthetic data support for cross-institutional critical care data sharing, training and validation of surgical critical care risk models, and optimized allocation of critical care medical resources. Summary of the Invention

[0014] To address the aforementioned issues, this invention provides a method, system, and electronic device for generating hybrid data for assessing the risk of postoperative critical illness outcomes.

[0015] The technical solution of this invention is: a hybrid data generation method for assessing the risk of postoperative critical illness outcomes, the method comprising:

[0016] S1. Data Acquisition: Collect perioperative structured data of adult surgical patients, determine the anchor point for preoperative critical illness risk assessment, and divide the fields into continuous numerical variables and discrete categorical variables.

[0017] S2. Perform data preprocessing, deduplicatize the collected data according to patient level, and divide it into training set, validation set and test set. Use only the training set to train and generate the model.

[0018] S3. Construct a linear interpolation path for continuous variables from standard Gaussian priors to true values, and use flow matching to learn the deterministic velocity field along this straight path.

[0019] S4. Heterogeneous Feature Tokenization and Shared Transformer Backbone Network Construction: Construct a dual-head architecture consisting of a heterogeneous feature tokenizer, a temporally conditionally shared Transformer backbone network, and continuous and discrete prediction heads.

[0020] S5. Hybrid Stream Joint Training and Auxiliary Distribution Alignment: In addition to continuous stream matching loss and classification mask diffusion loss, a joint and edge distribution alignment constraint is introduced;

[0021] S6. Synchronize Euler sampling and synthetic record recovery.

[0022] Furthermore, S2 includes: for continuous variables, missing values ​​can be handled using the median, model estimation, or preset missing value markers, and standardized based on training set statistics; for categorical variables, missing states are imputed as independent categories or using the mode, and then mapped to integer indices through a category dictionary. All preprocessing parameters are estimated only from the training set and reused during the inverse transformation of the synthetic data.

[0023] Furthermore, S3 includes introducing a special [MASK] absorption state for the categorical variable, modeling its generation process as the shortest logical path from the fully masked state to the target category; the two paths share the same generation time variable t∈[0,1] and consistent linear scheduling, so that t represents the transmission progress from the prior state to the real critical illness data state in both classes.

[0024] Linear interpolation paths include the construction of straight-line paths for continuous numerical variables and the construction of masked straight-line paths for discrete categorical variables;

[0025] The construction of the linear path for the continuous numerical variable includes:

[0026] Modeling continuous variables using flow matching; (Note: The original text contains some inconsistencies and unclear formatting. A more accurate translation would require the full context.) To standardize generation time, Corresponding to standard Gaussian noise prior, Corresponding to real numerical data; for real continuous samples and noise samples Construct the following linear interpolation path between the two endpoints:

[0027]

[0028] Differentiating with respect to time yields the constant conditional velocity:

[0029]

[0030] Training continuous prediction head Approximate the velocity vector;

[0031] The construction of the masked linear path for the discrete categorical variable includes:

[0032] For each category field, a special absorbent state [MASK] is added in addition to the original category set; given the true category. In time The disturbance state at the location It follows a linear mixture distribution of the true class and the [MASK] state:

[0033]

[0034] in This indicates the distribution; during training, Bernoulli masks are sampled for each classification field: the true class is preserved with probability t, and the true class is preserved with probability t. Replace with [MASK]; reverse process predicts clean class classification It employs time-weighted cross-entropy loss, where the transition rate corresponding to linear scheduling is set to... To avoid The value diverges when it approaches 1, according to actual sampling. .

[0035] Furthermore, in S4, the numerical column is transformed into a continuous token through column-by-column linear projection, and the classification column and [MASK] state are transformed into discrete tokens through learnable embeddings. All tokens, along with the temporal embeddings, are input into a shared backbone network to learn cross-column dependencies between organ function indicators, vital signs, surgical trauma attributes, critical illness risk factors, and critical illness outcomes within the same self-attention context.

[0036] Furthermore, S4 specifically includes:

[0037] S4.1, Mixed input after given perturbation First, a heterogeneous feature tokenizer is used to map each field to a unified latent dimension λ. Each continuous column is configured with an independent linear projection, transforming scalar values ​​into continuous tokens. Each categorical column is configured with a learnable embedding table, transforming valid categories and [MASK] states into discrete tokens. Further, [CLS] tokens are appended to aggregate the entire row context, forming a token of length λ. A unified token sequence; the final input vector It is represented as:

[0038]

[0039] S4.2. A unified sequence input multilayer Transformer encoder maps t to temporal embedding via sinusoidal position encoding or multilayer perceptron, and modulates the normalization parameters of each layer using an adaptive layer normalization method initialized to zero, enabling the network to perceive different generation stages; relative position information between the encoded columns of the rotation position encoding is added to the attention calculation to help the self-attention mechanism capture the co-occurrence relationship of table features and field identity dependency;

[0040] S4.3, The output sequence is obtained after passing through L layers of Transformers. The numerical token output is used for continuous velocity prediction, the classification token output is used for discrete category prediction, and the [CLS] token serves as a row-level representation in subsequent auxiliary distribution alignment. After information aggregation is completed, Two specialized prediction heads decode different types of features respectively, and the continuous prediction head projects the numerical feature representation back into scalar space to predict the continuous velocity field. The discrete prediction head sets up an independent linear layer for each category column, outputting the probability logits of the corresponding category vocabulary space, which is used to predict the distribution of clean data. .

[0041] Furthermore, in S5, the Wasserstein distance between the slices of the real batch and the predicted batch is minimized in the shared latent space to align the joint distribution of the entire row of critical care records; for continuous columns, a sort-based distance is used to match the marginal distribution, and for categorical columns, the batch category frequency is matched, thereby suppressing cross-column offsets caused by finite-step sampling and inconsistent combinations of variables that do not conform to the clinical logic of critical care.

[0042] Further, S5 includes:

[0043] S5.1 For continuous variables, use mean squared error. Supervise the difference between the predicted velocity and the actual linear velocity;

[0044] S5.2 For categorical variables, use cross-entropy loss with transition rate weights. ;

[0045] S5.3 Introduce joint and marginal distribution alignment constraints to align the statistical structure of real and generated data at the batch level;

[0046] For categorical variables, the logits output by the discrete prediction head are processed by softmax to obtain the class probabilities, and then weighted and summed with the corresponding class embedding tables to form the expected embedding; subsequently, the real data is batched through a shared feature tokenizer. and forecast data batch Mapping to a continuous latent space, minimizing the slice Wasserstein distance to align the potential joint distribution;

[0047] Marginal alignment applies a consistency constraint column-by-column. For continuous features, it minimizes the 1-Wasserstein distance between the predicted and true batches through a sorting operation. For categorical features, it directly aligns the batch average predicted probability with the true empirical frequency. The complete auxiliary alignment loss is... :

[0048]

[0049] in, This represents a function that maps data to a continuous latent embedding space. By projecting the high-dimensional latent embedding onto a random straight line and computing the order-based... Distance is obtained; for consecutive columns, The average absolute distance is used after sorting the true and predicted values; for categorical columns, The training algorithm uses the distance between the batch average predicted probability and the true empirical frequency; the final training objective is:

[0050]

[0051] Minimize using gradient optimizer Early stopping and model selection are performed based on the Shape, Trend, or comprehensive indicators of the validation set; and The alignment strength hyperparameter is determined based on the data size and the number of fields.

[0052] Furthermore, in S6, a synchronous Euler solver is used to sample from Gaussian noise and a fully masked classification sequence; continuous variables are updated smoothly according to the predicted velocity field, and categorical variables are gradually demasked according to the time-related jump rate; after sampling, inverse standardization, category inverse encoding, and field validity verification are performed to obtain a specified number of synthetic surgical critical care risk assessment records.

[0053] The present invention also provides a hybrid data generation system for assessing the risk of postoperative critical illness outcomes, the system comprising: a module for executing the hybrid data generation method for assessing the risk of postoperative critical illness outcomes.

[0054] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the hybrid data generation method for assessing the risk of postoperative critical illness outcomes.

[0055] The beneficial effects of this invention are:

[0056] 1. This invention uses a unified linear path and a shared Transformer to jointly model continuous physiological indicators, discrete critical illness variables, and critical illness outcome fields. This enables the synthesized data to not only restore the single-column marginal distribution but also maintain the cross-column clinical relevance structure upon which surgical critical illness risk assessment depends, accurately reproducing the intrinsic correlation between organ function status and postoperative critical illness outcome.

[0057] 2. This invention reduces the probability of generated samples having variable combinations that do not conform to the real clinical statistical laws of severe illness by aligning with batch-level union and marginal distribution, thereby improving the reliability of synthetic data when used for training, external validation and algorithm reproduction of severe illness early warning models.

[0058] 3. This invention uses deterministic continuous linear flow and synchronous demasking solver to reduce the curved and redundant paths and iterative steps of traditional random diffusion, enabling the batch generation of hospital-level surgical critical care risk assessment data with lower sampling overhead, thus meeting the batch data generation needs of clinical departments.

[0059] 4. The new records output by this invention do not correspond one-to-one with individual original patient records. They can support cross-institutional critical care research collaboration without directly exchanging original sensitive data, and provide a data foundation for a few high-risk outcome studies of critical care, critical care medical resource allocation analysis, and optimization of multi-center critical care early warning models. Attached Figure Description

[0060] Figure 1 This is an overall framework diagram of the present invention;

[0061] Figure 2 This is a heatmap showing the absolute deviation of the correlation between the synthesized data and the real data from different methods of this invention (ICU inpatient time cohort). Detailed Implementation

[0062] Example 1: As Figures 1-2 As shown, this invention presents a hybrid data generation method for postoperative critical illness outcome risk assessment. The generation of surgical critical illness risk assessment data is described as a joint probability transfer problem in continuous numerical space and discrete category space. This method takes structured preoperative and perioperative critical illness-related data and critical illness outcomes as input. Through data preprocessing, unified linear path construction, heterogeneous feature joint modeling, joint and marginal distribution alignment training, and synchronous rapid sampling, it outputs synthetic surgical critical illness risk assessment data that has a statistical structure similar to real data but does not directly correspond to the original patient records.

[0063] The method includes:

[0064] S1. Data Acquisition: Collect perioperative structured data of adult surgical patients, determine the anchor point for preoperative critical illness risk assessment, and divide the fields into continuous numerical variables and discrete categorical variables.

[0065] In this embodiment, a surgical critical care risk assessment cohort is constructed using the large perioperative database INSPIRE, including postoperative ICU transfer, postoperative critical complications, and in-hospital mortality of critically ill patients. During implementation, perioperative structured data of adult surgical patients can be collected from the Hospital Information System (HIS), the Artificial Anesthesia Information System (AIMS), the Electronic Medical Record (EMR), and the Laboratory Information System (LIS). Data fields include preoperative variables such as age, sex, height, weight, vital signs, complete blood count, biochemical tests, coagulation function, underlying diseases, surgical urgency, type of anesthesia, and surgical department, as well as outcome information such as in-hospital mortality, ICU stay time, and total hospital stay.

[0066] To ensure the generated data serves in actual surgical critical care risk assessment, the first step is to determine the critical care risk assessment anchor point. For elective surgery, the 24 hours prior to the start of anesthesia can be set as the anchor point, summarizing the most recent valid examination and vital signs prior to the anchor point. For emergency surgery, the immediate pre-anesthesia status can be set as the anchor point to reflect the time-sensitive risk of critical illness. Cases involving minors, cases lacking key demographic information, cases with obviously unreasonable records, and cases that do not meet the observation window requirements are excluded.

[0067] S2. Perform data preprocessing, deduplicatize the collected data according to patient level, and divide it into training set, validation set and test set. Use only the training set to train and generate the model.

[0068] Furthermore, S2 includes: for continuous variables, missing values ​​can be handled using the median, model estimation, or preset missing value markers, and standardized based on training set statistics; for categorical variables, missing states are imputed as independent categories or using the mode, and then mapped to integer indices through a category dictionary. All preprocessing parameters are estimated only from the training set and reused during the inverse transformation of the synthetic data.

[0069] Each patient record is represented as ,,in Represents continuous numerical characteristics. Representing classification features, For the finite set of values ​​for the 𝑗th categorical feature; the severe illness outcome field belongs to Part of it; the goal of generating tabular data is to learn a parametric model. Synthetic samples are generated from simple prior distributions. This makes the synthetic data closely resemble real training data in terms of marginal distribution, cross-column dependence, and information on surgical critical care risk assessment tasks;

[0070] S3. Construct a linear interpolation path for continuous variables from standard Gaussian priors to true values, and use flow matching to learn the deterministic velocity field along this straight path.

[0071] Furthermore, S3 includes introducing a special [MASK] absorption state for the categorical variable, modeling its generation process as the shortest logical path from the fully masked state to the target category; the two paths share the same generation time variable t∈[0,1] and consistent linear scheduling, so that t represents the transmission progress from the prior state to the real critical illness data state in both classes.

[0072] Linear interpolation paths include the construction of straight-line paths for continuous numerical variables and the construction of masked straight-line paths for discrete categorical variables;

[0073] The construction of the linear path for the continuous numerical variable includes:

[0074] Modeling continuous variables using flow matching; (Note: The original text contains some inconsistencies and unclear formatting. A more accurate translation would require the full context.) To standardize generation time, Corresponding to standard Gaussian noise prior, Corresponding to real numerical data; for real continuous samples and noise samples Construct the following linear interpolation path between the two endpoints:

[0075]

[0076] Differentiating with respect to time yields the constant conditional velocity:

[0077]

[0078] Training continuous prediction head Approximating the velocity vector; compared with curved random trajectories based on stochastic differential equations, the above path directly connects the prior and the true endpoint, which can reduce the numerical integration truncation error and provide a basis for fast sampling with fewer steps and determinism;

[0079] The construction of the masked linear path for the discrete categorical variable includes:

[0080] For each category field, a special absorbent state [MASK] is added in addition to the original category set; given the true category. In time The disturbance state at the location It follows a linear mixture distribution of the true class and the [MASK] state:

[0081]

[0082] in This indicates the distribution; during training, Bernoulli masks are sampled for each classification field: the true class is preserved with probability t, and the true class is preserved with probability t. Replace with [MASK]; reverse process predicts clean class classification It employs time-weighted cross-entropy loss, where the transition rate corresponding to linear scheduling is set to... To avoid The value diverges when it approaches 1, according to actual sampling. .

[0083] Continuous paths and classification paths share the same .when When the noise level is low, continuous variables are close to Gaussian noise and categorical variables are mostly in the [MASK] state; as the noise level decreases... As the value increases, continuous variables gradually approach the true value, and categorical variables recover the true category with a higher probability, thus achieving alignment in the semantics of generation time.

[0084] S4. Heterogeneous Feature Tokenization and Shared Transformer Backbone Network Construction: A dual-head architecture consisting of a heterogeneous feature tokenizer, a temporally conditional shared Transformer backbone network, and continuous and discrete prediction heads is constructed. Numerical columns are transformed into continuous tokens through column-by-column linear projection, while categorical columns and [MASK] states are transformed into discrete tokens through learnable embeddings. All tokens, along with temporal embeddings, are input into the shared backbone network to learn cross-column dependencies between organ function indicators, vital signs, surgical trauma attributes, critical illness risk factors, and critical illness outcomes within the same self-attention context.

[0085] Furthermore, S4 specifically includes:

[0086] S4.1, Mixed input after given perturbation First, a heterogeneous feature tokenizer is used to map each field to a unified latent dimension λ. Each continuous column is configured with an independent linear projection, transforming scalar values ​​into continuous tokens. Each categorical column is configured with a learnable embedding table, transforming valid categories and [MASK] states into discrete tokens. Further, [CLS] tokens are appended to aggregate the entire row context, forming a token of length λ. A unified token sequence; the final input vector It is represented as:

[0087]

[0088] S4.2 A unified sequence input multilayer Transformer encoder is used to inject generation time information. t is mapped to a time embedding via sinusoidal position encoding or a multilayer perceptron. Adaptive layer normalization (AdaLN-Zero) with initialization to zero is used to modulate the normalization parameters of each layer, enabling the network to perceive different generation stages. Relative position information between columns is added to the attention calculation using Rotated Position Encoding (RoPE), helping the self-attention mechanism capture the co-occurrence relationships and field identity dependencies of table features. Shared self-attention allows the model to explicitly learn cross-type dependencies such as renal function indicators and postoperative acute kidney injury, anesthesia type and ICU transfer, and surgical trauma grade and severe complications.

[0089] S4.3, The output sequence is obtained after passing through L layers of Transformers. The numerical token output is used for continuous velocity prediction, the classification token output is used for discrete category prediction, and the [CLS] token serves as a row-level representation in subsequent auxiliary distribution alignment. After information aggregation is completed, Two specialized prediction heads decode different types of features respectively, and the continuous prediction head projects the numerical feature representation back into scalar space to predict the continuous velocity field. The discrete prediction head sets up an independent linear layer for each category column, outputting the probability logits of the corresponding category vocabulary space, which is used to predict the distribution of clean data. .

[0090] S5. Hybrid Stream Joint Training and Auxiliary Distribution Alignment: In addition to continuous stream matching loss and classification mask diffusion loss, joint and marginal distribution alignment constraints are introduced; the Wasserstein distance between slices of the true batch and the predicted batch is minimized in the shared latent space to align the joint distribution of the entire row of critical care records; the marginal distribution is matched with sorting-based distance for continuous columns and the batch category frequency is matched for classification columns, thereby suppressing cross-column offsets caused by finite-step sampling and inconsistent variable combinations that do not conform to the clinical logic of critical care.

[0091] Further, S5 includes:

[0092] S5.1 For continuous variables, use mean squared error. Supervise the difference between the predicted velocity and the actual linear velocity:

[0093]

[0094] S5.2 For categorical variables, use cross-entropy loss with transition rate weights. ;

[0095]

[0096] S5.3. When relying solely on field-by-field supervision, finite-step sampling may lead to a shift in the overall row's joint structure. Therefore, this invention introduces joint and marginal distribution alignment constraints to align the statistical structure of the real and generated data at the batch level. The continuous variables in the joint distribution alignment are derived by inversely using the following formula:

[0097]

[0098] For categorical variables, the logits output by the discrete prediction head are processed by softmax to obtain the class probabilities, and then weighted and summed with the corresponding class embedding tables to form the expected embedding; subsequently, the real data is batched through a shared feature tokenizer. and forecast data batch Mapping to a continuous latent space, minimizing the slice Wasserstein distance to align the potential joint distribution;

[0099] Marginal alignment applies a consistency constraint column-by-column. For continuous features, it minimizes the 1-Wasserstein distance between the predicted and true batches through a sorting operation. For categorical features, it directly aligns the batch average predicted probability with the true empirical frequency. The complete auxiliary alignment loss is... :

[0100]

[0101] in, This represents a function that maps data to a continuous latent embedding space. By projecting the high-dimensional latent embedding onto a random straight line and computing the order-based... Distance is obtained; for consecutive columns, The average absolute distance is used after sorting the true and predicted values; for categorical columns, The training algorithm uses the distance between the batch average predicted probability and the true empirical frequency; the final training objective is:

[0102]

[0103] Minimize using gradient optimizer Early stopping and model selection are performed based on the Shape, Trend, or comprehensive indicators of the validation set; and The alignment strength hyperparameter is determined based on the data size and number of fields. In one embodiment, the gradient optimizer uses AdamW, with a learning rate of 0.001, 3 Transformer layers, a latent dimension of 32, and a batch size of 4096. With a value of 0.1, the number of Wasserstein projections is 32, and the number of training epochs is 6000.

[0104] S6. Synchronize Euler sampling and synthetic record recovery.

[0105] Furthermore, in step S6, a synchronous Euler solver is used to sample from Gaussian noise and fully masked classification sequences; continuous variables are updated smoothly according to the predicted velocity field, and categorical variables are gradually demasked according to the time-related jump rate; after sampling, inverse standardization, category decoding, and field validity verification are performed to obtain a specified number of synthetic surgical critical care risk assessment records, which can be used by different medical institutions for critical care data sharing, critical care early warning model training, external validation, and method reproduction.

[0106] When generating a specified number of synthetic records, continuous variables are initialized to standard Gaussian noise, and all categorical variables are initialized to [MASK]. The inference process... From each discrete time step Evolved to Step size is In one embodiment, the number of sampling steps S is set to 50. At each time step, the current continuous variable, categorical variable, and time are... Input the shared network to obtain the continuous velocity and classification probability distribution.

[0107] Continuous variables are updated according to the explicit Euler formula:

[0108]

[0109] For categorical features, the demasking process is modeled as being driven by the transition rate. The controlled time is a non-homogeneous Poisson process. For the current state... The state token, its step size The probability of an internal transfer to a valid class is given by the cumulative probability of the waiting time:

[0110]

[0111]

[0112] If the random number is less than Then, from the class probabilities predicted by the model A valid class is sampled. Continuous updates and discrete demasking are performed synchronously in the same time grid until... At this point, forced endpoint sampling is performed on the remaining masks. Subsequently, inverse standardization is performed on the continuous variables, integer values ​​are rounded for fields requiring integer values, the categorical index is de-encoded, and value range and type validation are performed based on the field dictionary to obtain the final high-fidelity synthetic surgical critical care risk assessment data.

[0113] The present invention also provides a hybrid data generation system for assessing the risk of postoperative critical illness outcomes, the system comprising: a module for executing the hybrid data generation method for assessing the risk of postoperative critical illness outcomes.

[0114] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the hybrid data generation method for assessing the risk of postoperative critical illness outcomes.

[0115] This invention belongs to the interdisciplinary field of artificial intelligence, medical informatics and perioperative critical care risk management. Its core purpose is to generate hybrid structured medical data for surgical critical care risk assessment, which can be deployed in hospital data centers, clinical research platforms, regional medical data platforms and medical artificial intelligence development environments.

[0116] In cross-institutional research and algorithm collaboration, hospitals can use this invention to train and generate models locally and output synthetic records. The synthetic data can replace the original patient records to carry out data format integration, algorithm development, model pre-training, external validation and benchmark testing in the direction of critical illness risk, reducing the privacy and compliance pressure brought about by the direct flow of real data.

[0117] In the development of surgical critical care risk warning models, the data generated by this invention can be used for training and stress testing of predictive models for outcomes such as postoperative ICU transfer, occurrence of critical complications, in-hospital mortality of critically ill patients, and prolonged ICU stay. It can also be used to analyze the demand for critical care beds, ICU resource occupancy, and surgical scheduling plans for critically ill patients under different risk thresholds. For departments with small sample sizes or scarce high-risk cases, additional research samples can be generated to improve algorithm debugging conditions; however, specific clinical deployment should still be independently validated on real data.

[0118] In product applications, this invention can be used as a data synthesis component in hospital data governance platforms, privacy computing platforms, medical AI development platforms, or surgical critical care risk assessment systems; it can also be used in medical education for constructing virtual cases of high-risk critical illnesses, system integration testing, software acceptance testing, and demonstrations and training that do not directly expose real patient information.

[0119] In one embodiment, this invention constructs three surgical risk assessment cohorts based on perioperative data: in-hospital mortality, prolonged ICU stay, and prolonged total hospital stay, and conducts targeted experiments. The results are evaluated using the Shape index, which assesses the marginal distribution of characteristic variables, and the Trend index, which assesses inter-cohort correlation. Experimental results show that this invention achieves the lowest Shape and Trend error rates for all three cohorts, indicating that the generated data can simultaneously maintain the marginal distribution of preoperative variables and the clinically relevant structure between cohorts, which is consistent with clinical application scenarios.

[0120] Table 1 compares the data generation fidelity (error rate, lower is better) across three surgical risk assessment cohorts.

[0121]

[0122] Note: The results are the mean ± standard deviation of five independent runs. Shape measures the difference in marginal distribution of a single column, and Trend measures the difference in the correlation trend between pairs of fields. The lower the values ​​of both, the closer the composite data is to the real data.

[0123] As shown in Table 1, the Shape error rates of this invention in the three risk assessment cohorts of in-hospital mortality, prolonged ICU stay, and prolonged total hospital stay were 1.26%, 2.43%, and 1.26%, respectively, while the Trend error rates were 1.38%, 2.12%, and 1.34%, respectively, all of which were the lowest. Compared with the second-best method among the various indicators, this invention improved the average fidelity by 32.74% across the three cohorts, with an average reduction of 48.6% in the Shape error rate and an average reduction of 16.88% in the Trend error rate. These results indicate that the joint generation of continuous physiological indicators and categorical clinical variables in the same temporal conditional Transformer can effectively reduce marginal distribution shifts and distortions in inter-cohort relationships caused by the splitting of mixed variables.

[0124] Figure 2 The colors represent the absolute deviation between the correlation matrix of real data and the correlation matrix of synthetic data; the darker the color, the greater the difference. It can be seen that the heatmap corresponding to this invention has the lightest overall color and the fewest local high-bias areas, indicating that this invention can better restore the intrinsic physiological correlations between preoperative variables. This visualization result is consistent with statistical indicators, further demonstrating that the joint distribution and marginal distribution alignment module can reduce variable combinations that do not conform to clinical logic.

[0125] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A hybrid data generation method for assessing the risk of postoperative critical illness outcomes, characterized by: The method includes: S1. Data Acquisition: Collect perioperative structured data of adult surgical patients, determine the anchor point for preoperative critical illness risk assessment, and divide the fields into continuous numerical variables and discrete categorical variables. S2. Perform data preprocessing, deduplicatize the collected data according to patient level, and divide it into training set, validation set and test set. Use only the training set to train and generate the model. S3. Construct a linear interpolation path for continuous variables from standard Gaussian priors to true values, and use flow matching to learn the deterministic velocity field along this straight path. S4. Heterogeneous Feature Tokenization and Shared Transformer Backbone Network Construction: Construct a dual-head architecture consisting of a heterogeneous feature tokenizer, a temporally conditionally shared Transformer backbone network, and continuous and discrete prediction heads. S5. Hybrid Stream Joint Training and Auxiliary Distribution Alignment: In addition to continuous stream matching loss and classification mask diffusion loss, a joint and edge distribution alignment constraint is introduced; S6. Synchronize Euler sampling and synthetic record recovery.

2. The hybrid data generation method for postoperative critical illness outcome risk assessment according to claim 1, characterized in that: S2 includes: for continuous variables, missing values ​​can be handled using the median, model estimation, or preset missing labels, and standardized based on training set statistics; for categorical variables, missing states are imputed as independent categories or using the mode, and then mapped to integer indices through a category dictionary. All preprocessing parameters are estimated only from the training set and reused during the inverse transformation of the synthetic data.

3. The method for generating hybrid data for postoperative critical illness outcome risk assessment according to claim 1, characterized in that: S3 includes introducing a special [MASK] absorption state for the categorical variable, and modeling its generation process as the shortest logical path from the fully masked state to the target category; the two paths share the same generation time variable t∈[0,1] and consistent linear scheduling, so that t represents the progress of transmission from the prior state to the real critical illness data state in both classes. Linear interpolation paths include the construction of straight-line paths for continuous numerical variables and the construction of masked straight-line paths for discrete categorical variables; The construction of the linear path for the continuous numerical variable includes: Modeling continuous variables using flow matching; (Note: The original text contains some inconsistencies and unclear formatting. A more accurate translation To standardize generation time, Corresponding to standard Gaussian noise prior, Corresponding to real numerical data; for real continuous samples and noise samples Construct the following linear interpolation path between the two endpoints: ; Differentiating with respect to time yields the constant conditional velocity: ; Training continuous prediction head Approximate the velocity vector; The construction of the masked linear path for the discrete categorical variable includes: For each category field, a special absorption state [MASK] is added in addition to the original category set; given the true category. In time The disturbance state at the location It follows a linear mixture distribution of the true class and the [MASK] state: ; in This indicates the distribution; during training, Bernoulli masks are sampled for each classification field: the true class is preserved with probability t, and the true class is preserved with probability t. Replace with [MASK]; reverse process predicts clean class classification It employs time-weighted cross-entropy loss, where the transition rate corresponding to linear scheduling is set to... To avoid The value diverges when it approaches 1, according to actual sampling. .

4. The method for generating hybrid data for postoperative critical illness outcome risk assessment according to claim 1, characterized in that: In S4, the numerical column is transformed into a continuous token through column-by-column linear projection, and the classification column and [MASK] state are transformed into discrete tokens through learnable embeddings. All tokens, along with the temporal embeddings, are input into a shared backbone network, and cross-column dependencies between organ function indicators, vital signs, surgical trauma attributes, critical illness risk factors, and critical illness outcomes are learned in the same self-attention context.

5. The method for generating hybrid data for postoperative critical illness outcome risk assessment according to claim 1, characterized in that: S4 specifically includes: S4.1, Mixed input after given perturbation First, a heterogeneous feature tokenizer is used to map each field to a unified latent dimension λ. Each continuous column is configured with an independent linear projection, transforming scalar values ​​into continuous tokens. Each categorical column is configured with a learnable embedding table, transforming valid categories and [MASK] states into discrete tokens. Further, [CLS] tokens are appended to aggregate the entire row context, forming a token of length λ. A unified token sequence; the final input vector It is represented as: ; S4.

2. A unified sequence input multilayer Transformer encoder maps t to temporal embedding via sinusoidal position encoding or multilayer perceptron, and modulates the normalization parameters of each layer using an adaptive layer normalization method initialized to zero, enabling the network to perceive different generation stages; relative position information between the encoded columns of the rotation position encoding is added to the attention calculation to help the self-attention mechanism capture the co-occurrence relationship of table features and field identity dependency. S4.3, The output sequence is obtained after passing through L layers of Transformers. The numerical token output is used for continuous velocity prediction, the classification token output is used for discrete category prediction, and the [CLS] token serves as a row-level representation in subsequent auxiliary distribution alignment. After information aggregation is completed, Two specialized prediction heads decode different types of features respectively, and the continuous prediction head projects the numerical feature representation back into scalar space to predict the continuous velocity field. The discrete prediction head sets up an independent linear layer for each category column, outputting the probability logits of the corresponding category vocabulary space, which is used to predict the distribution of clean data. .

6. The method for generating hybrid data for postoperative critical illness outcome risk assessment according to claim 1, characterized in that: In S5, the Wasserstein distance between the slices of the real batch and the predicted batch is minimized in the shared latent space to align the joint distribution of the entire row of critical care records; for continuous columns, a distance-based ranking is used to match the marginal distribution, and for categorical columns, the batch category frequency is matched, thereby suppressing cross-column offsets caused by finite-step sampling and inconsistent combinations of variables that do not conform to the clinical logic of critical care.

7. The method for generating hybrid data for postoperative critical illness outcome risk assessment according to claim 1, characterized in that: S5 includes: S5.1 For continuous variables, use mean squared error. Supervise the difference between the predicted velocity and the actual linear velocity; S5.2 For categorical variables, use cross-entropy loss with transition rate weights. ; S5.3 Introduce joint and marginal distribution alignment constraints to align the statistical structures of real and generated data at the batch level; For categorical variables, the logits output by the discrete prediction head are processed by softmax to obtain the class probabilities, and then weighted and summed with the corresponding class embedding tables to form the expected embedding; subsequently, the real data is batched through a shared feature tokenizer. and forecast data batch Mapping to a continuous latent space, minimizing the slice Wasserstein distance to align the potential joint distribution; Marginal alignment applies a consistency constraint column-by-column. For continuous features, it minimizes the 1-Wasserstein distance between the predicted and true batches through a sorting operation. For categorical features, it directly aligns the batch average predicted probability with the true empirical frequency. The complete auxiliary alignment loss is... : ; in, This represents a function that maps data to a continuous latent embedding space. By projecting the high-dimensional latent embedding onto a random straight line and computing the order-based... Distance is obtained; for consecutive columns, The average absolute distance is used after sorting the true and predicted values; for categorical columns, The training algorithm uses the distance between the batch average predicted probability and the true empirical frequency; the final training objective is: ; Minimize using gradient optimizer Early stopping and model selection are performed based on the Shape, Trend, or comprehensive indicators of the validation set; and The alignment strength hyperparameter is determined based on the data size and the number of fields.

8. The method for generating hybrid data for postoperative critical illness outcome risk assessment according to claim 1, characterized in that: In S6, a synchronous Euler solver is used to sample from Gaussian noise and fully masked classification sequences; continuous variables are updated smoothly according to the predicted velocity field, and classification variables are gradually demasked according to the time-related jump rate. After sampling, inverse standardization, category decoding, and field validity checks are performed to obtain a specified number of synthetic surgical critical care risk assessment records.

9. A hybrid data generation system for assessing the risk of postoperative critical illness outcomes, characterized in that: The system includes a module for performing a hybrid data generation method for assessing the risk of postoperative critical illness outcomes as described in any one of claims 1 to 8.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the hybrid data generation method for assessing the risk of postoperative critical illness outcomes as described in any one of claims 1 to 8.