Weakly supervised pathological slice classification method for micro-lesions

By constructing a high-attention enhancement module and enhancing pseudo-bags, the problems of missed detection and false detection in the screening of small lesions were solved, the accuracy and efficiency of pathological slide analysis were improved, and efficient identification of small lesions was achieved.

CN122176352APending Publication Date: 2026-06-09NORTHWEST UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHWEST UNIV
Filing Date
2026-01-27
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies suffer from missed or false detections in screening small lesion sections, making it difficult to balance analytical accuracy and processing efficiency. In particular, the lack of an effective mechanism to enhance the characteristics of small lesions in computer vision-based pathological section analysis leads to insufficient model recognition capabilities.

Method used

We employ a weakly supervised pathological slide classification method for small lesions. By constructing a high-attention enhancement module, we introduce enhancement pseudo-bags during training. These pseudo-bags contain high-attention small lesion features. We then fuse these features through a feature encoding network and an aggregation network to generate slide-level feature vectors, which are then classified using a classifier.

Benefits of technology

It significantly improves the model's ability to perceive small lesions and its slice classification performance, enhances analysis efficiency and accuracy, and provides a more reliable means of pathological image analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176352A_ABST
    Figure CN122176352A_ABST
Patent Text Reader

Abstract

The application relates to a weakly supervised pathological section classification method for micro-lesions, and belongs to the technical field of image analysis, comprising the following steps: constructing a weakly supervised pathological section classification model, wherein the model comprises a feature encoding network, an aggregation network and a classifier; inputting a pathological section to be classified into the trained weakly supervised pathological section classification model to obtain a classification prediction result of the pathological section to be classified. In the training process, a high-attention enhancement module is introduced, an enhanced pseudo bag containing high-attention micro-lesions is constructed on the basis of original normal section features, the model receives the input of the original section and the enhanced pseudo bag in the training process, the discrimination ability of the model for micro-lesions is enhanced, and the classification performance of sparse lesion sections and the model robustness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image analysis, and more specifically, to a weakly supervised pathological section classification method for small lesions. Background Technology

[0002] With the development of digital pathology technology, pathological slides are increasingly being digitally stored and analyzed in the form of ultra-high resolution whole-slide images (WSI), providing a data foundation for computer-aided pathological analysis. However, WSI images are huge in size and dense in information. Traditional manual slide reading methods rely heavily on the professional experience of pathologists, making the reading process time-consuming, labor-intensive, and inefficient. Especially in screening scenarios involving small lesions, due to their small size and scattered distribution, both manual reading and existing automated analysis methods are prone to missed or false positives. In large-scale clinical screening and assisted diagnostic applications, it is difficult to balance analytical accuracy and processing efficiency, and it is hard to meet the requirements of clinical applications for analytical efficiency and stability.

[0003] There are various computer vision-based methods for pathological slide analysis, including traditional machine learning based on artificial features, fully supervised methods based on deep learning, and weakly supervised multi-instance learning (MIL) methods. Among them, existing MIL methods have difficulty actively capturing these key regions during training and lack effective mechanisms to enhance the features of small lesions. This results in insufficient ability of the model to identify early lesions or sparse lesions, thereby affecting the accuracy of slide-level classification and the reliability of clinical diagnosis. Summary of the Invention

[0004] To overcome at least one deficiency in the prior art, this application provides a weakly supervised pathological section classification method for small lesions.

