An artificial intelligence pathological auxiliary diagnosis system, method and storage medium

CN123033691APending Publication Date: 2026-11-03CHONGQING UNIVERSITY THREE GORGES HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Current technologies have a high misdiagnosis rate in morphological screening of NUT cancer, leading to missed diagnoses and misdiagnoses, thus missing the best treatment opportunity. Furthermore, existing diagnostic methods are difficult to accurately distinguish NUT cancer from other poorly differentiated cancers.

Method used

An AI-assisted pathology diagnostic system is designed. It extracts pathological image features using a UNI model through a multi-scale feature fusion module and a gated self-attention classification module. It achieves collaborative fusion of multi-scale pathological image features and lesion focusing through hierarchical parent-child indexes and fixed-length token sequences. It also performs individualized risk assessment by combining clinical information.

Benefits of technology

It significantly reduces the misdiagnosis rate of NUT cancer, improves the accuracy and robustness of diagnosis, enhances the system's generalization ability, can autonomously locate suspected lesion areas without the need for in-depth pathology intervention, and provides individualized patient risk scores to optimize treatment options.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033691A_ABST
    Figure CN123033691A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of medical equipment and discloses an artificial intelligence pathological auxiliary diagnosis system, method and storage medium.The system comprises a pretreatment module, a feature extraction module, a multiscale feature fusion module and a gating self-attention classification module.The pretreatment module is used to acquire a whole slice pathological image and cut the image into image blocks under multiple magnifications.The feature extraction module is used to extract pathological image features of the image blocks.The multiscale feature fusion module is used to construct parent-child indexes, form a multilayer feature set and organize the multilayer features into token sequences with a fixed length.The gating self-attention module is used to model the context of the token sequences within a pathological region, learn multiple instances through attention between pathological regions, aggregate the features into slice-level features and output a diagnosis classification result.The application can solve the problem of high misdiagnosis rate of NUT cancer morphology screening in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical device technology, specifically relating to an artificial intelligence-assisted pathology diagnosis system, method, and storage medium. Background Technology

[0002] NUT carcinoma (NC) is a highly aggressive malignant tumor driven by NUTM1 gene rearrangement / fusion, commonly occurring in the midline or near-midline regions such as the chest and head and neck. Currently, diagnosis of NUT carcinoma typically involves morphological screening followed by NUT immunohistochemistry and NUTM1 fusion detection for definitive diagnosis.

[0003] However, NUT cancer typically presents as a rapidly progressing poorly differentiated or undifferentiated malignant tumor, lacking morphological and imaging specificity, and easily confused with poorly differentiated squamous cell carcinoma, undifferentiated carcinoma, small round cell tumor, or sarcomatoid tumor. Therefore, it is highly prone to being missed or misdiagnosed during the morphological screening stage. NUT cancer registry studies show that the median time from symptom onset to diagnosis is 10 weeks, ranging from 1 to 165 weeks; only about 22% of initial pathological diagnoses are directly diagnosed as NUT cancer, while about 78% of patients are initially diagnosed with non-NUT cancer, resulting in an extremely high misdiagnosis rate.

[0004] While NUT cancer is a rare tumor, it is highly aggressive, and missed or misdiagnosed cases during initial screening can lead to missed opportunities for the most effective treatment. Previous studies have reported that the median survival for NUT cancer is typically only about 6–9 months, and approximately 70%–80% of patients die within 2 years of diagnosis. Summary of the Invention

[0005] The present invention aims to provide an artificial intelligence-assisted pathology diagnosis system, method and storage medium to solve the problem of high misdiagnosis rate in NUT cancer morphology screening in the prior art.

