Artificial intelligence-based clinical prognosis evaluation method for anti-nmdar encephalitis
By combining tensor decomposition fusion and lesion-sensing diffusion filtering with dynamic convolution and gated pooling, the problem of information loss in the prognostic assessment of anti-NMDAR encephalitis was solved, achieving more efficient lesion feature extraction and accurate prognostic assessment.
Patent Information
- Application Number
- CN202510972704.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-07-15
AI Technical Summary
Existing technologies for clinical prognostic assessment of NMDAR encephalitis suffer from problems such as coarse multimodal fusion, lesion feature degradation, model initialization mismatch, and rigid pooling mechanisms, resulting in the loss of key cross-information and low feature extraction efficiency, making it difficult to meet the clinical needs of early intervention.
We employ a combination of tensor decomposition fusion strategy, lesion-sensing anisotropic diffusion filtering, dynamic convolution module, spatial feature decoupling module, and gated pooling module. By preserving cross-modal spatial correlation through low-rank constraints, selecting lesion-sensitive features by utilizing the sparsity constraints of the factor matrix, and combining gradient field-guided diffusion filtering mechanism and adaptive gated pooling mechanism, we enhance the extraction of lesion-related features.
It effectively preserves the edge information of anti-NMDAR encephalitis lesions, improves the accuracy and timeliness of prognostic assessment, overcomes the problems of lesion blurring and information loss in traditional methods, and achieves more efficient lesion feature extraction and classification.
Smart Images

Figure CN120766939B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and data processing technology, specifically relating to an artificial intelligence-based clinical prognostic assessment method for anti-NMDAR encephalitis. Background Technology
[0002] Anti-NMDAR encephalitis, an acute progressive autoimmune encephalitis, exhibits highly heterogeneous clinical manifestations (such as behavioral abnormalities, epilepsy, and motor disorders) and rapid disease progression. Accurate prognostic assessment is crucial for developing individualized immunotherapy and intensive care plans, directly impacting the patient's neurological recovery and survival rate. However, traditional assessment methods heavily rely on physician experience and single biomarkers (such as cerebrospinal fluid antibody titers), lacking the ability to dynamically integrate multi-dimensional clinical data (imaging, laboratory indicators, medical records, etc.). This results in highly subjective predictions and delayed timeliness, failing to meet the clinical needs for early intervention. Especially in critical scenarios such as prognostic stratification and relapse risk warning for critically ill patients, existing methods have significant blind spots, necessitating the use of intelligent technologies to overcome assessment bottlenecks.
[0003] Although artificial intelligence has made progress in prognostic models in fields such as oncology, existing technologies face the following problems when applied to NMDAR encephalitis: Coarse-grained multimodal fusion: Conventional splicing or averaging fusion strategies ignore the spatial-temporal correlations between MRI lesions, EEG rhythms, and serum markers in encephalitis, leading to the loss of crucial cross-cutting information; Lesion feature degradation: Isotropic filtering excessively smooths the edges of small inflammatory lesions (such as marginal gyral edema) during denoising, weakening the discriminative power of radiomics features; Model initialization mismatch: Random initialization of convolutional kernels struggles to adapt to the spatial heterogeneity of encephalitis lesions (such as morphological differences between basal ganglia and cortical lesions), reducing feature extraction efficiency; Rigid pooling mechanism: Homogeneous pooling operations fail to preferentially preserve the fine structural features of lesion edges, resulting in the loss of key classification information. These shortcomings collectively limit the model's analytical capabilities in the complex pathological characterization of anti-NMDAR encephalitis, necessitating the development of a dedicated technical framework for lesion perception. Summary of the Invention
[0004] To achieve the above objectives, the present invention employs the following technical solution:
[0005] This invention provides an artificial intelligence-based clinical prognostic assessment method for anti-NMDAR encephalitis, comprising the following steps:
[0006] S1. Acquire the patient's multimodal neuroimaging data;
[0007] S2. Tensor decomposition and fusion strategy is used to perform fusion preprocessing on multimodal neural image data. Cross-modal spatial correlation is preserved by low-rank constraint to obtain the fused output tensor.
[0008] S3. By performing lesion-sensing anisotropic diffusion filtering on the fused output tensor, the diffusion-filtered output image is obtained;
[0009] S4. Construct a clinical prognostic assessment model for anti-NMDAR encephalitis, the model including a dynamic convolution module, a spatial feature decoupling module, a gated pooling module and a fully connected classifier; the output image after diffusion filtering is input into the clinical prognostic assessment model for anti-NMDAR encephalitis for training, and the Adam adaptive optimizer is used to optimize the training process to finally obtain a trained model.
[0010] S5. Input the output image after diffusion filtering to be evaluated into the trained model to obtain the evaluation classification result.
[0011] Furthermore, step S1 specifically includes:
[0012] Multimodal neuroimaging data of patients were acquired using a magnetic resonance imaging system. The multimodal neuroimaging data was manually labeled, with labeling categories including good prognosis and poor prognosis. The multimodal neuroimaging data included T1-weighted sequences, T2-weighted sequences, and FLAIR sequences, and was stored in DICOM format. Cross-modal registration technology was used to align the three types of sequences to the MNI152 standard space, ultimately generating three-dimensional image data with consistent spatial dimensions.
[0013] Three-dimensional image data with consistent spatial dimensions are defined as four-dimensional image tensors. including height ,width ,depth and number of modes Four dimensions.
[0014] Furthermore, step S2 specifically includes:
[0015] S21. Tensor Decomposition and Fusion: Feature fusion is achieved by multiplying a multimodal factor matrix with a four-dimensional image tensor in a specific dimension and combining this with the residual tensor. The feature fusion operation is based on the factor matrices corresponding to the height, width, and depth dimensions, ultimately generating a fused output tensor, as shown in the following formula:
[0016] ,
[0017] in, This represents the output tensor after fusion; This represents the tensor product operation modulo n. ; The factor matrix represents the first-dimensional space, corresponding to the height dimension of the four-dimensional image tensor; The factor matrix represents the second-dimensional space, corresponding to the width dimension of the four-dimensional image tensor; The factor matrix represents the third dimension of the space, corresponding to the depth dimension of the four-dimensional image tensor; Represents the residual tensor;
[0018] S22. Optimize the factor matrix: Solve the factor matrix by minimizing the reconstruction error and applying sparsity constraints. The solution process uses the Frobenius norm to control the difference between the original image tensor and the fused output tensor, and uses the L21 norm of the factor matrix to achieve row sparsity. The sparsity control coefficient is used to adjust the intensity of lesion region feature selection.
[0019] Furthermore, step S3 specifically includes:
[0020] S31. Based on the lesion probability map generated by the pre-trained U-Net model, the original gradient magnitude tensor is weighted and enhanced. The gradient amplification intensity of the lesion region is adjusted using the edge enhancement coefficient to generate an enhanced gradient magnitude tensor, as shown in the following formula:
[0021] ,
[0022] in, This represents the fused gradient magnitude tensor; Represents the spatial gradient operator; Represents the probability map of lesions; Indicates the edge enhancement coefficient; Indicates element-wise multiplication; This represents the augmentation gradient magnitude tensor; This means that the edge enhancement coefficients, which are in scalar format, are multiplied by each element of the lesion probability map, which is in matrix format.
[0023] S32. Based on the enhanced gradient magnitude tensor, a nonlinear diffusion coefficient function is constructed. The nonlinear diffusion coefficient function uses the median of the global gradient magnitude, the edge threshold parameter, and the edge sharpness parameter to calculate the diffusion coefficient value corresponding to each gradient magnitude. The formula is expressed as follows:
[0024] ,
[0025] in, The gradient magnitude variable is represented by the augmented gradient magnitude tensor. The specific value of each element in the table; Represents the median function; Indicates the edge threshold parameter; This represents the edge sharpness parameter; Represents the diffusion coefficient function;
[0026] S33. Anisotropic diffusion: Solve the diffusion equation guided by the enhancement gradient magnitude to filter the fused image. This process is carried out iteratively within the virtual diffusion time. It terminates when the maximum difference between two adjacent iterations is less than a set threshold, and finally outputs the diffused filtered image.
[0027] Furthermore, step S33 specifically includes:
[0028] Output image after diffusion filtering Solving partial differential equations numerically We obtain, during initialization, the first The output image after the diffusion filter in the next iteration Set as the output tensor after fusion Then, iterative solutions are performed, defining the discretized virtual diffusion time. And define the step size as The update is performed using the explicit Euler method, and the update method is expressed as follows:
[0029] ,
[0030] in, Indicates the first The output image after the diffusion filter in the next iteration; Indicates the first The output image after the diffusion filter in the next iteration; Indicates step size; definition The term is a mathematical model of the diffusion process. .
[0031] Furthermore, in step S4, the dynamic convolution module initializes the convolution kernel with prior knowledge of the lesion through dynamic convolution kernel parameters, and uses anisotropic depthwise separable convolution to decompose the feature extraction process along the three orthogonal directions of the x-axis, y-axis, and z-axis, and uses directional attention maps to enhance the main response of the lesion:
[0032] Dynamic convolution kernel parameter initialization: Calculate the average value of the diffused filtered images of healthy samples and diseased samples respectively to obtain the healthy template and lesion template. Subtract the lesion template from the healthy template to obtain the basic convolution kernel parameters. Calculate the sigmoid-weighted expected value of the difference between the diffused images of random healthy samples and random diseased samples, and multiply it by a scaling factor to generate a lesion difference enhancement term. Add the basic convolution kernel parameters and the lesion difference enhancement term to obtain the final convolution kernel initial parameter tensor.
[0033] Anisotropic depthwise separable convolution: Calculates the output image after diffusion filtering along the three-dimensional spatial coordinate axes. The partial derivatives are used to obtain the gradient field tensor in the corresponding direction, which characterizes the rate of change of the image in that direction. This is defined as... For along The gradient field tensor of the direction, The x, y, and z axes represent the directional variables in three-dimensional space. Using a temperature-regulated Softmax function, the sharpness of the weight distribution is controlled by the temperature parameter, transforming the gradient field tensors in the three directions into corresponding directional attention weight maps. The formula is as follows:
[0034] ,
[0035] in, express Attention weights for directions; Indicates temperature parameter; Indicates difference from The direction variables of the x-axis, y-axis, and z-axis in three-dimensional space. Representation Summation Index Traverse the three spatial directions: x-axis, y-axis, and z-axis; Indicates along Gradient field tensor of the direction; Represents the natural exponential function; applied to the diffused filtered output image along three directions respectively. The weighted input image is subjected to a one-dimensional convolution operation. Each direction uses the corresponding trainable convolution kernel parameters to generate the feature tensor output by the convolution in that direction. The feature tensors output by the convolution along the x-axis, y-axis, and z-axis are concatenated along the feature dimensions to generate a multi-directional convolution feature tensor.
[0036] Further, in step S4, the spatial feature decoupling module decouples the lesion morphological features through a 3D convolution and curvature-driven spatial attention mechanism. Specifically, it performs a three-dimensional convolution operation on the multi-directional convolution feature tensor, uses the Gaussian error linear unit activation function combined with nonlinearity, and simultaneously uses the Laplacian operator to calculate the curvature of the input features. It generates a spatial attention map through convolution adjustment and the Sigmoid function, and multiplies the multi-directional convolution feature tensor and the spatial attention map element by element to obtain the decoupled spatial feature tensor.
[0037] Further, in step S4, the gated pooling module performs gated weighted downsampling on the feature map through lesion difference-aware pooling operation to retain information of lesion-sensitive regions. Specifically, it uses the lesion template generated during the initialization stage of dynamic convolution kernel parameters to calculate the similarity between the local region of the decoupled spatial feature tensor and the lesion template; it uses a sharpness adjustment parameter to control the sharpness of the weight distribution, and combines the similarity with the feature curvature of the decoupled spatial feature tensor to generate adaptive gated weights; it uses the gated weights to weight the features of the local region of the decoupled spatial feature tensor, and then performs max pooling operation to finally obtain the pooled feature tensor.
[0038] Further, in step S4, the fully connected classifier includes a fully connected layer and an output layer to achieve dimensionality reduction and high-level abstract feature extraction. Specifically, the pooled feature tensor is flattened into a one-dimensional feature vector, which is then passed through multiple fully connected layers to finally output a compact low-dimensional feature vector. Each fully connected layer consists of trainable weights and bias parameters, and uses the ReLU non-linear activation function for feature transformation. The compact low-dimensional feature vector is then passed through the output layer to obtain the pre-evaluation classification category. The output layer is also a fully connected layer and uses the Softmax function.
[0039] Furthermore, in step S4, the cross-entropy loss function is used to measure the difference between the prognostic class probability distribution predicted by the model and the true label. The cross-entropy loss function quantifies the degree of classification error and serves as the optimization objective.
[0040] The advantages of this invention are:
[0041] This invention captures high-order information through low-rank constraints and residual tensors, preserving cross-modal spatial correlations. Simultaneously, it utilizes the sparsity constraints of the factor matrix to achieve lesion-sensitive feature selection, effectively avoiding the loss of lesion boundary information in traditional channel splicing methods. Addressing the diffuse distribution characteristics of encephalitis lesions, it employs an anisotropic diffusion filtering mechanism guided by gradient fields. Through a gradient enhancement strategy weighted by the lesion probability map, it preserves the edges of small lesions while suppressing noise, overcoming the lesion blurring problem caused by conventional isotropic filtering. Convolutional kernel initialization parameters are generated based on the differences between healthy and diseased samples, endowing the convolutional kernel with prior knowledge of lesions. By calculating the weighted expectation of the differences between healthy and diseased samples, the convolutional kernel obtains a stronger feature response in the lesion region, accelerating model convergence and avoiding the blindness of traditional random initialization. An adaptive gated pooling mechanism based on lesion template similarity is adopted. By dynamically adjusting the contribution weights of the pooling region, it strengthens the extraction of lesion-related features, enhancing feature contribution in regions with high lesion similarity and preserving details at lesion edges, overcoming the information loss problem in traditional pooling operations. Attached Figure Description
[0042] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0043] Figure 1 This is a flowchart of the steps of the method of the present invention;
[0044] Figure 2 Images of the T1-weighted sequence, T2-weighted sequence, and FLAIR sequence of this invention;
[0045] Figure 3The impact of different feature fusion methods on the accuracy of prognostic assessment;
[0046] Figure 4 This is the lesion probability map and enhancement gradient amplitude map of the present invention;
[0047] Figure 5 These are feature diagrams of the healthy template and the lesion template of the present invention;
[0048] Figure 6 This is the feature map after performing a convolution operation using the initial parameter tensor of the convolution kernel according to the present invention;
[0049] Figure 7 This is a comparison chart of the training loss for different convolutional kernel initialization methods of the present invention;
[0050] Figure 8 This demonstrates the robustness of different methods of the present invention under noisy conditions. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Example 1
[0053] In this embodiment, as Figure 1 As shown, this invention provides an artificial intelligence-based clinical prognostic assessment method for anti-NMDAR encephalitis, the specific steps of which include:
[0054] S1. Acquire the patient's multimodal neuroimaging data;
[0055] Multimodal neuroimaging data of the patient were acquired using a magnetic resonance imaging (MRI) system, including T1-weighted sequences, T2-weighted sequences, and FLAIR sequences, such as... Figure 2 As shown.
[0056] All sequences were acquired using three-dimensional whole-brain scanning. Scanning parameters were uniformly set as follows: slice thickness 1 mm, matrix size 256 × 256, voxel resolution 1 mm³, and isotropic to ensure spatial alignment. T1 sequences were acquired using fast gradient echo sequences with TR / TE = 8.2 ms / 3.2 ms and a flip angle of 12° to highlight the contrast between gray and white matter anatomical structures, enabling accurate identification of brain tissue morphology. T2 sequences were acquired using fast spin echo sequences with TR / TE = 4800 ms / 110 ms, focusing on cerebrospinal fluid and edema signals in lesion areas, enhancing the imaging ability of fluid-related lesions. FLAIR sequences employed fluid attenuation inversion recovery technology with TR / TE / TI = 9000 ms / 140 ms / 2250 ms to suppress high-signal interference from cerebrospinal fluid and improve the detection rate of lesions within the brain parenchyma.
[0057] During the scan, the patient's head is fixed in a custom coil, and axial, sagittal, and coronal images are acquired simultaneously. The raw data is stored in DICOM format, and cross-modal registration technology is used to align the three types of sequences to the MNI152 standard space, ultimately generating three-dimensional image data with consistent spatial dimensions. The cross-modal registration technology can be a pre-trained cross-modal image registration model, such as a pre-trained generative adversarial network cross-modal image registration model.
[0058] Furthermore, three-dimensional image data with consistent spatial dimensions are defined as a four-dimensional image tensor, containing four dimensions corresponding to the image's height, width, depth, and modality count, respectively. This tensor is used to represent multimodal brain structural information. The four-dimensional image tensor is defined as follows: The height of the four-dimensional image tensor is The width of the four-dimensional image tensor is The depth of the four-dimensional image tensor is The number of modes in a four-dimensional image tensor is .
[0059] Furthermore, in order for the model to better learn and identify lesion characteristics, the collected image data is labeled. The labeling work is done by professional radiologists, who assign a unique label to each data sample through manual labeling, such as labeling it as having a good prognosis or a bad prognosis.
[0060] S2. Tensor decomposition and fusion strategy is used to perform fusion preprocessing on multimodal neural image data. Cross-modal spatial correlation is preserved by low-rank constraint to obtain the fused output tensor.
[0061] Neuroimaging data has three-dimensional spatial heterogeneity and multimodal complementarity. Conventional channel stitching ignores the spatial correlation between modalities, which can easily lead to the loss of lesion boundary information.
[0062] This invention employs a tensor decomposition fusion strategy to preserve cross-modal space correlations through low-rank constraints. The specific steps are as follows:
[0063] 1) Perform tensor decomposition and fusion
[0064] Feature fusion is achieved by multiplying a multimodal factor matrix with a four-dimensional image tensor in a specific dimension and combining this with a residual tensor. The feature fusion operation is based on factor matrices corresponding to the height, width, and depth dimensions, ultimately generating a fused output tensor, represented as follows:
[0065] ,
[0066] In the formula, The output tensor after fusion; For tensor multiplication operations of modulo n, i.e. For modulo tensor product operations, This is a 2-modulus tensor product operation. This is a 3-module tensor product operation; For the first The factor matrix in dimensional space, i.e. Let be the factor matrix in the first-dimensional space, corresponding to the height dimension of the four-dimensional image tensor. This is the factor matrix in the second-dimensional space, corresponding to the width dimension of the four-dimensional image tensor. This is the factor matrix in the third-dimensional space, corresponding to the depth dimension of the four-dimensional image tensor; It is a residual tensor used to capture high-order residual information in multimodal image tensors that cannot be fully represented by low-rank tensor decomposition.
[0067] 2) Optimize the factor matrix
[0068] This optimization problem, which minimizes reconstruction error and imposes sparsity constraints, solves for the factor matrix. The solution process utilizes the Frobenius norm to control the difference between the original image tensor and the fused output tensor, and employs the L21 norm of the factor matrix to achieve row sparsity. The sparsity control coefficient adjusts the intensity of lesion region feature selection. The optimization objective function is expressed as:
[0069] ,
[0070] In the formula, For Frobenius norm, in This item is used to control reconstruction error; Represents the variable and Perform a minimization operation, representing the result by adjusting... and The value of , minimizing the value of the objective function, It is a set of factor matrices, that is ; For the first A factor matrix in 3D space; It is the L21 norm. The L21 norm of the characterization factor matrix is used to achieve row sparsity. The sparsity control coefficient adjusts the intensity of feature selection in the lesion region, such as... .
[0071] It should be noted that the optimization process of the objective function uses iterative algorithms, such as gradient descent or alternating least squares, to ultimately obtain the set of optimal factor matrices. and residual tensor .
[0072] It should also be noted that when performing tensor decomposition and fusion, the factor matrix explicitly models the spatial correlation of the depth, height, and width dimensions of the four-dimensional image tensor through a low-rank structure shared across modalities, effectively achieving spatial correlation preservation.
[0073] It should also be noted that the residual tensor These are variables learned during the optimization process, not predefined; they are obtained by minimizing the objective function and the factor matrix. The common solution in the optimization problem In, residual tensor As a free variable, it is used to capture the four-dimensional image tensor. This allows for the extraction of high-order residual information that cannot be fully represented by low-rank tensor decomposition, such as noise, subtle lesion features, or nonlinear correlations between modes. This reduces reconstruction errors, improves the integrity of feature fusion, and avoids the loss of lesion boundary information due to low-rank constraints in regions with weak intermodal spatial correlations. Furthermore, it allows for the extraction of higher-order residual information that cannot be fully represented by low-rank tensor decomposition, such as noise, subtle lesion features, or nonlinear correlations between modes. In the calculation process, the residual tensor By using residual compensation, the fused output tensor Closer to 4D image tensor .
[0074] It should also be noted that the L21 norm of the factor matrix This forces the row vectors of the factor matrix to become sparse, automatically suppresses the feature weights of non-lesion regions, and achieves lesion-sensitive feature selection while preserving cross-modal spatial correlation, thus overcoming the problem of boundary information loss in channel splicing.
[0075] It should also be noted that in the optimization objective function, The reconstruction error term is represented by the Frobenius norm, which measures the four-dimensional image tensor. With the fused output tensor The differences between them ensure that the fusion result is faithful to the original data. Characterizing the sparse constraint term, the L21 norm is applied to the factor matrix, and the sparsity control coefficients are used. This forces the feature weights of non-lesion areas to approach zero, thereby highlighting the lesion areas.
[0076] S3. By performing lesion-sensing anisotropic diffusion filtering on the fused output tensor, the diffusion-filtered output image is obtained;
[0077] Neuroimaging data is susceptible to noise interference, and conventional isotropic filtering can blur small lesions.
[0078] In response to the diffuse distribution characteristics of encephalitis lesions, this invention employs a gradient field-guided diffusion filtering mechanism to suppress noise while preserving the lesion edges. The specific steps are as follows:
[0079] 1) Calculate the magnitude of the enhancement gradient
[0080] Based on the lesion probability map generated by the pre-trained U-Net model, the original gradient magnitude tensor is weighted and enhanced. The gradient amplification intensity in the lesion region is adjusted using edge enhancement coefficients to generate an enhanced gradient magnitude tensor, represented as:
[0081] ,
[0082] In the formula, Let be the gradient magnitude tensor after fusion, and let be the output tensor after fusion. The gradient magnitude tensor; The spatial gradient operator is a mathematical differential operator that represents the gradient. It is used to calculate the three-dimensional directional derivative of each element. In discrete image data, it is approximated by numerical difference to quantify local changes in the image, thereby enabling edge detection and feature enhancement. This is a probability map of lesions, generated by a pre-trained U-Net model, with a value range of... This represents the probability that each voxel belongs to a lesion; The edge enhancement coefficient adjusts the gradient amplification intensity of the lesion area, such as... ; Element-wise multiplication; To enhance the gradient magnitude tensor; This means that the edge enhancement coefficients, in scalar format, are multiplied by each element of the lesion probability map, in matrix format. In one embodiment, the lesion probability map and the enhancement gradient magnitude map are as follows: Figure 4 As shown, the left side is the lesion probability map, and the right side is the enhancement gradient magnitude map.
[0083] It should be noted that the fused gradient magnitude tensor It must be based on the fused output tensor The calculation must be performed on the fused output tensor, rather than based on the original image, in order to preserve cross-modal spatial correlations. The calculation process is as follows: first, the fused output tensor... Applying spatial gradient operator We obtain the three-dimensional directional derivative of each element, and then calculate the modulus of the gradient vector of each element, i.e., its Euclidean norm, to obtain the fused gradient magnitude tensor. .
[0084] It should also be noted that the lesion probability map This model is generated using a pre-trained U-Net model. U-Net is an encoder-decoder architecture widely used in medical image segmentation, capable of capturing multi-scale contextual information. The pre-trained U-Net model is trained on an independent dataset, with weights optimized using labeled lesion masks and a loss function. After training, the model generalizes to this task to generate lesion probability maps. In the lesion probability map During the generation process, the input data is the neural image data before diffusion filtering, which can be T1, T2, and FLAIR sequences, or a fused representation of T1, T2, and FLAIR sequences. Preferably, the fused output tensor is selected. As input to the pre-trained U-Net model, U-Net further outputs a probability map with the same spatial dimension as the input, i.e., a lesion probability map. Each value is normalized to 1 by the Sigmoid activation function. .
[0085] It should also be noted that, in In the middle, the probability map of lesions It can achieve weighted amplification of the gradient of the lesion area while preserving the edge of small lesions.
[0086] 2) Define the edge-sensing diffusion coefficient
[0087] Based on the enhanced gradient magnitude tensor, a nonlinear diffusion coefficient function is constructed. This function uses the global gradient magnitude median, edge threshold parameter, and edge sharpness parameter to calculate the diffusion coefficient value corresponding to each gradient magnitude, expressed as:
[0088] ,
[0089] In the formula, The gradient magnitude variable is the augmented gradient magnitude tensor. The specific value of each element in the tensor, i.e., for the augmentation gradient magnitude tensor. Each spatial location takes a value independently; It is a median function. Used to calculate the median of the global gradient magnitude of the augmented gradient magnitude tensor; This is an edge threshold parameter that controls the boundary between edge and non-edge regions, such as... ; This is an edge sharpness parameter; the larger the value, the sharper the edge is preserved. ; The diffusion coefficient function has an output range. .
[0090] It should be noted that in the diffusion coefficient function, the gradient magnitude variable... As an input variable, the diffusion intensity at each location is dynamically adjusted. When large, it indicates the edge of the lesion. To reduce size, suppress diffusion to preserve the edge, when Hours represent flat areas. Enlarging promotes diffusion to smooth noise, and the diffusion intensity depends on the local gradient, thus avoiding blurring of lesions.
[0091] 3) Perform anisotropic diffusion
[0092] Solve the diffusion equation guided by the enhanced gradient magnitude to filter the fused image. This process is carried out iteratively within the virtual diffusion time and terminates when the maximum difference between two adjacent iterations is less than a set threshold. Finally, the diffuse-filtered image is output.
[0093] Specifically, the output image after diffusion filtering Solving partial differential equations numerically We obtain, during initialization, the first The output image after the diffusion filter in the next iteration Set as the output tensor after fusion Then, an iterative solution is performed, defining the discretized virtual diffusion time as... And define the step size as The update is performed using the explicit Euler method, and the update method is expressed as follows:
[0094] ,
[0095] In the formula, For the first The output image after the diffusion filter in the next iteration; For the first The output image after the diffusion filter in the next iteration; The step size.
[0096] Furthermore, the iteration proceeds within the virtual diffusion time, terminating when the maximum difference between two adjacent iterations is less than a set threshold. The iteration termination condition is as follows: , For the number of iterations, This represents the function that takes the maximum value.
[0097] Furthermore, the final output image is the one after diffusion filtering. .
[0098] It should be noted that it can be defined The term is a mathematical model of the diffusion process. This indicates the output image after diffusion filtering. With virtual diffusion time The rate of change of the diffusion process is achieved by numerically solving partial differential equations during the iterative update of the output image after diffusion filtering.
[0099] It should be noted that the iterative process is an iterative algorithm for numerically solving the diffusion equation. The core is to approximate the solution of the partial differential equation through discrete time steps and stop when the solution is stable, that is, when the change is less than the threshold.
[0100] It should also be noted that the iterative process ensures that the output image after diffusion filtering... Smooth and edge-preserving, virtual diffusion time It has no physical meaning; it only controls the number of iterations.
[0101] It should also be noted that the fused gradient magnitude tensor In the calculation process, the lesion probability map is used. The weighted gradient enhancement mechanism automatically reduces the smoothing intensity at the edges of small lesions during the diffusion process, overcoming the lesion blurring problem of conventional filtering.
[0102] S4. Construct a clinical prognostic assessment model for anti-NMDAR encephalitis, the model including a dynamic convolution module, a spatial feature decoupling module, a gated pooling module and a fully connected classifier; the output image after diffusion filtering is input into the clinical prognostic assessment model for anti-NMDAR encephalitis for training, and the Adam adaptive optimizer is used to optimize the training process to finally obtain a trained model.
[0103] S401. Establishing a prognostic assessment model framework
[0104] The prognostic evaluation model constructed in this invention adopts a cascaded feature learning architecture, which consists of a dynamic convolution module, a spatial feature decoupling module, a gated pooling module, and a fully connected classifier.
[0105] The model input is the output image after diffusion filtering. First, the convolutional kernel is initialized with prior knowledge of lesions through dynamic convolutional kernel parameter initialization. Then, anisotropic depthwise separable convolution is used to decompose the feature extraction process along the three orthogonal directions of the x, y, and z axes, and directional attention maps are used to enhance the main response of the lesions. A spatial feature extraction layer is then connected, and the morphological features of the lesions are decoupled through 3D convolution and curvature-driven spatial attention mechanisms. The feature map is then gated and weighted downsampled through lesion differential perception pooling to retain information of sensitive lesion regions. The pooled features are then subjected to high-order abstraction and dimensionality reduction through a fully connected layer. Finally, the output layer performs prognostic classification calculations.
[0106] S402, Initialization of Dynamic Convolution Kernel Parameters
[0107] Traditional random initialization of convolutional kernels is difficult to adapt to the spatial heterogeneity of lesions in encephalitis images.
[0108] This invention generates initialization parameters based on the differences between healthy and diseased samples, enabling the convolution kernel to possess prior knowledge of lesion regions. The specific steps are as follows:
[0109] 1) Calculate health and lesion templates
[0110] Calculate the average value of the diffused filtered images of healthy and diseased samples respectively to obtain the healthy template and the lesion template. Subtract the lesion template from the healthy template to obtain the basic convolution kernel parameters, expressed as:
[0111] ,
[0112] In the formula, These are the basic convolution kernel parameters; Number of healthy samples; This represents the number of diseased samples. For the first Diffusion-filtered image of a healthy sample; For the first The diffused filtered image of a diseased sample.
[0113] It should be noted that, The average features of the healthy sample images are calculated to characterize the healthy template. The average features of the diseased sample image are calculated to characterize the lesion template. In one embodiment, the feature maps of the healthy template and the lesion template are as follows: Figure 5 As shown.
[0114] 2) Calculate the difference-sensitive weighting term
[0115] By calculating the sigmoid-weighted expected value of the difference in diffuse images between random healthy samples and random diseased samples, and multiplying it by a scaling factor, a lesion enhancement term is generated. This lesion enhancement term has a higher weight in areas of significant difference between healthy and diseased samples, and is expressed as:
[0116] ,
[0117] In the formula, This is an enhancement term for lesion differences; The scaling factor controls the intensity of the reinforcement, such as... ; For the expectation operator, The term is used to calculate the mean across samples; Diffusion images of random disease samples; Diffusion image of random healthy samples; It is the Sigmoid activation function. Used to implement difference-sensitive weighting.
[0118] It should be noted that the diffuse imaging of randomized disease samples Diffusion imaging of random healthy samples The acquisition process involves randomly selecting samples from the dataset. Random sampling enhances the differential enhancement term of the lesions. Generalize to the entire dataset to enhance the feature responses in regions where there are significant differences between healthy and diseased individuals.
[0119] 3) Synthesize the initial convolution kernel parameters
[0120] Adding the basic convolution kernel parameters to the lesion differential enhancement term yields the final initial parameter tensor of the convolution kernel, which exhibits a stronger feature response in the lesion region, and is expressed as:
[0121] ,
[0122] In the formula, is the initial parameter tensor of the convolution kernel.
[0123] It should be noted that in the lesion difference enhancement item During the calculation, The larger the value, the higher the weighting in regions of significant difference between health and disease. Furthermore, The term uses the Sigmoid activation function for activation output, ensuring that the weight range is [value missing]. This allows the initial convolutional kernel to obtain higher feature response weights in the lesion region, overcoming the blindness problem of random initialization.
[0124] In one embodiment, if a 1×1 convolution operation is used, the feature map after the convolution operation using the initial parameter tensor of the convolution kernel is as follows: Figure 6 As shown.
[0125] S403, Anisotropic Depthwise Separable Convolution
[0126] Conventional 3D convolution calculations are redundant and ignore brain anisotropy.
[0127] This invention employs a direction-aware convolutional kernel, which is weighted and fused through independent convolutional paths in three orthogonal directions. The specific process is as follows:
[0128] 1) Calculate the gradient field in each direction
[0129] Calculate the output image after diffusion filtering along the three-dimensional spatial coordinate axes respectively. The partial derivatives are used to obtain the gradient field tensor in the corresponding direction, which characterizes the rate of change of the image in that direction. This is defined as... For along The gradient field tensor of the direction, These represent the direction variables of the x-axis, y-axis, and z-axis in three-dimensional space.
[0130] 2) Generate directional attention map
[0131] Using a temperature-regulated Softmax function, the sharpness of the weight distribution is controlled by the temperature parameter. The gradient field tensors in the three directions are transformed into corresponding directional attention weight maps to enhance the response in the main directional direction of the lesion, as shown below:
[0132] ,
[0133] In the formula, for A directional attention weighting map is used to enhance the response in the main direction of the lesion; For the temperature parameter, control the sharpness of the weight distribution, such as... =0.5; It is a natural exponential function; To distinguish from The direction variables of the x-axis, y-axis, and z-axis in three-dimensional space. Representation Summation Index Traverse the three spatial directions: x-axis, y-axis, and z-axis; For along Gradient field tensor of the direction; This is a normalized exponential function that transforms the gradient strength into a probability distribution.
[0134] It should be noted that, The term is the calculation format of the Softmax function, which is obtained by measuring the gradient intensity in each direction. The distribution is transformed into a probability distribution, which normalizes the directional attention weights so that the sum of the weights is 1, and enhances the response in the direction of maximum gradient, that is, enhances the response in the main direction of the lesion.
[0135] It should also be noted that, The term represents the exponential transformation, used to amplify gradient differences, and the temperature parameter Controlling distribution sharpness, temperature parameters Smaller weights tend to concentrate more on the higher gradient direction.
[0136] 3) Perform direction-specific convolution
[0137] The output image after diffusion filtering is processed along three directions respectively. The weighted input image undergoes a one-dimensional convolution operation. For each direction, corresponding trainable convolution kernel parameters are used to generate a feature tensor of the convolution output in that direction, represented as:
[0138] ,
[0139] In the formula, Indicates along 1D convolution operation in the direction; For direction The corresponding trainable convolutional kernel parameters are initialized to the convolutional kernel initial parameter tensor. ; The term representation utilizes the attention weight map to represent the output image after diffusion filtering. Weighted; for The feature tensor output by directional convolution.
[0140] 4) Merging multi-directional features
[0141] The feature tensors output from convolution along the x, y, and z axes are concatenated along their feature dimensions to generate a multi-directional convolutional feature tensor, represented as follows:
[0142] ,
[0143] In the formula, This indicates a tensor concatenation operation; For multi-directional convolutional feature tensors; The feature tensor output by convolution along the x-axis represents the lesion structure information in the x-axis dimension; The feature tensor output by convolution along the y-axis represents the lesion structure information in the y-axis dimension; The feature tensor output by convolution along the z-axis represents the lesion structure information in the z-axis dimension.
[0144] It should be noted that anisotropic depthwise separable convolution uses 1D convolutions in three orthogonal directions instead of standard 3D convolutions, significantly reducing the number of parameters. Through directional decomposition and possible output channel adjustment, the number of parameters is reduced to 1 / 9 (inclusive). (For example, this reduces computational complexity while preserving anisotropic characteristics).
[0145] It should also be noted that direction-specific convolution operations are performed through attention weight maps. Adaptive enhancement of the lesion's main direction response can preserve anisotropic structural features while significantly reducing computational complexity.
[0146] S404 Spatial Feature Extraction
[0147] A 3D convolution operation is performed on the input feature tensor, and a Gaussian error linear unit activation function is used in conjunction with nonlinearity. Simultaneously, the curvature of the input features is calculated using the Laplacian operator. A spatial attention map is generated through convolution adjustment and the Sigmoid function to enhance lesion boundaries. Then, the convolution output features are multiplied element-wise with the spatial attention map to obtain the decoupled spatial feature tensor, representing spatial structural information such as lesion morphology, as shown below:
[0148] ,
[0149] In the formula, The decoupled spatial feature tensor represents spatial structural information such as lesion morphology; For the spatial attention map, the lesion boundary is enhanced using the Laplacian operator, with a value range of (0, 1). The calculation method is expressed as follows: ; The activation function for the Gaussian error linear unit; These are the spatial convolution kernel weights, used for feature mapping; This is a 3D convolution operation used to process three-dimensional spatial data; For multi-directional convolutional feature tensors; This is a 1×1×1 convolution operation used for feature channel adjustment; Let the second partial derivative with respect to the x-axis be denoted as , and similarly, we have . This represents the second-order partial derivative with respect to the y-axis. This represents the second-order partial derivative with respect to the z-axis.
[0150] It should be noted that, The Laplacian operator is used to calculate the curvature of the input features to locate the edge of the lesion.
[0151] S405, Pooling operation for lesion difference perception
[0152] Conventional pooling operations treat all regions equally, which can easily overlook the local specificity of encephalitis lesions;
[0153] This invention employs an adaptive gated pooling mechanism based on lesion template similarity. By dynamically adjusting the contribution weights of pooling regions, it enhances the extraction of lesion-related features. The specific steps are as follows:
[0154] 1) Calculate the similarity of local lesions
[0155] Using the lesion template generated during the dynamic convolution kernel parameter initialization stage, the similarity between the local region of the feature map and the lesion template is calculated, which serves as the basis for the gating weights, expressed as:
[0156] ,
[0157] In the formula, For the first Local similarity tensor at spatial location; Indices for spatial location coordinates; For the decoupled spatial feature tensor China and Israel Centered on spatial location Local blocks; These are the basic convolution kernel parameters; This refers to tensor inner product operations; It is the Frobenius norm.
[0158] 2) Generate a gating weight graph
[0159] The sharpness of the weight distribution is controlled by a sharpness adjustment parameter, and adaptive gating weights are generated by combining similarity and feature curvature, as follows:
[0160] ,
[0161] In the formula, For the first The gating weight value at the location; For the decoupled spatial feature tensor; For the decoupled spatial feature tensor The absolute value tensor of the Laplacian operator represents the absolute value of the curvature of the input features; Indicates the first Decoupled spatial feature tensor at spatial location The absolute value of the Laplacian operator is used to quantify the intensity of local boundary curvature. The sharpness adjustment parameter, the smaller the value, the sharper the weight distribution, for example, .
[0162] 3) Execute gated weighted pooling
[0163] After applying gated weights to weight the features of the local region, a max pooling operation is performed, which is represented as:
[0164] ,
[0165] In the formula, The feature tensor after pooling is in the first... The value of spatial location; It is the set of input indices corresponding to the output position in the height dimension, that is, the index range of the pooling window in the height direction; It is the set of input indices corresponding to the output position in the width dimension, that is, the index range of the pooling window in the width direction; It is the set of input indices corresponding to the output position in the depth dimension, that is, the index range of the pooling window in the depth direction; Indicates the first Each height index belongs to , No. Each width index belongs to , No. A depth index belongs to The operation is to take the maximum value within the range.
[0166] It should be noted that the gating weight value By integrating the similarity and boundary curvature information between local regions and lesion templates, the pooling process enhances feature contribution in areas with high lesion similarity, while preserving details at lesion edges where boundary curvature is high. Simultaneously, parameters are adjusted through sharpness. Adjusting the sensitivity of lesion region selection overcomes the information loss problem of traditional pooling.
[0167] Furthermore, the pooled feature tensor It is obtained by iteratively applying a gated weighted pooling operation to each position of the output feature map, i.e. The feature tensor after pooling Element.
[0168] S406, Feature Processing of Fully Connected Layers
[0169] For the pooled feature tensor The process involves multiple fully connected layers to achieve feature dimensionality reduction and high-level abstract feature extraction.
[0170] Specifically, the feature tensor after pooling First, it is flattened into a one-dimensional feature vector to fit the input requirements of the fully connected layer. This one-dimensional feature vector contains lesion-related spatial features extracted from the original neural images.
[0171] Then, the one-dimensional feature vector is passed through multiple fully connected layers. Each fully connected layer consists of trainable weights and bias parameters, and the ReLU non-linear activation function is used for feature transformation to enhance the model's expressive power and extract higher-level abstract features.
[0172] The fully connected layer gradually reduces the feature dimension, achieving feature compression and redundancy removal, and finally outputs a compact low-dimensional feature vector.
[0173] It should be noted that the number and size of fully connected layers can be adjusted according to task requirements to ensure that key lesion information is preserved while reducing the risk of overfitting, thereby improving the generalization performance of the model. Preferably, the number of fully connected layers is set to 3, with the number of neurons in the first fully connected layer being the same as the number of elements in the one-dimensional feature vector, the number of neurons in the second fully connected layer being set to 200, and the number of neurons in the third fully connected layer being set to 100.
[0174] S407, Output layer implements prognostic assessment classification
[0175] Based on the feature vectors processed by the fully connected layer, a clinical prognostic assessment and classification of anti-NMDAR encephalitis is achieved.
[0176] Specifically, the output layer is also composed of fully connected layers, and the number of neurons corresponds to the number of prognostic categories. For example, in a binary classification task that includes two categories, good prognosis and bad prognosis, the number of neurons in the output layer is 2.
[0177] The output layer receives the feature vectors output by the fully connected layer as input, calculates the original score for each category through linear transformation, and uses the Softmax function to convert these scores into a probability distribution, representing the confidence that the input sample belongs to each prognostic category.
[0178] S408, Loss Calculation and Parameter Update
[0179] The cross-entropy loss function is used to measure the difference between the prognostic class probability distribution predicted by the model and the true label. The cross-entropy loss function quantifies the degree of classification error and serves as an optimization objective.
[0180] During training iterations, the gradient of the loss with respect to the parameters of each layer of the network is calculated using the backpropagation algorithm, including the gradients of the convolutional kernel weights and the parameters of the fully connected layers.
[0181] Then, the Adam adaptive optimizer is used to update all trainable parameters based on gradients in order to gradually minimize the loss function and improve model accuracy;
[0182] Training continues until a stopping condition is met, such as when the loss value changes less than a preset threshold in consecutive iterations, indicating convergence, or when the maximum number of training epochs, such as 1000 training epochs, is reached.
[0183] S5. Input the output image after diffusion filtering to be evaluated into the trained model to obtain the evaluation classification result.
[0184] Example 2
[0185] In this embodiment, as Figure 3As shown, to verify the effectiveness of the multimodal neuroimaging tensor fusion strategy, the experiment compared the performance differences of four fusion methods in the prognostic assessment task. The bar chart shows the accuracy comparison between channel stitching, simple averaging, conventional tensor decomposition and the technology of the present invention. The experimental results show that the fusion method of the present invention is significantly better than other methods. It captures high-order information in the original image that cannot be fully represented by low-rank decomposition through residual tensor, and at the same time uses the sparsity constraint of the factor matrix to achieve feature selection of lesion region.
[0186] Example 3
[0187] In this embodiment, as Figure 7 As shown, the impact of convolutional kernel initialization strategy on model convergence performance is analyzed. The loss changes during training are compared between random initialization, basic convolutional kernel initialization, and the technique of the present invention. The curve of the technique of the present invention shows the fastest descent rate and the lowest stable loss value. Its advantage comes from the lesion difference enhancement term. By calculating the weighted expectation of the difference between healthy and diseased samples, the convolutional kernel obtains a stronger feature response in the lesion area. The separation point of the three curves in the figure appears in the early stage of training, which proves that the initialization strategy of the present invention endows the model with prior knowledge of lesions, effectively accelerates the feature extraction process, avoids the blindness of random initialization, and provides a more reliable lesion representation ability for prognostic assessment.
[0188] Example 4
[0189] This article summarizes case studies and analyzes the stability of different methods in noisy environments. Experiments simulate common image quality fluctuations encountered in clinical settings, such as... Figure 8 As shown in the figure, a line graph illustrates the trend of accuracy changes for each method as noise levels increase. The horizontal axis represents noise intensity, and the vertical axis represents classification accuracy. The curve of the method in this invention shows a slight decrease and remains stable at a high level, while the curves of other methods show a significant decline. Experimental results indicate that the lesion-sensing anisotropic diffusion filtering operation used in this invention has a robust enhancement effect. Through the gradient enhancement strategy weighted by the lesion probability map, the filtering process automatically reduces the smoothing intensity at the edges of small lesions, avoiding feature confusion caused by noise amplification. At the same time, the nonlinear diffusion coefficient function effectively distinguishes lesion edges from flat areas, suppressing random noise interference while preserving key anatomical structures.
[0190] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An anti-NMDAR encephalitis clinical prognosis evaluation method based on artificial intelligence, characterized in that, The method comprises the following steps: S1. obtaining multi-modal neuroimaging data of a patient; S2. performing fusion preprocessing on the multi-modal neuroimaging data by using a tensor decomposition fusion strategy, retaining cross-modal spatial correlation through low-rank constraint, and obtaining an output tensor after fusion; S3. performing lesion-aware anisotropic diffusion filtering on the output tensor after fusion to obtain an output image after diffusion filtering; S4. constructing a clinical prognosis evaluation model for anti-NMDAR encephalitis, wherein the model comprises a dynamic convolution module, a spatial feature decoupling module, a gated pooling module, and a full connection classifier; the output image after diffusion filtering is input into the clinical prognosis evaluation model for anti-NMDAR encephalitis for training, and the training process is optimized by using an Adam adaptive optimizer, and finally a trained model is obtained; the specific steps comprise: The dynamic convolution module is initialized by dynamic convolution kernel parameters to give the convolution kernel lesion prior knowledge, uses anisotropic deep separable convolution to decompose the feature extraction process along the x-axis, y-axis and z-axis three orthogonal directions, and uses a direction attention map to strengthen the lesion main response: Dynamic convolution kernel parameter initialization: the average values of the diffusion filtered images of the healthy samples and the diseased samples are calculated respectively to obtain a healthy template and a lesion template, the healthy template is subtracted from the lesion template to obtain a basic convolution kernel parameter; the Sigmoid weighted expectation value of the difference between a random healthy sample and a random diseased sample diffusion image is calculated, multiplied by a scaling factor to generate a lesion difference strengthening item; the basic convolution kernel parameter and the lesion difference strengthening item are added to obtain the final convolution kernel initial parameter tensor; Anisotropic depth separable convolution: the partial derivatives of the output image after diffusion filtering are calculated along the three-dimensional spatial coordinate axis directions respectively to obtain the gradient field tensor of the corresponding direction, which represents the change rate of the image in the direction, and is defined as represents the direction variable of the x-axis, y-axis and z-axis of the three-dimensional space; the Softmax function adjusted by the temperature is used to control the sharpness of the weight distribution by using the temperature parameter, and the gradient field tensors of the three directions are converted into the corresponding direction attention weight maps; the formula is as follows: , in, express Attention weights for different directions; Indicates temperature parameter; Indicates difference from The direction variables of the x-axis, y-axis, and z-axis in three-dimensional space. Representation Summation Index Traverse the three spatial directions: x-axis, y-axis, and z-axis; Indicates along Gradient field tensor of the direction; Represents the natural exponential function; applied to the diffused filtered output image along three directions respectively. The weighted input image is subjected to a one-dimensional convolution operation. Each direction uses the corresponding trainable convolution kernel parameters to generate the feature tensor output by the convolution in that direction. The feature tensors output by the convolution along the x-axis, y-axis, and z-axis are concatenated along the feature dimensions to generate a multi-directional convolution feature tensor. The spatial feature decoupling module decouples the lesion shape features by 3D convolution and curvature driven spatial attention mechanism, specifically: performing three-dimensional convolution operation on the multi-directional convolution feature tensor, using Gaussian error linear unit activation function combined with nonlinearity, at the same time, calculating the curvature of the input feature by using Laplacian operator, generating a spatial attention map by convolution adjustment and Sigmoid function, multiplying the multi-directional convolution feature tensor and the spatial attention map element by element to obtain the decoupled spatial feature tensor; The gated pooling module performs gated weighted down-sampling on the feature map by lesion difference perception pooling operation, retains the lesion sensitive region information, specifically: using the lesion template generated in the dynamic convolution kernel parameter initialization stage to calculate the similarity between the local region of the decoupled spatial feature tensor and the lesion template; using the sharpness adjustment parameter to control the sharpness of the weight distribution, combining the similarity and the feature curvature of the decoupled spatial feature tensor to generate adaptive gating weight; weighting the local region features of the decoupled spatial feature tensor by using the gating weight, and then performing maximum pooling operation, finally obtaining the pooled feature tensor; The full connection classifier comprises a full connection layer and an output layer, realizes dimension reduction of features and high-level abstract feature extraction, specifically: the pooled feature tensor is flattened into a one-dimensional feature vector, the one-dimensional feature vector is transmitted through multiple full connection layers, and finally a compact low-dimensional feature vector is output; each full connection layer is composed of trainable weight and bias parameters, and adopts a ReLU nonlinear activation function for feature transformation; the compact low-dimensional feature vector is subjected to an output layer to obtain a prognosis evaluation classification category; the output layer is also a full connection layer, and adopts a Softmax function; S5. inputting the diffusion filtered output image to be evaluated into the trained model to obtain an evaluation classification result.
2. The artificial intelligence-based anti-NMDAR encephalitis clinical prognosis evaluation method according to claim 1, characterized in that, Step S1 specifically comprises: Multi-modal neural image data of a patient is acquired by a magnetic resonance imaging system, and the multi-modal neural image data is manually labeled, and the labeled categories include good prognosis and poor prognosis; the multi-modal neural image data comprises a T1 weighted sequence, a T2 weighted sequence and a FLAIR sequence, and the multi-modal neural image data is stored in a DICOM format; a cross-modal registration technology is used to align the three types of sequences to an MNI152 standard space, and finally three-dimensional image data with consistent spatial dimensions is generated; Three-dimensional image data consistent in spatial dimensions is defined as a four-dimensional image tensor , including height , width , depth , and number of modalities 3. The artificial intelligence-based anti-NMDAR encephalitis clinical prognosis evaluation method according to claim 2, characterized in that, Step S2 specifically comprises: S21. tensor decomposition fusion: a specific dimension product operation is performed on a multi-modal factor matrix and a four-dimensional image tensor, and a residual tensor is combined to realize feature fusion, the feature fusion operation is based on factor matrices corresponding to three dimensions of height, width and depth, and finally a fused output tensor is generated, and the formula is as follows: , wherein, represents the fused output tensor; represents an n-mode tensor product operation, ; represents a factor matrix of the 1st dimensional space, corresponding to the height dimension of the four-dimensional image tensor; represents a factor matrix of the 2nd dimensional space, corresponding to the width dimension of the four-dimensional image tensor; represents a factor matrix of the 3rd dimensional space, corresponding to the depth dimension of the four-dimensional image tensor; represents a residual tensor; S22. optimizing the factor matrix: the factor matrix is solved by minimizing the reconstruction error and imposing an optimization problem with a sparsity constraint, the solving process uses the Frobenius norm to control the difference between the original image tensor and the fused output tensor, and uses the L21 norm of the factor matrix to realize row sparsification, and the sparsity control coefficient is used to adjust the intensity of feature selection in the lesion area.
4. The artificial intelligence-based anti-NMDAR encephalitis clinical prognosis evaluation method according to claim 3, characterized in that, Step S3 specifically comprises: S31. based on the lesion probability map generated by the pre-trained U-Net model, the original gradient amplitude tensor is weighted and enhanced, the edge enhancement coefficient is used to adjust the gradient amplification intensity of the lesion area, and an enhanced gradient amplitude tensor is generated, and the formula is as follows: , wherein, denotes the fused gradient magnitude tensor; denotes the spatial gradient operator; denotes the lesion probability map; denotes the edge enhancement coefficient; denotes the element multiplication; denotes the enhanced gradient magnitude tensor; denotes multiplying the edge enhancement coefficient in scalar format with each element in the lesion probability map in matrix format, respectively; S32. based on the enhanced gradient amplitude tensor, a nonlinear diffusion coefficient function is constructed, the nonlinear diffusion coefficient function uses the global gradient amplitude median, the edge threshold parameter and the edge sharpness parameter to calculate the diffusion coefficient value corresponding to each gradient amplitude, and the formula is as follows: , wherein, denotes a gradient magnitude variable, is an enhanced gradient magnitude tensor the specific value of each element in denotes a median function; denotes an edge threshold parameter; denotes an edge sharpness parameter; denotes a diffusion coefficient function; S33. anisotropic diffusion: the diffusion equation guided by the enhanced gradient amplitude is solved to filter the fused image, and the process is iterated in a virtual diffusion time, and the iteration is terminated when the maximum difference between adjacent two iterations is less than a set threshold, and finally a diffusion filtered image is output.
5. The artificial intelligence-based anti-NMDAR encephalitis clinical prognosis evaluation method according to claim 4, characterized in that, Step S33 specifically comprises: diffusion filtered output image by numerically solving partial differential equations obtained, at initialization, the diffusion filtered output image of the first iteration is set to the fused output tensor then iteratively solving, defining a discretized virtual diffusion time and defining a step size of using an explicit Euler method for updating, the update being expressed as: , wherein, denotes the output image of the diffusion filtering of the denotes the output image of the diffusion filtering of the denotes the step size; defines the term is a mathematical model of the diffusion process . 6. The artificial intelligence-based anti-NMDAR encephalitis clinical prognosis evaluation method according to claim 5, characterized in that, In step S4, the loss function adopts a cross-entropy loss function to measure the difference between the prognosis category probability distribution predicted by the model and the true label, the cross-entropy loss function quantifies the classification error degree and serves as an optimization target.
Citation Information
Patent Citations
Random forest algorithm-based encephalitis and meningitis intelligent auxiliary diagnosis system
CN111292852A
Medical image segmentation method based on spatial domain and frequency domain feature attention
CN120298432A