Machine learning based inpatient fall risk prediction method
By using multimodal data fusion and an improved segmentation network, a risk evolution network is constructed to generate visual reports and personalized intervention suggestions. This solves the problems of accuracy and interpretability in fall risk prediction in existing technologies, achieving a qualitative leap from prediction to management and improving the precision and timeliness of fall prevention.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE FIRST AFFILIATED HOSPITAL OF WENZHOU MEDICAL UNIV
- Filing Date
- 2026-06-16
- Publication Date
- 2026-07-14
AI Technical Summary
Existing methods for predicting fall risk rely on manual assessment, are highly influenced by subjective factors, ignore muscle mass decline, lack multimodal data fusion, have poor prediction accuracy and generalization ability, lack interpretability, and are difficult to provide a clear basis for risk decision-making.
Employing a machine learning-based approach, this method utilizes multimodal fusion of CT image data and clinical structured data. An improved segmentation network is used to segment muscle tissue, constructing a multi-stream feature encoding network and a risk evolution network. Combined with a counterfactual reasoning module, it generates visual reports and personalized intervention recommendations, achieving full-process automation.
It significantly improves the precision of muscle tissue segmentation and the accuracy of fall risk prediction, provides clear clinical decision-making basis, reduces the workload of medical staff, and improves the accuracy and timeliness of fall prevention and management.
Smart Images