[0006] To achieve the above objectives, the present invention provides the following basic solution: An AI-assisted pathology diagnostic system includes a preprocessing module, a feature extraction module, a multi-scale feature fusion module, a gated self-attention module, and a classification module. The preprocessing module is used to acquire whole-slice pathological images and divide them into image blocks of equal pixel size at multiple magnifications; A feature extraction module is used to extract pathological image features from the image patch; The multi-scale feature fusion module is used to organize the pathological image features at multiple magnifications according to spatial hierarchical relationships, construct parent-child indexes, form a multi-layer feature set, and organize the multi-layer features into a fixed-length token sequence. A gated self-attention classification module is used to perform contextual modeling of the token sequence within the pathological region, and to aggregate it into slice-level features through attention multi-instance learning between pathological regions, and output diagnostic classification results.

[0007] Nucleotide tumors (NUTs) are extremely rare, and currently, screening can only be performed visually by doctors. However, due to their rarity, individual doctors may lack experience, leading to a very high misdiagnosis rate in this morphological screening stage. Furthermore, NUTs are highly aggressive, and missed or misdiagnosed cases in the initial screening can cause patients to miss the most effective treatment window. Therefore, the inventors of this application aim to reduce the misdiagnosis rate by designing an artificial intelligence-assisted diagnostic system specifically for NUTs.

[0008] Typically, after acquiring whole-slice pathological images, feature extraction, learning, and diagnostic inference are performed at a single magnification. However, NUT cancer often presents as poorly differentiated malignant tumors, exhibiting sheet-like or nest-like growth, and may be accompanied by necrosis, high mitotic figures, and prominent nucleoli. These features significantly overlap with those of poorly differentiated squamous cell carcinoma, undifferentiated carcinoma, small round cell tumors, neuroendocrine carcinomas, or sarcomatoid tumors, making accurate judgment difficult at a single magnification. Even when using multiple magnifications, the first thought is to simply stitch together or align concentric image patches from different magnifications. However, simple stitching leads to information misalignment and introduces a large number of irrelevant feature combinations, resulting in very low diagnostic accuracy for NUT cancer with dispersed, focal, multi-scale, and nonspecific diagnostic features. Concentric image patch alignment is not tight enough, resulting in blank areas at high resolution, interfering with model performance.

[0009] This application clarifies the hierarchical relationship between pathological image features at different magnifications through hierarchical parent-child indexes and fixed-length token sequences, accurately understanding which high-magnification pathological image feature belongs to which low-magnification pathological image feature, thus achieving effective multi-scale fusion. Furthermore, through a gated self-attention mechanism, it automatically assigns higher attention weights to key lesion regions, thereby achieving multi-scale fusion and lesion focusing. This application hierarchically organizes and matches pathological blocks of different resolutions, enabling the system to integrate multi-scale morphological information within the same pathological region, including cytological details under high magnification and tissue structure features under low magnification. This improves the model's ability to represent the spatial heterogeneity of pathological regions, thereby enhancing the system's generalization and predictive robustness. Through the scheme of this application, low-magnification and high-magnification pathological image features effectively collaborate, facilitating accurate diagnosis and reducing the misdiagnosis rate.

[0010] Furthermore, the multi-scale feature fusion module, after forming a multi-layer feature set, first constructs a corresponding padding mask to identify the authenticity of location nodes, and then organizes the multi-layer features into a fixed-length token sequence. The tissue area and number of effective regions vary greatly among different whole-slice pathological images, especially in NUT cancer cases with small biopsies and abundant necrosis, where the number of effective image blocks may be far less than the fixed length. Padding is used to complete the fixed length, and a padding mask is used to shield invalid tokens, preventing the system from focusing on meaningless locations and affecting the assignment of attention weights.

[0011] Furthermore, the feature extraction module employs the UNI model to extract pathological image features from the image patches. The UNI base model is pre-trained using millions of clinical pathological whole-slice images, with training data covering over 100,000 WSIs, over 100 million tissue image patches, and 20 tissue types. It is built upon a large-scale Vision Transformer (ViT-H) architecture, using non-overlapping image patches as input and employing a self-attention mechanism to map from pixel space to high-dimensional semantic features. This serves as the visual encoder for the system, providing effective pathological representations for the diagnosis of downstream NUT cancers.

[0012] Furthermore, the magnification ratios are 10×, 20×, and 40×.

