P53 mutation classification method and system for endometrial cancer pathological section
By employing a method combining category tokens and multi-scale feature fusion, endometrial cancer pathological sections are cropped and their features extracted. Combined with the Transformer model, this approach addresses the issues of high detection costs or strong subjectivity in existing technologies, achieving efficient and accurate P53 mutation detection.
Patent Information
- Application Number
- CN202511471084.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2025-12-12
AI Technical Summary
Existing methods for detecting P53 mutations in endometrial cancer pathological sections are costly or highly subjective, making them difficult to promote on a large scale. Furthermore, deep learning models require significant computational resources and time, making them difficult to apply in clinical practice, and they lack accuracy, consistency, and generalization.
By employing category tokens, multi-scale feature fusion, and spatial recovery mechanisms, and combining multi-scale feature modules and the Transformer model, we can achieve efficient classification of P53 mutations through cropping, feature extraction, and sequence splicing of endometrial tissue slices.
It significantly improves the accuracy and stability of identifying P53 mutation status in endometrial cancer, reduces computational resource requirements, and enhances the interpretability and accuracy of detection.
Smart Images

Figure CN121120609A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method for classifying P53 mutations in pathological sections of endometrial cancer and a system for classifying P53 mutations in pathological sections of endometrial cancer. Background Technology
[0002] Endometrial cancer is one of the most common gynecological malignancies worldwide, ranking among the most prevalent cancers in women. The newly released staging system incorporates molecular subtyping for the first time in its diagnosis and staging process, with the p53 mutation considered the molecular subtype with the worst prognosis. Therefore, accurately identifying a patient's p53 mutation status is crucial for individualized treatment and survival outcomes.
[0003] Currently, clinical practice primarily relies on two methods to determine P53 status: combined immunoassay and high-throughput sequencing. Combined immunoassay detects the expression of P53 protein in tumor sections using antibody markers, indirectly inferring gene mutation status. This method is low-cost and simple to operate, but the interpretation of results is highly dependent on the pathologist's experience, exhibiting significant subjectivity. High-throughput sequencing can directly detect TP53 mutation status and simultaneously identify variations in other related genes, considered the "gold standard" for confirming TP53 mutations. However, this method is costly, time-consuming, and resource-intensive, lacking feasibility in large-scale clinical practice and unlikely to become a routine testing method for all patients. With the development of artificial intelligence, some studies have attempted to use deep learning methods to automatically infer molecular subtypes or mutation status from pathological sections. However, current deep learning models employ multi-layered and complex network structures, requiring substantial computational resources and time during training and inference. While acceptable in research experiments, this is difficult to promote in routine clinical work, limiting its application value in real-world medical scenarios.
[0004] In summary, routine clinical testing primarily relies on immunohistochemistry and high-throughput sequencing. Immunohistochemistry is relatively inexpensive but highly subjective, while high-throughput sequencing offers high accuracy but is prohibitively expensive, hindering large-scale deployment. Existing deep learning methods still exhibit significant shortcomings in accuracy, consistency, generalization, and interpretability. Therefore, a new approach is urgently needed to improve the accuracy of automated classification of p53 mutation status in endometrial cancer while maintaining controllable costs. Summary of the Invention
[0005] (a) Technical problems to be solved In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides a method and system for classifying P53 mutations in pathological sections of endometrial cancer. It solves the technical problems that immunohistochemistry is low-cost but highly subjective, high-throughput sequencing is accurate but too expensive and difficult to promote on a large scale, and existing deep learning methods still have obvious deficiencies in terms of accuracy, consistency, generalization and interpretability.
[0006] (II) Technical Solution To achieve the above objectives, the main technical solutions adopted in this application include: In a first aspect, embodiments of this application provide a method for classifying P53 mutations in pathological sections of endometrial cancer, including: Based on a pre-set window size and magnification, a full-view slice of endometrial tissue is cropped to obtain multiple image blocks, and the initial position information of each image block is recorded; wherein, each image block is a local tissue fragment of endometrial tissue. Feature extraction is performed on each image patch to obtain the feature vector of each image patch; The feature vectors and initial position information of all image patches are input into a pre-trained feature classification model to obtain classification results that help determine whether P53 mutations have occurred in the full-view slice. The feature classification model is used for: Based on a pre-set sequence concatenation algorithm, all feature vectors are concatenated and a predefined category token is inserted to obtain the corresponding feature sequence; wherein, the category token and any feature vector have the same dimension parameter. The context information of the feature sequence is extracted, and multi-scale feature extraction is performed on the context information based on a pre-set multi-scale feature module to obtain a multi-scale comprehensive vector; Based on the initial position information of each image patch, the multi-scale integrated vector is mapped to the spatial position corresponding to the full-view slice, and feature classification is performed to obtain a classification result used to assist in determining whether a mutation has occurred in P53 in the full-view slice.
[0007] Optionally, in a specific embodiment, based on a pre-set sequence concatenation algorithm, all feature vectors are concatenated and a predefined category token is inserted to obtain the corresponding feature sequence, including: Based on a pre-set sequence concatenation algorithm, the order of all feature vectors is determined so that all feature vectors can be concatenated to obtain the corresponding original sequence. A predefined category token is inserted at the beginning of the original sequence to obtain the corresponding feature sequence. Based on the aggregation interface pre-set by the category token, the feature sequence is transformed into a processable embedding sequence of the feature classification model. The aggregation interface is used to enable the category token to interact with all feature vectors.
[0008] Optionally, in one specific embodiment, the category token is defined through the following steps: Based on the pre-set target dimensions, determine the corresponding dimension standards; Based on the dimensional standard, an initial token is generated by randomly sampling from a pre-set standard normal distribution. The initial token is a set of trainable parameters for the feature classification model, and the feature dimension of the initial token is the same as the feature dimension of the dimensional standard. When training the feature classification model based on the model training set, the parameters in the initial token are adjusted in real time to obtain the defined category token.
[0009] Optionally, in a specific embodiment, extracting the contextual information of the feature sequence includes: Based on the environmental perception prompting algorithm, the pre-set prompting vector is fused with the feature sequence; Extract the contextual information of the fused feature sequence.
[0010] Optionally, in one specific embodiment, the cue vector is established through the following steps: Based on the pre-acquired first P53 mutation positive slice images of each category, a type correction vector is generated; Based on the staining intensity distribution in multiple pre-acquired images of second P53 mutation positive slides, a staining intensity correction vector is generated. The cue vectors include: a type correction vector and a staining intensity correction vector.
[0011] Optionally, in one specific embodiment, the category token is located at the beginning of the feature sequence; Then, based on the environmental awareness prompting algorithm, the pre-set prompting vector is fused with the feature sequence, including: Based on the environment-aware cueing algorithm, a pre-set cue vector is inserted into the feature sequence, and the cue vector is located after the category token and before all feature vectors.
[0012] Optionally, in a specific embodiment, extracting contextual information of the fused feature sequence includes: Based on the fused feature sequence, the similarity between the cue vector in the feature sequence and each feature vector is obtained, so as to assign weight to the cue word corresponding to each feature vector; Based on the fused feature sequence, the attention weight between each feature vector in the feature sequence and any other feature vector / category token is obtained, and the corresponding attention association matrix is obtained. Based on the attention association matrix and the prompt word weights corresponding to each feature vector, all feature vectors in the fused feature sequence are weighted and integrated to obtain a weighted integrated vector. Based on the weighted integration vector, cue vector, and category token, the contextual information of the fused feature sequence is extracted.
[0013] Optionally, in a specific embodiment, multi-scale feature extraction is performed on the context information based on a pre-set multi-scale feature module to obtain a multi-scale comprehensive vector, including: The context information is extracted using multiple convolutional kernels of different sizes to obtain the overall structural features and local detail features output by each convolutional kernel. All overall structural features and local detail features are spliced together to obtain a multi-scale composite vector. Several different sizes of convolution kernels are available, including 3×3 convolution kernels, 5×5 convolution kernels, and 7×7 convolution kernels.
[0014] Optionally, in one specific embodiment, the full-view slice is obtained through the following steps: Panoramic scanning was performed on pre-acquired glass slides of endometrial cancer tissue to obtain corresponding digital images; the glass slides of endometrial cancer tissue were stained. Semantic segmentation is performed on the digital image to remove the background region and obtain the corresponding full-view slice.
[0015] Secondly, embodiments of this application provide a P53 mutation classification system for endometrial cancer pathological sections, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the above-described P53 mutation classification method for endometrial cancer pathological sections.
[0016] (III) Beneficial Effects This application presents a method for classifying P53 mutations in endometrial cancer pathological sections. By introducing class tokens, multi-scale feature fusion, and spatial recovery mechanisms, it achieves performance optimization based on the traditional multi-instance learning framework. While ensuring computational efficiency, it significantly improves the accuracy and stability of identifying the P53 mutation status of endometrial cancer, thereby assisting relevant personnel in more accurately determining whether P53 mutations have occurred in endometrial cancer pathological sections. Attached Figure Description
[0017] Figure 1 A flowchart of a method for classifying P53 mutations in pathological sections of endometrial cancer provided in this application embodiment; Figure 2This is a flowchart illustrating a method for classifying P53 mutations in pathological sections of endometrial cancer, as provided in an embodiment of this application. Detailed Implementation
[0018] To better explain and facilitate understanding of this application, the following detailed description of the application is provided in conjunction with the accompanying drawings and specific embodiments.
[0019] Endometrial cancer is one of the most common gynecological malignancies worldwide, ranking among the most prevalent cancers in women. The newly released staging system incorporates molecular subtyping for the first time in its diagnosis and staging process, with the p53 mutation considered the molecular subtype with the worst prognosis. Therefore, accurately identifying a patient's p53 mutation status is crucial for individualized treatment and survival outcomes.
[0020] Currently, clinical practice primarily relies on two methods to determine P53 status: combined immunoassay and high-throughput sequencing. Combined immunoassay detects the expression of P53 protein in tumor sections using antibody markers, indirectly inferring gene mutation status. This method is low-cost and simple to operate, but the interpretation of results is highly dependent on the pathologist's experience, exhibiting significant subjectivity. High-throughput sequencing can directly detect TP53 mutation status and simultaneously identify variations in other related genes, considered the "gold standard" for confirming TP53 mutations. However, this method is costly, time-consuming, and resource-intensive, lacking feasibility in large-scale clinical practice and unlikely to become a routine testing method for all patients. With the development of artificial intelligence, some studies have attempted to use deep learning methods to automatically infer molecular subtypes or mutation status from pathological sections. However, current deep learning models employ multi-layered and complex network structures, requiring substantial computational resources and time during training and inference. While acceptable in research experiments, this is difficult to promote in routine clinical work, limiting its application value in real-world medical scenarios.
[0021] This application presents a method for classifying P53 mutations in endometrial cancer pathological sections. By introducing class tokens, multi-scale feature fusion, and spatial recovery mechanisms, it achieves performance optimization based on the traditional multi-instance learning framework. While ensuring computational efficiency, it significantly improves the accuracy and stability of identifying the P53 mutation status of endometrial cancer, thereby assisting relevant personnel in more accurately determining whether P53 mutations have occurred in endometrial cancer pathological sections.
[0022] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application can be understood more clearly and thoroughly, and that the scope of this application can be fully conveyed to those skilled in the art.
[0023] This application provides a method for classifying P53 mutations in pathological sections of endometrial cancer, such as... Figure 1 As shown, it includes: S1. Based on the preset window size and magnification, the full-view slice of endometrial tissue is cropped to obtain multiple image blocks, and the initial position information of each image block is recorded; wherein, each image block is a local tissue fragment of endometrial tissue.
[0024] Optionally, in a specific embodiment, the full-view slice is obtained through the following steps: Panoramic scanning was performed on pre-acquired glass slides of endometrial cancer tissue to obtain corresponding digital images; the glass slides of endometrial cancer tissue were stained. Semantic segmentation is performed on digital images to remove background regions and obtain corresponding full-view slices.
[0025] Generally, a whole-slide image (WSI) is an ultra-high-resolution digital image of a glass slide of endometrial cancer tissue obtained through digital pathological scanning. It is essentially a "digital twin of the glass slide." However, the whole-slide images used in this application require semantic segmentation to remove irrelevant background areas and retain only the pathological tissue portion.
[0026] Full-field section (WSI) is not a directly acquired image, but rather generated based on pre-made glass slides. The specific process is as follows: Select representative tissue blocks, and through pathological techniques such as fixation, dehydration, embedding, sectioning, and staining (e.g., HE staining, P53 immunohistochemical staining), prepare the tissue into glass slides with a thickness of only a few micrometers (usually 3-5 micrometers); use a digital pathology scanner (with a resolution of up to 0.25 micrometers / pixel) to perform high-resolution scanning of each region of the glass slide, and stitch them together to form a complete digital image covering the entire glass slide, i.e., a full-field section (WSI).
[0027] A single WSI image typically has a pixel size of tens of thousands x tens of thousands, and a file size of hundreds of MB or even tens of GB. It can clearly present details such as the cell nucleus and cytoplasm (e.g., brownish-yellow granules in P53 immunohistochemical staining), meeting the accuracy requirements for pathological analysis.
[0028] The scanned digital image is semantically segmented (background removed) and cropped to a fixed size to generate image patches for feature extraction. The spatial coordinate information (initial position information) of these patches is also recorded based on the original coordinate system of the full-view slice.
[0029] The pathological features of the image patches (such as cell morphology and staining intensity) all originate from local areas of the full-field section.
[0030] Furthermore, in the data preprocessing stage, semantic segmentation is performed on the input full-view slices to remove irrelevant background areas, retaining only the pathological tissue portion. Based on this, the tissue region is cropped with a fixed size (e.g., 256×256 pixels) and a fixed magnification (e.g., 20x) to generate several non-overlapping image patches. At the same time, the spatial coordinate information (initial position information) of each image patch is recorded for subsequent feature reconstruction.
[0031] This embodiment removes irrelevant information such as blank slide areas, impurities, and staining residues through semantic segmentation, ensuring that the subsequently cropped image blocks are "purely fragments of local tissue from endometrial cancer." This avoids background noise (such as bubbles and scale bars) being misjudged as pathological features, directly improving the accuracy of subsequent feature extraction. Furthermore, explicitly using a fixed magnification for cropping ensures that image blocks from different samples maintain uniformity in staining features (such as P53-positive brownish-yellow granules) and resolution (such as 0.25 micrometers / pixel corresponding to cell details), avoiding model judgment biases caused by differences in staining depth and magnification, and improving the reliability of cross-sample analysis.
[0032] Because a single full-view slice can reach tens of thousands of pixels in size and file sizes exceeding gigabytes, it cannot be directly input into the model. By cropping it into small image patches of a fixed size, the massive amounts of data that cannot be directly processed are transformed into small batches of data that the model can compute in parallel, significantly reducing memory usage and computation time.
[0033] By preserving spatial coordinates and recording the initial position information of each image patch, the model can provide a core basis for subsequent spatial restoration. The model can remap the features of scattered image patches back to the original layout of the slices through coordinates, restore the spatial structure of pathological tissue (such as the infiltration range of mutation areas and the continuity of gland arrangement), and improve the interpretability of prediction results.
[0034] S2. Extract features from each image block to obtain the feature vector of each image block.
[0035] Optionally, in a specific embodiment, feature extraction in this embodiment is implemented through a trained feature extraction model. That is, in the feature extraction stage, the cropped image patch is input into the pre-trained feature extraction model to obtain a high-dimensional feature vector of fixed length (e.g., 1024 dimensions). This step realizes the transformation from raw pixel information to feature representation, providing a unified input for subsequent deep models.
[0036] Specifically, the feature extraction model in this embodiment can use either the ResNet or VGGNet model framework. The ResNet framework introduces residual connections, solving the gradient vanishing problem in deep networks, allowing for training to very deep layers, and is suitable for most image classification and detection tasks. The VGGNet framework, on the other hand, uses small convolutional kernels (3×3) and depth stacking, resulting in strong feature extraction capabilities and a well-structured architecture. Its disadvantage is a larger number of parameters, making it suitable for scenarios requiring high accuracy and sufficient computing power.
[0037] This embodiment achieves the transformation from raw image patches to high-dimensional feature vectors through a pre-trained model and fixed-dimensional output design. While the raw image patches have a fixed size, their pixel information (RGB values) is low-dimensional raw data, which cannot be processed by deep models such as Transformers (requiring structured vector input). By outputting fixed-length feature vectors from the pre-trained model, all image patch information is uniformly transformed into a high-dimensional, structured vector format. This ensures that subsequent models (such as feature token construction and Transformer modeling) receive consistent input, avoiding process interruptions due to data format differences.
[0038] The pre-trained feature extraction model has learned general visual features such as edges, textures, and shapes on large-scale image data. When transferred to pathological image scenes, it can quickly focus on key pathological features of endometrial cancer tissue (such as cell nuclear contours, staining intensity differences, and cell arrangement patterns), avoiding the model learning basic visual features from scratch and improving feature extraction efficiency. The original image patch contains a lot of redundant information (such as subtle brightness fluctuations of local pixels). The pre-trained model automatically filters out invalid information through mechanisms such as convolution and attention, encoding core pathological features (such as the distribution of brown-yellow granules in P53 immunohistochemical staining) into a high-dimensional vector, providing valuable feature support for subsequent "judgment of P53 mutation" and reducing the interference of noise on the model's judgment.
[0039] S3. Input the feature vectors and initial position information of all image patches into a pre-trained feature classification model to obtain classification results to help determine whether P53 has mutated in the full field of view slice; Feature classification models are used for: Based on a pre-set sequence concatenation algorithm, all feature vectors are concatenated and a predefined category token is inserted to obtain the corresponding feature sequence; wherein, the category token and any feature vector have the same dimension parameter. Extract the contextual information of the feature sequence, and perform multi-scale feature extraction on the contextual information based on the pre-set multi-scale feature module to obtain a multi-scale comprehensive vector; Based on the initial position information of each image patch, the multi-scale integrated vector is mapped to the spatial position corresponding to the full-view slice, and feature classification is performed to obtain the classification result used to help determine whether P53 has undergone mutation in the full-view slice.
[0040] Optionally, in a specific embodiment, based on a pre-set sequence concatenation algorithm, all feature vectors are concatenated and a predefined category token is inserted to obtain the corresponding feature sequence, including: Based on a pre-set sequence concatenation algorithm, the order of all feature vectors is determined so that all feature vectors can be concatenated to obtain the corresponding original sequence. Insert a predefined category token into the beginning of the original sequence to obtain the corresponding feature sequence, and transform the feature sequence into a processable embedding sequence for the feature classification model based on the aggregation interface pre-set by the category token. The aggregation interface is used to enable category tokens to interact with all feature vectors.
[0041] The category token is defined through the following steps: Based on the pre-set target dimensions, determine the corresponding dimension standards; Based on the dimensionality standard, initial tokens are generated by randomly sampling from a pre-set standard normal distribution. The initial tokens are the trainable parameter set of the feature classification model, and the feature dimensions of the initial tokens are the same as the feature dimensions of the dimensionality standard. When training a feature classification model based on a model training set, the parameters in the initial token are adjusted in real time to obtain a defined category token.
[0042] Specifically, a category token is a special trainable vector whose core function is to aggregate global information from the input sequence in models such as Transformer, ultimately serving as a key basis for the model to perform classification or global decision-making.
[0043] All feature vectors are arranged according to a pre-set sequence concatenation algorithm (arrangement rules), i.e., the feature vectors of N image patches are input (each is 1024-dimensional, denoted as V1, V2, ..., V3). N (corresponding to N image blocks).
[0044] Generate a trainable vector with the exact same dimensions as the feature vector, denoted as V. cls For example, generating V through random initialization (such as sampling from a normal distribution). cls =[c1, c2, ..., c 1024 ], where each c i These are initial parameters that will be updated as the model trains. This category of tokens is predefined before model training and is not used as input data, but rather as a built-in parameter of the model.
[0045] Insert the category token into the sequence of feature vectors at the beginning position to form a complete feature sequence. For example, the sequence of feature vectors is [V1, V2, ..., V...]. N ], after insertion becomes [V cls V1, V2, ..., V N After splicing, all elements in the sequence have the same dimension (1024 dimensions), and the sequence length is N+1.
[0046] The concatenated feature sequence is converted into a tensor format that can be directly processed by the model (such as Transformer). This sequence contains local features of all image patches and reserves an interface for global information aggregation through category tokens, laying the foundation for the subsequent self-attention interaction of Transformer (the category token is associated with all feature vectors).
[0047] Furthermore, the definition process for category tokens is a standardized process from parameter initialization to adapting the model input, specifically as follows: Determine the dimension parameter of the category token (aligned with the feature vector). The dimension of the category token must be completely consistent with the dimension of the feature vector of the image patch. This is a prerequisite for subsequent sequence splicing and model processing. First, clarify the dimension of the feature vector output by the feature extraction model (e.g., 1024 dimensions), and use this as the dimension standard for the category token. If the feature vector of each image patch is 1024 dimensions, then the dimension of the category token is also set to 1024 dimensions to ensure that the two can be compatible in the same sequence.
[0048] Initialize the category tokens (generate a trainable parameter vector). Category tokens are built-in trainable parameters of the model, not features extracted from the data. Their initial values must be generated using a predefined strategy. Common methods include random initialization and all-zero initialization. Random initialization samples from a standard normal distribution (e.g., N(0,0.02)) to generate a 1024-dimensional vector, ensuring a reasonable initial value distribution for subsequent training updates. All-zero initialization generates a 1024-dimensional vector with all elements equal to 0, suitable for scenarios where the model wants to learn global features from "no prior information." Register the initialized vector as a trainable parameter of the model (e.g., using nn.Parameter() in PyTorch), allowing the values to be updated via backpropagation during training, gradually learning how to summarize global information.
[0049] To adapt to batch processing (expanding dimensions to match input batches), in actual training / inference, the input is usually a batch of slices (e.g., processing 8 slices at a time, i.e., batch size=8), and each slice needs to correspond to an independent category token.
[0050] This embodiment uses category tokens as global information carriers. During the self-attention interactions of models like Transformer, it automatically aggregates feature vectors from all image patches, preventing the model from focusing only on isolated local features and ignoring overall pathological patterns (e.g., a slice may show weak positives locally, but there are no obvious mutations globally; the category token can capture this global consistency). The aggregation interface ensures that the category token can interact efficiently with all feature vectors (e.g., in self-attention calculations, the category token can calculate similarity and assign weights to each feature vector), rather than existing in isolation. This makes the global information aggregation more accurate, providing "slice-wide" decision-making basis for subsequent classification and improving the reliability of the judgment. Feature vectors are concatenated based on a preset algorithm to avoid information loss due to feature disorder.
[0051] Furthermore, before inputting the feature vector into the feature classification model, the feature vector can be converted into a corresponding feature token, which facilitates subsequent concatenation and insertion of category tokens.
[0052] Optionally, in one specific embodiment, extracting contextual information of the feature sequence includes: Based on the environmental perception prompting algorithm, the pre-set prompting vector is fused with the feature sequence; Extract the contextual information of the fused feature sequence.
[0053] Furthermore, the cue vector is established through the following steps: Based on the pre-acquired first P53 mutation positive slice images of each category, a type correction vector is generated; Based on the staining intensity distribution in multiple pre-acquired images of second P53 mutation positive slides, a staining intensity correction vector is generated. The cue vectors include: a type correction vector and a staining intensity correction vector.
[0054] Specifically, this embodiment introduces an Environmental Awareness Prompt Module (EPVT), which guides the model to pay more attention to features and staining features related to P53 mutations by introducing task-related prompt information (prompt vectors), thereby improving the recognition ability under complex or ambiguous staining conditions.
[0055] In other words, the task-related cue vectors need to be closely aligned with the scenario of P53 mutation determination. For example, they can contain two types of key information: cue vectors for various types of P53 mutations (type correction vectors) and cue vectors for staining features (staining intensity correction vectors). The type correction vectors are generated for special types of P53 mutations, such as overexpression P53 mutations, loss-of-expression P53 mutations, cytoplasmic staining P53 mutations, and unequal intensity P53 mutations. The staining intensity correction vectors, for scenarios with ambiguous staining (such as staining that is too light / too dark, resulting in unclear features), prompt the model to focus on key signals that can distinguish between mutations, such as the "edge contour of the brownish-yellow staining area" and "relative differences in staining intensity."
[0056] By transforming these cue vectors into a model-recognizable vector form (such as cue vectors with the same dimension as feature tokens), inserting them into feature sequences, or using them as guiding factors for attention weights, the model can automatically increase the attention weight to "cue-related regions" during processing in core learning modules (such as the Transformer), and reduce ineffective focusing on irrelevant regions (such as normal glands and stroma).
[0057] The cue vector is established through the following steps: based on pre-collected first P53 mutation positive slice images of various categories, features are extracted from the images and converted into prior knowledge. This prior knowledge is then transformed into cue vectors. For example, for different types of first P53 mutation positive slice images, including but not limited to overexpression P53 mutation images, expression loss P53 mutation images, cytoplasmic staining P53 mutation images, and P53 mutation images with varying strengths, features are extracted from the images and dynamic learnable cue vectors are generated (continuously optimized as the model trains).
[0058] For ambiguous staining scenarios (such as staining that is too light, too dark, or localized decolorization), a staining intensity correction vector can be designed. For example, the distribution of different staining intensities in the training set can be statistically analyzed to generate a staining intensity correction vector, prompting the model to focus on relative staining differences (rather than absolute staining depth). Alternatively, for ambiguous areas at the edge of the slide, edge feature filtering prompts can be generated to prevent the model from misjudging edge impurities as pathological features.
[0059] Optionally, in one specific embodiment, based on an environment-aware cueing algorithm, a pre-set cue vector is fused with a feature sequence, including: Based on the environment-aware cueing algorithm, a pre-set cue vector is inserted into the feature sequence, with the cue vector located after the category token and before all feature vectors.
[0060] Optionally, in a specific embodiment, extracting contextual information of the fused feature sequence includes: Based on the fused feature sequence, the similarity between the cue vector in the feature sequence and each feature vector is obtained, so as to assign weight to the cue word corresponding to each feature vector; Based on the fused feature sequence, the attention weight between each feature vector in the feature sequence and any other feature vector / category token is obtained, and the corresponding attention association matrix is obtained. Based on the attention association matrix and the prompt word weights corresponding to each feature vector, all feature vectors in the fused feature sequence are weighted and integrated to obtain a weighted integrated vector. Contextual information of the fused feature sequence is extracted based on the weighted integration vector, cue vector, and category token.
[0061] Specifically, the similarity between the cue vector and the feature vector is calculated to generate cue word weights. Based on task-related cueing (such as P53 mutation feature cueing), feature vectors strongly related to diagnosis are selected to provide task-oriented guidance for subsequent weighting. For example, for each cue vector, the similarity with each feature vector is calculated (commonly using scaled dot product or cosine similarity); for each feature vector, its similarity with all cue vectors is normalized using Softmax to generate the cue word weight for that feature vector. The higher the weight, the stronger the correlation between that feature vector and the P53 mutation task.
[0062] Calculate the attention weights among all tokens in the sequence, construct an attention association matrix, and model the global associations of all tokens in the fusion sequence (including spatial associations between features and associations between category tokens and global features), providing a full-sequence perspective for contextual information. Based on the Transformer self-attention mechanism, calculate the attention weights of each token (feature token) with all other tokens (feature tokens, category tokens) in the sequence, and organize them into an attention association matrix (the dimension is the total number of feature tokens × (total number of feature tokens + 1), i.e., N × N + 1).
[0063] By combining dual weights to weight and integrate feature vectors, a weighted integrated vector is generated. Through the dual constraints of cue word weights and attention association matrix, the original feature vectors are filtered and enhanced, retaining key information and filtering noise.
[0064] By combining weighted vectors, cues, and category tokens, complete contextual information is extracted. The information from local weighted features, task cues, and global category tokens is integrated to form a multi-level contextual representation, providing a structured basis for subsequent classification.
[0065] This embodiment takes prompting and guidance as its core, and combines attention association and other methods to extract contextual information that fits the diagnostic needs of P53 mutation from the fusion sequence in a progressive manner, avoiding model-irrelevant features while ensuring the integrity and relevance of the information.
[0066] Optionally, in a specific embodiment, multi-scale feature extraction is performed on the context information based on a pre-set multi-scale feature module to obtain a multi-scale comprehensive vector, including: Feature extraction of contextual information is performed using multiple convolutional kernels of different sizes to obtain the overall structural features and local detail features output by each convolutional kernel; All overall structural features and local detail features are spliced together to obtain a multi-scale composite vector. Multiple convolution kernels of different sizes include, but are not limited to: 3×3 convolution kernel, 5×5 convolution kernel and 7×7 convolution kernel.
[0067] Specifically, a multi-scale feature fusion module is set up. This module extracts local details and overall structural features through convolution operations of different scales (such as 3×3 convolution kernels, 5×5 convolution kernels, and 7×7 convolution kernels), and then splices and combines them in the fusion layer to obtain a multi-scale comprehensive representation. This design can enhance the model's ability to perceive pathological features at different levels.
[0068] To avoid the loss of spatial structure during feature aggregation, the image patch coordinate information (initial position information) saved in the preprocessing stage is used to remap the extracted features to the original spatial layout of the slices, preserving the complete structural information of the pathological tissue. This design helps improve the accuracy and interpretability of the prediction results.
[0069] Furthermore, in the classification stage, the features, after multi-scale fusion and spatial reconstruction, are input into the classifier, which outputs the P53 mutation prediction results corresponding to the slices. The output format can be binary (mutated / non-mutated) or extended to multi-class (distinguishing between different mutation types).
[0070] This embodiment introduces a prompting mechanism, multi-scale feature fusion, and spatial recovery module, achieving performance optimization based on the traditional multi-instance learning framework. It can significantly improve the accuracy and stability of identifying the P53 mutation status of endometrial cancer while maintaining computational efficiency.
[0071] Furthermore, the feature classification model provided in this embodiment is a Transformer+ classifier framework, and the input of this feature classification model is connected to the output of the aforementioned feature extraction model.
[0072] Generally, feature extraction models and feature classification models are trained on the same training set. During model training, based on the backpropagation principle, the first batch of training parameters are used only to correct the model parameters of the feature extraction model, while subsequent training parameters are used to correct the model parameters of the feature extraction model and the feature classification model.
[0073] This embodiment provides a method for classifying P53 mutations in pathological sections of endometrial cancer, such as... Figure 2 As shown, P53 mutation and Non-P53 mutation are full-view slices, i.e., slices with P53 mutation and slices without P53 mutation. Cropping is the cropping operation. First M feature tokens are the first M feature tokens. Feature token embedding is the feature token embedding. Pretrained model is the pre-trained model (i.e., the feature extraction model). Feature tokens are feature tokens. Class tokens are class tokens. Squaring is the insertion and reshaping operation. TransformerBlock is the core processing structure in the Transformer model. Patch tokens (Hf) are global context information. Identity is the identity mapping. Flatten is the flattening operation. Patch token (Hse) is the information after mapping the multi-scale integrated vector to the spatial location corresponding to the full-view slice. WSI-based score is the score of the full-view slice.
[0074] This embodiment combines a cueing mechanism, multi-scale feature fusion, and spatial structure restoration mechanism to address the shortcomings of existing technologies, such as insufficient accuracy, poor interpretability, and weak generalization between different centers, in complex staining patterns. By preprocessing the full-field pathological slides, they are cropped into multiple fixed-size image patches with recorded spatial location information. A pre-trained feature extraction network is then used to convert these image patches into corresponding high-dimensional feature vectors. During the feature construction stage, the feature vectors are organized into feature tokens, and cue vectors are introduced before inputting them into the Transformer network to guide the model to focus on regional features relevant to the target prediction.
[0075] Based on the features output by the Transformer, multi-scale convolution operations are further used to extract features at different levels, fusing local details and global structural information to form a multi-scale comprehensive representation. Subsequently, based on the spatial location information of image patches, the fused features are remapped into the spatial structure of the original slices to maintain the integrity of the tissue layout. Finally, the recovered features are input into a classifier, which outputs the predicted pathological markers corresponding to the slices.
[0076] Furthermore, this embodiment provides a P53 mutation classification system for endometrial cancer pathological sections, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the above-mentioned P53 mutation classification method for endometrial cancer pathological sections.
[0077] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0078] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0079] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first and second features are in direct contact, or that they are in indirect contact through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0080] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0081] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for classifying P53 mutations in pathological sections of endometrial cancer, characterized in that, include: Based on a pre-set window size and magnification, a full-view slice of endometrial tissue is cropped to obtain multiple image blocks, and the initial position information of each image block is recorded; wherein, each image block is a local tissue fragment of endometrial tissue. Feature extraction is performed on each image patch to obtain the feature vector of each image patch; The feature vectors and initial position information of all image patches are input into a pre-trained feature classification model to obtain classification results that help determine whether P53 mutations have occurred in the full-view slice. The feature classification model is used for: Based on a pre-set sequence concatenation algorithm, all feature vectors are concatenated and a predefined category token is inserted to obtain the corresponding feature sequence; wherein, the category token and any feature vector have the same dimension parameter. The context information of the feature sequence is extracted, and multi-scale feature extraction is performed on the context information based on a pre-set multi-scale feature module to obtain a multi-scale comprehensive vector; Based on the initial position information of each image patch, the multi-scale integrated vector is mapped to the spatial position corresponding to the full-view slice, and feature classification is performed to obtain a classification result used to assist in determining whether a mutation has occurred in P53 in the full-view slice.
2. The method for classifying P53 mutations in endometrial cancer pathological sections according to claim 1, characterized in that, Based on a pre-set sequence concatenation algorithm, all feature vectors are concatenated and a predefined category token is inserted to obtain the corresponding feature sequence, including: Based on a pre-set sequence concatenation algorithm, the order of all feature vectors is determined so that all feature vectors can be concatenated to obtain the corresponding original sequence. A predefined category token is inserted at the beginning of the original sequence to obtain the corresponding feature sequence. Based on the aggregation interface pre-set by the category token, the feature sequence is transformed into a processable embedding sequence of the feature classification model. The aggregation interface is used to enable the category token to interact with all feature vectors.
3. The method for classifying P53 mutations in pathological sections of endometrial cancer according to claim 2, characterized in that, The category token is defined through the following steps: Based on the pre-set target dimensions, determine the corresponding dimension standards; Based on the dimensional standard, an initial token is generated by randomly sampling from a pre-set standard normal distribution. The initial token is a set of trainable parameters for the feature classification model, and the feature dimension of the initial token is the same as the feature dimension of the dimensional standard. When training the feature classification model based on the model training set, the parameters in the initial token are adjusted in real time to obtain the defined category token.
4. The method for classifying P53 mutations in pathological sections of endometrial cancer according to any one of claims 1 to 3, characterized in that, Extracting the contextual information of the feature sequence, including: Based on the environmental perception prompting algorithm, the pre-set prompting vector is fused with the feature sequence; Extract the contextual information of the fused feature sequence.
5. The method for classifying P53 mutations in endometrial cancer pathological sections according to claim 4, characterized in that, The prompt vector is established through the following steps: Based on the pre-acquired first P53 mutation positive slice images of each category, a type correction vector is generated; Based on the staining intensity distribution in multiple pre-acquired images of second P53 mutation positive slides, a staining intensity correction vector is generated. The cue vectors include: a type correction vector and a staining intensity correction vector.
6. The method for classifying P53 mutations in endometrial cancer pathological sections according to claim 4, characterized in that, The category token is located at the beginning of the feature sequence; Then, based on the environmental awareness prompting algorithm, the pre-set prompting vector is fused with the feature sequence, including: Based on the environment-aware cueing algorithm, a pre-set cue vector is inserted into the feature sequence, and the cue vector is located after the category token and before all feature vectors.
7. The method for classifying P53 mutations in endometrial cancer pathological sections according to claim 4, characterized in that, Extract the contextual information of the fused feature sequence, including: Based on the fused feature sequence, the similarity between the cue vector in the feature sequence and each feature vector is obtained, so as to assign weight to the cue word corresponding to each feature vector; Based on the fused feature sequence, the attention weight between each feature vector in the feature sequence and any other feature vector / category token is obtained, and the corresponding attention association matrix is obtained. Based on the attention association matrix and the prompt word weights corresponding to each feature vector, all feature vectors in the fused feature sequence are weighted and integrated to obtain a weighted integrated vector. Based on the weighted integration vector, cue vector, and category token, the contextual information of the fused feature sequence is extracted.
8. The method for classifying P53 mutations in pathological sections of endometrial cancer according to claim 1, characterized in that, Based on a pre-set multi-scale feature module, multi-scale feature extraction is performed on the context information to obtain a multi-scale comprehensive vector, including: The context information is extracted using multiple convolutional kernels of different sizes to obtain the overall structural features and local detail features output by each convolutional kernel. All overall structural features and local detail features are spliced together to obtain a multi-scale composite vector. Several different sizes of convolution kernels are available, including 3×3 convolution kernels, 5×5 convolution kernels, and 7×7 convolution kernels.
9. The method for classifying P53 mutations in pathological sections of endometrial cancer according to claim 1, characterized in that, The full-view slice is obtained through the following steps: Panoramic scanning was performed on pre-acquired glass slides of endometrial cancer tissue to obtain corresponding digital images; the glass slides of endometrial cancer tissue were stained. Semantic segmentation is performed on the digital image to remove the background region and obtain the corresponding full-view slice.
10. A P53 mutation classification system for pathological sections of endometrial cancer, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the P53 mutation classification method for endometrial cancer pathological sections according to any one of claims 1 to 9.