Method and system for classifying full slice images
By using Shapley score scoring and a progressive pseudo-bag enhancement framework, the problems of unbalanced attention distribution and inaccurate instance importance score estimation in full-slice image classification are solved, improving the accuracy and generalization ability of the model and achieving a more balanced attention distribution and pseudo-bag allocation.
Patent Information
- Application Number
- CN202510562049.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-09
- Filing Date
- 2025-04-30
- Publication Date
- 2025-11-11
AI Technical Summary
Existing multi-instance learning methods suffer from uneven attention distribution and inaccurate instance importance score estimation in full-slice image classification, leading to undertraining and the introduction of noisy labels, which affects the accuracy and generalization ability of the model.
Shapley score is used to determine instance importance score, and the multi-instance learning method is improved by progressive pseudo-bag enhancement framework. The contribution of each instance is evaluated by Shapley score, and the attention mechanism is combined to accelerate the calculation, so as to achieve a more balanced attention distribution and pseudo-bag allocation.
It improves the accuracy of whole-slice image classification and the model's generalization ability, significantly improves instance recognition and priority ranking, solves the problems of attention distribution skew and mislabeling, and enhances the interpretability and interpretability of the model.
Smart Images

Figure CN120931974A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates broadly, but not exclusively, to methods and systems for classifying whole slice images (WSI), and to methods and systems for classifying tissue specimens. Background Technology
[0002] In computational pathology, whole-slide image (WSI) classification faces significant challenges due to its gigapixel resolution and limited fine-grained annotation. Multiple-instance learning (MIL) offers a weakly supervised solution, but extracting instance-level information from bag-level labels remains complex. While most traditional MIL methods use attention scores to estimate instance importance scores (IIS), which aids in predicting slide labels, these methods often lead to skewed attention distributions and inaccuracies in identifying key instances.
[0003] Recent advances in digital pathology and artificial intelligence have significantly expanded the potential for analyzing whole-slice images (WSIs) in diagnostic contexts, prognostic assessments, and a variety of clinical tasks. A key component of this field is WSI classification, a fundamental and crucial process distinguished from typical natural image classification by the gigapixel resolution of WSIs. The complexity of WSI classification tasks necessitates specialized methods such as Multi-Instance Learning (MIL). The principle of MIL is that if at least one positive instance is present in a bag, the entire bag is classified as positive; otherwise, it is considered negative. Most current MIL research is based on the fundamental idea of extracting more instance-level information from bag-level labels. In this paradigm, attention-based pooling is a prominent technique because the attention score α generated for each instance in the bag naturally serves as an option for estimating the contribution of each instance, known as the Instance Importance Score (IIS). For example, the attention score plays a crucial role in helping the MIL model identify important instances to reduce overfitting. Furthermore, some studies have utilized attention scores to fine-tune feature encoders. Attention scores have such a powerful influence that these studies operate on the assumption that key (positive) instances can be identified by selecting those instances with high attention scores.
[0004] However, as Figure 1 As shown in (a) through (c), attention-based MIL encounters many challenges, such as:
[0005] Extreme distribution of attention: A limited number of instances receive the majority of attention scores. For example, the top 10 attention scores account for more than 75% of the total. This concentration leads to undertraining.
[0006] Misidentifying positive instances by using high-ranking attention scores: Positive instances are not guaranteed to rank highly. Both positive and negative instances can be filtered out using high-ranking attention scores. Assigning only positive labels to these instances during training or fine-tuning can introduce noise.
[0007] Figure 1 Figures (a) through (c) show the attention distribution and the top 5 instances of a sample slice in the CAMELYON-16 dataset. Figure 1 In (a) through (c), ABMIL, CLAM, and DTFD were used, respectively. In the "Attention Distribution" column, the patch index of all patches spanning all slices in the left subimage was normalized to the range of 0 to 1. Notably, the distribution of attention scores is skewed, with a few instances accumulating a significant share. In the "Top 5 Instances" column, the attention scores of positive instances (shown by dashed borders) are not consistently ranked because negative instances (shown by solid borders) may occupy a priority position in the queue. Summary of the Invention
[0008] According to one embodiment, a computer-implemented method for classifying whole-slice images (WSIs) is provided, comprising: extracting a plurality of instances from the WSIs; determining an instance importance score (IIS) for each of the plurality of instances, wherein the IIS is determined based on a Shapley value score, and wherein the Shapley value score is based on the contribution of each of the plurality of instances; assigning each of the plurality of instances to one of a plurality of pseudo-bags based on the determined IIS; and inputting each of the plurality of instances assigned to one of the plurality of pseudo-bags into a multi-instance learning (MIL) classifier.
[0009] According to another embodiment, a computer-implemented method for classifying tissue specimens is provided, comprising: extracting a plurality of instances from whole-slice images (WSIs) of the tissue specimen; and inputting each of the plurality of instances into a multi-instance learning (MIL) classifier to determine a pathological classification of the tissue specimen, wherein the MIL classifier is trained by a training corpus comprising training WSIs, and wherein training the MIL classifier comprises: extracting a plurality of training instances from the training WSIs; determining an instance importance score (IIS) for each of the plurality of training instances, wherein the IIS is determined based on a Shapley score, and the Shapley score is based on the contribution of each of the plurality of training instances; and assigning each of the plurality of training instances to one of a plurality of pseudobags based on the determined IIS.
[0010] According to another embodiment, a system for classifying whole slice images (WSI) is provided, comprising: a processor module; and a memory module containing computer program code; the memory module and the computer program code are configured, together with the processor module, to cause the system to perform at least the following operations: extracting a plurality of instances from the WSI; determining an Instance Importance Score (IIS) for each of the plurality of instances, wherein the IIS is determined based on a Shapley score, and the Shapley score is based on the contribution of each of the plurality of instances; assigning each of the plurality of instances to one of a plurality of pseudo-bags based on the determined IIS; and inputting each of the plurality of instances assigned to one of the plurality of pseudo-bags into a Multi-Instance Learning (MIL) classifier.
[0011] According to yet another embodiment, a system for classifying tissue specimens is provided, comprising: a processor module; and a memory module containing computer program code; the memory module and the computer program code being configured, together with the processor module, to cause the system to perform at least the following operations: extracting a plurality of instances from whole-slice images (WSIs) of the tissue specimen; and inputting each of the plurality of instances into a multi-instance learning (MIL) classifier to determine a pathological classification of the tissue specimen. The MIL classifier is trained by a training corpus containing training WSIs, and wherein training the MIL classifier includes: extracting a plurality of training instances from the training WSIs; determining an instance importance score (IIS) for each of the plurality of training instances, wherein the IIS is determined based on a Shapley score, and the Shapley score is based on the contribution of each of the plurality of training instances; and assigning each of the plurality of training instances to one pseudobag from a plurality of pseudobags based on the determined IIS. Attached Figure Description
[0012] Embodiments of the invention will be better understood and readily appreciated by those skilled in the art through the following written description, given by way of example only, in conjunction with the accompanying drawings:
[0013] Figure 1 (a) through (c) show the attention distribution and the top 5 instances of an example slice from the CAMELYON-16 dataset. Figure 1 (d) shows the relationship with ABMIL, CLAM, and DTFD (i.e., corresponding to respectively). Figure 1 Compared to (a) to (c), the PMIL framework according to one embodiment achieves a more uniform attention distribution.
[0014] Figure 2 (a) and (b) illustrate a PMIL framework according to one embodiment.
[0015] Figure 3 The bag-level performance results are shown in five repeatable experiments conducted on the CAMELYON-16, BRACS, and TCGA-LUNG test sets.
[0016] Figure 4 The instance-level performance results are shown for five repeatable experiments conducted on the CAMELYON-16 test set.
[0017] Figure 5 A visualization of pseudo-bag allocation using the PMIL framework according to one embodiment is shown.
[0018] Figure 6 (a) through (c) show heatmaps of four sub-fields using different models and IIS estimates.
[0019] Figure 7 The performance results of pseudo-bag enhancement using different IIS metrics are shown on the CAMELYON-16, BRACS, and TCGA-LUNG test sets.
[0020] Figure 8 The performance of the model according to one embodiment is shown on the CAMELYON-16 dataset.
[0021] Figure 9 Repeatability results for various hyperparameters μ and τ used in Shapley value acceleration according to one embodiment are shown.
[0022] Figure 10 The results of pseudo-bag enhancement using different progressive strategies are shown on the CAMELYON-16, BRACS, and TCGA-LUNG test sets.
[0023] Figure 11 This is a flowchart illustrating a computer-implemented method for classifying whole slice images (WSI) according to one embodiment.
[0024] Figure 12 This is a flowchart illustrating a computer-implemented method for classifying tissue specimens according to one embodiment.
[0025] Figure 13 An exemplary computing device according to one embodiment is shown. Detailed Implementation
[0026] Some parts of the following description are presented, explicitly or implicitly, as algorithms and functions or symbolic representations of data operations within computer memory. These algorithmic descriptions and functional or symbolic representations are the means by which those skilled in the art of data processing most effectively communicate the substance of their work to others skilled in the art. Here, an algorithm is generally considered to be a series of self-consistent steps that lead to a desired result. These steps are steps that require physical manipulation of physical quantities, such as electrical, magnetic, or optical signals that can be stored, transmitted, combined, compared, and otherwise manipulated.
[0027] Unless otherwise specified and as will be apparent from the following text, it is understood that throughout this specification, the use of terms such as “scan,” “calculate,” “determine,” “replace,” “generate,” “initialize,” “output,” or similar terms refers to the actions and processes of a computer system or similar electronic device that manipulate and convert data represented as physical quantities within the computer system into other data similarly represented as physical quantities within the computer system or other information storage, transmission, or display device.
[0028] This specification also discloses apparatus for performing these methods. Such apparatus may be specifically constructed for the desired purpose, or may include a computer or other device that can be selectively activated or reconfigured by a computer program stored in the computer. The algorithms and displays presented herein are not inherently related to any particular computer or other device. Various machines can be used with the programs taught herein. Alternatively, more specialized apparatus may be constructed to perform the desired method steps. The structure of a conventional computer will be shown in the description below.
[0029] Furthermore, this specification implicitly discloses a computer program, as it will be readily apparent to those skilled in the art that the various steps of the methods described herein can be implemented using computer code. The computer program is not intended to be limited to any particular programming language or its implementation. It is understood that the teachings of the disclosure contained herein can be implemented using various programming languages and their encoding. Moreover, the computer program is not intended to be limited to any particular control flow. The computer program also has many other variations, which may use different control flows without departing from the spirit or scope of the invention.
[0030] Furthermore, one or more steps of a computer program can be executed in parallel, rather than sequentially. Such a computer program can be stored on any computer-readable medium. Computer-readable media can include, for example, disks or optical discs, memory chips, or other storage devices suitable for interfacing with a computer. Computer-readable media can also include hardwired media (such as those exemplified in Internet systems) or wireless media (such as those exemplified in GSM, GPRS, 3G, or 4G mobile phone systems) and other wireless systems (such as Bluetooth, ZigBee, and Wi-Fi). When a computer program is loaded onto and executed on such a computer, it effectively produces apparatus for implementing the steps of the preferred method.
[0031] This invention can also be implemented as a hardware module. More specifically, in a hardware sense, a module is a functional hardware unit designed for use with other components or modules. For example, a module can be implemented using discrete electronic components, or it can be part of an overall electronic circuit, such as an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA). Many other possibilities also exist. It will be understood by those skilled in the art that the system can also be implemented as a combination of hardware and software modules.
[0032] Embodiments of this invention aim to provide a scheme for accurate cancer subtype analysis from whole-slice images of pathology (WSI) using a cooperative game theory-inspired multi-instance learning (MIL) framework, specifically employing Shapley scores to assess the contribution of each instance. Embodiments of this invention aim to improve the accuracy of the instance importance score (IIS), which is crucial for model accuracy, and integrate an attention mechanism to accelerate the computation of Shapley scores, which is traditionally a computationally intensive task. This not only speeds up the process but also improves instance identification and prioritization, addressing a significant challenge in large-scale medical image analysis. Furthermore, embodiments of this invention aim to provide a progressive framework for allocating pseudo-bags based on refined IIS, thereby promoting a balanced attention distribution among instances, reducing attention bias, and allowing the detection of subtle clinically relevant features.
[0033] In computational pathology, whole-slice image (WSI) classification presents a formidable challenge due to its gigapixel resolution and limited fine-grained annotation. Multi-instance learning (MIL) offers a weakly supervised solution, but refining instance-level information from bag-level labels remains complex. While most traditional MIL methods use attention scores to estimate the instance importance score (IIS) that contributes to predicting slice labels, these methods often result in skewed attention distribution and inaccuracies in identifying key instances. To address these issues, embodiments of the present invention employ Shapley values to evaluate the contribution of each instance, thereby improving IIS estimation. Attention is then leveraged to accelerate Shapley value computation while preserving enhanced instance identification and prioritization. A progressive allocation framework for pseudo-bags based on the estimated IIS is introduced to encourage a more balanced attention distribution within the MIL model.
[0034] To address attention-based MIL (as mentioned above) Figure 1 Addressing the inherent problems described in (a) through (c), embodiments of the present invention aim to provide a progressive pseudo-bag augmentation MIL framework, referred to as PMIL. This framework fully leverages pseudo-bag augmentation techniques guided by Shapley values. According to one embodiment, pseudo-bag augmentation is first applied to MIL to encourage models to focus on more important instances. Furthermore, to improve the mislabeling problem in pseudo-bag augmentation, Shapley values are introduced as a means of IIS estimation to constrain the assignment strategy, rather than random segmentation. Regular bags are segmented into a series of pseudo-bags in a reasonable manner, thereby reducing the inherent noise associated with pseudo-bag creation and enhancing the generalization ability of the models.
[0035] To address the limitations of attention score-based IIS in terms of ranking accuracy and interpretation, embodiments of the present invention introduce an accelerated Shapley value with linear computational complexity to measure IIS in a multi-instance learning context.
[0036] By using IIS based on Shapley values, embodiments of the present invention provide a progressive pseudo-bag enhancement multi-instance learning framework that effectively improves MIL performance.
[0037] Extensive experiments were conducted on the CAMELYON-16, BRACS, and TCGA-LUNG datasets to demonstrate that embodiments of the present invention outperform other prior art methods in both slice-level and instance-level evaluation, and provide categorical interpretation by utilizing IIS based on Shapley values.
[0038] Shapley value approximation
[0039] For the sake of brevity, details regarding the Shapley value will not be described in this specification. The Shapley value provides a solution in cases of falsely identified positive instances, quantifying the contribution of each instance based on its interactions with other instances. Further details can be found in the following literature: Shapley, Lloyd S. et al., 1953, “A Value for n-Person Games”; Messialas, Andreas, Yiannis Kanellopoulos, and Christos Makris, 2019, “Model-Agnostic Interpretability with Shapley Values”, 10th International Conference on Information, Intelligence, Systems and Applications (IISA), 1-7, IEEE; Tang, Siyi, Amirata Ghorbani, Rikiya Yamashita, Sameer Rehman, Jared A. Dunnmon, James Zou, and Daniel L. Rubin, 2021, “Data Valuation for Medical Imaging Using Shapley Value and Application to a Large-Scale Chest x-Ray”. Dataset (using Shapley values to estimate medical imaging data and applying it to a large-scale chest X-ray dataset), Scientific Reports 11(1): 8366.
[0040] The following description will cover the MIL paradigm and pseudo-bag enhancement techniques. Next, it will describe IIS based on Shapley values to improve pseudo-bag allocation. Following this, the PMIL framework according to embodiments of the present invention will be described.
[0041] MIL in WSI classification
[0042] In this task, the training set of labeled WSIs is represented as in This indicates that N is included after feature extraction. i The goal is to learn the mapping: x→y, where x is the bag space and y is the label space. The traditional MIL classifier maps the aggregated bag-level representation to predictions as follows:
[0043]
[0044] Where g(·) and f(·) represent the aggregator and fully connected (FC) layer in the MIL classifier, respectively.
[0045] Attention-based MIL method
[0046] In attention-based MIL models, the attention score derived from the pooling operation is typically used to measure IIS. Specifically, the attention score (denoted by α) is calculated for each instance in the bag and measures its importance in the overall classification decision. Therefore, attention-based aggregation can be represented as:
[0047]
[0048] Where, α i,j Let represent the attention score assigned to the j-th instance in the i-th bag. By combining these attention scores, the model not only improves its prediction accuracy but also gains insight into which instances have the most significant impact on the classification results.
[0049] Pseudobag reinforcement for MIL
[0050] For the MIL with pseudo-bag augmentation, the regular bags are randomly divided into M pseudo-bags, and each pseudo-bag inherits the label of its parent bag, thus obtaining an expanded training set. in It refers to the number of bags.
[0051] Obtained via Formula 1 The objective function for MIL augmentation with pseudo-bags is defined as follows:
[0052]
[0053] Where θ represents the parameters of the MIL classifier. This represents the cross-entropy loss function. However, the labels inherited from the parent bag are not always consistent with the actual labels of the pseudo-bags. Therefore, the objective function in formula (3) can be further divided into two parts:
[0054]
[0055] Where ε is the number of fake bags with incorrectly assigned labels.
[0056] Equation (4) reveals the trade-off between enhancing instance diversity and introducing additional noise. It is important to emphasize that the existing MIL method employs a strategy of randomly dividing bags into pseudo-bags, which leads to suboptimal results.
[0057] IIS estimation based on Shapley value
[0058] from Figure 1As can be seen from (a) to (c), α may not accurately reflect the ranking of importance. Therefore, embodiments of the present invention introduce the Shapley value φ as an alternative method to the attention score for estimating IIS:
[0059]
[0060] Where, x i,j It is used to calculate the Shapley value φ i,j The j-th feature in the i-th bag, X i It is the complete feature set of the i-th bag. It is all available subsets.
[0061] A close examination of formula (5) reveals that the computational complexity of the original Shapley value formula increases exponentially with the number of instances, which is extremely time-consuming in WSI classification because each bag contains thousands of instances. To expedite this process, several methods have been developed to efficiently approximate the Shapley value. It is worth noting that, according to the principles of MIL, the bag label is determined by the positive instance. Under this premise, embodiments of the present invention leave less important instances in the attention score order, focusing instead on rearranging the importance ranking of instances that have high attention scores through their Shapley-based IIS:
[0062]
[0063] in, and X represents a subset of instances with high attention scores and low attention scores, and X i It is a common set for all instances.
[0064] For the sake of simplicity, The number of instances in the array is set to μM, and Let the number of samples be τ. Assuming the inference time for each bag of the model is approximately constant γ, the computational complexity of different IIS estimates can be quantified as follows:
[0065]
[0066] Where Ω is the asymptotic lower bound of the computational complexity, and It is a combined value. According to formula (5), the calculation of the Shapley value involves exponential computational complexity, while the calculation of the attention score exhibits linear complexity. By employing an approximation technique, embodiments of the present invention transform the Shapley-based IIS calculation into linear complexity as shown in formula (9), while ensuring that its ranking accuracy remains unchanged in the multi-instance learning domain.
[0067] IIS-based pseudo-bag enhancement
[0068] like Figure 2 As shown in (b), the instances within each bag are rearranged according to the IIS sorting, as represented as constraining x′ using the modulo function mod i,j To satisfy j≡k(mod M), these instances are uniformly staggered into M pseudo-bags, resulting in each pseudo-bag... Indicates originating from X′ i The sample. By fixing the parameters θ of the MIL model, the optimization of ε can be approximated as:
[0069]
[0070] Where Γ(X′) is the instance importance distribution of X′ with estimated IIS, and D KL It is the Kullback-Leibler divergence function. Therefore, the optimization of ε is transformed into the optimization of Γ(X′), where the estimation of IIS plays a decisive role.
[0071] Furthermore, it is important to consider a gradual strategy regarding the number of pseudo-bags and initialization. Dividing regular bags into a large number of pseudo-bags can introduce excessive noise, which may lead to training instability, especially when regular bags contain only a limited number of positive instances. To address this issue, embodiments of the present invention gradually increase the number of pseudo-bags during training as the MIL model converges:
[0072]
[0073] Where t represents the convergence iteration, ΔM represents the increasing number of pseudo-bags, and M0 and M max These represent the initial and maximum number of pseudo-bags, respectively. Furthermore, the initial allocation of pseudo-bags significantly impacts subsequent training, especially when dealing with challenging datasets. To address this issue, embodiments of the present invention progressively enhance the initial pseudo-bags by calculating instance importance scores and utilizing the previously trained MIL model.
[0074] MIL with progressive pseudo-bag reinforcement
[0075] Guided by the IIS estimated via Shapley values (instead of the attention scores used in existing architectures), embodiments of the present invention aim to provide a progressive pseudo-bag augmentation MIL framework (referred to as "PMIL"). To mitigate the mislabeling problem in Equation (4), embodiments of the present invention employ the Expectation-Maximization (EM) algorithm to obtain optimal pseudo-bag label assignment. Specifically, the parameters θ of the MIL model can be learned via Equation (3) as the M-step, while the minimization problem for ε is transformed into pseudo-bag assignment optimization via Equation (10). Figure 2 As shown in (b), this iterative optimization is achieved in n rounds of training.
[0076] like Figure 2 As shown, the PMIL framework is illustrated. Figure 2 In (a), the set of image patches extracted from WSI is divided into M (increasingly larger) pseudo-bags based on their estimated IIS, and then trained in the same manner as regular bags. Figure 2 In (b), the weights of the MIL model are frozen to estimate the IIS for easier pseudo-bag assignment. When the MIL model converges in round 0, the number of pseudo-bags M gradually increases throughout the iterations, and the initial pseudo-bags are assigned using the IIS estimated by the MIL model in the previous round. Pseudo-bag augmentation is only used during training (i.e., both the E-step and M-step).
[0077] experiment
[0078] The next section will provide a detailed evaluation of the various embodiments of the present invention.
[0079] Data sets and evaluation metrics
[0080] The experimental setup used three publicly available datasets to evaluate the performance of various embodiments of the present invention.
[0081] CAMELYON-16 primarily detects lymph node metastasis in early-stage breast cancer. It includes 399 breast cancer samples (WSIs), with 270 used for training and 129 for testing. The official training set employed a 5-fold cross-validation protocol to generate both training and validation sets. Furthermore, based on annotations in the test set, instance labels were assigned to 337,124 negative cases and 60,077 positive cases for subsequent evaluation.
[0082] BRACS is designed for breast cancer subtypes and includes 547 WSIs. The classification task covers benign tumors, atypical tumors (AT), and malignant tumors (MT). Following the official dataset's partitioning, 395 WSIs were used for training, 65 for validation, and 87 for testing. Five independent experiments were conducted using different random seeds.
[0083] TCGA-LUNG includes 1034 WSIs, comprising 528 cases of lung adenocarcinoma (LUAD) and 506 cases of lung squamous cell carcinoma (LUSC). Both training and testing employed a 5-fold cross-validation protocol.
[0084] Bag-level evaluation uses the following multi-metric approach: slice-level accuracy (ACC), area under the curve (AUC) for one-to-many pairs, and macro F1 score. Instance-level evaluation uses the following binary metrics: ACC, AUC, F1 score, precision, and recall.
[0085] Implementation details of the assessment
[0086] In the preprocessing stage, OTSU's thresholding method was used to detect and locate tissue regions to generate image patches. For CAMELYON-16 and TCGA-LUNG, non-overlapping image patches of 256×256 pixels were created at a magnification of 20x, while for BRACS, they were created at a magnification of 5x. The result of this process was an average of approximately 7156, 11951, and 714 image patches per bag, respectively, for these datasets.
[0087] All experiments were performed on a workstation equipped with an NVIDIA RTX 3090 GPU. ResNet50 was used as the encoder, and ABMIL was used as the primary MIL model. The Adam optimizer with a weight decay of 1e-5 was selected. An early stopping strategy was implemented, with the patience parameter set to 20 epochs. The initial learning rate was set to 3e-4 and subsequently reduced to 1e-4 for fine-tuning purposes. For the CAMELYON-16 dataset, the maximum number of pseudo-bags was limited to 8; for BRACS, it was limited to 10; and for TCGA-LUNG, it was limited to 14. The increment for the number of pseudo-bags was set to 4. For speeding up Shapley value calculation, the parameters μ and τ were set to 10. The total number of training epochs n for EM was set to 10.
[0088] Evaluation and comparison
[0089] Experimental results of the PMIL framework built on the ABMIL backbone on the CAMELYON-16, BRACS, and TCGA-LUNG datasets will be presented and compared with the following methods: (1) Traditional instance-level MILs, including Mean-Pooling MIL and Max-Pooling MIL. (2) Vanilla attention-based MIL, ABMIL (Ilse, Tomczak, and Welling, 2018). (3) Two variants of ABMIL, including Non-Local Attention Pooling DSMIL (B. Li, Li, and Elieiri, 2021) and Single Attention Branch CLAM-SB (Lu et al., 2021). (4) Transformer-based MIL, TransMIL (Z. Shao et al., 2021). (5) Pseudo-bag augmented MIL, DTFD (H. Zhang et al., 2022).
[0090] Figure 3 Bag-level performance results are shown in five repeatable experiments conducted on the CAMELYON-16, BRACS, and TCGA-LUNG test sets. Subscripts indicate the standard deviation of each metric. Best evaluation results are shown in bold.
[0091] like Figure 3 As shown, in bag-level evaluation, the PMIL framework according to an embodiment of the present invention exhibits superior performance, achieving an AUC score of 90.1% in CAMELYON-16, 82.8% in BRACS, and 96.5% in TCGA-LUNG. These scores consistently outperform all other methods included in the comparison. Notably, the embodiments of the present invention demonstrate significant superiority on the complex BRACS dataset. Gradually refining the generation of pseudo-bags helps enhance training diversity and reduce the number of instances per bag. This strategy effectively improves the model's proficiency in learning from positive instances.
[0092] Figure 4 The example-level performance results are shown for five repeatable experiments conducted on the CAMELYON-16 test set. Subscripts indicate the standard deviation of each metric. Best evaluation results are shown in bold.
[0093] like Figure 4As shown, in instance-level evaluation, some methods (such as MaxMIL and DSMIL) exhibit high precision scores but low recall scores, indicating a cautious tendency to predict positive instances. Conversely, methods such as MeanMIL, ABMIL, CLAM, TransMIL, and DTFD show the opposite trend, frequently predicting more instances with positive labels, despite lower precision. Compared to these, the embodiments of the present invention are significantly more accurate in predicting positive instances and outperform other methods in both ACC and F1 scores.
[0094] Visualization and Explanation
[0095] To evaluate the effectiveness of progressive pseudo-bag enhancement in shifting network focus to more positive instances, the attention distribution of embodiments of the present invention was analyzed. Figure 1 (d) shows the correspondence with ABMIL, CLAM, and DTFD (i.e., respectively corresponding to ABMIL, CLAM, and DTFD). Figure 1 Compared to (a) to (c)), PMIL achieved a more uniform distribution of attention. Furthermore, the sum of the top 10 attention scores decreased to 0.36 for normal cases and to 0.53 for tumor cases.
[0096] Figure 5 This illustrates a specific example of pseudo-bag allocation in PMIL. Specifically, Figure 5 A visualization of pseudo-bag assignment using PMIL is shown. "Baseline Truth" represents the cancer area labeled by the physician. Labeled areas represent cancer regions. Embodiments of the invention can be based on Shapley values to locate only three positive examples (represented by "star," "circle," and "cross" symbols) even in micrometastases and evenly distribute them into pseudo-bags. Comparisons in attention ranking can assess whether Shapley values were used when calculating IIS. "Regular Bags" represents the process where IIS was calculated without using Shapley values. Figure 5 Attention ranking in the study reveals that more positive instances are noticed during training through precise pseudo-bag augmentation.
[0097] like Figure 5 As shown, in micrometastatic cases, PMIL successfully identified three key image patches. Random partitioning methods have only a 2 / 9 chance of accurately assigning positive examples to three distinct pseudo-bags; otherwise, these pseudo-bags introduce noise into the training. In contrast, embodiments of the present invention reliably place these image patches into different pseudo-bags, thereby significantly increasing the diversity of positive instances.
[0098] To emphasize the limitations of attention score-based IIS, a comparative analysis was conducted, such as... Figure 6As shown in (a) and (b), both ABMIL and PMIL demonstrate effective performance in the macrometastasis scenario. However, in the micrometastasis scenario, the attention score-based IIS shows that both ABMIL and PMIL incorrectly focus attention on some non-cancerous areas, which is logically inexplicable. Conversely, by using the Shapley value-based IIS, PMIL can accurately exclude non-cancerous areas and precisely locate cancerous areas.
[0099] More in detail, Figure 6 Heatmaps of four slice subfields using different models and IIS estimates are shown. Figure 6 A heatmap comparison is presented to demonstrate the interpretability of the IIS calculated using the Shapley value. ABMIL (Attention) and PMIL (Attention) represent conventional methods for calculating IIS, while PMIL (Shapley Tumor Class) represents the method of this application that incorporates the Shapley value into the calculation. Figure 6 This demonstrates that the method described in this application is more consistent with expert annotations provided by pathologists.
[0100] Figure 6 (a) and (b) are macrometastasis and micrometastasis cases from CAMELYON-16, where the relatively darker areas in the "Ground Truth" column represent cancerous areas, while the relatively brighter areas represent non-cancer areas. "Ground Truth" indicates the cancerous areas as labeled by the physician. Figure 6 (c) shows malignant tumor cases from BRACS, where, in the "Baseline Truth" column, the relatively dark rectangular areas represent malignant tumors (MT), while the relatively bright boxed areas represent atypical tumors (AT). In the other columns, relatively bright shading indicates a higher probability.
[0101] Unlike attention scores, Shapley values are calculated across the entire MIL classifier, incorporating information from various categories, thus allowing for category-based interpretation. For example... Figure 6 As shown in (c), the IIS estimated by attention scores and category-MT Shapley values are primarily concentrated in malignant tumor regions. Meanwhile, the heatmap generated using category-AT Shapley values mainly emphasizes atypical tumor regions, consistent with slice-level labels. While the heatmaps may not be entirely accurate for the BRACS dataset, this finding highlights the strong interpretability of Shapley-based IIS across various classification tasks.
[0102] In summary, the visualization results demonstrate that while attention score-based IIS typically produces noisy instance importance rankings and is limited to a single target category, Shapley value-based IIS ensures more accurate instance importance rankings and enables categorical interpretation, thus fully utilizing the capabilities of the MIL classifier.
[0103] Ablation Research
[0104] IIS Measurement Estimation Metrics
[0105] In the ablation study, random segmentation was used as the baseline for pseudo-bag enhancement, and both attention score and Shapley value were evaluated as a method for estimating IIS for subsequent training. Figure 7 The results shown demonstrate that IIS estimation based on Shapley values outperforms the CAMELYON-16 and TCGA-LUNG datasets. Conversely, on the BRACS dataset, the attention score-based estimation performs better. This difference in performance is likely due to the direct acquisition of attention scores through pooling operations. In contrast, calculating Shapley values requires additional fully connected layers, which may be less robust when the overall performance of the MIL classifier is not particularly high. Therefore, Shapley value estimation is more advantageous for datasets with less learning challenges.
[0106] in particular, Figure 7 Performance results for pseudo-bag enhancement using different IIS metrics are shown on the CAMELYON-16, BRACS, and TCGA-LUNG test sets. Subscripts represent standard deviations. Best evaluation results are shown in bold. Figure 7 The “attention score” in the table represents the performance result of the traditional method used to calculate IIS.
[0107] Sensitivity to hyperparameters
[0108] Due to variations in image patch magnification and tumor region size, the optimal number of pseudo-bags M varies across different datasets. max They are also different. For example... Figure 8 As shown, on the CAMELYON-16 dataset, the model according to an embodiment of the present invention performs well in M... max It exhibits peak performance at approximately 9, when M max Beyond this value, effectiveness drops sharply. Similarly, the ideal M for the BRACS and TCGA-LUNG datasets... max The values are 10 and 14 respectively. The M values for the CAMELYON-16 dataset are... maxThe smaller size of the pseudo-bags may be due to the prevalence of a small number of positive instances in micrometastatic slices, even at 20x magnification. In this scenario, pseudo-bag augmentation must strike a balance between introducing additional noise into the training set and improving training diversity. Conversely, the cancer (subtype) regions in the BRACS and TCGA-LUNG datasets are larger and can be divided into more pseudo-bags without affecting stability.
[0109] Figure 9 Repeatability results for various hyperparameters μ and τ used in Shapley value acceleration are shown. Figure 9 The performance of embodiments of the present invention is shown to be not significantly affected by changes in μ and τ, because performance fluctuations are within an acceptable range.
[0110] Progressive pseudobag reinforcement
[0111] To determine the effectiveness of progressively increasing the number of pseudo-bags and refining the initial pseudo-bag assignments, a series of experiments were conducted. For the CAMELYON-16 and TCGA-LUNG datasets, the pseudo-bag increment ΔM was set to 4, and the number of training epochs n was set to 5, while for the more complex BRACS dataset, this was extended to 10. Figure 10 As shown, the results indicate that the models employing both progressive strategies achieve the highest performance levels. The CAMELYON-16 dataset is particularly sensitive to the number of false bags, requiring precise calibration to prevent the introduction of unwanted noise. Conversely, the BRACS dataset is sensitive to the initial setting of false bags due to the challenges of distinguishing between subtypes. More complex initial settings significantly help the models accurately identify positive instances, thereby improving performance.
[0112] in particular, Figure 10 Evaluation results for pseudo-bag augmentation using different progressive strategies are shown on the CAMELYON-16, BRACS, and TCGA-LUNG test sets. Subscripts represent standard deviations. Best evaluation results are shown in bold.
[0113] The following important insights were gained from the ablation research:
[0114] Choosing an IIS estimation metric. The choice of IIS estimation method depends on the characteristics of the dataset. While attention score-based IIS is a commonly used method, its ranking accuracy can sometimes be compromised. Conversely, Shapley value-based IIS often shows better performance on less complex datasets because its effectiveness relies primarily on accurate classification results.
[0115] Sensitivity to hyperparameters. Optimal maximum number of pseudo-bags M. maxThis varies depending on the dataset and is largely dependent on the number of positive instances present. For datasets containing large tumor regions within the pseudo-bag, a higher M is recommended. max Conversely, for datasets with fewer positive instances in each bag, a smaller M is used. max This is advantageous to avoid unnecessary complexity. Embodiments of the invention are insensitive to the hyperparameters used in the Shapley value approximation. However, it is recommended not to set μ and τ too small.
[0116] A gradual approach. Increasing the number of pseudo-bags incrementally is effective for challenging datasets or datasets with only a limited number of positive instances in each bag. However, this approach is less attractive for datasets with large tumor regions. Conversely, gradual initialization shows significant improvements across a wide range of datasets, especially on more challenging ones.
[0117] In summary, embodiments of the present invention aim to address attention-related challenges in multi-instance learning for whole-slice image classification, particularly the extreme distribution of attention and false identification of positive instances. To overcome these challenges, embodiments of the present invention introduce an accelerated Shapley value (which quantifies the contribution of each instance) to estimate the IIS. This approach helps to allocate false bags more reasonably.
[0118] Furthermore, embodiments of the present invention also provide a progressive pseudo-bag augmentation multi-instance learning framework that combines Shapley-value-based IIS with the expectation-maximization algorithm. This method systematically improves pseudo-bag augmentation, thereby significantly enhancing the effectiveness of MIL.
[0119] Extensive experiments conducted on three publicly available datasets demonstrate that embodiments of the present invention outperform existing technologies in the art. Furthermore, IIS based on Shapley values provides valuable categorical interpretability for whole-slice pathology images.
[0120] Figure 11 This is a flowchart illustrating a computer-implemented method for classifying whole-slice images (WSIs) according to an embodiment of the present invention. Step 1102 involves extracting multiple instances from the WSIs. In this disclosure, the term "image patch" may be used interchangeably with "instance".
[0121] Step 1104 involves determining an Instance Importance Score (IIS) for each of the multiple instances. The IIS is determined based on the Shapley score. The Shapley score is based on the contribution of each of the multiple instances. In other words, each instance has its own IIS. Each instance contributes to the calculation of the bag-level label. The Shapley value provides a quantitative metric for contribution evaluation. The Shapley score has been described in detail above.
[0122] Step 1106 involves assigning each of the plurality of instances to one of a plurality of pseudo-bags based on the determined IIS. In other words, each instance is assigned / split into one pseudo-bag of the pseudo-bags. Furthermore, the assignment / split depends on the IIS of the specific instance.
[0123] Step 1108 involves inputting each of the plurality of instances to a multi-instance learning (MIL) classifier into a pseudo-bag that will be assigned to a plurality of pseudo-bags.
[0124] Step 1106, which assigns each instance of a plurality of instances to a pseudo-bag of a plurality of pseudo-bags based on the determined IIS, may include: (i) sorting each instance of the plurality of instances based on the determined IIS; and (ii) uniformly interleaving each instance of the plurality of instances into a pseudo-bag of a plurality of pseudo-bags based on the sorting of each instance of the plurality of instances.
[0125] An example of uniform staggered instances is as follows: Assume there are 10 instances, ranked from 1 to 10. Additionally, assume there are 3 pseudo-bags (A, B, and C). Pseudo-bag A may contain instances ranked 1, 4, 7, and 10. Pseudo-bag B may contain instances ranked 2, 5, and 8. Pseudo-bag C may contain instances ranked 3, 6, and 9.
[0126] The computer-implemented method for classifying WSIs may further include increasing the number of pseudo-bags during subsequent training iterations, provided that the MIL classifier has converged.
[0127] The computer-implemented method for classifying WSIs may further include freezing the weights of the MIL classifier when determining the IIS for each instance across multiple instances.
[0128] like Figure 11 The computer-implemented method described above for classifying WSIs generally involves training a MIL classifier.
[0129] Figure 12 This is a flowchart illustrating a computer-implemented method for classifying tissue specimens according to one embodiment. Step 1202 involves extracting multiple instances from a whole-slice image (WSI) of the tissue specimen. The digital WSI may be provided by a hospital or institution. In other words, optionally, prior to step 1202, the method for classifying the tissue specimen may include receiving or obtaining the WSI of the tissue specimen.
[0130] Step 1204 involves feeding each of the multiple instances into a multi-instance learning (MIL) classifier to determine the pathological classification of the tissue specimen.
[0131] The MIL classifier is trained using a training corpus containing the training WSI. The training of the MIL classifier can be based on, for example, at least referencing... Figure 11 The steps described above. For example, training may include extracting multiple training instances from the training WSI and determining an Instance Importance Score (IIS) for each of the multiple training instances. The IIS is determined based on a Shapley score. The Shapley score is based on the contribution of each training instance among the multiple training instances. Training may further include assigning each of the multiple training instances to a pseudo-bag of multiple pseudo-bags based on the determined IIS.
[0132] like Figure 12 The computer-implemented methods described above for classifying tissue specimens generally involve clinical diagnosis and digital pathology.
[0133] According to one embodiment, a system for classifying whole-slice images (WSI) is provided. The system includes a processor module and a memory module containing computer program code. The memory module and the computer program code are configured, together with the processor module, to cause the system to perform at least the following operations: (i) extracting a plurality of instances from the WSI; (ii) determining an Instance Importance Score (IIS) for each of the plurality of instances, wherein the IIS is determined based on a Shapley score, and wherein the Shapley score is based on the contribution of each of the plurality of instances; (iii) assigning each of the plurality of instances to one of a plurality of pseudo-bags based on the determined IIS; and (iv) inputting each of the plurality of instances assigned to one of the pseudo-bags into a Multi-Instance Learning (MIL) classifier.
[0134] The system can further enable it to: sort each instance among multiple instances based on the determined IIS; and, based on the sorting of each instance among multiple instances, uniformly interleave each instance among multiple instances into one pseudo-bag among multiple pseudo-bags.
[0135] The system can be further improved by increasing the number of pseudo-bags in subsequent training iterations, provided that the MIL classifier converges.
[0136] The system can further freeze the weights of the MIL classifier when determining the IIS for each of the multiple instances.
[0137] According to another embodiment, a system for classifying tissue specimens is provided. The system includes: a processor module; and a memory module containing computer program code. The memory module and the computer program code are configured, together with the processor module, to cause the system to perform at least the following operations: (i) extracting a plurality of instances from whole-slice images (WSI) of the tissue specimen; and (ii) inputting each of the plurality of instances into a multi-instance learning (MIL) classifier to determine the pathological classification of the tissue specimen.
[0138] The MIL classifier is trained using a training corpus containing training WSIs. Training the MIL classifier includes: extracting multiple training instances from the training WSIs; determining an Instance Importance Score (IIS) for each of the multiple training instances, wherein the IIS is determined based on a Shapley score, and wherein the Shapley score is based on the contribution of each instance among the multiple training instances; and assigning each instance among the multiple training instances to a pseudo-bag of multiple pseudo-bags based on the determined IIS.
[0139] Figure 13 An exemplary computing device 1300, hereinafter interchangeably referred to as computer system 1300, is described, wherein one or more such computing devices 1300 can be used to perform / carry out the methods / steps described herein, such as classifying whole-slice images (WSI), classifying tissue specimens, and training a MIL classifier. The following description of computing device 1300 is provided by way of example only and is not intended to be limiting.
[0140] like Figure 13 As shown, the example computing device 1300 includes a processor 1304 for executing software routines. Although only a single processor is shown for clarity, the computing device 1300 may also include a multiprocessor system. The processor 1304 is connected to a communication infrastructure 1306 for communicating with other components of the computing device 1300. For example, the communication infrastructure 1306 may include a communication bus, a crossbar switch, or a network.
[0141] The computing device 1300 also includes main memory 1308 (such as random access memory (RAM)) and secondary memory 1310. Secondary memory 1310 may include, for example, a hard disk drive 1312 and / or a removable memory drive 1314, which may include a floppy disk drive, magnetic tape drive, optical disk drive, or similar device. Removable memory drive 1314 reads from and / or writes to removable storage unit 1318 in a well-known manner. Removable storage unit 1318 may include a floppy disk, magnetic tape, optical disk, or similar device, which is read from and written to by removable memory drive 1314. Those skilled in the art will understand that removable storage unit 1318 includes a computer-readable storage medium storing computer-executable program code instructions and / or data.
[0142] In an alternative embodiment, the auxiliary memory 1310 may additionally or alternatively include other similar means for allowing computer programs or other instructions to be loaded into the computing device 1300. Such means may include, for example, removable storage unit 1322 and interface 1320. Examples of removable storage unit 1322 and interface 1320 include program boxes and box interfaces (such as program boxes and box interfaces in video game console devices), removable memory chips (such as EPROM or PROM) and associated sockets, and other removable storage units 1322 and interfaces 1320 that allow software and data to be transferred from removable storage unit 1322 to computer system 1300.
[0143] The computing device 1300 also includes at least one communication interface 1324. The communication interface 1324 allows the transfer of software and data between the computing device 1300 and external devices via a communication path 1326. In various embodiments of the invention, the communication interface 1324 allows the transfer of data between the computing device 1300 and a data communication network (such as a public or private data communication network). The communication interface 1324 can be used to exchange data between different computing devices 1300 forming part of an interconnected computer network. Examples of the communication interface 1324 may include a modem, a network interface (such as an Ethernet card), a communication port, an antenna with associated circuitry, and similar devices. The communication interface 1324 may be wired or wireless. The software and data transferred via the communication interface 1324 are in the form of signals, which may be electronic signals, electromagnetic signals, optical signals, or other signals that can be received by the communication interface 1324. These signals are provided to the communication interface via the communication path 1326.
[0144] like Figure 13As shown, the computing device 1300 also includes a display interface 1302 and an audio interface 1332. The display interface is used to perform the operation of presenting an image to the associated display 1330, while the audio interface is used to perform the operation of playing audio content via the associated speaker 1334.
[0145] As used herein, the term "computer program product" may refer in part to removable storage unit 1318, removable storage unit 1322, hard disk installed in hard disk drive 1312, or carrier wave that transports software to communication interface 1324 via communication path 1326 (wireless link or cable). Computer-readable storage medium means any non-transitory tangible storage medium that provides recorded instructions and / or data to computing device 1300 for execution and / or processing. Examples of such storage media include floppy disks, magnetic tapes, CD-ROMs, DVDs, and Blu-ray discs. TM Disc, hard disk drive, ROM or integrated circuit, USB memory, magneto-optical disk, or computer-readable card (such as a PCMCIA card) and similar devices, whether such devices are internal or external to the computing device 1300. Examples of temporary or intangible computer-readable transmission media that may also participate in providing software, applications, instructions and / or data to the computing device 1300 include radio or infrared transmission channels and network connections to another computer or networked device, and the Internet or intranet including email transmissions and information recorded on websites and similar devices.
[0146] Computer programs (also referred to as computer program code) are stored in main memory 1308 and / or secondary memory 1310. Computer programs may also be received via communication interface 1324. When executed, these computer programs enable computing device 1300 to perform one or more features of the embodiments discussed herein. In various embodiments, when executed, the computer programs enable processor 1304 to perform the features of the embodiments described above. Therefore, these computer programs represent the controller of computer system 1300.
[0147] The software may be stored in a computer program product and loaded into a computing device 1300 using a removable memory drive 1314, a hard disk drive 1312, or an interface 1320. Alternatively, the computer program product may be downloaded to the computer system 1300 via communication path 1326. When executed by the processor 1304, the software causes the computing device 1300 to perform the functions described in the embodiments herein.
[0148] It should be understood that, Figure 13The embodiments described are presented by way of example only. Therefore, in some embodiments, one or more features of the computing device 1300 may be omitted. Furthermore, in some embodiments, one or more features of the computing device 1300 may be combined together. Additionally, in some embodiments, one or more features of the computing device 1300 may be divided into one or more components.
[0149] Those skilled in the art will understand that many variations and / or modifications can be made to the invention shown in the specific embodiments without departing from the spirit or scope of the invention as broadly described. Therefore, the various embodiments of the invention should be considered exemplary and not restrictive in all respects.
Claims
1. A computer-implemented method for classifying whole-slice images (WSI), the method comprising: Extract multiple instances from WSI; An Instance Importance Score (IIS) is determined for each of the plurality of instances, wherein the IIS is determined based on a Shapley score, and wherein the Shapley score is based on the contribution of each of the plurality of instances; Based on the determined IIS, each of the multiple instances is assigned to one of the multiple pseudo bags; as well as Each instance of the plurality of instances assigned to one of the plurality of pseudo-bags is input into a multi-instance learning (MIL) classifier.
2. The method according to claim 1, wherein, Based on the determined IIS, assigning each of the plurality of instances to one of the plurality of pseudo-bags includes: Each of the plurality of instances is sorted based on the identified IIS; and Based on the order of each instance among the plurality of instances, each instance among the plurality of instances is uniformly interleaved into one of the plurality of pseudo-bags.
3. The method of claim 1, further comprising increasing the number of the plurality of pseudo-bags during subsequent training iterations, provided that the MIL classifier converges.
4. The method of claim 3, further comprising freezing the weights of the MIL classifier when determining the IIS for each of the plurality of instances.
5. A computer-implemented method for classifying tissue specimens, the method comprising: Multiple instances were extracted from the whole-slice images (WSI) of the tissue specimen; as well as Each of the plurality of instances is fed into a multi-instance learning (MIL) classifier to determine the pathological classification of the tissue specimen. The MIL classifier is trained using a training corpus containing training WSIs, and training the MIL classifier includes: Multiple training instances are extracted from the training WSI; A Instance Importance Score (IIS) is determined for each of the plurality of training instances, wherein the IIS is determined based on a Shapley score, and the Shapley score is based on the contribution of each of the plurality of training instances; and Based on the determined IIS, each of the plurality of training instances is assigned to one of the plurality of pseudo-bags.
6. The method according to claim 5, wherein, Assigning each training instance from the plurality of training instances to one of the plurality of pseudo-bags based on the determined IIS includes: Based on the determined IIS, each of the plurality of training instances is sorted; and Based on the order of each training instance among the plurality of training instances, each training instance among the plurality of training instances is uniformly interleaved into one of the plurality of pseudo-bags.
7. A system for classifying whole-slice images (WSI), the system comprising: Processor module; as well as A memory module containing computer program code; The memory module and the computer program code are configured, together with the processor module, to cause the system to perform at least the following operations: Extract multiple instances from the WSI; An Instance Importance Score (IIS) is determined for each of the plurality of instances, wherein the IIS is determined based on a Shapley score, and the Shapley score is based on the contribution of each of the plurality of instances; Based on the determined IIS, each of the multiple instances is assigned to one of the multiple pseudo-bags; as well as Each instance of the plurality of instances to be assigned to one of the plurality of pseudo-bags is input into a multi-instance learning (MIL) classifier.
8. The system according to claim 7, wherein, The system also performs the following operations: Sort each of the plurality of instances based on the identified IIS; as well as Based on the order of each instance among the plurality of instances, each instance among the plurality of instances is uniformly interleaved into one of the plurality of pseudo-bags.
9. The system according to claim 7, wherein, The system also performs the following operation: under the condition that the MIL classifier converges, during subsequent training iterations, the number of the plurality of pseudo-bags is increased.
10. The system according to claim 9, wherein, The system also performs the following operation: when determining the IIS for each of the plurality of instances, freezes the weights of the MIL classifier.
11. A system for classifying tissue specimens, the system comprising: Processor module; as well as A memory module containing computer program code; The memory module and the computer program code are configured, together with the processor module, to cause the system to perform at least the following operations: Multiple instances were extracted from the whole-slice images (WSI) of the tissue specimen; as well as Each of the plurality of instances is fed into a multi-instance learning (MIL) classifier to determine the pathological classification of the tissue specimen. The MIL classifier is trained using a training corpus containing training WSIs, and training the MIL classifier includes: Multiple training instances are extracted from the training WSI; A Instance Importance Score (IIS) is determined for each of the plurality of training instances, wherein the IIS is determined based on a Shapley score, and the Shapley score is based on the contribution of each of the plurality of training instances; and Based on the determined IIS, each of the plurality of training instances is assigned to one of the plurality of pseudo bags.