[0013] Furthermore, the multi-scale feature fusion module constructs the parent-child index by using two padded index tensors to represent the parent-child relationship from level-1 to level-2 and from level-2 to level-3. Each parent node retains at most K child nodes, and if there are less than K, they are padded with -1. A zero-sentinel vector is added to the end of the feature matrix to uniformly map invalid indexes to zero features. The length of the fixed-length token sequence is 1+K(1+K).

[0014] Furthermore, the gated self-attention classification module also outputs an attention heatmap of suspected lesion areas, identifying key tissue regions of interest. This can further assist pathologists in diagnosis.

[0015] Furthermore, the preprocessing module is also used to obtain gender, age, and anatomical location; It also includes a prognostic module, which encodes the gender, age, and anatomical location into low-dimensional continuous vectors, fuses the low-dimensional continuous vectors with slice-level features, and then processes the fused features through activation functions and regularization to finally output an individualized risk score for the patient.

[0016] The prognostic module performs individualized risk assessment based on pathological image features and clinical information, outputting individualized risk scores for patients. This assists clinicians in patient stratification management, provides a reference for treatment plan selection, screens suitable patients for clinical trials, predicts patient survival prognosis, and optimizes follow-up strategies. Experimental validation showed that if only pathological images are used for prediction, the C-index is only 0.61, while incorporating clinical information (gender, age, anatomical location) increases the C-index to >0.8.

[0017] This application also provides another basic solution, an artificial intelligence-assisted pathology diagnosis method, including the following steps. S1, acquire the whole-slice pathological image, and cut it into image blocks of equal pixel size at multiple magnifications; S2, Extract the pathological image features of the image block; S3, organize the pathological image features under multiple magnification according to the spatial hierarchical relationship, construct parent-child indexes, form a multi-layer feature set, and organize the multi-layer features into a fixed-length token sequence; S4. Contextual modeling is performed on the token sequence within the pathological region, and attention-based multi-instance learning is used between pathological regions to aggregate them into slice-level features. Based on the slice-level features, the diagnostic classification result is output.

[0018] Furthermore, in step S1, gender, age, and anatomical location are also obtained; The method also includes step S5, which encodes the gender, age, and anatomical location into low-dimensional continuous vectors, and fuses the low-dimensional continuous vectors with pathological image features. The fused features are then processed by activation functions and regularization, and finally, a patient-specific risk score is output.

[0019] This application also provides another basic solution: a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-mentioned artificial intelligence-assisted pathological diagnosis method. Attached Figure Description

[0020] Figure 1 This is a system block diagram of an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the process structure for the implementation and operation of the system according to an embodiment of the present invention.

[0022] Figure 3 This is a reference diagram of the system heat map in an embodiment of the present invention.

[0023] Figure 4 This is a graph showing the results of verifying the classification accuracy of the system in an embodiment of the present invention.

[0024] Figure 5 The figure shows the results of the system classification ablation experiment in an embodiment of the present invention.

[0025] Figure 6 This is a graph showing the results of verifying the prognostic accuracy of the system in an embodiment of the present invention.

[0026] Figure 7 This is a diagram showing the results of a preoperative ablation experiment of the system according to an embodiment of the present invention. Detailed Implementation

[0027] The following detailed description provides further details on specific implementation methods.

[0028] This embodiment provides an artificial intelligence-assisted pathology diagnosis system, which includes a preprocessing module, a feature extraction module, a multi-scale feature fusion module, a gated self-attention classification module, and a prognosis module. The system module diagram of this embodiment is shown below. Figure 1 As shown, the system implementation and operation flowchart is as follows: Figure 2 As shown.

[0029] The training data for each module consisted of 2468 whole-slice images from 893 patients across three different medical centers. Among the patients, the ratio of NUT cancer:Other Cancer:Normal tissue was 204:436:253, and among the whole-slice images, the ratio was 864:1214:390. During system model construction, the data was randomly partitioned at a 7:3 ratio based on patient level to construct the training and validation sets.

[0030] The preprocessing module is used to acquire whole-slice pathological images (WSI) of patients to be diagnosed, as well as basic clinical information such as gender, age, and anatomical location. The whole-slice pathological images are then divided into image blocks of equal pixel size at multiple magnifications.

[0031] Specifically, the whole-section pathological image was segmented into non-overlapping image tiles of 224×224 pixels at three magnifications: 10×, 20×, and 40×. This resulted in thousands to tens of thousands of tiles per WSI image. The OTSU thresholding method was used to calculate the tissue percentage of each tile, retaining tiles with a tissue percentage >0.25% and removing blank backgrounds.

[0032] The OTSU algorithm automatically determines the optimal threshold by maximizing the inter-class variance: σ²_between(t) = ω0(t) · ω1(t) · [μ0(t) - μ1(t)]² t* = argmax_t σ²_between(t) Where ω0 and ω1 are the weights of the two types of pixels, μ0 and μ1 are the mean values ​​of the two types of pixels, and t is the threshold.

[0033] Application to pathological images: Convert RGB images to grayscale, use the OTSU algorithm to separate tissue (foreground) and background, and calculate tissue proportion. tissue_ratio = (number of tissue pixels) / (total number of tile pixels) If tissue_ratio > 0.25: Keep the tile. else: Discard the tile.

[0034] The feature extraction module is used to extract pathological image features of the aforementioned image blocks. Specifically, the UNI model is used as a visual encoder to extract image features of each magnification tile. Each 224×224 pixel tile outputs a 1024-dimensional feature vector.

[0035] The specific structural framework of UNI is as follows: Each tile corresponds to one patch, and each patch is 224 pixels in size. Each image patch is mapped to a vector of dimension D through linear projection:

[0036]

[0037] in It is a category token; E is the embedding matrix of the patch; The location encoding for the patch; C is the number of channels in the patch image, and L is the total number of tokens in the patch.

[0038] The Transformer Encoder consists of stacked Multi-Head Self-Attention (MHSA) and Feed-Forward Network (FFN):

[0039]

[0040]

[0041] Where Q, K, and V are respectively derived from the features projected from the previous layer; is the dimension of the attention head; LN is the layer normalization. Finally, the classification token representation output by ViT is used for global image semantic features.

[0042] The core pre-training algorithm used by UNI is DINOv2, which belongs to the unsupervised and self-supervised learning paradigm. This algorithm employs three key techniques: joint optimization of self-distillation, multi-crop augmentation, and masked image modeling (MIM).

[0043] The core of self-distillation lies in building a two-branch mutual learning architecture: using a differentiable network as the student model. Using its exponential moving average (EMA) version as the teacher model The training objective is to minimize the representational differences between the student and teacher models under different augmented views of the same image. Unsupervised representation learning is achieved through knowledge self-distillation, where the teacher model parameters are only smoothly updated by the student model parameters and do not participate in gradient backpropagation. The self-distillation loss function is:

[0044]

[0045] in , These are the parameters for the teacher model and the student model, respectively; m is the momentum coefficient set to 0.99; Represents the softmax distribution; , It is a view obtained from the original patch through different random augmentations, which ensures that the student model output remains consistent across multiple augmented views and is independent of labels.

[0046] Masked image modeling constructs a masked view by randomly occluding a portion of the input image. This masked view serves as the model input, guiding the model to infer and reconstruct the original features or pixel information of the occluded region from the visible region. This unsupervised learning method yields robust visual representations with global semantic consistency and local structure awareness. The loss function for masked image modeling is:

[0047] The loss function mainly performs regression learning on the difference between the masked input and the complete image output.

[0048] Therefore, the total loss function for UNI during training is:

[0049] Herein lies the weight that controls the modeling loss.

[0050] UNI's use of DINOv2's design enables the model to capture both global semantics and local details without any labels, which is particularly important for tissue and cell structure recognition. UNI is robust to different resolutions and organ sources of tissue images, thanks to the Transformer's self-attention mechanism, which extracts consistent features across structures at different scales. In few-shot scenarios, UNI employs a class prototype approach:

[0051] Given a sample set belonging to class c, new samples can be classified using nearest neighbor or cosine similarity.

[0052] The multi-scale feature fusion module is used to organize the pathological image features at multiple magnifications according to spatial hierarchical relationships, construct parent-child indexes, form a multi-layer feature set, then construct the corresponding padding mask to identify the authenticity of the location nodes, and finally organize the multi-layer features into a fixed-length token sequence.

[0053] Specifically, two padded index tensors are used to represent the parent-child relationships in the hierarchical structure, describing the mapping relationships from level-1 (10×) to level-2 (20×) and from level-2 (20×) to level-3 (40×), respectively. For each parent node, at most K child nodes are retained; when the number of child nodes is insufficient, -1 is used for padding. Based on this representation, this application designs a fully vectorized hierarchical feature assembly method, thereby avoiding the use of node-by-node loops at the Python level.

[0054] For an input batch consisting of several level-1 nodes, this method first extracts the corresponding level-1 features; then, based on the index mapping, it collects at most K level-2 child node features for each level-1 node, and further collects at most K level-3 child node features for each level-2 node. For invalid index positions, by appending all-zero sentinel vectors to the end of the feature matrix, all padding values ​​are uniformly mapped to zero features, thus ensuring that the entire feature collection process can be efficiently completed through batch tensor indexing, completing the construction of parent and child indices, forming a multi-layer feature set, and then constructing the corresponding padding mask to identify the authenticity of the position nodes, that is, identifying which positions are real tokens and which positions are padding tokens due to incomplete hierarchical structure, forming a fixed-length token sequence. In the specific implementation of the system, it is done in the following way: The input sample (pathological image features extracted by the feature extraction module) contains R regions, each region consisting of T hierarchical tokens, and each token has a feature dimension of D. The input features can then be written as:

[0055] Where B represents the batch size, and L = R × T represents the total number of tokens. In this embodiment, the number of tokens in each region is fixed at 21.

[0056] The input tensors are initially organized as a whole sequence, and the module first rearranges them into a three-dimensional structure based on regions:

[0057] Subsequently, the batch dimension and the region dimension are merged, thus treating each region as an independent sequence of tokens:

[0058] The corresponding padding mask is also rearranged in the same way as follows:

[0059] Where 1 indicates that the position is a padding token, and 0 indicates that the position is a padding mask.

[0060] A gated self-attention classification module is used to perform contextual modeling of the token sequence within the pathological region, and to aggregate it into slice-level features through attention multi-instance learning between pathological regions, and output diagnostic classification results.

[0061] The implementation of a gated self-attention classification module includes the following steps: 1. Introduce CLS token and location encoding To obtain region-level representations, the module introduces a learnable CLS token at the beginning of each region sequence (the aforementioned fixed-length token sequence), denoted as:

[0062] For each region, its input sequence is expanded as follows:

[0063] Since the CLS token does not correspond to actual input, it is always considered a valid position and is not subject to paddingmask masking. To preserve the relative order information of the token within the region, the module further introduces learnable positional encoding:

[0064] Therefore, the actual input to the Transformer layer is: .

[0065] 2. Transformer encoding within the region Within the region, the module uses a Transformer Encoder to model the context of the hierarchical token sequence. Assuming a common layer of Transformer encoders, the output of the l-th layer is denoted as:

[0066] The padding mask M is used to ignore invalid tokens during self-attention computation. After multiple layers of encoding, the final region sequence representation is obtained:

[0067] The module takes the output corresponding to the CLS token in each region sequence as the overall representation of that region. Then, to enhance feature stability, LayerNorm is used to normalize the region representation. Finally, it is restored to a region feature tensor organized by sample.

[0068] In other words, for each input sample, the module ultimately obtains R region-level representations, each of which incorporates contextual information from 21 levels of tokens within that region.

