A method for training a classification model of a cancer histological subtype and a storage medium

By dividing tumor image regions into sub-slice images and combining them with an attention regression-enhanced multi-instance learning method, the problem of ignoring pathological features in existing technologies is solved, thereby improving the accuracy of hepatocellular carcinoma subtype classification and the model's generalization ability.

CN120997586BActive Publication Date: 2026-03-10CANCER INST & HOSPITAL CHINESE ACADEMY OF MEDICAL SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies may overlook low-probability but discriminative pathological features when differentiating different molecular subtypes of hepatocellular carcinoma, affecting the accuracy of classification.

Method used

We employ a multi-instance learning method based on attention regression enhancement. By identifying tumor image regions and dividing them into sub-slices, we combine feature extraction networks, attention networks, and hybrid density networks to construct enhanced feature vectors. We then use a comprehensive loss value to adjust hyperparameters and generate a well-trained cancer histological subtype classification model.

Benefits of technology

It improves the classification accuracy of cancer histological subtypes and the generalization ability of the model, captures more complex subtype features, and generates more accurate cancer histological subtype classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997586B_ABST
    Figure CN120997586B_ABST
Patent Text Reader

Abstract

The application provides a training method of a cancer histological subtype classification model and a storage medium. The method comprises the following steps: identifying a tumor image region in a HE-stained slice image, and dividing the tumor image region into a plurality of non-overlapping sub-slice images; inputting each sub-slice image corresponding to each HE-stained slice image in a sample set into a feature extraction network to obtain a basic feature vector of the sub-slice image; inputting the basic feature vectors of all sub-slice images of the HE-stained slice image into a connected attention network and a hybrid density network to construct an enhanced feature vector of the HE-stained slice image; inputting the enhanced feature vector of the HE-stained slice image into a classifier to output a cancer histological subtype prediction result of the HE-stained slice image; and adjusting hyperparameters to generate a trained cancer histological subtype classification model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and more specifically, to a training method and storage medium for a classification model of cancer histological subtypes. Background Technology

[0002] With the widespread application of deep learning technology in medical image analysis, deep learning models such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs) have been widely used for pathological image classification tasks. Current techniques typically improve classification accuracy by optimizing network structure or feature aggregation strategies, but lack optimization for subtype classification that addresses subtle histological differences. For example, when distinguishing different molecular subtypes of hepatocellular carcinoma, existing methods may overlook certain low-probability but discriminative pathological features, thus affecting classification accuracy. Summary of the Invention

[0003] The purpose of this application is to provide a training method and storage medium for a classification model of cancer histological subtypes, so as to improve the classification accuracy of the classification model for cancer subtypes.

[0004] In a first aspect, the present invention provides a method for training a classification model of cancer histological subtypes, the method comprising:

[0005] For each HE-stained slide image in the sample set, the tumor image region in the HE-stained slide image is identified, and multiple non-overlapping sub-slice images are divided within the tumor image region.

[0006] For each sub-slice image corresponding to each HE-stained slice image in the sample set, the sub-slice image is input into the feature extraction network to obtain the basic feature vector of the sub-slice image.

[0007] For each HE-stained slice image in the sample set, the basic feature vectors of all sub-slice images of the HE-stained slice image are input into an interconnected attention network and a hybrid density network to construct the enhanced feature vector of the HE-stained slice image.

[0008] For each HE-stained slide image in the sample set, the enhanced feature vector of the HE-stained slide image is input into the classifier to output the cancer histological subtype prediction result of the HE-stained slide image.

[0009] For each HE-stained slide image in the sample set, the hyperparameters are adjusted based on the combined loss values ​​of the attention network, the mixed density network, and the classifier to generate a trained cancer histological subtype classification model.

[0010] In an optional implementation, the enhanced feature vector of the target HE-stained slice image is constructed in the following manner:

[0011] The basic feature vectors of all sub-slice images of the target HE-stained slice image are input into the attention network to obtain the attention score and optimized feature vector of each sub-slice image output by the attention network;

[0012] The attention scores and optimized feature vectors of all sub-slices of the target HE-stained slice image are input into a hybrid density network to obtain the enhanced feature vector of the target HE-stained slice image output by the hybrid density network.

[0013] In an optional implementation, the step of the attention network outputting the optimized feature vector for each sub-slice image specifically includes:

[0014] The basic feature vectors of all sub-slice images of the target HE-stained slice image are input into the attention network to calculate the attention score of each sub-slice image;

[0015] Based on the attention scores of all sub-slice images of the target HE staining slice image, the weight coefficient value corresponding to each sub-slice image is determined;

[0016] For each sub-slice of the target HE-stained section image, the optimized feature vector of the sub-slice image is calculated based on the basic feature vector of the sub-slice image and the corresponding weight coefficient value.

[0017] In an optional implementation, the step of the hybrid density network outputting the enhanced feature vector of the target HE-stained slice image specifically includes:

[0018] The attention scores and optimized feature vectors of all sub-slice images of the target HE staining slice image are input into the mixing density network to calculate the mixing coefficients, mean and standard deviation of all sub-slice images.

[0019] For each sub-slice image of the target HE staining section image, the cluster assignment probability value of the sub-slice image is calculated based on the attention score, mixing coefficient value, mean and standard deviation value of the sub-slice image;

[0020] Based on the class assignment probability value and mean of each sub-slice image, the regression prediction value of that sub-slice image is calculated;

[0021] The enhanced feature vector is obtained by weighting the optimized feature vectors and regression predictions of all sub-slice images of the target HE-stained slice image.

[0022] In an optional implementation, the cluster assignment probability value is calculated using the following formula:

[0023] ;

[0024] in, For the first The sub-slice image belongs to the first The probability values ​​assigned to each cluster. The first output of the attention network Attention scores for individual slice images, The output of the hybrid density network The mean coefficients corresponding to each sub-slice image. The output of the hybrid density network The square of the standard deviation coefficients corresponding to each sub-slice image The output of the hybrid density network The mixing coefficients corresponding to each sub-slice image;

[0025] Furthermore, the regression prediction value is calculated using the following formula:

[0026] ;

[0027] in, For the first The regression prediction value corresponding to each sub-slice image.

[0028] In an optional implementation, the loss value is calculated using the following formula:

[0029] ;

[0030] ;

[0031] ;

[0032] ;

[0033] in, For classifying losses, For attention regression loss, For the mixed density loss, For the actual results of cancer histological subtypes, The results are for predicting cancer histological subtypes.

[0034] In an optional implementation, the weight coefficient value corresponding to the sub-slice image is determined by the following formula:

[0035] ;

[0036] in, For the first Attention scores corresponding to each sub-slice image.

[0037] In an optional implementation, the HE-stained slide image to be classified is input into a pre-trained cancer histology subtype classification model to obtain the cancer histology subtype classification result output by the cancer histology subtype classification model. The cancer histology subtype classification result is used to indicate whether the HE-stained slide image to be classified belongs to the target cancer histology subtype.

[0038] In a second aspect, the present invention provides an electronic device, comprising: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of a training method for a classification model of cancer histological subtypes as described in any of the foregoing embodiments.

[0039] Thirdly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of a training method for a classification model of cancer histological subtypes as described in any of the foregoing embodiments. Attached Figure Description

[0040] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 A flowchart illustrating a training method for a classification model of cancer histological subtypes provided in this application embodiment;

[0042] Figure 2 This is a schematic diagram of the structure of a cancer histological subtype classification model provided in an embodiment of this application;

[0043] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0044] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0045] Figure 1 A flowchart illustrating a training method for a classification model of cancer histological subtypes provided in this application embodiment. Figure 2 This is a schematic diagram of the structure of a cancer histological subtype classification model provided in an embodiment of this application. Figure 1 and Figure 2As shown, in one embodiment of this application, a method for training a classification model of cancer histological subtypes is provided, comprising:

[0046] S1. For each HE-stained (hematoxylin-eosin staining) slide image in the sample set, identify the tumor image region in the HE-stained slide image, and divide the tumor image region into multiple non-overlapping sub-slice images.

[0047] Here, taking the histological subtype classification diagnosis of tumors with strong intratumoral heterogeneity (such as hepatocellular carcinoma) as an example, multiple whole-slide images (WSI) can be collected, preprocessed, and separated by masking to identify tumor image regions. This ensures that the focus of subsequent analysis is concentrated on diagnostically relevant areas.

[0048] The tumor image region is divided into non-overlapping 256×256 pixel sub-slices, denoted as patches, which serve as independent instances in subsequent multi-instance learning, avoiding noise introduced by the mesenchyme or normal liver tissue.

[0049] S2. For each sub-slice image corresponding to each HE-stained slice image in the sample set, input the sub-slice image into the feature extraction network to obtain the basic feature vector of the sub-slice image.

