A postoperative ventricular shunt risk prediction method, device, medium and product
By unifying the fusion prediction method of multimodal MRI images, tumor segmentation masks and clinical information, and utilizing affine transformation and attention mechanism neural networks, the problem of insufficient utilization of multimodal information and class imbalance in the prediction of ventricular shunt risk after pediatric brain tumor surgery was solved, achieving higher prediction accuracy and clinical usability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies fail to fully utilize multimodal MRI information, have insufficient spatial alignment, fail to model local spatial patterns of tumors, and fail to systematically utilize clinical text information and pathological priors in predicting the risk of ventricular shunt after pediatric brain tumor surgery. This results in insufficient prediction accuracy and a tendency to favor cases where shunt is not necessary.
By acquiring multimodal 3D magnetic resonance images, tumor segmentation masks, and clinical information, affine transformation and resampling are used to remove skull interference. Tumor features are extracted by combining attention mechanism neural networks, and structured clinical variables and pathological prior information are fused. Multilayer perceptron classification network is used for prediction to solve the class imbalance problem.
It improves the accuracy and clinical usability of predicting postoperative ventricular shunt risk, especially significantly improving prediction accuracy in small sample data environments, and can more accurately identify children who need shunt.
Smart Images

Figure CN122177444A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image processing, and in particular to a method, device, medium and product for predicting the risk of postoperative ventricular shunt. Background Technology
[0002] Pediatric brain tumors are among the most common solid tumors of the central nervous system in children. Some children may develop refractory hydrocephalus or ventricular system obstruction after tumor resection, requiring shunt surgery such as ventriculoperitoneal shunt. While shunt surgery can relieve intracranial pressure, it also carries complications such as infection, duct obstruction, and over-drainage, significantly impacting the child's long-term quality of life. Therefore, accurate preoperative prediction of postoperative ventricular shunt needs is crucial for developing surgical strategies, communicating with family members, and managing follow-up care.
[0003] Current research often relies on single image sequences or a small number of structured clinical indicators to establish traditional statistical models or simple machine learning models, which have the following shortcomings.
[0004] (1) Insufficient utilization of multimodal information: The tumor features and hydrocephalus information contained in multimodal magnetic resonance imaging (MRI) such as T1, T1 contrast enhancement, T2, and FLAIR were not fully integrated.
[0005] (2) Coarse spatial alignment and brain tissue extraction: Insufficient geometric alignment between different modalities, and interference of skull and non-brain structure signals with model learning.
[0006] (3) Insufficient modeling of local spatial patterns of tumors: It is difficult to depict the complex three-dimensional structural relationships such as tumor morphology and compression of surrounding brain tissue through simple manual features.
[0007] (4) Clinical text information is not systematically utilized: Unstructured texts such as medical records and chief complaint descriptions are often not included in the model.
[0008] (5) Pathological priors were not explicitly modeled: The relationship between different tumor pathological types and postoperative triage requirements was not incorporated into the model.
[0009] (6) Extreme class imbalance: There are relatively few children who actually need shunting after surgery, which makes the model prone to predicting "no need for shunting".
[0010] Therefore, there is an urgent need for a comprehensive prediction method that integrates multimodal 3D MRI, tumor mask, structured clinical variables, clinical text and pathological prior information within a unified physical space, and effectively handles the class imbalance problem based on a deep learning model, thereby improving the accuracy and clinical usability of postoperative ventricular shunt risk prediction. Summary of the Invention
[0011] The purpose of this application is to provide a method, device, medium, and product for predicting postoperative ventricular shunt risk, so as to improve the accuracy of postoperative ventricular shunt risk prediction.
[0012] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a method for predicting postoperative ventricular shunt risk, including: The system acquires case data of the target child; the case data includes multimodal three-dimensional magnetic resonance imaging, tumor segmentation masks, and clinical information; wherein, the multimodal three-dimensional magnetic resonance imaging includes T1 images, T1 contrast-enhanced images, T2 images, and FLAIR sequences; the tumor segmentation mask, the T1 images, the T1 contrast-enhanced images, the T2 images, and the FLAIR sequences all contain affine matrices for mapping voxel coordinates to physical space; the clinical information includes structured clinical variables, unstructured clinical text, and pathological prior information; Based on the affine matrix, the multimodal three-dimensional magnetic resonance image is subjected to affine transformation, resampling, and desquamation to obtain a desquamated multimodal three-dimensional magnetic resonance image. Based on the tumor segmentation mask and the multimodal three-dimensional magnetic resonance image after craniotomy, the global feature vector and local feature vector of the tumor are determined using a neural network based on an attention mechanism. Structured clinical variables, unstructured clinical text, and pathological prior information are preprocessed and encoded to obtain clinical feature vectors, text feature vectors, and pathological prior features. The clinical feature vectors and text feature vectors are then fused to obtain a clinical-text feature vector. Based on the global tumor feature vector, the local tumor feature vector, the clinical-text feature vector, and the pathological prior features, the postoperative ventricular shunt risk prediction model is used to obtain the postoperative ventricular shunt probability of the target child; wherein, the postoperative ventricular shunt risk prediction model is obtained by training a multilayer perceptron classification network or support vector machine using a training dataset and employing binary cross-entropy loss or focus loss with class weights.
[0013] In one embodiment, based on the affine matrix, the multimodal three-dimensional magnetic resonance image is subjected to affine transformation, resampling, and craniotomy to obtain a craniotomy-reduced multimodal three-dimensional magnetic resonance image, specifically including: Based on the multimodal three-dimensional magnetic resonance image, the corresponding affine matrix is used to unify it onto the physical space and voxel grid of the reference mode through affine transformation and resampling, thereby obtaining the transformed multimodal three-dimensional magnetic resonance image. Based on the brain mask, the transformed multimodal three-dimensional magnetic resonance images are subjected to craniotomy to obtain craniotomy-removed multimodal three-dimensional magnetic resonance images; the brain mask is obtained by extracting reference modal images using a pre-trained intracranial extraction and segmentation network, and then performing threshold segmentation, morphological operations and connected component filtering.
[0014] In one embodiment, based on the multimodal three-dimensional magnetic resonance image, using the corresponding affine matrix, the image is unified to the physical space and voxel grid of the reference mode through affine transformation and resampling to obtain the transformed multimodal three-dimensional magnetic resonance image, specifically including: A magnetic resonance image of any mode is used as a reference mode magnetic resonance image, and the affine matrix corresponding to the magnetic resonance image of the reference mode is used as a reference affine matrix; a magnetic resonance image of any non-reference mode is used as a target mode magnetic resonance image, and the affine matrix corresponding to the magnetic resonance image of the target mode is used as the target mode affine matrix. Let the voxel coordinates in the voxel grid of the reference mode be (x, y, z). For each target voxel position in the magnetic resonance image of the target mode, construct homogeneous coordinates. Based on the reference affine matrix and the homogeneous coordinates, the physical coordinates of the target voxel position are obtained; Based on the physical coordinates of the target voxel position, the corresponding original voxel coordinates are calculated through the inverse transformation of the target modal affine matrix; Based on the original voxel coordinates, resampling is performed using trilinear interpolation to obtain the resampled voxel intensity, thereby obtaining the transformed multimodal three-dimensional magnetic resonance image; wherein, the discrete label data is resampled using nearest neighbor interpolation.
[0015] In one embodiment, based on the tumor segmentation mask and the decranialized multimodal three-dimensional magnetic resonance imaging, an attention-based neural network is used to determine the global tumor feature vector and the local tumor feature vector, specifically including: Based on the tumor segmentation mask, the corresponding affine matrix is used to unify the physical space and voxel grid of the reference mode through affine transformation and resampling to obtain the transformed tumor segmentation mask. The multi-category labels are folded into a binary tumor region mask, and the tumor bounding box in the transformed tumor segmentation mask is determined based on the binary tumor region mask. Based on the tumor bounding box and the multimodal three-dimensional magnetic resonance image after craniotomy, the multi-channel three-dimensional tumor region of interest is determined; The multi-channel 3D tumor region of interest is input into an attention-based neural network to extract global and local tumor feature vectors.
[0016] In one embodiment, based on the tumor bounding box and the decranialized multimodal three-dimensional magnetic resonance image, a multi-channel three-dimensional region of interest for the tumor is determined, specifically including: Using the tumor bounding box as the boundary, a three-dimensional region of interest is cropped from the decranialized multimodal three-dimensional magnetic resonance image and resampled into a voxel mesh of a set size to obtain the resampled multimodal three-dimensional region of interest. The resampled multimodal three-dimensional regions of interest are stacked by channel and superimposed with a one-channel tumor mask to form an initial multi-channel three-dimensional tumor region of interest. The initial multi-channel three-dimensional tumor region of interest is linearly normalized to obtain the multi-channel three-dimensional tumor region of interest.
[0017] In one embodiment, structured clinical variables, unstructured clinical text, and pathological prior information are preprocessed and encoded respectively to obtain clinical feature vectors, text feature vectors, and pathological prior features. The clinical feature vectors and text feature vectors are then fused to obtain a clinical-text feature vector, specifically including: The structured clinical variables are processed for missing values and standardized to obtain clinical feature vectors; For the unstructured clinical text, a pre-trained PubMedBERT text encoding model was used to determine the text feature vector; In the pathological prior information, tumors with the pathological type of medulloblastoma are marked as 1, and non-medulloblastomas are marked as 0, thus obtaining the pathological prior features; The clinical feature vector and the text feature vector are concatenated and input into one or more linear transformation and nonlinear activation units to obtain the clinical-text feature vector.
[0018] In one embodiment, based on the global tumor feature vector, the local tumor feature vector, the clinical-text feature vector, and the prior pathological features, a postoperative ventricular shunt risk prediction model is used to obtain the postoperative ventricular shunt probability of the target child, specifically including: The global tumor feature vector, the local tumor feature vector, the clinical-text feature vector, and the pathological prior features are concatenated to obtain a multimodal fusion feature; Based on the multimodal fusion features, the postoperative ventricular shunt risk prediction model is used to obtain the postoperative ventricular shunt probability of the target child.
[0019] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method for predicting the risk of postoperative ventriculoperitoneal shunt.
[0020] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for predicting the risk of postoperative ventriculoperitoneal shunt.
[0021] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for predicting the risk of postoperative ventricular shunt.
[0022] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a method, device, medium, and product for predicting postoperative ventricular shunt risk. It acquires case data of target children; the case data includes multimodal three-dimensional magnetic resonance imaging (MRI), tumor segmentation masks, and clinical information; wherein the multimodal MRI images include T1 images, T1-contrast-enhanced images, T2 images, and FLAIR sequences, along with corresponding affine matrices; the clinical information includes structured clinical variables, unstructured clinical text, and prior pathological information; based on the affine matrix, the multimodal MRI images undergo affine transformation, resampling, and craniotomy to obtain craniotomy-reduced multimodal MRI images; according to the tumor... Multimodal 3D magnetic resonance imaging (MRI) images after tumor segmentation masking and craniotomy are used. An attention-based neural network is employed to determine the global and local tumor feature vectors. Structured clinical variables, unstructured clinical text, and prior pathological information are preprocessed and encoded to obtain clinical feature vectors, text feature vectors, and prior pathological features. The clinical and text feature vectors are then fused to obtain a clinical-text feature vector. Based on the global tumor feature vector, local tumor feature vector, clinical-text feature vector, and prior pathological features, a postoperative ventricular shunt risk prediction model is used to obtain the postoperative ventricular shunt probability of the target child. This method for predicting postoperative ventricular shunt risk integrates multimodal 3D MRI images, tumor masking, structured clinical variables, clinical text, and prior pathological information. It also effectively addresses class imbalance issues using a multilayer perceptron classification network, thereby improving the accuracy of postoperative ventricular shunt risk prediction. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A flowchart illustrating a method for predicting postoperative ventricular shunt risk, provided as an embodiment of this application; Figure 2 A framework diagram of a postoperative ventricular shunt risk prediction method provided in an embodiment of this application; Figure 3 These are before-and-after photos showing the removal of the skull. Figure 4 For heatmaps; Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] In one exemplary embodiment, Figure 1 This is a flowchart illustrating a method for predicting the risk of postoperative ventricular shunt. Figure 2 This describes the complete data flow from the normalized data to the final output prediction, such as... Figure 1 and Figure 2 As shown, a method for predicting postoperative ventricular shunt risk is provided, including the following steps: S1: Acquire the case data of the target child; the case data includes multimodal three-dimensional magnetic resonance imaging, tumor segmentation mask, and clinical information; wherein, the multimodal three-dimensional magnetic resonance imaging includes T1 images, T1 contrast-enhanced images, T2 images, and FLAIR sequences; the tumor segmentation mask, the T1 images, the T1 contrast-enhanced images, the T2 images, and the FLAIR sequences all contain affine matrices for mapping voxel coordinates to physical space; the clinical information includes structured clinical variables, unstructured clinical text, and pathological prior information.
[0028] Structured clinical variables include, but are not limited to, the child's age, sex, duration of symptoms, edema severity indicators, hydrocephalus-related indices (such as Evans index, FOHR, etc.), preoperative tumor volume, and other laboratory and imaging quantitative indicators.
[0029] S2: Based on the affine matrix, perform affine transformation, resampling, and desquamation on the multimodal three-dimensional magnetic resonance image to obtain a desquamated multimodal three-dimensional magnetic resonance image.
[0030] In this embodiment, multimodal 3D MRI images such as T1 images, T1 contrast-enhanced images, T2 images, and FLAIR sequences are unified to the same physical space and voxel grid through affine transformation and resampling. The brain mask is obtained by calling the intracranial extraction network, and the skull is removed from each modality of images to filter out non-brain tissue signal interference.
[0031] In one embodiment, S2 specifically includes: S21: Based on the multimodal three-dimensional magnetic resonance image, using the corresponding affine matrix, the image is unified to the physical space and voxel grid of the reference mode through affine transformation and resampling to obtain the transformed multimodal three-dimensional magnetic resonance image.
[0032] In one embodiment, S21 specifically includes: S211: Take any modal magnetic resonance image as the reference modal magnetic resonance image, and take the affine matrix corresponding to the reference modal magnetic resonance image as the reference affine matrix; take any non-reference modal magnetic resonance image as the target modal magnetic resonance image, and take the affine matrix corresponding to the target modal magnetic resonance image as the target modal affine matrix.
[0033] In this embodiment, the T1 image is selected as the reference mode, and its affine matrix is read as the reference affine matrix A_ref.
[0034] S212: Let the voxel coordinates in the voxel grid of the reference mode be (x, y, z). For each target voxel position in the magnetic resonance image of the target mode, construct homogeneous coordinates.
[0035] In this embodiment, homogeneous coordinates p=(x, y, z, 1)^T are constructed for each target voxel position in other modalities.
[0036] S213: Based on the reference affine matrix and the homogeneous coordinates, obtain the physical coordinates of the target voxel position.
[0037] In this embodiment, the physical coordinates p_phys=A_ref·p are obtained from the reference affine matrix.
[0038] S214: Calculate the original voxel coordinates based on the physical coordinates of the target voxel position through the inverse transformation of the target modal affine matrix.
[0039] In this embodiment, the original voxel coordinates p_orig=A_m^{-1}·p_phys are calculated by inverse transformation of the target modal affine matrix.
[0040] S215: Based on the original voxel coordinates, resampling is performed using trilinear interpolation to obtain the resampled voxel intensity, thereby obtaining the transformed multimodal three-dimensional magnetic resonance image; wherein, the discrete label data is resampled using nearest neighbor interpolation.
[0041] In this embodiment, the voxel intensity after resampling is obtained by trilinear interpolation; the discrete label data is resampled using nearest neighbor interpolation to ensure the consistency and integrity of the labels.
[0042] S22: Based on the brain mask, the transformed multimodal three-dimensional magnetic resonance image is subjected to desquamation processing to obtain a desquamated multimodal three-dimensional magnetic resonance image; the brain mask is obtained by extracting the reference modality image using a pre-trained intracranial extraction and segmentation network, and then performing threshold segmentation, morphological operations and connected component filtering.
[0043] In this embodiment, the pre-trained intracranial extraction and segmentation network is a three-dimensional encoder-decoder segmentation network, preferably a brain tissue segmentation model based on the nnU-Net framework, and the acquisition of the brain mask includes threshold segmentation of the brain tissue probability map, morphological closing operation, and maximum connected component screening.
[0044] A reference modal image (MRI image of the reference modality) is input into a pre-trained intracranial extraction and segmentation network to obtain a brain tissue probability map. The brain tissue probability map is binarized by setting a threshold, morphological closure operations are performed to fill small holes, and maximum connected component filtering is used to remove small non-brain tissue fragments, resulting in a refined brain mask. This brain mask is then used to perform a dot product operation on the transformed multimodal 3D MRI image, preserving brain tissue regions and suppressing skull and soft tissue signals, thus achieving skull removal.
[0045] S3: Based on the tumor segmentation mask and the multimodal three-dimensional magnetic resonance image after craniotomy, the global feature vector and local feature vector of the tumor are determined using a neural network based on an attention mechanism.
[0046] In one embodiment, S3 specifically includes: S31: Based on the tumor segmentation mask, using the corresponding affine matrix, the transformed tumor segmentation mask is obtained by unifying the physical space and voxel grid of the reference mode through affine transformation and resampling.
[0047] In this embodiment, for the tumor segmentation mask, its independent affine matrix is first read, and then the tumor segmentation mask is resampled to the reference modal grid using the same affine transformation and nearest neighbor interpolation as in S2, resulting in a binary tumor mask aligned with the de-cranial image (the transformed tumor segmentation mask). If there are multiple categories of labels in the original mask, all tumor-related labels can be folded into a single tumor region label.
[0048] S32: Fold the multi-category labels into a binary tumor region mask, and determine the tumor bounding box in the transformed tumor segmentation mask based on the binary tumor region mask.
[0049] In this embodiment, the tumor segmentation mask is resampled to a reference modal mesh, and multi-category cancerous regions are folded into a unified tumor label. By traversing the voxel indices with a value of 1 in the tumor segmentation mask, the minimum and maximum indices are calculated in three directions to obtain the minimum bounding box of the tumor. Then, a predetermined number of voxels Δx, Δy, and Δz are expanded in the x, y, and z directions to include the tumor and its surrounding compressed brain tissue, resulting in the tumor bounding box (i.e., the expanded bounding box).
[0050] S33: Based on the tumor bounding box and the multimodal three-dimensional magnetic resonance image after craniotomy, determine the multi-channel three-dimensional tumor region of interest.
[0051] In one embodiment, S33 specifically includes: S331: Using the tumor bounding box as the boundary, a three-dimensional region of interest is cropped from the decranialized multimodal three-dimensional magnetic resonance image, and then resampled into a voxel grid of a set size to obtain the resampled multimodal three-dimensional region of interest.
[0052] In this embodiment, a three-dimensional region of interest is cropped from the multimodal three-dimensional magnetic resonance image after skull removal, using the extended bounding box as the boundary, and then resampled into a voxel mesh of a set size (e.g., 64×64×64).
[0053] S332: Stack the resampled multimodal three-dimensional regions of interest by channel and overlay a one-channel tumor mask to form an initial multi-channel three-dimensional tumor region of interest, I_ROI∈R^{C×64×64×64}, where C represents the number of channels.
[0054] S333: Perform linear normalization on the initial multi-channel three-dimensional tumor region of interest to obtain the multi-channel three-dimensional tumor region of interest.
[0055] In this embodiment, for each modal channel, the influence of extreme values is eliminated by quantile truncation, and linear normalization is performed according to I'=(clip(I_ROI, p_low, p_high)-μ) / ε to obtain a numerically stable input, namely the multi-channel three-dimensional tumor region of interest, where p_low and p_high are the low and high quantiles, and μ and ε are the mean and standard deviation within the channel.
[0056] S34: Input the multi-channel three-dimensional tumor region of interest into an attention-based neural network to extract global tumor feature vectors and local tumor feature vectors.
[0057] In one embodiment, a whole-brain multi-scale coding enhancement strategy is introduced.
[0058] First, the craniotomized multimodal 3D MRI images and tumor segmentation masks are resampled onto a unified 3D voxel grid to construct a fixed-size multi-channel input I_full. This input is then fed into the encoder E_full of a self-attention-based encoder-decoder 3D segmentation network (an attention-based neural network), preferably using a structure such as SwinUNETR, to obtain multi-level feature maps {F_l}. The encoder of the self-attention-based encoder-decoder 3D segmentation network extracts multi-scale features from local to global through a hierarchical Transformer module, and then performs step-by-step upsampling through the decoder to restore the original resolution.
[0059] In the self-attention module of the network, a low-rank adaptive update W'_q = W_q + A_q B_q is introduced for the original query weight matrix W_q ∈ R^{d×d}, where A_q ∈ R^{d×r} and B_q ∈ R^{r×d}. A_q and B_q are low-rank matrices of rank r (r is much smaller than dimension d). Only A_q, B_q, and the segmentation head parameters are trained, while W_q, key weights, value weights, and most convolutional layer parameters are kept frozen. This low-rank adaptive strategy can quickly fine-tune the pre-trained model with a small number of parameters, adapting to the feature distribution of pediatric brain tumor data.
[0060] After completing tumor segmentation fine-tuning and reaching a preset performance threshold, the LoRA-tuned encoder parameters are frozen. A high-level semantic layer F_L is selected in the multi-level feature map, and global average pooling is performed on the encoder's high-level semantic layer feature map to obtain the global tumor feature vector h_global. Simultaneously, mask pooling is performed within the upsampled mask region to obtain the local tumor feature vector h_tumor_full.
[0061] S4: Preprocess and encode the structured clinical variables, unstructured clinical text, and pathological prior information respectively to obtain clinical feature vectors, text feature vectors, and pathological prior features, and then fuse the clinical feature vectors and the text feature vectors to obtain the clinical-text feature vector.
[0062] In one embodiment, S4 specifically includes: S41: Perform missing value processing and standardization on the structured clinical variables to obtain the clinical feature vector.
[0063] For structured clinical variables such as age, gender, symptom duration, edema indicators, hydrocephalus-related indices (such as Evans index, FOHR, etc.), and preoperative tumor volume, missing values were handled by means imputation and outlier removal, and standardized uniformly. Each variable v was processed by v'=(v-μ_v) / σ_v to form a structured clinical feature vector (i.e., the clinical feature vector in S41) h_clin, where μ_v is the sample mean of variable v in the training set; σ_v is the sample standard deviation of variable v in the training set.
[0064] S42: For the unstructured clinical text, a pre-trained PubMedBERT text encoding model is used to determine the text feature vector.
[0065] Unstructured clinical texts such as chief complaints and present medical history in electronic medical records are cleaned and desensitized before being input into a pre-trained PubMedBERT text encoding model in the medical field. A fixed-length text vector (i.e., the text feature vector in S42) h_text is obtained by using the hidden state of the [CLS] marker position or the average pooling strategy.
[0066] S43: In the pathological prior information, tumor pathological types of medulloblastoma are marked as 1, and non-medulloblastoma is marked as 0, to obtain the pathological prior feature h_path, h_path∈R.
[0067] S44: Concatenate the clinical feature vector with the text feature vector and input the concatenation into one or more linear transformation and nonlinear activation units to obtain the clinical-text feature vector h_ct, h_ct= (W_ct·[h_clin;h_text]+b_ct), where, is a non-linear activation function, and W_ct and b_ct are learnable parameters.
[0068] S5: Based on the global tumor feature vector, the local tumor feature vector, the clinical-text feature vector, and the pathological prior features, the postoperative ventricular shunt risk prediction model is used to obtain the postoperative ventricular shunt probability of the target child; wherein, the postoperative ventricular shunt risk prediction model is obtained by training a multilayer perceptron classification network or support vector machine using a training dataset and employing binary cross-entropy loss or focus loss with class weights.
[0069] In one embodiment, S5 specifically includes: S51: The global tumor feature vector, the local tumor feature vector, the clinical-text feature vector, and the pathological prior features are concatenated to obtain multimodal fusion features.
[0070] S52: Based on the multimodal fusion features, the postoperative ventricular shunt risk prediction model is used to obtain the postoperative ventricular shunt probability of the target child.
[0071] In this embodiment, the global tumor feature vector h_global, the local tumor feature vector h_tumor_full, the clinical-text feature vector h_ct, and the pathological prior feature h_path are concatenated and then input into the classification network to predict the probability of postoperative ventricular shunt, thereby achieving multi-scale fusion of whole-brain and local information.
[0072] In this embodiment, VPS classification is finally performed using multimodal feature fusion and imbalanced learning: The global tumor feature vector h_global, the local tumor feature vector h_tumor_full, the clinical-text feature vector h_ct, and the pathological prior feature h_path are concatenated to obtain the multimodal fusion feature h_all, which is then input into a multilayer perceptron classification network f(·). The multilayer perceptron classification network consists of several fully connected layers and nonlinear activation functions, and its output scalar z, after passing through the sigmoid function σ(z)=1 / (1+e^{-z}), becomes the postoperative ventricular shunt probability p. During training, binary cross-entropy loss L_BCE and / or focal loss L_FL with class weights are used to assign higher weights to minority class samples that "need shunt," and oversampling of minority class samples is performed during the sample construction stage to balance the number of positive and negative samples. Model stability was evaluated using K-fold cross-validation. ROC and PR curves were plotted, and the receiver operating characteristic (ROC-AUC), precision-recall (PR-AUC), sensitivity, specificity, and accuracy were calculated to comprehensively evaluate model performance. The ROC curve was plotted with false positive rate on the x-axis and true positive rate on the y-axis, while the PR curve was plotted with recall on the x-axis and precision on the y-axis. Based on the principle of optimal comprehensive indicators on the validation set, a probability threshold τ was determined. During the inference phase, a prediction result regarding whether postoperative ventriculoperitoneal shunt is recommended was given based on this threshold. The output probability was compared with the probability threshold; if p ≥ τ, it was determined that "postoperative ventriculoperitoneal shunt is needed"; otherwise, it was determined that "ventriculoperitoneal shunt is not needed."
[0073] The binary cross-entropy loss with class weights is L_BCE = -w_pos·y·log(p) - w_neg·(1-y)·log(1-p), where y∈{0,1} represents the true label, y=1 indicates that ventriculoperitoneal shunt is required after surgery, y=0 indicates that ventriculoperitoneal shunt is not required after surgery, and w_pos and w_neg are the positive and negative class weights, respectively.
[0074] The focus loss L_FL = -α·(1-p)^γ·y·log(p) - (1-α)·p^γ·(1-y)·log(1-p), where α is the balancing factor and γ is the exponential hyperparameter that adjusts the difficulty of the samples.
[0075] Correspondingly, a linear support vector machine classifier was trained simultaneously. Using the same input feature vectors as the multilayer perceptron, z-score normalization was first performed on the training set, and then the linear kernel support vector machine was trained in the normalized feature space.
[0076] Given the high class imbalance, enabling the `class_weight="balanced"` option assigns higher weights to the minority classes in the classification margin. To obtain the probability output for plotting the ROC curve, Platt probability calibration (CalibratedClassifierCV, using sigmoid with inner 3-fold cross-validation) is applied to the decision function.
[0077] The outer layer still uses the same 5-fold hierarchical cross-validation scheme as MLP: in each fold, standardized parameters, SVM and probabilistic calibration model are fitted with training set data, the predicted probability of VPS occurrence is obtained on the validation set, and performance indicators such as AUC-ROC and AUC-PR are calculated. Finally, the 5-fold mean and standard deviation are reported.
[0078] Compared to conventional prediction methods (which typically rely on big data), the postoperative ventricular shunt risk prediction method proposed in this application can still significantly improve the prediction accuracy of postoperative ventricular shunt even in a test environment with small sample data.
[0079] In another embodiment, this application also provides a postoperative ventricular shunt risk prediction system, comprising: The data acquisition module is used to acquire multimodal three-dimensional magnetic resonance images, tumor segmentation masks, and clinical information, and to read the affine matrix of each image.
[0080] The image preprocessing module is used to perform geometric alignment and resampling of each modality image based on the affine matrix, unify it to the physical space and voxel grid of the reference modality, and call the intracranial extraction and segmentation network to generate a brain mask to perform de-skeletalization processing on each modality image.
[0081] The tumor processing module is used to resample the tumor segmentation mask to the reference modal mesh, generate a binary tumor mask, calculate the tumor bounding box and tumor volume, and construct a fixed-size three-dimensional tumor region of interest in a unified coordinate system.
[0082] The image feature extraction module is used to input multi-channel three-dimensional tumor region of interest images into an attention-based neural network encoder, and output global tumor feature vectors and local tumor feature vectors.
[0083] The clinical information processing module is used to standardize structured clinical variables, encode unstructured clinical text, synthesize clinical-text feature vectors, and generate pathological prior features based on pathological results.
[0084] The risk assessment module is used to fuse global tumor feature vectors, local tumor feature vectors, clinical-text feature vectors, and pathological prior features, and outputs the postoperative ventricular shunt probability through a multilayer perceptron classification network.
[0085] As an optional implementation, it also includes a whole-brain coding module for obtaining multi-scale features of the whole brain based on a three-dimensional segmentation network encoder and low-rank adaptive parameters, and performing risk assessment together with the aforementioned features.
[0086] The postoperative ventricular shunt risk prediction method of this application has the following beneficial effects: (1) Unified physical space multimodal image depth modeling: By unifying multimodal 3D MRI through affine matrices and combining intracranial extraction to eliminate interference from the skull and non-brain tissues, a consistent and clean input is provided for subsequent local tumor modeling and whole-brain coding, avoiding feature bias caused by geometric mismatch between different modalities. For example... Figure 3 The image shown is a typical MRI visualization after craniotomy, with the middle layer selected for contrast, preserving the brain parenchyma. Raw (slice=12) represents the original image of the 12th slice in the image sequence, and Brain (resampled) (slice=12) represents the brain image after resampling the 12th slice in the image sequence.
[0087] (2) Extraction of three-dimensional depth features for local tumor sites: By aligning tumor segmentation masks and cropping ROIs, the model focuses on the tumor and its surrounding tissues. It uses an attention-based neural network to capture complex spatial patterns, which has a stronger representational ability than simple manual volume or diameter features. This helps to characterize tumor morphology, tumor-ventricle relationship, and the degree of compression on surrounding brain tissue.
[0088] (3) Joint modeling of structured clinical data, clinical texts, and pathological priors: By using a unified vector representation to integrate traditional interpretable structured variables, clinical text information, and important pathological priors with image features, we can achieve multimodal collaborative decision-making between image, clinical, and pathology, which is more in line with the real clinical thinking process while retaining a certain degree of interpretability.
[0089] (4) Robust learning strategies for extremely imbalanced data: By employing a weighted loss function, focus loss, and minority class oversampling strategy, the problem of the number of cases requiring triage being far lower than the number of cases not requiring triage is effectively alleviated, the model's ability to identify minority classes is improved, recall and PR-AUC are enhanced, and the detection rate of high-risk children is optimized while ensuring overall accuracy.
[0090] (5) A scalable whole-brain multi-scale coding framework: Furthermore, a self-attention-based 3D segmentation network and a low-rank adaptive training strategy are introduced to achieve efficient fine-tuning with limited samples. Global and tumor region features are utilized to further improve prediction performance, providing room for expansion of subsequent upgrade schemes on larger samples and multi-center datasets. The LoRA-style low-rank update significantly reduces the number of parameters requiring training, facilitating model adaptation under limited computing power. Figure 4 The heatmap shows the level of attention paid to characteristic regions of the whole brain.
[0091] (6) The project is simple to implement and easy to deploy: The postoperative ventriculoperitoneal shunt risk prediction method of this application can be implemented on a conventional GPU server. Utilizing a standard deep learning framework and pre-trained model, it is easy to integrate into hospital imaging workstations or independent decision support systems, demonstrating good applicability.
[0092] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described postoperative ventriculoperitoneal shunt risk prediction method.
[0093] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described postoperative ventriculoperitoneal shunt risk prediction method.
[0094] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described postoperative ventricular shunt risk prediction method.
[0095] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 5As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for predicting the risk of postoperative ventriculoperitoneal shunt.
[0096] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0097] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0098] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0099] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0101] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for predicting the risk of postoperative ventricular shunt, characterized in that, include: The system acquires case data of the target child; the case data includes multimodal three-dimensional magnetic resonance imaging, tumor segmentation masks, and clinical information; wherein, the multimodal three-dimensional magnetic resonance imaging includes T1 images, T1 contrast-enhanced images, T2 images, and FLAIR sequences; the tumor segmentation mask, the T1 images, the T1 contrast-enhanced images, the T2 images, and the FLAIR sequences all contain affine matrices for mapping voxel coordinates to physical space; the clinical information includes structured clinical variables, unstructured clinical text, and pathological prior information; Based on the affine matrix, the multimodal three-dimensional magnetic resonance image is subjected to affine transformation, resampling, and desquamation to obtain a desquamated multimodal three-dimensional magnetic resonance image. Based on the tumor segmentation mask and the multimodal three-dimensional magnetic resonance image after craniotomy, the global feature vector and local feature vector of the tumor are determined using a neural network based on an attention mechanism. Structured clinical variables, unstructured clinical text, and pathological prior information are preprocessed and encoded to obtain clinical feature vectors, text feature vectors, and pathological prior features. The clinical feature vectors and text feature vectors are then fused to obtain a clinical-text feature vector. Based on the global tumor feature vector, the local tumor feature vector, the clinical-text feature vector, and the pathological prior features, the postoperative ventricular shunt risk prediction model is used to obtain the postoperative ventricular shunt probability of the target child; wherein, the postoperative ventricular shunt risk prediction model is obtained by training a multilayer perceptron classification network or support vector machine using a training dataset and employing binary cross-entropy loss or focus loss with class weights.
2. The method for predicting postoperative ventricular shunt risk according to claim 1, characterized in that, Based on the affine matrix, the multimodal three-dimensional magnetic resonance image is subjected to affine transformation, resampling, and craniotomy to obtain a craniotomy-reduced multimodal three-dimensional magnetic resonance image, specifically including: Based on the multimodal three-dimensional magnetic resonance image, the corresponding affine matrix is used to unify it onto the physical space and voxel grid of the reference mode through affine transformation and resampling, thereby obtaining the transformed multimodal three-dimensional magnetic resonance image. Based on the brain mask, the transformed multimodal three-dimensional magnetic resonance images are subjected to craniotomy to obtain craniotomy-removed multimodal three-dimensional magnetic resonance images; the brain mask is obtained by extracting reference modal images using a pre-trained intracranial extraction and segmentation network, and then performing threshold segmentation, morphological operations and connected component filtering.
3. The method for predicting postoperative ventricular shunt risk according to claim 2, characterized in that, Based on the multimodal 3D magnetic resonance image, using the corresponding affine matrix, the image is unified to the physical space and voxel grid of the reference mode through affine transformation and resampling to obtain the transformed multimodal 3D magnetic resonance image, specifically including: A magnetic resonance image of any mode is used as a reference mode magnetic resonance image, and the affine matrix corresponding to the magnetic resonance image of the reference mode is used as a reference affine matrix; a magnetic resonance image of any non-reference mode is used as a target mode magnetic resonance image, and the affine matrix corresponding to the magnetic resonance image of the target mode is used as the target mode affine matrix. Let the voxel coordinates in the voxel grid of the reference mode be (x, y, z). For each target voxel position in the magnetic resonance image of the target mode, construct homogeneous coordinates. Based on the reference affine matrix and the homogeneous coordinates, the physical coordinates of the target voxel position are obtained; Based on the physical coordinates of the target voxel position, the corresponding original voxel coordinates are calculated through the inverse transformation of the target modal affine matrix; Based on the original voxel coordinates, resampling is performed using trilinear interpolation to obtain the resampled voxel intensity, thereby obtaining the transformed multimodal three-dimensional magnetic resonance image; wherein, the discrete label data is resampled using nearest neighbor interpolation.
4. The method for predicting postoperative ventricular shunt risk according to claim 1, characterized in that, Based on the tumor segmentation mask and the decranialized multimodal three-dimensional magnetic resonance imaging, an attention-based neural network is used to determine the global and local tumor feature vectors, specifically including: Based on the tumor segmentation mask, the corresponding affine matrix is used to unify the physical space and voxel grid of the reference mode through affine transformation and resampling to obtain the transformed tumor segmentation mask. The multi-category labels are folded into a binary tumor region mask, and the tumor bounding box in the transformed tumor segmentation mask is determined based on the binary tumor region mask. Based on the tumor bounding box and the multimodal three-dimensional magnetic resonance image after craniotomy, the multi-channel three-dimensional tumor region of interest is determined; The multi-channel 3D tumor region of interest is input into an attention-based neural network to extract global and local tumor feature vectors.
5. The method for predicting postoperative ventricular shunt risk according to claim 4, characterized in that, Based on the tumor bounding box and the decranialized multimodal three-dimensional magnetic resonance image, a multi-channel three-dimensional region of interest for the tumor is determined, specifically including: Using the tumor bounding box as the boundary, a three-dimensional region of interest is cropped from the decranialized multimodal three-dimensional magnetic resonance image and resampled into a voxel mesh of a set size to obtain the resampled multimodal three-dimensional region of interest. The resampled multimodal three-dimensional regions of interest are stacked by channel and superimposed with a one-channel tumor mask to form an initial multi-channel three-dimensional tumor region of interest. The initial multi-channel three-dimensional tumor region of interest is linearly normalized to obtain the multi-channel three-dimensional tumor region of interest.
6. The method for predicting postoperative ventricular shunt risk according to claim 1, characterized in that, Structured clinical variables, unstructured clinical text, and pathological prior information are preprocessed and encoded respectively to obtain clinical feature vectors, text feature vectors, and pathological prior features. The clinical feature vectors and text feature vectors are then fused to obtain a clinical-text feature vector, specifically including: The structured clinical variables are processed for missing values and standardized to obtain clinical feature vectors; For the unstructured clinical text, a pre-trained PubMedBERT text encoding model was used to determine the text feature vector; In the pathological prior information, tumors with the pathological type of medulloblastoma are marked as 1, and non-medulloblastomas are marked as 0, thus obtaining the pathological prior features; The clinical feature vector and the text feature vector are concatenated and input into one or more linear transformation and nonlinear activation units to obtain the clinical-text feature vector.
7. The method for predicting postoperative ventricular shunt risk according to claim 1, characterized in that, Based on the global tumor feature vector, the local tumor feature vector, the clinical-text feature vector, and the prior pathological features, the postoperative ventricular shunt risk prediction model is used to obtain the postoperative ventricular shunt probability of the target child, specifically including: The global tumor feature vector, the local tumor feature vector, the clinical-text feature vector, and the pathological prior features are concatenated to obtain a multimodal fusion feature; Based on the multimodal fusion features, the postoperative ventricular shunt risk prediction model is used to obtain the postoperative ventricular shunt probability of the target child.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the postoperative ventricular shunt risk prediction method according to any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the postoperative ventricular shunt risk prediction method according to any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the postoperative ventricular shunt risk prediction method according to any one of claims 1-7.