[0069] 3. Slice-level attention multi-instance learning aggregation After obtaining region-level features, the module further performs slice-level aggregation on multiple regions through multi-instance attention learning. Here, each region is treated as an instance, while the entire slice is treated as a bag. To enhance the non-linear modeling capability of region importance, the module further supports a gated attention structure. Unlike ordinary attention, the gating mechanism learns the "content representation" and the "gating signal" through two parallel branches. Slice-level aggregation adopts the ABMIL mechanism, using attention weights... The region-level features are weighted and summed to obtain the slice-level features, as follows:

[0070]

[0071] in, It can be generated by a gated attention network, and its calculation method is as follows:

[0072] in This refers to the Sigmoid function.

[0073] 4. Multilayer perceptron outputs classification results The slice-level features obtained from the above aggregation are then processed by a multilayer perceptron to output raw scores (logits) for three categories (NUT cancer, other cancers, and normal tissue): z = [z_NUT, z_OtherCancer, z_Normal] Then, the Softmax function is used to convert it into a normalized probability: P_i = exp(z_i) / [ exp(z_NUT) + exp(z_OtherCancer) + exp(z_Normal) ] The sum of the three equals 1. For example: P(NUT cancer) = 0.85, P(other cancers) = 0.12, P(normal tissue) = 0.03.

[0074] The system then determines that the WSI is most likely a NUT cancer.

[0075] If the NUT cancer probability is high, such as greater than 0.5 (a specific threshold can be set as needed), this module will continue to output the self-attention score of each region through the ABMIL mechanism. Finally, based on the self-attention score of each region, an attention heatmap of the suspected lesion region is generated to identify the suspected lesion region that is of particular interest.

[0076] Based on the attention weight scores of single image patches output by the gated self-attention classification module, without the need for manual annotation of tumor regions by experienced pathologists, the system can autonomously locate and visualize the distribution areas of suspected tumor lesions within a slide during the whole-slice pathological image training process. For example... Figure 3 . Figure 3 The left side of the image shows the attention score heatmap, with red indicating potential cancer areas, and the right side shows the results of the actually labeled cancer areas.

[0077] The prognostic module encodes the gender, age, and anatomical location into low-dimensional continuous vectors through independent embedding layers. Then, it fuses the low-dimensional continuous vectors with the slice-level features obtained by the gated self-attention module using an element-wise summation method. The fused features are then processed by the activation function (ReLU) and regularization (Dropout), and finally, the individualized risk score of the patient is output.

[0078] The specific implementation of the prognostic module involves designing independent embedding mapping functions for the categorical characteristics of three discrete clinical variables: gender, age, and anatomical location. These functions encode structured clinical information into low-dimensional continuous feature vectors, as defined below:

[0079]

[0080]

[0081] Subsequently, the clinical embeddings (i.e., low-dimensional continuous feature vectors) and slice-level image features are fused together element-wise:

[0082] By projecting image representations into a common latent space that simultaneously encodes pathological morphology and clinical context information, the module's ability to model patient survival risk is enhanced.

[0083] Features after fusion After ReLU activation and Dropout, the input is fed into a fully connected prediction head, with the output dimension set to 2, where the second component is used as the risk score of the sample. .

[0084] When training the prognostic module, the Cox survival loss function is used as the model's loss function. Let the survival time of the i-th sample in the dataset be . The censoring indicator variable is Its risk set is defined as follows:

[0085] In actual training, this relationship is expressed as:

[0086] Optimization is performed using Cox partial likelihood loss:

[0087] This loss mechanism can effectively constrain the system output: it causes samples that experience the endpoint event (relapse / death) earlier to correspond to higher risk scores, thereby enabling the network to learn a prognostic risk score representation that is highly consistent with the survival time ranking.