[0050] In step S2, a ResNet-50 network can be used as the feature extraction network to extract features for each patch. The ResNet-50 network can be pre-trained on ImageNet for application to histological feature extraction tasks. Each 256×256 patch is input into the ResNet-50 convolutional network, outputting a 1024-dimensional feature vector.

[0051] S3. For each HE-stained slice image in the sample set, input the basic feature vectors of all sub-slice images of the HE-stained slice image into an interconnected attention network and a hybrid density network to construct the enhanced feature vector of the HE-stained slice image.

[0052] Here, the cancer subtype classification problem is viewed as a weakly supervised Multiple Instance Learning (MIL) problem. Each WSI is considered a bag containing N patch instances. The basic feature vector of each patch is extracted using ResNet-50 and mapped to a latent representation space. To emphasize the patches with the highest diagnostic value, an attention mechanism is employed. The features of each patch are mapped to the latent representation space and activated through a fully connected layer. Then, a softmax function is used to compute an attention score for each patch, and the basic feature vector of the patch is adjusted according to the attention weights. In this way, the attention mechanism helps the model focus on patches containing discriminative morphological features.

[0053] In step S3, the enhanced feature vector of the target HE-stained slice image can be constructed in the following way:

[0054] The base feature vectors of all sub-slice images of the target HE-stained section image are input into an attention network to obtain the attention score and optimized feature vector of each sub-slice image output by the attention network. The attention scores and optimized feature vectors of all sub-slice images of the target HE-stained section image are then input into a hybrid density network to obtain the enhanced feature vector of the target HE-stained section image output by the hybrid density network.

[0055] Specifically, the steps by which the attention network outputs the optimized feature vector for each sub-slice image include:

[0056] The basic feature vectors of all sub-slices of the target HE-stained section image are input into an attention network to calculate the attention score for each sub-slice. Based on the attention scores of all sub-slices of the target HE-stained section image, the weight coefficient value corresponding to each sub-slice is determined. For each sub-slice of the target HE-stained section image, the optimized feature vector of that sub-slice image is calculated based on its basic feature vector and corresponding weight coefficient value.

[0057] For each target HE-stained slice image, there can be N sub-slice images. The attention network includes multiple linear layers, scaled dot-product attention layers, and fully connected layers (concat). The attention layer can compute the... Attention score of sub-slice images . The weight coefficient values ​​corresponding to the sub-slice images are determined using the following formula:

[0058] ;

[0059] in, It is an exponential function. For the first Attention scores corresponding to each sub-slice image .

[0060] The corresponding weight coefficient value is determined by the proportion of attention scores of the sub-slice image among all sub-slice images.

[0061] Use weighted coefficient values ​​to adjust the underlying feature vectors corresponding to the sub-slice images. Optimize and generate corresponding optimized feature vectors. .

[0062] A hybrid density network is used to fit the attention score for each sub-slice image.

[0063] Specifically, the steps of the hybrid density network outputting the enhanced feature vector of the target HE-stained slice image include:

[0064] The attention scores and optimized feature vectors of all sub-slices of the target HE stained section image are input into a mixing density network to calculate the mixing coefficients, mean, and standard deviation for each sub-slice. For each sub-slice of the target HE stained section image, a cluster assignment probability is calculated based on its attention score, mixing coefficient, mean, and standard deviation. A regression prediction value is then calculated based on the class assignment probability and mean of each sub-slice. Finally, an enhanced feature vector is obtained by weighting the optimized feature vectors and regression prediction values ​​from all sub-slices of the target HE stained section image.

[0065] In feasible embodiments, the hybrid density network employs Each hybrid component performs regression on the optimized feature vector of the patch. In a specific example... The output can be set to 3, outputting the parameters of the Gaussian distribution (mean coefficient, standard deviation coefficient, mixture coefficient) to fit the attention score of the patch, and outputting the regression prediction value of each sub-slice image to form a complete set. The size of the regression prediction matrix.

[0066] Specifically, in hybrid density networks, fully connected layers can be used to map the optimized feature vectors of a patch into the hidden space. .

[0067] Weighting coefficient , Indicates the first The first sub-slice image The weights of each blending component are processed through a Softmax activation function, outputting the corresponding image for each sub-slice. The weight coefficients of each hybrid component, for each target HE-stained slice image, constitute a size of [missing value]. The matrix.

[0068] mean coefficient = , Indicates the first The first sub-slice image corresponding to the first The mean of each Gaussian distribution is calculated. Output the corresponding value for each sub-slice image. Each mean coefficient is assigned to a target HE-stained slice image of size [size missing]. The matrix.

[0069] Coefficient of variation , Indicates the first The first sub-slice image corresponding to the first The standard deviation of a Gaussian distribution is given. Output the corresponding standard deviation of each sub-slice image. The coefficient of variation is 1, and the size of each target HE-stained slice image is 1. The matrix.

[0070] The hybrid density network calculates cluster assignment probabilities based on the fitting results and outputs them as a cluster assignment probability matrix, the size of which is... Specifically, the cluster assignment probability value can be calculated using the following formula:

[0071] ;

[0072] in, For the first The sub-slice image belongs to the first The probability values ​​assigned to each cluster. The first output of the attention network Attention scores for individual slice images, The output of the hybrid density network The mean coefficients corresponding to each sub-slice image. The output of the hybrid density network The square of the standard deviation coefficients corresponding to each sub-slice image The output of the hybrid density network The mixing coefficients corresponding to each sub-slice image;

[0073] All cluster assignment probability values ​​can be normalized before use.

[0074] The regression predictions are used to re-aggregate the weighted features, resulting in a global, slide-level enhanced feature vector. The regression predictions can be calculated using the following formula:

[0075] ;

[0076] in, For the first The regression prediction value corresponding to each sub-slice image.

[0077] Finally, the optimized feature vectors of all sub-slice images of the target HE-stained section image are weighted and summed using the regression predicted values ​​to obtain the enhanced feature vector. This enhancement of feature vectors allows the model to capture more complex subtype features.

[0078] S4. For each HE-stained slide image in the sample set, input the enhanced feature vector of the HE-stained slide image into the classifier to output the cancer histological subtype prediction result of the HE-stained slide image.

[0079] The enhanced feature vector is passed through a fully connected layer and a sigmoid activation function to predict the final subtype classification result. In S4, the classifier can be used for binary classification prediction, predicting the cancer histological subtype based on the enhanced feature vector of the target HE-stained slide image. The cancer histological subtype prediction result of the HE-stained slide image is used to indicate whether it belongs to a strongly intratumoral heterogeneous tumor histological subtype (such as hepatocellular carcinoma).

[0080] S5. For each HE-stained slide image in the sample set, the hyperparameters are adjusted based on the combined loss values ​​of the attention network, the mixed density network, and the classifier to generate a trained cancer histological subtype classification model.

[0081] In step S5, the training process achieves end-to-end training by optimizing the joint loss function, which comprises three parts: classification loss, attention regression loss, and MDN likelihood loss. The classification loss uses binary cross-entropy to calculate the final subtype prediction. The attention regression loss minimizes the difference between the regression prediction and the target value using mean squared error (MSE). The negative log-likelihood (NLL) loss of the MDN is used to learn the mixture parameters. The total loss is a weighted combination of these three parts, and can be calculated using the following formula:

[0082] ;

[0083] ;

[0084] ;

[0085] ;

[0086] in, For classifying losses, For attention regression loss, For the mixed density loss, For the actual results of cancer histological subtypes, The results are for predicting cancer histological subtypes. , , These are the hyperparameters adjusted using the validation set.

[0087] This application provides an attention-enhanced multi-instance learning (RE-MIL) method for cancer histological subtype classification diagnosis based on HE images. By combining the attention-enhanced mechanism with a multi-instance learning framework, this method can effectively extract key features from HE images, improve the generalization ability and accuracy of the classification model, and enhance the subtype classification precision.

[0088] In a feasible embodiment, the HE-stained slide image to be classified can be input into a pre-trained cancer histological subtype classification model to obtain the cancer histological subtype classification result output by the model. The cancer histological subtype classification result is used to indicate whether the HE-stained slide image to be classified belongs to the target cancer histological subtype. This results in a more accurate predicted cancer histological subtype classification result.

