Papers › Multiple Instance Learning Framework with Masked Hard Instance Mining for Whole Slide...

Multiple Instance Learning Framework with Masked Hard Instance Mining for Whole Slide Image Classification

28 Jul 2023ICCV 2023 1arXiv:2307.15254archive 2025-07-28

Wenhao Tang, Sheng Huang, Xiaoxian Zhang, Fengtao Zhou, Yi Zhang, Bo Liu

The whole slide image (WSI) classification is often formulated as a multiple instance learning (MIL) problem. Since the positive tissue is only a small fraction of the gigapixel WSI, existing MIL methods intuitively focus on identifying salient instances via attention mechanisms. However, this leads to a bias towards easy-to-classify instances while neglecting hard-to-classify instances. Some literature has revealed that hard examples are beneficial for modeling a discriminative boundary accurately. By applying such an idea at the instance level, we elaborate a novel MIL framework with masked hard instance mining (MHIM-MIL), which uses a Siamese structure (Teacher-Student) with a consistency constraint to explore the potential hard instances. With several instance masking strategies based on attention scores, MHIM-MIL employs a momentum teacher to implicitly mine hard instances for training the student model, which can be any attention-based MIL model. This counter-intuitive strategy essentially enables the student to learn a better discriminating boundary. Moreover, the student is used to update the teacher with an exponential moving average (EMA), which in turn identifies new hard instances for subsequent training iterations and stabilizes the optimization. Experimental results on the CAMELYON-16 and TCGA Lung Cancer datasets demonstrate that MHIM-MIL outperforms other latest methods in terms of performance and training cost. The code is available at: https://github.com/DearCaat/MHIM-MIL.