[0088] This embodiment also provides an artificial intelligence-assisted pathology diagnosis method, including the following steps. S1. Obtain the whole-slice pathological image and cut it into image blocks of 224×224 pixels at magnifications of 10×, 20×, and 40× respectively; S2, The UNI model is used to extract the pathological image features of the image block; S3. Organize the pathological image features under multiple magnification according to the spatial hierarchical relationship, construct parent-child indexes to form a multi-layer feature set, and organize the multi-layer features into a fixed-length token sequence. Then, construct the corresponding padding mask to identify the authenticity of the location node. S4. Contextual modeling is performed on the token sequence within the pathological region, and attention-based multi-instance learning is used between pathological regions to aggregate them into slice-level features. Based on the slice-level features, diagnostic classification results are output, including three situations: NUT cancer, other cancers, and normal tissue, and their probabilities. An attention heatmap of the suspected lesion area is also output to identify the tissue areas of focus.

[0089] If S1 also obtains clinical information such as the patient's gender, age, and anatomical location, then step S5 is also included, which encodes the gender, age, and anatomical location into low-dimensional continuous vectors, fuses the low-dimensional continuous vectors with pathological image features, and processes the fused features through activation functions and regularization, finally outputting the patient's individualized risk score.

[0090] The specific implementation methods described above are the same as those of the artificial intelligence-assisted pathology diagnosis system in this embodiment.

[0091] Of course, this embodiment also provides a computer-readable storage medium storing a computer program that can implement the above method when the computer program is run by a processor.

[0092] experiment: Experiment 1: Classification Accuracy Verification The test validation set results during system model construction confirm that, for example Figure 4 As shown, this system exhibits excellent multi-class classification performance, with an overall classification accuracy of 0.96 (95% CI: 0.95-0.97), a composite F1 score of 0.94, and a global AUC approaching the optimal level. Independent performance analysis for each class shows that the AUC values ​​for all three classes exceed 0.99, fully demonstrating that this system can accurately distinguish different types of whole-tissue pathological slides and possesses excellent inter-class differentiation power.

[0093] Experiment 2: Classification Ablation Experiment To investigate the performance gain of the feature fusion strategy of "parent-child index + fixed-length token sequence + padding mask" in this embodiment, a five-fold cross-validation experiment was conducted on the same dataset. Pathological image features at single resolutions of 10×, 20×, and 40× were extracted sequentially and input into the system for training and evaluation. The experimental results are as follows: Figure 5 As shown, compared to modeling using only a single resolution feature, the feature representation module constructed in this embodiment can further improve the overall classification performance of the system by 1% to 2%, which fully demonstrates that the feature fusion in this embodiment can effectively mine multi-level spatial information of pathological images, thereby optimizing the model's discrimination performance.

[0094] Experiment 3: Validation of Prognostic Accuracy Based on the multi-scale feature fusion module and gated self-attention module of this embodiment for cross-scale feature fusion, this experiment uses 203 cases from the 893 patient data in this embodiment (the original NUT cancer data had 204 cases, but one case lacked prognostic information and could not be used for prognostic training) of the NUT dataset to train the prognostic module. The dataset was strictly divided into training and validation sets in an 8:2 ratio according to the patient dimension. The results are as follows: Figure 6 As shown, the prognostic module exhibited a concordance index (C-index) higher than 0.8 across all NUT samples, lung NUT samples, and head and neck NUT samples, demonstrating excellent prognostic predictive efficacy. The system can output individualized prognostic risk scores for patients, dividing the study population into high- and low-risk subgroups based on the optimal cutoff value. Kaplan-Meier survival analysis results showed a significant difference in survival curves between the high-risk and low-risk subgroups, with statistically significant differences (p<0.05) as confirmed by the Log-rank test, demonstrating that the system can achieve accurate and reliable patient prognostic risk stratification.

[0095] Experiment 4: Prognostic Ablation Experiment To further explore the impact of clinical baseline information such as gender, age, and lesion sampling site on prognostic predictive efficacy, this study included a controlled experiment: prognostic models based solely on pathological image features and models incorporating both pathological image and clinical information were constructed and compared. The results showed that when modeling solely using pathological image features, as... Figure 7 As shown, the model's C-index is only 0.61, and it cannot effectively stratify the prognostic risk of patients, fully demonstrating that integrating clinical information can significantly improve the system's prognostic prediction accuracy and stratification ability.