[0005] Firstly, a weakly supervised pathological section classification method for small lesions is provided, including: Obtain the training dataset. The samples in the training dataset are pathological slides, including normal pathological slides and abnormal pathological slides. A weakly supervised pathological slide classification model was constructed, which included a feature encoding network, an aggregation network, and a classifier. The weakly supervised pathological slide classification model was trained based on the training dataset to obtain the trained weakly supervised pathological slide classification model; the training process included: The sample is divided into multiple image patches. The feature encoding network encodes each image patch to obtain image patch encoded features. The encoded features of each image patch are input into the aggregation network, which generates attention weights for each image patch through attention branches. The encoded features of each image patch are weighted and fused based on the attention weights to obtain a slice-level feature vector. The slice-level feature vector is input into the classifier to obtain the slice classification prediction result. A high-attention enhancement module is constructed. The high-attention enhancement module selects the correctly predicted abnormal pathological slices from the slice classification prediction results and determines the image blocks in the selected slices whose attention weights meet the set threshold. Each determined image block is included in the high-attention image block pool. A set proportion of image blocks are randomly selected from the high-attention image block pool to replace some image blocks in the normal pathological slices, generating enhancement pseudo-bags containing micro-tumor features. The enhancement pseudo-bags are used as samples in the training process. The pathological slides to be classified are input into the trained weakly supervised pathological slide classification model to obtain the classification prediction results of the pathological slides to be classified.

[0006] In one embodiment, the feature encoding network adopts the UNI model, which includes a linear embedding layer, a lightweight convolutional layer, a multi-head self-attention module, a feedforward fully connected network, and a self-attention module connected in sequence. Multiple image patches are mapped to high-dimensional feature vectors through a linear embedding layer, while positional encoding is added to preserve spatial information. Lightweight convolutional layers encode local features of the high-dimensional feature vectors to extract tissue texture information, resulting in a local feature sequence. A multi-head self-attention module captures the global distribution of lesions in the slice by modeling long-distance dependencies between image patches, resulting in self-attention features. The self-attention features are then processed through a feedforward fully connected network and the self-attention module to obtain a high-dimensional feature sequence, where each element corresponds to an image patch encoded feature.

[0007] In one embodiment, the method further includes self-supervised pre-training of the feature encoding network, including: Data augmentation is performed on image patches to obtain different views; Different views are input into the feature encoding network to obtain the corresponding feature representations; The feature consistency constraint is calculated, and representation alignment is achieved by minimizing the distance between features, using the following formula:

[0008] in, For feature consistency constraints, Number of views For the first i Each feature represents, For the first j Each feature represents, This represents the L2 norm.

[0009] In one embodiment, the sample is divided into multiple image patches, including: The samples were preprocessed, including the extraction of tissue regions using the OTSU threshold segmentation algorithm. The tissue region is cropped into multiple fixed-size image blocks using a non-overlapping sliding window strategy, and the spatial coordinates of each image block in the original slice are recorded.

[0010] Secondly, a weakly supervised pathological slide classification device for small lesions is provided, comprising: The training dataset acquisition module is used to acquire the training dataset. The samples in the training dataset are pathological slides, including normal pathological slides and abnormal pathological slides. The model building module is used to build a weakly supervised pathological slide classification model, which includes a feature encoding network, an aggregation network, and a classifier. The training module is used to train the weakly supervised pathological slide classification model based on the training dataset, resulting in the trained weakly supervised pathological slide classification model. The training process includes: The sample is divided into multiple image patches. The feature encoding network encodes each image patch to obtain image patch encoded features. The encoded features of each image patch are input into the aggregation network, which generates attention weights for each image patch through attention branches. The encoded features of each image patch are weighted and fused based on the attention weights to obtain a slice-level feature vector. The slice-level feature vector is input into the classifier to obtain the slice classification prediction result. A high-attention enhancement module is constructed. The high-attention enhancement module selects the correctly predicted abnormal pathological slices from the slice classification prediction results and determines the image blocks in the selected slices whose attention weights meet the set threshold. Each determined image block is included in the high-attention image block pool. A set proportion of image blocks are randomly selected from the high-attention image block pool to replace some image blocks in the normal pathological slices, generating enhancement pseudo-bags containing micro-tumor features. The enhancement pseudo-bags are used as samples in the training process. The classification module is used to input the pathological slides to be classified into the trained weakly supervised pathological slide classification model to obtain the classification prediction results of the pathological slides to be classified.

[0011] Thirdly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the aforementioned weakly supervised pathological slide classification method for small lesions.

[0012] Fourthly, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the aforementioned weakly supervised pathological slide classification method for small lesions.

[0013] Compared to existing technologies, this application offers the following advantages: It introduces a high-attention enhancement module during feature aggregation. By constructing an enhanced pseudo-bag containing high-attention micro-lesions based on the original normal slice features, the model receives input from both the original slice and the enhanced pseudo-bag during training. In this way, the network can learn the differences between the two in the feature space, thereby actively focusing on micro-lesions and strengthening their discriminative features. Furthermore, this strategy not only effectively expands the number of training samples and increases data diversity, enabling the model to more fully learn the feature distribution of sparse lesions, but also significantly improves the overall discriminative ability of the model, enhancing its perception of micro-lesions and slice classification performance, thus providing a more reliable and efficient technical means for pathological image analysis. Attached Figure Description

[0014] This application can be better understood by referring to the description given below in conjunction with the accompanying drawings, which, together with the detailed description below, are incorporated in and form part of this specification. In the drawings: Figure 1 A flowchart of a weakly supervised pathological section classification method for small lesions is shown; Figure 2 A schematic diagram of a weakly supervised pathological slide classification model is shown. Figure 3 The results of the attention heatmap visualization are shown. Detailed Implementation

[0015] Exemplary embodiments of the present application will be described below with reference to the accompanying drawings. For clarity and brevity, not all features of the actual embodiments are described in the specification. However, it should be understood that many embodiment-specific decisions can be made in the development of any such actual embodiment to achieve the developer’s specific objectives, and these decisions may vary as the embodiments differ.

[0016] It should also be noted that, in order to avoid obscuring this application with unnecessary details, only the device structure closely related to the solution of this application is shown in the accompanying drawings, while other details that are not closely related to this application are omitted.

[0017] It should be understood that this application is not limited to the described embodiments by virtue of the following description with reference to the accompanying drawings. In this document, embodiments may be combined with each other, features may be substituted or borrowed between different embodiments, and one or more features may be omitted in one embodiment, where feasible.

[0018] This application provides a weakly supervised pathological section classification method for small lesions. Figure 1 A flowchart illustrating a weakly supervised pathological section classification method for small lesions is shown. See [link to flowchart]. Figure 1 The methods mainly include: Step S1: Obtain the training dataset. The samples in the training dataset are pathological slides, including normal pathological slides and abnormal pathological slides.

[0019] Here, the Camelyon16 and Camelyon17 datasets were used, containing a total of 1349 pathological slides, including 870 positive slides (abnormal pathological slides) and 479 negative slides (normal pathological slides). Only slide-level overall labels are provided for weakly supervised identification of lymph node metastasis in breast cancer.

[0020] Step S2: Construct a weakly supervised pathological slide classification model, which includes a feature encoding network, an aggregation network, and a classifier.

[0021] Figure 2 A schematic diagram of a weakly supervised pathological slide classification model is shown. The feature encoding network adopts the UNI model, which includes a linear embedding layer, a lightweight convolutional layer, a multi-head self-attention module, a feedforward fully connected network, and a self-attention module connected in sequence. Multiple image patches are mapped to high-dimensional feature vectors through a linear embedding layer, while positional encoding is added to preserve spatial information. Lightweight convolutional layers encode local features of the high-dimensional feature vectors to extract tissue texture information, resulting in a local feature sequence. A multi-head self-attention module captures the global distribution of lesions in the slice by modeling long-distance dependencies between image patches, resulting in self-attention features. The self-attention features are then processed through a feedforward fully connected network and the self-attention module to obtain a high-dimensional feature sequence, where each element corresponds to an image patch encoded feature.

[0022] To enhance the feature encoding network's ability to express pathological tissue structures, this embodiment performs self-supervised pre-training on the encoding network, ensuring that the features generated by the network remain consistent under different augmented views, thereby capturing local and global tissue information of the slide, including: Data augmentation is performed on image patches to obtain different views; Different views are input into the feature encoding network to obtain the corresponding feature representations; The feature consistency constraint is calculated, and representation alignment is achieved by minimizing the distance between features, using the following formula:

[0023] in, For feature consistency constraints, Number of views For the first i Each feature represents, For the first j Each feature represents, This represents the L2 norm.

[0024] The aggregation network includes an attention branch and a feature fusion layer. The aggregation network receives image patch-encoded feature sequences from the output of the feature encoding network. , Encode the number of features for each image patch, and generate attention weights for each image patch through attention branches. Furthermore, the features of each image patch are weighted and integrated in the feature fusion layer to obtain slice-level feature vectors. :

[0025] In the feature fusion process, a normalization operation is introduced to ensure feature stability and information integrity.

[0026] The classifier uses a fully connected layer structure to map slice-level feature vectors to the category space and calculates the prediction score for each category using the SoftMax function, thereby completing slice-level classification prediction.

[0027] Step S3: Train the weakly supervised pathological slide classification model based on the training dataset to obtain the trained weakly supervised pathological slide classification model; the training process includes: The sample is divided into multiple image patches. The feature encoding network encodes each image patch to obtain image patch encoded features. The encoded features of each image patch are input into the aggregation network, which generates attention weights for each image patch through attention branches. The encoded features of each image patch are weighted and fused based on the attention weights to obtain a slice-level feature vector. The slice-level feature vector is input into the classifier to obtain the slice classification prediction result. A high-attention enhancement module is constructed. The high-attention enhancement module selects the correctly predicted abnormal pathological slices from the slice classification prediction results and determines the image blocks in the selected slices whose attention weights meet the set threshold. Each determined image block is included in the high-attention image block pool. A set proportion of image blocks are randomly selected from the high-attention image block pool to replace some image blocks in the normal pathological slices, generating enhancement pseudo-bags containing micro-tumor features. The enhancement pseudo-bags are used as samples in the training process.

[0028] Here, during training, the module can combine high-attention instances with original slice image patches to form enhanced pseudo-bags. While maintaining the consistency of the overall structure of the original tissue, it introduces local highly discriminative features to simulate the scenario of small lesions.

[0029] The high-attention enhancement module guides the model to perceive fine-grained differences during training by comparing the feature differences between the original slices and the enhanced pseudo-bags. This contrast mechanism can explicitly amplify the representation intensity of small lesion features in the feature space, enabling the model to automatically learn discriminative information sensitive to small lesions under weak supervision. The module adopts a closed-loop iterative design, with the high-attention image block pool and enhanced pseudo-bags dynamically updated in each training round. This allows the model to continuously optimize its ability to perceive small lesions and slice-level classification performance, while ensuring the stability of the global feature representation.

[0030] Specifically, the samples are divided into multiple image patches, including: The samples were preprocessed, including the extraction of tissue regions using the OTSU threshold segmentation algorithm. The tissue region is cropped into multiple fixed-size image blocks using a non-overlapping sliding window strategy, and the spatial coordinates of each image block in the original slice are recorded.

[0031] Step S4: Input the pathological slide to be classified into the trained weakly supervised pathological slide classification model to obtain the classification prediction result of the pathological slide to be classified. Here, the classification prediction result indicates whether the pathological slide to be classified is a normal pathological slide or an abnormal pathological slide.

[0032] By employing the aforementioned techniques, a high-attention enhancement module is used to improve the model's ability to discriminate minute lesions, thereby enhancing the classification performance and robustness of sparse lesion sections. During the inference phase, pathological sections can be directly input into the trained model, and section-level classification results can be obtained through forward propagation without additional annotation or manual intervention, thus achieving end-to-end automated analysis.

[0033] Table 1 shows the experimental results of slice classification of the proposed method and existing methods. According to Table 1, the proposed method outperforms existing multi-instance learning methods (such as CLAM, DS-MIL, DGR-MIL, etc.) in multiple dimensions such as slice classification accuracy, recall and F1 score, which verifies the effectiveness and superiority of the proposed method in the task of identifying small lesions.

[0034] By generating slice-level attention heatmaps, the method in this application can visually identify key areas of minute lesions. For example... Figure 3With the help of the high attention enhancement module, the method in this application can highlight the discriminative features of lesion areas during the slice-level feature aggregation process, thereby generating an attention heatmap that can effectively identify small lesion areas. This technology not only provides pathologists with auxiliary reference and makes the prediction results interpretable, but also enhances the application value of the model in clinical scenarios, helps to increase doctors' trust in the model's prediction results, and improves the usability and reliability of pathological auxiliary diagnosis.

[0035] Based on the same inventive concept as the weakly supervised pathological slide classification method for small lesions, this embodiment also provides a corresponding weakly supervised pathological slide classification device for small lesions, including: The training dataset acquisition module is used to acquire the training dataset. The samples in the training dataset are pathological slides, including normal pathological slides and abnormal pathological slides. The model building module is used to build a weakly supervised pathological slide classification model, which includes a feature encoding network, an aggregation network, and a classifier. The training module is used to train the weakly supervised pathological slide classification model based on the training dataset, resulting in the trained weakly supervised pathological slide classification model. The training process includes: The sample is divided into multiple image patches. The feature encoding network encodes each image patch to obtain image patch encoded features. The encoded features of each image patch are input into the aggregation network, which generates attention weights for each image patch through attention branches. The encoded features of each image patch are weighted and fused based on the attention weights to obtain a slice-level feature vector. The slice-level feature vector is input into the classifier to obtain the slice classification prediction result. A high-attention enhancement module is constructed. The high-attention enhancement module selects the correctly predicted abnormal pathological slices from the slice classification prediction results and determines the image blocks in the selected slices whose attention weights meet the set threshold. Each determined image block is included in the high-attention image block pool. A set proportion of image blocks are randomly selected from the high-attention image block pool to replace some image blocks in the normal pathological slices, generating enhancement pseudo-bags containing micro-tumor features. The enhancement pseudo-bags are used as samples in the training process. The classification module is used to input the pathological slides to be classified into the trained weakly supervised pathological slide classification model to obtain the classification prediction results of the pathological slides to be classified.

[0036] The weakly supervised pathological slide classification device for small lesions in this embodiment has the same inventive concept as the weakly supervised pathological slide classification method for small lesions described above. Therefore, the specific implementation of this device can be found in the embodiment section of the weakly supervised pathological slide classification method for small lesions described above, and its technical effects correspond to the technical effects of the above method, so it will not be repeated here.

[0037] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the aforementioned weakly supervised pathological slide classification method for small lesions.

[0038] This application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the aforementioned weakly supervised pathological slide classification method for small lesions.

[0039] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A weakly supervised pathological section classification method for small lesions, characterized in that, include: Obtain a training dataset, wherein the samples in the training dataset are pathological slides, and the samples in the training dataset include normal pathological slides and abnormal pathological slides; A weakly supervised pathological slide classification model was constructed, which included a feature encoding network, an aggregation network, and a classifier. The weakly supervised pathological slide classification model is trained based on the training dataset to obtain the trained weakly supervised pathological slide classification model. The training process includes: The sample is divided into multiple image patches. The feature encoding network encodes each image patch to obtain image patch encoding features. The image patch encoding features are input into the aggregation network, and attention weights for the image patches are generated through attention branches. The image patch encoding features are then weighted and fused based on the attention weights to obtain a slice-level feature vector. The slice-level feature vector is input into the classifier to obtain the slice classification prediction result. A high-attention enhancement module is constructed. In the slice classification prediction results, the high-attention enhancement module selects the correctly predicted abnormal pathological slices and determines the image blocks in the selected slices whose attention weights meet the set threshold. Each determined image block is included in the high-attention image block pool. A set proportion of image blocks are randomly selected from the high-attention image block pool to replace some image blocks in the normal pathological slices, generating an enhancement pseudo-bag containing micro-tumor features. The enhancement pseudo-bag is used as a sample in the training process. The pathological slide to be classified is input into the trained weakly supervised pathological slide classification model to obtain the classification prediction result of the pathological slide to be classified.