Figure CN122392982A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical large model technology, and in particular to a method for predicting the risk of falls in hospitalized patients based on machine learning. Background Technology
[0002] Falls in hospitalized patients are a common adverse event in clinical nursing. They can lead to secondary injuries such as fractures and soft tissue damage, prolong hospital stays, increase medical costs, and seriously affect the patient's recovery process and the quality of medical services. Currently, most fall risk assessment methods used in clinical practice rely on manually completed assessment scales, which are greatly affected by subjective factors, resulting in insufficient accuracy and consistency of assessment results.
[0003] Existing fall risk prediction methods mostly focus on structured clinical data, neglecting the close correlation between fall risk and the key physiological indicator of muscle mass decline. Some methods involving imaging data have significant limitations. On the one hand, the precision of muscle tissue segmentation is insufficient, making it difficult to accurately quantify muscle mass-related indicators. On the other hand, they often use single-modal data or simple feature stitching methods, failing to effectively integrate multi-dimensional information such as imaging, clinical data, and time series data, resulting in poor generalization ability of prediction models and insufficient timeliness of warnings.
[0004] At the same time, existing models generally lack interpretability, making it difficult to provide medical staff with clear risk decision-making basis, which restricts clinical translation and promotion. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a machine learning-based method for predicting the risk of falls in hospitalized patients. The technical solution adopted is as follows:
[0006] A machine learning-based method for predicting the risk of falls in hospitalized patients uses a computer deployed with a machine learning-based model for predicting the risk of falls in hospitalized patients. The method includes the following steps:
[0007] Step 1: Collect CT image data and clinical structured data of hospitalized patients, and perform standardization processing to obtain a standardized multimodal dataset;
[0008] Step 2: An improved segmentation network is used to segment muscle tissue in CT images, extract traditional radiomics features and deep semantic features, and quantify muscle mass deterioration indicators.
[0009] Step 3: Construct a multi-stream feature encoding network, and achieve adaptive fusion of image features, clinical features, and temporal features through a cross-modal attention mechanism. Combine this with an ensemble learning framework to output a fall risk prediction value.
[0010] Step 4: Construct a risk evolution network and a counterfactual reasoning module. Based on the time series characteristics, predict the risk evolution trajectory at multiple future time points. Simulate the risk change path under different intervention timings through a counterfactual generator. With the goal of the fastest decrease in risk score, solve for the optimal intervention timing.
[0011] Step 5: Quantify the importance of features, combine the optimal intervention timing obtained in Step 4, generate a visualized risk report that includes a dynamic risk trend chart and intervention window recommendations, and update the risk assessment and intervention timing in real time based on the new data.
[0012] Step 6: Based on the risk level and the optimal intervention timing, trigger the graded early warning mechanism to output personalized intervention recommendations including the best intervention time point, and achieve fully automated operation through the clinical deployment architecture.
[0013] Optionally, the standardization process in step 1 includes: cross-device domain adaptation, automated ROI location, data balancing, and data augmentation.
[0014] Cross-device domain adaptation uses the Cycle-GAN algorithm to eliminate image feature offsets caused by different CT devices; automated ROI localization uses a vertebral key point detection algorithm to accurately locate muscle regions at the T4, T8, and T12 levels; data balancing uses the SMOTE-ENN algorithm to handle class imbalance; and data augmentation applies 3D elastic deformation, rotation, and scaling operations to CT images.
[0015] Optionally, the improved segmentation network in step 2 adopts the 3DU-Net++ segmentation network, introduces an attention gating mechanism, and uses a hybrid loss function combining Dice loss and Focal-Loss; the muscle mass decline indicators include the muscle fat infiltration index (MFI) and the age and sex-corrected muscle mass Z-score.
[0016] The attention gate mechanism in the improved 3DU-Net++ segmentation network is a 3D attention gate, which specifically includes the following steps:
[0017] Step a: Receive the high-resolution feature map x output by the encoder and the decoder gating signal g that is upsampled and matched with the spatial dimension of x;
[0018] Step b, reduce the dimensionality of x and g using 3D convolution respectively:
[0019] Step c: Fuse and activate the dimensionality-reduced features;
[0020] Step d: Generate a 3D spatial attention weight map;
[0021] Step e involves weighting the input features using element-wise multiplication to obtain the enhanced feature map. And pass it to the decoder.
[0022] Optionally, the expression for the hybrid loss function is:
[0023] ;
[0024] in It is an adaptive muscle group Dice loss. It is a grouped focal loss. It is a boundary regularization term; The weights are the adaptive muscle group Dice loss and the group-focused Focal loss, which are determined through cross-validation optimization. By introducing the adaptive muscle group Dice loss and the group-focused Focal loss, the key difficulties of muscle segmentation can be accurately optimized.
[0025] Optionally, step 2, which extracts traditional image omics features and deep semantic features, specifically includes:
[0026] Traditional radiomics features: extracting morphological features, texture features, and wavelet features from the segmented muscle region; morphological features include muscle volume, average density, and cross-sectional perimeter; texture features include the energy, entropy, contrast, and long run advantage of the gray-level co-occurrence matrix; wavelet features include the mean of low-frequency components and the variance of high-frequency components after Haar wavelet transform;
[0027] Deep semantic features: Using a pre-trained 3DResNet-34 model, after removing the last fully connected layer, features are extracted from the segmented muscle region to obtain a 512-dimensional high-level semantic feature vector.
[0028] Optionally, the multi-stream feature coding network in step 3 specifically includes: an image feature stream encoder, a clinical feature stream encoder, and a temporal feature stream encoder;
[0029] The image feature stream encoder is composed of a 3D convolutional neural network, which contains four convolutional blocks in sequence. Each convolutional block contains a 3D convolutional layer, a batch normalization layer, a ReLU activation function, and a max pooling layer. It integrates traditional image omics features with deep semantic features and encodes them into a 256-dimensional image feature vector.
[0030] The clinical feature stream encoder consists of a multilayer sensing mechanism. The input is 18-dimensional clinical structured data, which is encoded into a 32-dimensional clinical feature vector through 3 fully connected layers.
[0031] The temporal feature stream encoder is composed of a long short-term memory network. The input is a temporal sequence of muscle mass deterioration indicators examined multiple times during the patient's hospitalization. It contains two layers of LSTM units and the output is a 64-dimensional temporal feature vector.
[0032] Optionally, the adaptive fusion process of the cross-modal attention mechanism in step 3 includes:
[0033] The image feature vector, clinical feature vector, and temporal feature vector are mapped to the same feature space through linear transformation to obtain the mapped features; the attention weights of each modality feature are calculated; and the weighted fusion of each modality feature vector yields a 128-dimensional fused feature vector.
[0034] Optionally, the core formula for outputting the fall risk prediction value in step 3 is the meta-learner prediction formula of the ensemble learning framework, as follows:
[0035] ;
[0036] in This is the final output of the predicted fall risk value; the closer it is to 1, the higher the patient's fall risk. It is the standardized clinical comprehensive characteristic after step 1, which is obtained by weighted summation of age, number of underlying diseases, and number of days of use of risky drugs; It is a comprehensive characteristic of muscle mass quantified in step 2, which is obtained by weighted conversion of muscle fat infiltration index (MFI), muscle mass Z-score, and MFI change rate. It is element-wise multiplication, representing the interaction between clinical characteristics and muscle mass characteristics; , and These are the feature weights; It is a bias term. It is the Sigmoid activation function, which maps the output to the [0,1] interval to obtain the final fall risk prediction value. .
[0037] Optionally, step 4 includes the following sub-steps:
[0038] Step 41, construct a risk evolution model based on a temporal adversarial network: receive the 64-dimensional temporal feature vector output by the temporal feature stream encoder. By using an evolutionary network containing two layers of gated recurrent units, the risk value at T future time points is predicted, thus forming a risk evolution trajectory. The Wasserstein loss function was used during training to fit the actual risk change data.
[0039] Step 42, Constructing the intervention embedding vector: Encode the candidate intervention measures as a one-hot vector I, and combine it with the feature vector. The data is then concatenated and input into the counterfactual generator.
[0040] Step 43: The counterfactual generator employs a conditional variational autoencoder structure, given a feature vector... Under the condition of intervention I, generate the counterfactual risk evolution trajectory T days after the intervention is applied. ;
[0041] Step 44, Define the risk integral function ,in For the timing of intervention implementation, As a decay factor, it is used to balance short-term and long-term risks by iterating through different intervention opportunities within the next 3 days. Solving the optimization problem This yields the optimal intervention timing that minimizes the cumulative risk integral. .
[0042] Optionally, the interpretability AI technology in step 5 specifically includes global feature importance analysis, case feature importance analysis, risk trend interpretation, and natural language report generation;
[0043] Global feature importance analysis uses permutation importance to calculate the degree of influence of each input feature on the prediction result and generates a ranking of key risk factors.
[0044] Case feature importance analysis generates a risk contribution heatmap by integrating gradient quantification of the contribution of each feature of a single patient to its risk score.
[0045] The risk trend interpretation uses the Shapley value to decompose the risk evolution trajectory and quantify the direction and intensity of the contribution of different characteristics to future risk changes.
[0046] Natural language report generation is based on feature importance analysis and risk trend interpretation results. It automatically generates structured reports that include patient risk level, core risk factors, dynamic risk trend description and recommended optimal intervention time window.
[0047] The tiered early warning mechanism described in step 6 specifically refers to: when the current risk prediction value... A yellow alert is triggered when the first threshold is exceeded; when Exceeding the second threshold or the optimal intervention time When the time window for intervention is less than the warning time window, a red warning is triggered; the warning information and the optimal intervention time point are pushed to the front-end system together.
[0048] In summary, the present invention has at least one of the following beneficial technical effects:
[0049] This invention provides a machine learning-based method for predicting the risk of falls in hospitalized patients. Through the synergistic effect of multimodal data fusion, an improved muscle segmentation network, and a dynamic risk assessment and counterfactual intervention timing optimization mechanism, it not only significantly improves the accuracy of muscle tissue segmentation and the accuracy of fall risk prediction, but also achieves a qualitative leap from predicting risk to managing risk.
[0050] Introducing counterfactual reasoning into the field of fall risk prediction for hospitalized patients, by simulating the effects of different intervention timings, can proactively output the best clinical decisions that can be implemented, bridging the decision gap between risk assessment and clinical decision-making in existing technologies, and providing medical staff with a clear basis for deciding when to do something.
[0051] Interpretability analysis provides clear evidence for clinical intervention, and the clinical deployment architecture supports fully automated operation, effectively reducing the workload of medical staff and helping medical institutions improve the accuracy and timeliness of fall prevention management. Attached Figure Description
[0052] Figure 1 This is a flowchart illustrating the fall risk prediction method for hospitalized patients based on machine learning, as described in this invention.
[0053] Figure 2 This is a schematic diagram of the first page of the inpatient fall risk prediction report according to a specific embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram on the second page of the inpatient fall risk prediction report according to a specific embodiment of the present invention;
[0055] Figure 4 This is a schematic diagram on the third page of the inpatient fall risk prediction report, which is a specific embodiment of the present invention. Detailed Implementation
[0056] The following is in conjunction with the accompanying drawings. Figures 1-4 The present invention will be described in further detail below.
[0057] This invention discloses a method for predicting the risk of falls in hospitalized patients based on machine learning.
[0058] Example 1
[0059] A machine learning-based method for predicting the risk of falls in hospitalized patients uses a computer deployed with a machine learning-based model for predicting the risk of falls in hospitalized patients. The method includes the following steps:
[0060] Step 1: Collect CT image data and clinical structured data of hospitalized patients, and perform standardization processing to obtain a standardized multimodal dataset;
[0061] Step 2: An improved segmentation network is used to segment muscle tissue in CT images, extract traditional radiomics features and deep semantic features, and quantify muscle mass deterioration indicators.
[0062] Step 3: Construct a multi-stream feature encoding network, and achieve adaptive fusion of image features, clinical features, and temporal features through a cross-modal attention mechanism. Combine this with an ensemble learning framework to output a fall risk prediction value.
[0063] Step 4: Construct a risk evolution network and a counterfactual reasoning module. Based on the time series characteristics, predict the risk evolution trajectory at multiple future time points. Simulate the risk change path under different intervention timings through a counterfactual generator. With the goal of the fastest decrease in risk score, solve for the optimal intervention timing.
[0064] Step 5: Quantify the importance of features, combine the optimal intervention timing obtained in Step 4, generate a visualized risk report that includes a dynamic risk trend chart and intervention window recommendations, and update the risk assessment and intervention timing in real time based on the new data.
[0065] Step 6: Based on the risk level and the optimal intervention timing, trigger the graded early warning mechanism to output personalized intervention recommendations including the best intervention time point, and achieve fully automated operation through the clinical deployment architecture.
[0066] By employing the aforementioned technical solution, the method automates the process using a predictive model deployed on a computer. First, CT images and structured clinical data from patients are collected and standardized to eliminate format and distribution differences among multi-source data. Then, an improved segmentation network is used to accurately segment muscle tissue in the CT images, extracting radiomics features and deep semantic features reflecting muscle mass and function, and quantifying the degree of muscle mass decline. Next, a multi-stream feature encoding network is constructed, dynamically fusing image features, clinical features, and temporal features reflecting disease progression using a cross-modal attention mechanism, and combining this with an ensemble learning framework to output a quantitative prediction of the current fall risk. Based on this, a risk evolution network and a counterfactual reasoning module are further constructed to predict risk changes at multiple future time points based on temporal features, and to simulate the differences in risk paths after intervention at different times, aiming to determine the optimal intervention time based on the fastest decrease in risk score. Finally, interpretability analysis generates a visual report containing risk trend maps and intervention recommendations, triggering tiered warnings based on risk level and optimal intervention time, and outputting personalized intervention recommendations, achieving a fully automated closed loop from data collection to clinical decision-making.
[0067] Example 2
[0068] The standardization process in step 1 includes: cross-device domain adaptation, automated ROI location, data balancing, and data augmentation.
[0069] Cross-device domain adaptation uses the Cycle-GAN algorithm to eliminate image feature offsets caused by different CT devices; automated ROI localization uses a vertebral key point detection algorithm to accurately locate muscle regions at the T4, T8, and T12 levels; data balancing uses the SMOTE-ENN algorithm to handle class imbalance; and data augmentation applies 3D elastic deformation, rotation, and scaling operations to CT images.
[0070] By adopting the above technical solutions, cross-device domain adaptation employs the Cycle-GAN algorithm. This algorithm, through cycle consistency loss, transforms the image styles of different CT devices without the need for paired data, making the image feature distributions of the source and target devices more consistent, thereby eliminating the adverse effects of device differences on the model's generalization ability. Automated ROI localization utilizes a vertebral keypoint detection algorithm, leveraging the stable grayscale patterns and morphological features of the vertebrae in CT images to automatically identify the T4, T8, and T12 vertebral levels. Using the vertebrae as anchor points, it precisely delineates the muscle analysis region, ensuring anatomical consistency in muscle mass assessment. Data balancing employs the SMOTE-ENN algorithm. SMOTE synthesizes new samples through linear interpolation between minority class samples, expanding the number of fall event samples, while ENN removes noisy samples in the majority class that are inconsistent with their nearest neighbors using a nearest neighbor voting rule. The combination of these two algorithms effectively alleviates the model bias problem caused by the scarcity of fall event samples. Data augmentation simulates real variations in clinical settings, such as changes in patient position and tissue deformation, by applying 3D elastic deformation, rotation, and scaling operations to CT images. This increases the diversity of training data and improves the model's robustness to image variations.
[0071] Example 3
[0072] The improved segmentation network described in step 2 uses the 3DU-Net++ segmentation network, introduces an attention gating mechanism, and employs a hybrid loss function combining Dice loss and Focal-Loss. The muscle mass decline indicators include the muscle fat infiltration index (MFI) and the age- and sex-corrected muscle mass Z-score.
[0073] The attention gate mechanism in the improved 3DU-Net++ segmentation network is a 3D attention gate, which specifically includes the following steps:
[0074] Step a: Receive the high-resolution feature map x output by the encoder and the decoder gating signal g that is upsampled and matched with the spatial dimension of x;
[0075] Step b, reduce the dimensionality of x and g using 3D convolution respectively:
[0076] Step c: Fuse and activate the dimensionality-reduced features;
[0077] Step d: Generate a 3D spatial attention weight map;
[0078] Step e involves weighting the input features using element-wise multiplication to obtain the enhanced feature map. And pass it to the decoder.
[0079] By adopting the above technical solution, the improved segmentation network is based on the 3DU-Net++ architecture. Its skip connections and multi-layer decoder design can capture multi-scale spatial features of muscle tissue. The introduced 3D attention gating mechanism enhances segmentation accuracy through the following steps: Step a receives the high-resolution feature map output by the encoder and the gating signal provided by the decoder. The gating signal contains global semantic information after upsampling. Step b uses 3D convolution to reduce the dimensionality of the feature map and the gating signal respectively, reducing the amount of computation while retaining the core features. Step c adds the dimensionality-reduced features element-wise and performs non-linear activation, allowing local details and global semantics to interact and merge. Step d generates a spatial attention weight map through a 3D convolutional layer and a sigmoid function. This weight map assigns high weights to muscle regions and low weights to background regions such as fat and bone. Step e multiplies the attention weight map element-wise with the original feature map to obtain an enhanced feature map. The response of muscle tissue in this feature map is significantly amplified, thereby improving segmentation accuracy. The final output indicators of muscle mass decline include the muscle fat infiltration index (MFI) and the age- and sex-corrected muscle mass Z-score. The former reflects the degree of muscle fat infiltration, while the latter eliminates the interference of age and sex differences on muscle mass assessment.
[0080] Example 4
[0081] The expression for the hybrid loss function is:
[0082] ;
[0083] in It is an adaptive muscle group Dice loss. It is a grouped focal loss. It is a boundary regularization term; The weights are the adaptive muscle group Dice loss and the group-focused Focal loss, which are determined through cross-validation optimization. By introducing the adaptive muscle group Dice loss and the group-focused Focal loss, the key difficulties of muscle segmentation can be accurately optimized.
[0084] By employing the above technical solution, the hybrid loss function consists of three components: adaptive muscle group Dice loss, grouped focusing Focal loss, and boundary regularization term. The adaptive muscle group Dice loss assigns learnable adaptive weights to different muscle groups, with clinically important muscle groups such as the psoas major and erector spinae muscles receiving higher weights. This forces the network to focus more on these key regions during training, alleviating the class imbalance problem between muscle regions and the background. The grouped focusing Focal loss targets difficult-to-segment samples such as muscle boundaries and small-volume muscle groups. By using a modulation factor, it reduces the loss contribution of easily segmented samples, allowing the network to focus its optimization efforts on difficult-to-segment regions, improving the precision of segmentation boundaries and muscle integrity. The boundary regularization term constrains the predictive consistency of muscle boundary voxels. By penalizing discontinuous predictions at the boundaries, it makes the segmented muscle surface smoother and more anatomically consistent. The balancing weights λ and μ are determined through cross-validation to ensure that the three losses achieve optimal coordination under different training stages and data distributions, thus improving the overall quality of muscle segmentation.
[0085] Example 5
[0086] Step 2, which extracts traditional image omics features and deep semantic features, specifically includes:
[0087] Traditional radiomics features: extracting morphological features, texture features, and wavelet features from the segmented muscle region; morphological features include muscle volume, average density, and cross-sectional perimeter; texture features include the energy, entropy, contrast, and long run advantage of the gray-level co-occurrence matrix; wavelet features include the mean of low-frequency components and the variance of high-frequency components after Haar wavelet transform;
[0088] Deep semantic features: Using a pre-trained 3DResNet-34 model, after removing the last fully connected layer, features are extracted from the segmented muscle region to obtain a 512-dimensional high-level semantic feature vector.
[0089] By employing the aforementioned technical solutions, traditional radiomics features extract three types of information from the segmented muscle region: morphological features directly quantify muscle volume, average density, and cross-sectional perimeter, reflecting the macroscopic morphology and density level of the muscle; texture features calculate indicators such as energy, entropy, and contrast through the gray-level co-occurrence matrix, and utilize the gray-level run-length matrix to obtain the advantage of long run lengths. These indicators can capture the microscopic heterogeneity of gray-level distribution within the muscle, indirectly reflecting the degree of muscle fat infiltration and fibrosis; wavelet features extract the mean of low-frequency components and the variance of each high-frequency component by performing Haar wavelet transform on the muscle region, characterizing the detailed changes and overall trends of muscle tissue from multiple scales. Deep semantic features utilize a 3DResNet-34 model pre-trained on a large medical image dataset. After removing the final fully connected classification layer, the segmented 3D image of the muscle region is input into the model, extracting the 512-dimensional feature vector output from the penultimate layer. This vector contains high-level semantic information of muscle tissue, capable of representing complex relationships and abstract patterns that are difficult to capture with traditional hand-crafted features. The two types of features complement each other, providing a rich image information foundation for subsequent risk prediction.
[0090] Example 6
[0091] The multi-stream feature coding network mentioned in step 3 specifically includes: an image feature stream encoder, a clinical feature stream encoder, and a temporal feature stream encoder;
[0092] The image feature stream encoder is composed of a 3D convolutional neural network, which contains four convolutional blocks in sequence. Each convolutional block contains a 3D convolutional layer, a batch normalization layer, a ReLU activation function, and a max pooling layer. It integrates traditional image omics features with deep semantic features and encodes them into a 256-dimensional image feature vector.
[0093] The clinical feature stream encoder consists of a multilayer sensing mechanism. The input is 18-dimensional clinical structured data, which is encoded into a 32-dimensional clinical feature vector through 3 fully connected layers.
[0094] The temporal feature stream encoder is composed of a long short-term memory network. The input is a temporal sequence of muscle mass deterioration indicators examined multiple times during the patient's hospitalization. It contains two layers of LSTM units and the output is a 64-dimensional temporal feature vector.
[0095] By adopting the above technical solutions, the image feature flow encoder uses a 3D convolutional neural network, containing four convolutional blocks. Each convolutional block sequentially performs 3D convolution, batch normalization, ReLU activation, and max pooling. 3D convolution can simultaneously extract the associated features of the muscle region across three spatial dimensions: transverse, coronal, and sagittal planes. Batch normalization accelerates training convergence and stabilizes data distribution. ReLU activation introduces non-linear expressive power, and max pooling achieves feature dimensionality reduction and spatial invariance. This encoder fuses traditional radiomics features with deep semantic features and encodes them into a 256-dimensional image feature vector, condensing multi-scale image information related to muscles. The clinical feature flow encoder uses a 3-layer fully connected multilayer perceptron. It takes 18-dimensional clinical structured data as input, including age, number of underlying diseases, and medication history. Through layer-by-layer dimensionality reduction, the original clinical data is mapped into a 32-dimensional compact vector, preserving key clinical information while reducing redundancy and noise. The temporal feature flow encoder uses a two-layer long short-term memory network. It takes as input the temporal sequence of muscle mass decline indicators obtained from multiple examinations during the patient's hospitalization. The forgetting gate and input gate mechanism of LSTM can effectively capture the long-term dependencies and changing trends in the time series and output a 64-dimensional temporal feature vector to characterize the dynamic evolution of the patient's muscle mass over time.
[0096] Example 7
[0097] The adaptive fusion process of the cross-modal attention mechanism in step 3 includes:
[0098] The image feature vector, clinical feature vector, and temporal feature vector are mapped to the same feature space through linear transformation to obtain the mapped features; the attention weights of each modality feature are calculated; and the weighted fusion of each modality feature vector yields a 128-dimensional fused feature vector.
[0099] By employing the above technical solution, image feature vectors, clinical feature vectors, and temporal feature vectors are first mapped to the same 128-dimensional feature space through their respective linear transformation matrices. This step eliminates the heterogeneity of the three types of features in terms of original dimension, numerical range, and distribution characteristics, making them comparable and fusionable. Next, the attention weights of each modality feature are calculated. This process is implemented through a small neural network. The network takes the mapped three types of features as input and outputs three normalized weight values, the sum of which is 1. The weights are calculated based on the importance of each type of feature in the current input sample to the fall risk prediction task. For example, when a patient's muscle mass declines significantly, temporal features receive higher weights, while when clinical factors are dominant, the weights of clinical features are correspondingly increased. Finally, the mapped three types of features are weighted and summed according to the calculated weights to obtain a 128-dimensional fused feature vector. This fused vector dynamically retains the most discriminative information from each modality, avoiding the problem of key information being diluted or redundant information interfering with the simple feature concatenation.
[0100] Example 8
[0101] The core formula for outputting the fall risk prediction value in step 3 is the meta-learner prediction formula of the ensemble learning framework, as follows:
[0102] ;
[0103] in This is the final output of the predicted fall risk value; the closer it is to 1, the higher the patient's fall risk. It is the standardized clinical comprehensive characteristic after step 1, which is obtained by weighted summation of age, number of underlying diseases, and number of days of use of risky drugs; It is a comprehensive characteristic of muscle mass quantified in step 2, which is obtained by weighted conversion of muscle fat infiltration index (MFI), muscle mass Z-score, and MFI change rate. It is element-wise multiplication, representing the interaction between clinical characteristics and muscle mass characteristics; , and These are the feature weights; It is a bias term. It is the Sigmoid activation function, which maps the output to the [0,1] interval to obtain the final fall risk prediction value. .
[0104] By employing the above technical solution, the Clinical Comprehensive Characteristic (CF) is obtained by weighted summation of age-standardized values, number of underlying diseases, and number of days of use of risky medications. The weights reflect the independent contribution of each clinical factor to fall risk. The Muscle Mass Comprehensive Characteristic (MF) is obtained by weighted transformation of the Muscle Fat Infiltration Index (MFI), the negative value of the muscle mass Z-score, and the rate of change of MFI. A negative Z-score is used because lower muscle mass indicates higher risk, while the rate of change of MFI reflects the speed of muscle mass decline. The linear combination term in the formula... and The main effects of clinical factors and muscle mass factors on risk were quantified separately. The innovation lies in the introduction of interaction terms. The term , where ⊙ denotes element-wise multiplication, is used to specifically capture the synergistic effect between clinical characteristics and muscle mass characteristics. For example, in elderly patients with rapid muscle mass decline, the cumulative risk is often higher than the simple sum of the individual risks. The bias term b adjusts the predicted baseline level to fit the data distribution. Finally, the linear combination result is mapped to the 0-1 interval using a sigmoid function, and the output value is directly interpreted as the probability of the patient falling; the closer to 1, the higher the risk.
[0105] Example 9
[0106] Step 4 includes the following sub-steps:
[0107] Step 41, construct a risk evolution model based on a temporal adversarial network: receive the 64-dimensional temporal feature vector output by the temporal feature stream encoder. By using an evolutionary network containing two layers of gated recurrent units, the risk value at T future time points is predicted, thus forming a risk evolution trajectory. The Wasserstein loss function was used during training to fit the actual risk change data.
[0108] Step 42, Constructing the intervention embedding vector: Encode the candidate intervention measures as a one-hot vector I, and combine it with the feature vector. The data is then concatenated and input into the counterfactual generator.
[0109] Step 43: The counterfactual generator employs a conditional variational autoencoder structure, given a feature vector... Under the condition of intervention I, generate the counterfactual risk evolution trajectory T days after the intervention is applied. ;
[0110] Step 44, Define the risk integral function ,in For the timing of intervention implementation, As a decay factor, it is used to balance short-term and long-term risks by iterating through different intervention opportunities within the next 3 days. Solving the optimization problem This yields the optimal intervention timing that minimizes the cumulative risk integral. .
[0111] By adopting the above technical solution, step 41 constructs a risk evolution model based on a temporal adversarial network. This model receives a 64-dimensional temporal feature vector output by a temporal feature stream encoder. The system predicts risk values at T future time points using a two-layer gated recurrent unit (GRU). The GRU has update and reset gate structures, enabling it to effectively learn the dynamics of muscle mass decline indices over time and generate risk evolution trajectories. During training, the Wasserstein loss function is used, which measures the difference between the predicted and actual trajectory distributions and captures the temporal patterns of risk changes better than traditional mean squared error. Step 42 encodes candidate interventions as one-hot vectors I and correlates them with the current state. The process involves piecing together information so that the counterfactual generator is aware of the current patient condition and the type of intervention to be applied. Step 43 uses a conditional variational autoencoder as the counterfactual generator, whose encoder will... The model maps I to the latent distribution space, from which the decoder samples and reconstructs the counterfactual risk evolution trajectory for the next T days after the intervention. The generative capability of the conditional variational autoencoder enables the model to answer the counterfactual question of how the risk trajectory will change if a certain intervention is applied. Step 44 defines the risk integral function. The attenuation factor β makes the model focus more on short-term risk, which aligns with the principle of prioritizing early clinical intervention. This is achieved by exploring different intervention opportunities within the next three days. Calculate the corresponding cumulative risk integral, and take the τ corresponding to the smallest integral as the optimal intervention time. This allows for specific recommendations on when intervention will yield the best results.
[0112] Example 10
[0113] In step 5, the interpretability AI technology specifically includes global feature importance analysis, case feature importance analysis, risk trend interpretation, and natural language report generation;
[0114] Global feature importance analysis uses permutation importance to calculate the degree of influence of each input feature on the prediction result and generates a ranking of key risk factors.
[0115] Case feature importance analysis generates a risk contribution heatmap by integrating gradient quantification of the contribution of each feature of a single patient to its risk score.
[0116] The risk trend interpretation uses the Shapley value to decompose the risk evolution trajectory and quantify the direction and intensity of the contribution of different characteristics to future risk changes.
[0117] Natural language report generation is based on feature importance analysis and risk trend interpretation results. It automatically generates structured reports that include patient risk level, core risk factors, dynamic risk trend description and recommended optimal intervention time window.
[0118] The tiered early warning mechanism described in step 6 specifically refers to: when the current risk prediction value... A yellow alert is triggered when the first threshold is exceeded; when Exceeding the second threshold or the optimal intervention time When the time window for intervention is less than the warning time window, a red warning is triggered; the warning information and the optimal intervention time point are pushed to the front-end system together.
[0119] By employing the above technical solutions, the global feature importance analysis uses a permutation importance method. This involves randomly shuffling the values of a particular input feature in the test set and observing the decline in model prediction performance. A more significant performance decline indicates greater feature importance, ultimately generating a ranking of key risk factors to help healthcare professionals grasp the core factors driving falls at the group level. The case feature importance analysis uses an ensemble gradient method. Starting from the baseline of the mean of all patient features and extending to the feature value of the target patient, the analysis integrates along the gradient path to obtain the independent contribution of each feature to the patient's risk score. A positive contribution indicates that the feature increases risk, while a negative contribution indicates that it decreases risk. The contribution values are presented in the form of a heatmap, enabling doctors to quickly identify the main sources of risk for individual patients. Risk trend interpretation uses Shapley values to decompose the risk evolution trajectory, decomposing the predicted risk value at each future time point into the sum of the contributions of each input feature, thereby quantifying the driving direction and strength of different features on future risk changes. Natural language report generation, based on the above analysis results, automatically converts the data into a structured text report through a rule engine, including risk level, core risk factors, dynamic risk trend description, and recommended optimal intervention time window. The tiered early warning mechanism sets two thresholds: a yellow warning is triggered when the current risk prediction value exceeds the first threshold, indicating that attention is needed; a red warning is triggered when the value exceeds the second threshold or when the optimal intervention time is less than the warning time window, indicating that immediate intervention is needed. The warning information and the optimal intervention time point are pushed to the front-end system together to ensure that medical staff can take targeted measures in a timely manner.
[0120] The following describes the implementation principle of the present invention using specific embodiments:
[0121] A Complete Practical Case Study of a Machine Learning-Based Fall Risk Prediction Method for Hospitalized Patients
[0122] This case study uses a 78-year-old female orthopedic inpatient from a tertiary hospital as the practical subject. Her initial diagnoses were: femoral neck fracture surgery (3 days post-surgery), sarcopenia, and grade 2 hypertension. Her hospital number was 20260*****1. Clinically, she presented with multiple high-risk factors for falls, including advanced age, muscle atrophy, and long-term use of antihypertensive medication. This case study utilizes an in-hospital intelligent medical prediction computer system deployed with deep learning and ensemble learning models. Strictly following the aforementioned complete technical solution, it automates the entire process from multimodal data acquisition, feature extraction, risk prediction, counterfactual intervention simulation, to visual report output and tiered early warning push notifications. All technical parameters, algorithm rules, and calculation formulas match the core settings of the aforementioned embodiments, with concrete illustrations supplemented throughout based on real-world clinical scenarios.
[0123] Step 1: Multimodal data acquisition and standardization processing;
[0124] For this elderly orthopedic inpatient, the system automatically collects two types of core data and completes standardized processing to construct a dedicated standardized multimodal dataset, completely eliminating model errors caused by differences in multi-source data formats, devices, and distributions.
[0125] Data Collection: The patient's lumbar spine, thoracic and abdominal CT images were collected 3 days after admission. At the same time, 18-dimensional structured clinical data from the hospital's HIS system and nursing system were captured. The core clinical indicators included: age 78 years, gender (female), height and weight, number of underlying diseases (hypertension, sarcopenia, 2 items in total), history of falls (none), number of days of use of risk medications (12 years of continuous use of antihypertensive drugs, 3 days of use of postoperative analgesics), duration of bed rest, activity level score, muscle strength rating and other core clinical indicators.
[0126] Standardization process:
[0127] Cross-device domain adaptation: The Cycle-GAN algorithm is used to perform unpaired style conversion between the image style of the 64-slice spiral CT and the 128-slice spiral CT image of the model training benchmark, eliminating the image feature offset of different CT devices and ensuring that the image data of this time conforms to the distribution standard of the model training data.
[0128] Automated ROI localization: Through the vertebral body key point detection algorithm, the system automatically identifies and accurately locates the three standard vertebral body levels of T4, T8, and T12 in the patient's CT images. Using the vertebral body anatomical position as the anchor point, the target muscle analysis area (erector spinae and psoas major core area) is delineated to ensure the anatomical consistency of muscle quality assessment.
[0129] Data balancing: Based on the SMOTE-ENN algorithm, the class imbalance problem of scarce positive samples and excessive negative samples in clinical falls is addressed by optimizing the sample subset of elderly patients who underwent fracture surgery. The SMOTE algorithm interpolates and synthesizes high-risk samples of the same type, and the ENN algorithm removes irrelevant noise samples to avoid model prediction bias.
[0130] Data augmentation: Perform 3D elastic deformation, multi-angle rotation, and scaling operations on the patient's original 3DCT images to simulate the real clinical scenario of patient bed position shift and slight soft tissue deformation, thereby improving the model's adaptability to individual image variations.
[0131] Step 2: Muscle tissue segmentation, feature extraction, and quantification of muscle mass decline;
[0132] This step uses an improved 3DU-Net++ segmentation network (embedded with a 3D attention gate mechanism and a hybrid loss function) to achieve precise muscle segmentation, simultaneously extracting dual-dimensional features and quantifying the core indicators of muscle mass decline in patients.
[0133] Practical demonstration of the improved segmentation network:
[0134] The network infrastructure is 3DU-Net++, with a built-in custom 3D attention gate mechanism, and the entire process enhances muscle segmentation accuracy through a five-step workflow:
[0135] Step a: Receive the high-resolution feature map x of the muscle region output by the encoder, and at the same time receive the gated signal g (carrying global semantic information) that is upsampled by the decoder and perfectly matches the spatial dimension of x.
[0136] Step b: Perform 3D convolution dimensionality reduction on feature map x and gate signal g respectively to compress redundant features and retain muscle core morphology information;
[0137] Step c: Fuse the two types of features after dimensionality reduction element by element, and complete the interaction between local details and global semantics through a non-linear activation function;
[0138] Step d: Generate a 3D spatial attention weight map by combining a 3D convolutional layer with a sigmoid function, assigning high weights to the effective muscle region and low weights to the bone, fat, and blank background.
[0139] Step e: Multiply the attention weight map and the original feature map element by element to obtain the enhanced muscle feature map x´, and input it into the decoder to complete accurate segmentation.
[0140] The model training and prediction processes both employ a hybrid loss function, with the standard formula as follows:
[0141] ;
[0142] in It is an adaptive muscle group Dice loss (giving higher learning weights to key fall-related muscles such as the psoas major and erector spinae). It is a group-focused Focal loss (optimizes the segmentation effect of muscle boundaries and small-volume muscle samples that are difficult to segment). It is a boundary regularization term (constraining the smoothness and regularity of muscle segmentation edges); It is a balance weight between adaptive muscle group Dice loss and grouped focus Focal loss, with weight coefficients λ=0.6 and μ=0.2 (determined as optimal parameters through five-fold cross-validation).
[0143] Multi-dimensional feature extraction:
[0144] Based on the segmented patient muscle target region, traditional radiomics features and deep semantic features are extracted simultaneously:
[0145] Traditional radiomics features: morphological features (total muscle volume 126.3 cm³, average muscle density 38.6 HU, maximum cross-sectional perimeter 42.8 mm); texture features (gray-level co-occurrence matrix energy 0.32, entropy 5.16, contrast 8.24, gray-level long run advantage 0.68); wavelet features (Haar wavelet transform low-frequency component mean 0.52, high-frequency component variance 0.18);
[0146] Deep semantic features: A pre-trained 3DResNet-34 model (with the terminal fully connected layer removed) is used as input. The input is a 3D muscle segmentation image of the patient, and the output is a 512-dimensional high-level semantic feature vector, which captures the abstract features of muscle microdegeneration and microfibrillation that cannot be identified by hand-crafted features.
[0147] Quantification of muscle mass decline indicators:
[0148] Based on the extracted image features, the patient's core decline indicators were calculated: muscle fat infiltration index (MFI) = 28.6% (normal elderly reference value < 20%, indicating severe muscle fat infiltration), age and sex-corrected muscle mass Z-score = -2.1 (Z-score < -2.0, indicating pathological muscle loss), and the short-term change rate of MFI was calculated as +3.2% / 3d, indicating that the patient's muscle decline was accelerating.
[0149] Step 3: Multimodal feature fusion and fall risk value prediction;
[0150] The three modal features are encoded by a multi-stream feature encoding network, adaptively fused using a cross-modal attention mechanism, and finally output as a real-time fall risk prediction value for patients through an ensemble learning framework.
[0151] Multi-stream feature coding:
[0152] Image feature stream encoder: 4-layer 3D convolutional block structure, which integrates traditional patient radiomics features with 512-dimensional deep semantic features, and encodes and compresses to obtain a 256-dimensional image feature vector;
[0153] Clinical Feature Flow Encoder: A 3-layer fully connected multilayer perceptron, taking 18-dimensional standardized clinical data as input and encoding a 32-dimensional clinical feature vector as output;
[0154] Temporal feature flow encoder: 2-layer LSTM unit, inputting MFI and muscle mass Z-score temporal data continuously monitored within 3 days of hospitalization, capturing the dynamic trend of muscle atrophy, and outputting a 64-dimensional temporal feature vector.
[0155] Cross-modal attention adaptive fusion:
[0156] Step 1: Map the 256-dimensional imaging features, 32-dimensional clinical features, and 64-dimensional temporal features to a unified 128-dimensional common feature space using independent linear transformation matrices, eliminating the heterogeneity of modal dimensions and numerical distribution. Step 2: Calculate the attention weights for the three modalities using a shallow neural network (in this case, the weights are: temporal features 0.52, imaging features 0.35, and clinical features 0.13, which aligns with the patient's clinical feature of "rapid muscle atrophy as the core high-risk factor"). Step 3: Generate a 128-dimensional multimodal fusion feature vector through weighted fusion.
[0157] Ensemble learning risk prediction:
[0158] The fall risk value is calculated using the model's core prediction formula:
[0159] Parameter description:
[0160] Clinical composite feature (CF): The standardized score was obtained by weighted summation of the patient's advanced age, two underlying diseases, and three days of analgesic drug use records, with a standardized score of 0.72.
[0161] The comprehensive muscle mass characteristic (MF) is obtained by weighted transformation of MFI, corrected Z-score (substituting negative values), and MFI change rate, with a standardized score of 0.81.
[0162] To characterize the synergistic interaction risk between clinical factors and muscle mass decline (the patient's advanced age and rapid muscle mass decline significantly increased the interaction risk).
[0163] Optimal weights for the model: =0.28、 =0.45、 =0.22, bias term b=-0.15;
[0164] After mapping by the Sigmoid function, the final output is the patient's real-time fall risk value r=0.83 (values [0,1], the higher the value, the higher the risk).
[0165] Step 4: Predicting the risk evolution trajectory and determining the optimal intervention timing;
[0166] Based on temporal adversarial networks and conditional variational autoencoders, the counterfactual reasoning module predicts the future risk trends of patients, simulates the effects of different intervention timings, and solves for the optimal intervention window.
[0167] Risk evolution trajectory prediction: This involves using the patient's 64-dimensional temporal feature vector h... t Input a 2-layer GRU gated recurrent unit evolutionary network, train and fit it using the Wasserstein loss function, and predict the natural state risk evolution trajectory for the next 3 days (T=3): =0.85、 =0.89、 =0.92, indicating that the risk of falls continues to increase without intervention, and will reach an extremely high risk level after 3 days.
[0168] Intervention Embedding and Counterfactual Trajectory Generation: Routine clinical interventions (muscle strength rehabilitation training combined with bedside monitoring) are encoded as one-hot vectors I, and coupled with the current temporal features h. t The concatenated input conditional variational autoencoder counterfactual generator simulates the risk evolution trajectory after intervention is applied in the next 1, 2, and 3 days.
[0169] Determining the optimal intervention timing: The cumulative risk of different intervention timings is calculated using the risk integral formula.
[0170] In the formula, the attenuation factor β = 0.15 (priority weight for recent risk) is used to calculate the optimal intervention time after iterating through the intervention opportunities in the next 3 days. =4 days post-surgery (within 24 hours of the current time), risk score after intervention at this time. Minimize risk, minimize risk, maximize intervention benefits. Delaying intervention until 48 hours later increases the cumulative risk of a fall by 41.2%.
[0171] Step 5: Explainability analysis and visualization of risk report generation;
[0172] Leveraging interpretable AI technology, it completes global and case-specific feature analysis, and automatically generates structured and visualized reports based on risk evolution results.
[0173] Multidimensional interpretable analysis results:
[0174] Global feature importance: Permutation importance analysis showed that muscle fat infiltration index (MFI), muscle mass Z-score, rate of muscle deterioration, advanced age, and postoperative bed rest duration were the top 5 core risk factors for falls in elderly fracture patients.
[0175] Case feature contribution: Integrated gradient quantification shows that the main contributions of this patient's high risk are: severe muscle mass deficiency (contribution 58%), rapid muscle fat infiltration (contribution 22%), and advanced age (contribution 12%), generating a unique risk contribution heatmap.
[0176] Risk trend decomposition: Shapley value decomposition confirms that the core driver of the patient's continued increase in future risk is the progressive decline in muscle mass, while clinical drugs and underlying diseases are secondary auxiliary driving factors.
[0177] Automatically generated visual reports: The reports include the patient's high-risk fall risk level, details of core risk factors, a dynamic risk trend curve for the next 3 days, and recommendations for the optimal intervention window (within 4 days post-surgery, with priority given to intervention within 24 hours). They also include risk warnings indicating a significantly increased risk of delayed intervention. The system automatically captures newly added nursing and examination data within the hospital and updates risk assessment results and intervention windows in real time. Figure 2 , Figure 3 and Figure 4 As shown.
[0178] Step 6: Triggering tiered early warning systems and implementing personalized clinical interventions;
[0179] Based on the system's preset grading thresholds (first threshold = 0.6, second threshold = 0.8), and combined with the patient's risk value and the optimal intervention timing, an early warning mechanism is triggered to complete the fully automated clinical deployment.
[0180] Warning level determination: If the patient's real-time risk value r=0.83 > the second threshold of 0.8, and the optimal intervention window is only 24 hours, the system will trigger a red emergency warning; if the risk value is in the range of 0.6–0.8, a yellow attention warning will be triggered.
[0181] Personalized intervention recommendations: The system automatically pushes early warning information to the orthopedic nurse station and the attending physician's front-end system, and simultaneously outputs personalized intervention plans: Optimal intervention time: within 4 days after surgery (prioritized within 24 hours); Core intervention measures: installing double-sided protective rails at the bedside, turning and monitoring every 2 hours, low-intensity bed muscle strength rehabilitation training, suspending high-risk sedative and analgesic drugs, and dynamically monitoring muscle indicators and gait status; continuous dynamic risk retesting, and daily updates to the intervention window.
[0182] Case Implementation Results Summary:
[0183] The patient case fully replicates the entire technical process of the machine learning fall risk prediction method. Through multimodal data standardization, precise muscle segmentation and quantification, cross-modal feature fusion, counterfactual intervention extrapolation, interpretable analysis, and a graded early warning closed loop, the method accurately identifies the hidden high fall risk in this elderly post-fracture patient and precisely pinpoints the optimal intervention time. Compared to traditional manual fall risk scale assessments (which can only determine high risk and lack precise intervention timing guidance), this technical solution can achieve fully automated output of risk quantification scoring, risk trend prediction, optimal intervention timing solution, and personalized intervention guidance. It effectively compensates for the shortcomings of traditional clinical assessments, such as strong subjectivity, low accuracy, lack of dynamic prediction, and lack of intervention timing guidance, and is suitable for the clinical needs of precise fall prevention and control in elderly patients with sarcopenia, post-fracture surgery, and chronic diseases.
[0184] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for predicting the risk of falls in hospitalized patients based on machine learning, characterized in that, Predictions are made using a computer deployed with a machine learning-based model for predicting the risk of falls in hospitalized patients, including the following steps: Step 1: Collect CT image data and clinical structured data of hospitalized patients, and perform standardization processing to obtain a standardized multimodal dataset; Step 2: An improved segmentation network is used to segment muscle tissue in CT images, extract traditional radiomics features and deep semantic features, and quantify muscle mass deterioration indicators. Step 3: Construct a multi-stream feature encoding network, and achieve adaptive fusion of image features, clinical features, and temporal features through a cross-modal attention mechanism. Combine this with an ensemble learning framework to output a fall risk prediction value. Step 4: Construct a risk evolution network and a counterfactual reasoning module. Based on the time series characteristics, predict the risk evolution trajectory at multiple future time points. Simulate the risk change path under different intervention timings through a counterfactual generator. With the goal of the fastest decrease in risk score, solve for the optimal intervention timing. Step 5: Quantify the importance of features, combine the optimal intervention timing obtained in Step 4, generate a visualized risk report that includes a dynamic risk trend chart and intervention window recommendations, and update the risk assessment and intervention timing in real time based on the new data. Step 6: Based on the risk level and the optimal intervention timing, trigger the graded early warning mechanism to output personalized intervention recommendations including the best intervention time point, and achieve fully automated operation through the clinical deployment architecture.
2. The method for predicting the risk of falls in hospitalized patients based on machine learning according to claim 1, characterized in that, The standardization process in step 1 includes: cross-device domain adaptation, automated ROI location, data balancing, and data augmentation. Cross-device domain adaptation uses the Cycle-GAN algorithm to eliminate image feature offsets caused by different CT devices; automated ROI localization uses a vertebral key point detection algorithm to accurately locate muscle regions at the T4, T8, and T12 levels; data balancing uses the SMOTE-ENN algorithm to handle class imbalance; and data augmentation applies 3D elastic deformation, rotation, and scaling operations to CT images.
3. The method for predicting the risk of falls in hospitalized patients based on machine learning according to claim 2, characterized in that, The improved segmentation network described in step 2 uses the 3DU-Net++ segmentation network, introduces an attention gating mechanism, and employs a hybrid loss function combining Dice loss and Focal-Loss. The muscle mass decline indicators include the muscle fat infiltration index (MFI) and the age- and sex-corrected muscle mass Z-score. The attention gate mechanism in the improved 3DU-Net++ segmentation network is a 3D attention gate, which specifically includes the following steps: Step a: Receive the high-resolution feature map x output by the encoder and the decoder gating signal g that is upsampled and matched with the spatial dimension of x; Step b, reduce the dimensionality of x and g using 3D convolution respectively: Step c: Fuse and activate the dimensionality-reduced features; Step d: Generate a 3D spatial attention weight map; Step e involves weighting the input features using element-wise multiplication to obtain the enhanced feature map. And pass it to the decoder.
4. The method for predicting the risk of falls in hospitalized patients based on machine learning according to claim 3, characterized in that, The expression for the hybrid loss function is: ; in It is an adaptive muscle group Dice loss. It is a grouped focal loss. It is a boundary regularization term; It is a balance weight between adaptive muscle group Dice loss and grouped focus Focal loss, which is determined through cross-validation optimization; By introducing adaptive muscle group Dice loss and group-focused Focal loss, we can achieve precise optimization of key challenges in muscle segmentation.
5. The method for predicting the risk of falls in hospitalized patients based on machine learning according to claim 4, characterized in that, Step 2, which extracts traditional image omics features and deep semantic features, specifically includes: Traditional radiomics features: extracting morphological features, texture features, and wavelet features from the segmented muscle region; morphological features include muscle volume, average density, and cross-sectional perimeter; texture features include the energy, entropy, contrast, and long run advantage of the gray-level co-occurrence matrix; wavelet features include the mean of low-frequency components and the variance of high-frequency components after Haar wavelet transform; Deep semantic features: Using a pre-trained 3DResNet-34 model, after removing the last fully connected layer, features are extracted from the segmented muscle region to obtain a 512-dimensional high-level semantic feature vector.
6. The method for predicting the risk of falls in hospitalized patients based on machine learning according to claim 5, characterized in that, The multi-stream feature coding network mentioned in step 3 specifically includes: an image feature stream encoder, a clinical feature stream encoder, and a temporal feature stream encoder; The image feature stream encoder is composed of a 3D convolutional neural network, which contains four convolutional blocks in sequence. Each convolutional block contains a 3D convolutional layer, a batch normalization layer, a ReLU activation function, and a max pooling layer. It integrates traditional image omics features with deep semantic features and encodes them into a 256-dimensional image feature vector. The clinical feature stream encoder consists of a multilayer sensing mechanism. The input is 18-dimensional clinical structured data, which is encoded into a 32-dimensional clinical feature vector through 3 fully connected layers. The temporal feature stream encoder is composed of a long short-term memory network. The input is a temporal sequence of muscle mass deterioration indicators examined multiple times during the patient's hospitalization. It contains two layers of LSTM units and the output is a 64-dimensional temporal feature vector.
7. The method for predicting the risk of falls in hospitalized patients based on machine learning according to claim 6, characterized in that, The adaptive fusion process of the cross-modal attention mechanism in step 3 includes: The image feature vector, clinical feature vector, and temporal feature vector are mapped to the same feature space through linear transformation to obtain the mapped features; the attention weights of each modality feature are calculated; and the weighted fusion of each modality feature is used to obtain a 128-dimensional fused feature vector.
8. The method for predicting the risk of falls in hospitalized patients based on machine learning according to claim 7, characterized in that, The core formula for outputting the fall risk prediction value in step 3 is the meta-learner prediction formula of the ensemble learning framework, as follows: ; in This is the final output of the predicted fall risk value; the closer it is to 1, the higher the patient's fall risk. It is the standardized clinical comprehensive characteristic after step 1, which is obtained by weighted summation of age, number of underlying diseases, and number of days of use of risky drugs; It is a comprehensive characteristic of muscle mass quantified in step 2, which is obtained by weighted conversion of muscle fat infiltration index (MFI), muscle mass Z-score, and MFI change rate. It is element-wise multiplication, representing the interaction between clinical characteristics and muscle mass characteristics; , and These are the feature weights; It is a bias term. It is the Sigmoid activation function, which maps the output to the [0,1] interval to obtain the final fall risk prediction value. .
9. The method for predicting the risk of falls in hospitalized patients based on machine learning according to claim 8, characterized in that, Step 4 includes the following sub-steps: Step 41, constructing a risk evolution model based on a temporal adversarial network: receiving the 64-dimensional temporal feature vector output by the temporal feature stream encoder. By using an evolutionary network containing two layers of gated recurrent units, the risk value at T future time points is predicted, thus forming a risk evolution trajectory. ; During training, the Wasserstein loss function is used to fit the true risk change data; step 42, construct the intervention embedding vector: encode the candidate intervention measures as a one-hot vector I, and combine it with the feature vector. The data is then concatenated and input into the counterfactual generator. Step 43: The counterfactual generator employs a conditional variational autoencoder structure, given a feature vector... Under the condition of intervention I, generate the counterfactual risk evolution trajectory T days after the intervention is applied. ; Step 44, Define the risk integral function ,in For the timing of intervention, As a decay factor, it is used to balance short-term and long-term risks by iterating through different intervention opportunities within the next 3 days. Solving the optimization problem This yields the optimal intervention timing that minimizes the cumulative risk integral. .
10. The method for predicting the risk of falls in hospitalized patients based on machine learning according to claim 9, characterized in that, In step 5, the interpretability AI technology specifically includes global feature importance analysis, case feature importance analysis, risk trend interpretation, and natural language report generation; Global feature importance analysis uses permutation importance to calculate the degree of influence of each input feature on the prediction result and generates a ranking of key risk factors. Case feature importance analysis generates a risk contribution heatmap by integrating gradient quantification of the contribution of each feature of a single patient to its risk score. The risk trend interpretation uses the Shapley value to decompose the risk evolution trajectory and quantify the direction and intensity of the contribution of different characteristics to future risk changes. Natural language report generation is based on feature importance analysis and risk trend interpretation results. It automatically generates structured reports that include patient risk level, core risk factors, dynamic risk trend description and recommended optimal intervention time window. The tiered early warning mechanism described in step 6 specifically refers to: when the current risk prediction value... A yellow alert is triggered when the first threshold is exceeded; when Exceeding the second threshold or the optimal intervention time A red alert is triggered when the time window for warnings is less than the warning period. The warning information, along with the optimal intervention time point, is pushed to the front-end system.