[0096] For those skilled in the art, without departing from the concept of the technical solution of this invention, several modifications and improvements can be made, and these should also be considered within the scope of protection of this invention. These will not affect the effectiveness of the implementation of this patent or the practicality of the patent.

Claims

1. An artificial intelligence pathological auxiliary diagnosis system, characterized in that: It includes a preprocessing module, a feature extraction module, a multi-scale feature fusion module, and a gated self-attention classification module. The preprocessing module is used to acquire whole-slice pathological images and divide them into image blocks of equal pixel size at multiple magnifications; A feature extraction module is used to extract pathological image features from the image patch; The multi-scale feature fusion module is used to organize the pathological image features at multiple magnifications according to spatial hierarchical relationships, construct parent-child indexes, form a multi-layer feature set, and organize the multi-layer features into a fixed-length token sequence. A gated self-attention classification module is used to perform contextual modeling of the token sequence within the pathological region, and to aggregate it into slice-level features through attention multi-instance learning between pathological regions, and output diagnostic classification results.

2. The artificial intelligence aided pathological diagnosis system according to claim 1, characterized in that: The multi-scale feature fusion module first constructs a corresponding padding mask to identify the authenticity of the location nodes after forming a multi-layer feature set, and then organizes the multi-layer features into a fixed-length token sequence. 3.The artificial intelligence pathological auxiliary diagnosis system according to claim 1, characterized in that: The feature extraction module uses the UNI model to extract the pathological image features of the image block. 4.The artificial intelligence pathological auxiliary diagnosis system according to claim 1, characterized in that: The magnification ratios are 10×, 20×, and 40×.

5. The artificial intelligence pathology auxiliary diagnostic system according to claim 1, characterized in that: The multi-scale feature fusion module constructs the parent-child index by using two padded index tensors to represent the parent-child relationship from level-1 to level-2 and from level-2 to level-3. Each parent node retains at most K child nodes. If there are fewer than K child nodes, they are padded with -1. A zero sentinel vector is added to the end of the feature matrix to uniformly map invalid indexes to zero features. The length of the fixed-length token sequence is 1+K(1+K). 6.The artificial intelligence pathological auxiliary diagnosis system according to claim 1, characterized in that: The gated self-attention classification module also outputs an attention heatmap of suspected lesion areas, identifying key tissue areas of interest.

7. The artificial intelligence pathology aided diagnosis system according to claim 1, wherein: The preprocessing module is also used to obtain gender, age, and anatomical location; It also includes a prognostic module, which encodes the gender, age, and anatomical location into low-dimensional continuous vectors, fuses the low-dimensional continuous vectors with slice-level features, and then processes the fused features through activation functions and regularization to finally output an individualized risk score for the patient.

8. An artificial intelligence pathological auxiliary diagnosis method, characterized in that: Includes the following steps, S1, acquire the whole-slice pathological image, and cut it into image blocks of equal pixel size at multiple magnifications; S2, Extract the pathological image features of the image block; S3, organize the pathological image features under multiple magnification according to the spatial hierarchical relationship, construct parent-child indexes, form a multi-layer feature set, and organize the multi-layer features into a fixed-length token sequence; S4. Contextual modeling is performed on the token sequence within the pathological region, and attention-based multi-instance learning is used between pathological regions to aggregate them into slice-level features, outputting diagnostic classification results.

9. The artificial intelligence pathological auxiliary diagnosis method according to claim 8, characterized in that: Step S1 also obtains gender, age, and anatomical location; The method also includes step S5, which encodes the gender, age, and anatomical location into low-dimensional continuous vectors, and fuses the low-dimensional continuous vectors with pathological image features. The fused features are then processed by activation functions and regularization, and finally, a patient-specific risk score is output.

10. A computer readable storage medium characterized by, The storage medium stores a computer program, and the computer program is run by the processor to implement the method in claim 8 or 9. The storage medium stores a computer program, and the computer program is run by the processor to implement the method in claim 8 or 9.