2. The method as described in claim 1, characterized in that, The feature encoding network adopts the UNI model, which includes a linear embedding layer, a lightweight convolutional layer, a multi-head self-attention module, a feedforward fully connected network, and a self-attention module connected in sequence. Multiple image patches are mapped into high-dimensional feature vectors through the linear embedding layer, while positional encoding is added to preserve spatial information. The lightweight convolutional layer performs local feature encoding on the high-dimensional feature vectors to extract tissue texture information, resulting in a local feature sequence. The multi-head self-attention module captures the global distribution of lesions in the slice by modeling long-distance dependencies between image patches, resulting in self-attention features. The self-attention features are then processed by the feedforward fully connected network and the self-attention module to obtain a high-dimensional feature sequence, where each element in the high-dimensional feature sequence corresponds to an image patch encoding feature.

3. The method as described in claim 1, characterized in that, The method further includes self-supervised pre-training of the feature encoding network, including: Data augmentation is performed on image patches to obtain different views; The different views are input into a feature encoding network to obtain the corresponding feature representations; The feature consistency constraint is calculated, and representation alignment is achieved by minimizing the distance between features, using the following formula: in, For feature consistency constraints, Number of views For the first i Each feature represents, For the first j Each feature represents, This represents the L2 norm.

4. The method as described in claim 1, characterized in that, The sample is divided into multiple image patches, including: The samples are preprocessed, including: extracting tissue regions using the OTSU threshold segmentation algorithm; The tissue region is cropped into multiple fixed-size image blocks using a non-overlapping sliding window strategy, and the spatial coordinates of each image block in the original slice are recorded.

5. A weakly supervised pathological slide classification device for small lesions, characterized in that, include: The training dataset acquisition module is used to acquire a training dataset, wherein the samples in the training dataset are pathological slides, and the samples in the training dataset include normal pathological slides and abnormal pathological slides. The model building module is used to build a weakly supervised pathological slide classification model, which includes a feature encoding network, an aggregation network, and a classifier. The training module is used to train the weakly supervised pathological slide classification model based on the training dataset to obtain the trained weakly supervised pathological slide classification model. The training process includes: The sample is divided into multiple image patches. The feature encoding network encodes each image patch to obtain image patch encoding features. The image patch encoding features are input into the aggregation network, and attention weights for the image patches are generated through attention branches. The image patch encoding features are then weighted and fused based on the attention weights to obtain a slice-level feature vector. The slice-level feature vector is input into the classifier to obtain the slice classification prediction result. A high-attention enhancement module is constructed. In the slice classification prediction results, the high-attention enhancement module selects the correctly predicted abnormal pathological slices and determines the image blocks in the selected slices whose attention weights meet the set threshold. Each determined image block is included in the high-attention image block pool. A set proportion of image blocks are randomly selected from the high-attention image block pool to replace some image blocks in the normal pathological slices, generating an enhancement pseudo-bag containing micro-tumor features. The enhancement pseudo-bag is used as a sample in the training process. The classification module is used to input the pathological slide to be classified into the trained weakly supervised pathological slide classification model to obtain the classification prediction result of the pathological slide to be classified.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the weakly supervised pathological section classification method for small lesions as described in any one of claims 1-4.

7. A computer program product, characterized in that, Includes a computer program / instruction, which, when executed by a processor, implements the weakly supervised pathological section classification method for small lesions as described in any one of claims 1-4.