[0089] Based on the same inventive concept, this application also provides a training device for a cancer histological subtype classification model, including a training module. Specifically, for each HE-stained slide image in a sample set, the module identifies the tumor image region within the HE-stained slide image and divides the tumor image region into multiple non-overlapping sub-slide images. For each sub-slide image corresponding to each HE-stained slide image in the sample set, the module inputs the sub-slide image into a feature extraction network to obtain the basic feature vector of the sub-slide image. For each HE-stained slide image in the sample set, the module inputs the basic feature vectors of all sub-slide images of the HE-stained slide image into an interconnected attention network and a hybrid density network to construct an enhanced feature vector for the HE-stained slide image. For each HE-stained slide image in the sample set, the enhanced feature vector of the HE-stained slide image is input into a classifier to output the cancer histological subtype prediction result for the HE-stained slide image. For each HE-stained slide image in the sample set, the hyperparameters are adjusted based on the combined loss value corresponding to the attention network, the hybrid density network, and the classifier to generate a trained cancer histological subtype classification model.

[0090] In a preferred embodiment, the training module constructs an enhanced feature vector of the target HE-stained slice image in the following manner:

[0091] The basic feature vectors of all sub-slice images of the target HE-stained slice image are input into the attention network to obtain the attention score and optimized feature vector of each sub-slice image output by the attention network;

[0092] The attention scores and optimized feature vectors of all sub-slices of the target HE-stained slice image are input into a hybrid density network to obtain the enhanced feature vector of the target HE-stained slice image output by the hybrid density network.

[0093] In a preferred embodiment, the training module is specifically used to input the basic feature vectors of all sub-slice images of the target HE-stained slice image into the attention network to calculate the attention score of each sub-slice image;

[0094] Based on the attention scores of all sub-slice images of the target HE staining slice image, the weight coefficient value corresponding to each sub-slice image is determined;

[0095] For each sub-slice of the target HE-stained section image, the optimized feature vector of the sub-slice image is calculated based on the basic feature vector of the sub-slice image and the corresponding weight coefficient value.

[0096] In a preferred embodiment, the training module is specifically used to input the attention scores and optimized feature vectors of all sub-slice images of the target HE staining slice image into the mixing density network to calculate the mixing coefficient values, mean and standard deviation values ​​of all sub-slice images.

[0097] For each sub-slice image of the target HE staining section image, the cluster assignment probability value of the sub-slice image is calculated based on the attention score, mixing coefficient value, mean and standard deviation value of the sub-slice image;

[0098] Based on the class assignment probability value and mean of each sub-slice image, the regression prediction value of that sub-slice image is calculated;

[0099] The enhanced feature vector is obtained by weighting the optimized feature vectors and regression predictions of all sub-slice images of the target HE-stained slice image.

[0100] In a preferred embodiment, the training module calculates the cluster assignment probability value using the following formula:

[0101] ;

[0102] in, For the first The sub-slice image belongs to the first The probability values ​​assigned to each cluster. The first output of the attention network Attention scores for individual slice images, The output of the hybrid density network The mean coefficients corresponding to each sub-slice image. The output of the hybrid density network The square of the standard deviation coefficients corresponding to each sub-slice image The output of the hybrid density network The mixing coefficients corresponding to each sub-slice image;

[0103] Furthermore, the regression prediction value is calculated using the following formula:

[0104] ;

[0105] in, For the first The regression prediction value corresponding to each sub-slice image.

[0106] In a preferred embodiment, the training module calculates the loss value using the following formula:

[0107] ;

[0108] ;

[0109] ;

[0110] ;

[0111] in, For classifying losses, For attention regression loss, For the mixed density loss, For the actual results of cancer histological subtypes, The results are for predicting cancer histological subtypes.

[0112] In a preferred embodiment, the training module determines the weight coefficient values ​​corresponding to the sub-slice images using the following formula:

[0113] ;

[0114] in, For the first Attention scores corresponding to each sub-slice image.

[0115] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 3 As shown, the electronic device 300 includes a processor 310, a memory 320, and a bus 330.

[0116] The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 and the memory 320 communicate via the bus 330. When the machine-readable instructions are executed by the processor 310, they can perform the operations described above. Figure 1 The steps of training a classification model for a cancer histological subtype shown in the method embodiment are described in detail in the method embodiment, and will not be repeated here.

[0117] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 The steps of training a classification model for a cancer histological subtype shown in the method embodiment are described in detail in the method embodiment, and will not be repeated here.

[0118] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0119] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0120] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0121] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0122] It should be noted that if the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0123] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0124] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for training a classification model of cancer histological subtypes, characterized in that, The method comprises: For each HE-stained slice image in the sample set, identify the tumor image region in the HE-stained slice image, and divide a plurality of non-overlapping sub-slice images in the tumor image region; For each sub-slice image corresponding to each HE-stained slice image in the sample set, input the sub-slice image into the feature extraction network to obtain the basic feature vector of the sub-slice image; For each HE-stained slice image in the sample set, input the basic feature vectors of all sub-slice images of the HE-stained slice image into the interconnected attention network and the hybrid density network to construct the enhanced feature vector of the HE-stained slice image; For each HE-stained slice image in the sample set, input the enhanced feature vector of the HE-stained slice image into the classifier to output the cancer histological subtype prediction result of the HE-stained slice image; For each HE-stained slice image in the sample set, based on the comprehensive loss value corresponding to the attention network, the hybrid density network and the classifier, adjust the hyperparameters to generate a trained cancer histological subtype classification model; the enhanced feature vector of the target HE-stained slice image is constructed by: Input the basic feature vectors of all sub-slice images of the target HE-stained slice image into the attention network to obtain the attention score and optimized feature vector of each sub-slice image output by the attention network; Input the attention score and optimized feature vector of all sub-slice images of the target HE-stained slice image into the hybrid density network to obtain the enhanced feature vector of the target HE-stained slice image output by the hybrid density network; The step of outputting the enhanced feature vector of the target HE-stained slice image by the hybrid density network comprises: Input the attention score and optimized feature vector of all sub-slice images of the target HE-stained slice image into the hybrid density network to calculate the hybrid coefficient value, mean value and standard deviation value corresponding to all sub-slice images; For each sub-slice image of the target HE-stained slice image, based on the attention score, the hybrid coefficient value, the mean value and the standard deviation value of the sub-slice image, calculate the cluster assignment probability value of the sub-slice image; Based on the cluster assignment probability value and the mean value of each sub-slice image, calculate the regression prediction value of the sub-slice image; Based on the optimized feature vector and the regression prediction value of all sub-slice images of the target HE-stained slice image, obtain the enhanced feature vector by weighting.

2. The method of claim 1, wherein, The step of outputting the optimized feature vector of each sub-slice image by the attention network comprises: Input the basic feature vectors of all sub-slice images of the target HE-stained slice image into the attention network to calculate the attention score of each sub-slice image; Based on the attention score of all sub-slice images of the target HE-stained slice image, determine the weight coefficient value corresponding to each sub-slice image; For each sub-slice image of the target HE-stained slice image, based on the basic feature vector and the corresponding weight coefficient value of the sub-slice image, calculate the optimized feature vector of the sub-slice image.

3. The method of claim 1, wherein, The cluster assignment probability value is calculated by the following formula: ; in, For the first The sub-slice image belongs to the first The probability values ​​assigned to each cluster. The first output of the attention network Attention scores for individual slice images, The output of the hybrid density network The mean coefficients corresponding to each sub-slice image. The output of the hybrid density network The square of the standard deviation coefficients corresponding to each sub-slice image The output of the hybrid density network The mixing coefficients corresponding to each sub-slice image; And the regression prediction value is calculated by the following formula: ; wherein, is the regression prediction value corresponding to the i-th sub-slice image. is the regression prediction value corresponding to the i-th sub-slice image.

4. The method of claim 1, wherein, The loss value is calculated by the following formula: ; ; ; ; wherein, is a classification loss, is an attention regression loss, is a mixture density loss, is a cancer histological subtype actual result, is a cancer histological subtype predicted result, , , is a hyperparameter adjusted by a validation set, is a number of sub-slice images, is a number of mixture components adopted by the mixture density network.

5. The method of claim 2, wherein, The weight coefficient value corresponding to the sub-slice image is determined by the following formula: ; in, For the first Attention scores corresponding to each sub-slice image.

6. The method of claim 1, wherein, The HE-stained slice image to be classified is input into the pre-trained cancer histological subtype classification model to obtain a cancer histological subtype classification result output by the cancer histological subtype classification model, and the cancer histological subtype classification result is used to indicate whether the HE-stained slice image to be classified belongs to a target cancer histological subtype.

7. An electronic device, comprising: Comprise: A processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, the processor executes the machine readable instructions to execute the steps of the training method of the cancer histological subtype classification model as claimed in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is run by the processor to execute the steps of the training method of the cancer histological subtype classification model as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for predicting microsatellite instability from pathological picture based on self-attention mechanism

    CN113744251A

  • Gleason grading method and device for prostatic cancer pathological image, equipment and medium

    CN120088201A