PaperPDFConference PDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 18 code samples harvested from 1 repository linked to this paper: 12 ran (of which 10 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 0 violated, 10 with no contract checked; 2 where Syntology's instrument failed) · 6 unverified. Where Syntology's instrument failed: 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 18 samples from 1 repository, 12 ran (10 with no instrument failure; 2 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

dearcaat/mhim-mil officialmentioned in papermentioned on GitHubpytorchSyntology: 18 samples, 12 ran (2 instrument-failed) · 6 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested: 12 ran (of which 10 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 0 violated, 10 with no contract checked; 2 where Syntology's instrument failed) · 6 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran; the contract check could not run
10ran
6unverified

Licence: 18 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from dearcaat/mhim-mil. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 5 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

dearcaat/mhim-mil official repository 18 samples, 12 ran (2 instrument-failed) · 6 unverified
Attention in 344 papers
census: 13 implementations from 12 papers, 10 distinct outputs across 4 buckets, one shared input per bucket
modules/mhim.py ran · metamorphic tier: deterministic no licence file found · pointer only · cd5072f3dab80831 · report fixture: returned Attention · level recorded 2026-09-22
AttentionGated modules/mhim.py ran · metamorphic tier: deterministic no licence file found · pointer only · c24df49a676f0f1a · report fixture: returned AttentionGated · level recorded 2026-09-22
BClassifier modules/mhim.py ran · metamorphic tier: deterministic no licence file found · pointer only · caf9dc0be4a5c52a · report fixture: returned BClassifier · level recorded 2026-09-22
DAttention modules/mhim.py ran · metamorphic tier: deterministic no licence file found · pointer only · 051bad1d581b89b4 · report fixture: returned DAttention · level recorded 2026-09-22
DSMIL modules/mhim.py ran · metamorphic tier: deterministic no licence file found · pointer only · 6ea72cc545523452 · report fixture: returned DSMIL · level recorded 2026-09-22
MCA modules/mhim.py ran · metamorphic tier: deterministic no licence file found · pointer only · 60e4fa6dfb5aeff2 · report fixture: returned MCA · level recorded 2026-09-22
Merge modules/mhim.py ran · metamorphic tier: deterministic no licence file found · pointer only · 7cb71ab3af3802a8 · report fixture: returned Merge · level recorded 2026-09-22
NystromAttention in 7 papers modules/mhim.py ran · metamorphic tier: deterministic no licence file found · pointer only · 67b13214c4cebc6e · report fixture: returned NystromAttention · level recorded 2026-09-22
SoftTargetCrossEntropy modules/mhim.py ran · metamorphic tier: deterministic fingerprinted no licence file found · pointer only · afd72a005841c7b4 · report fixture: returned SoftTargetCrossEntropy · level recorded 2026-09-22
TransLayer in 8 papers modules/mhim.py ran · metamorphic tier: deterministic no licence file found · pointer only · ffd680dc515cfebb · report fixture: returned TransLayer · level recorded 2026-09-22
mask_fn modules/mhim.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted no licence file found · pointer only · 922acd20edd7332d · report fixture: signature x:Tensor/3/float, ids_shuffle:Tensor/2/int, len_keep:int/0/int · returned Tensor · level recorded 2026-09-22
select_mask_fn modules/mhim.py ran; the contract check could not run (RAISES) · metamorphic tier: deterministic no licence file found · pointer only · af7d353a41c42289 · report fixture: signature ps:int/0/int, attn:Tensor/3/float, largest:bool/0/bool, mask_ratio:float/0/float, mask_ids_other:NoneType/0/?, len_keep_other:NoneType/0/?, cls_attn_topk_idx_other:NoneType/0/?, random_ratio:float/0/float, select_inv:bool/0/bool, msa_fusion:str/0/str · returned tuple · level recorded 2026-09-22
MHIM modules/mhim.py unverified no licence file found · pointer only · 25b3b007ad601a8d · report
SAttention modules/mhim.py unverified no licence file found · pointer only · 6c1728a2d867c404 · report
get_pseudo_score modules/mhim.py unverified no licence file found · pointer only · f42c0327718a26dc · report
get_pseudo_score_trans modules/mhim.py unverified no licence file found · pointer only · 21387ddaf3ce7305 · report
initialize_weights in 30 papers modules/mhim.py unverified no licence file found · pointer only · fa98c708d9cb32ac · report
moore_penrose_iter_pinv in 10 papers modules/mhim.py unverified no licence file found · pointer only · ace5e24876cba9e9 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for MHIM-MIL (graph method: MHIM-MIL). 19 bricks; individually on a fixture: 13 ran (of which 10 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 1 violated, 10 with no contract checked; 2 where Syntology's instrument failed) · 6 unverified. The assembly has not been run end-to-end.

  1. MHIM entry · level 0 · unverified · 25b3b007ad601a8d
  2. DAttention helper · level 1 · ran · 051bad1d581b89b4
  3. DSMIL helper · level 1 · ran · 6ea72cc545523452
  4. Merge helper · level 1 · ran · 7cb71ab3af3802a8
  5. SAttention helper · level 0 · unverified · 6c1728a2d867c404
  6. SoftTargetCrossEntropy loss · level 1 · ran · afd72a005841c7b4
  7. get_pseudo_score helper · level 0 · unverified · f42c0327718a26dc
  8. get_pseudo_score_trans helper · level 0 · unverified · 21387ddaf3ce7305
  9. initialize_weights helper · level 0 · unverified · fa98c708d9cb32ac
  10. mask_fn helper · level 1 · ran; the contract check could not run (RAISES) · 922acd20edd7332d
  11. select_mask_fn helper · level 1 · ran; the contract check could not run (RAISES) · af7d353a41c42289
  12. Attention helper · level 1 · ran · cd5072f3dab80831
  13. AttentionGated helper · level 1 · ran · c24df49a676f0f1a
  14. BClassifier helper · level 1 · ran · caf9dc0be4a5c52a
  15. MCA helper · level 1 · ran · 60e4fa6dfb5aeff2
  16. TransLayer helper · level 1 · ran · ffd680dc515cfebb
  17. NystromAttention helper · level 1 · ran · 67b13214c4cebc6e
  18. exists helper · level 1 · ran · violated contract · aa5486a3650902d8
  19. moore_penrose_iter_pinv helper · level 0 · unverified · ace5e24876cba9e9

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2307.15254") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Image ClassificationMultiple Instance Learningimage-classification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Focus

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections