{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/dgr-mil-exploring-diverse-global","title":"DGR-MIL: Exploring Diverse Global Representation in Multiple Instance Learning for Whole Slide Image Classification","arxiv_id":"2407.03575","date":"2024-07-04","proceeding":null,"authors":["Wenhui Zhu","Xiwen Chen","Peijie Qiu","Aristeidis Sotiras","Abolfazl Razi","Yalin Wang"],"abstract":"Multiple instance learning (MIL) stands as a powerful approach in weakly supervised learning, regularly employed in histological whole slide image (WSI) classification for detecting tumorous lesions. However, existing mainstream MIL methods focus on modeling correlation between instances while overlooking the inherent diversity among instances. However, few MIL methods have aimed at diversity modeling, which empirically show inferior performance but with a high computational cost. To bridge this gap, we propose a novel MIL aggregation method based on diverse global representation (DGR-MIL), by modeling diversity among instances through a set of global vectors that serve as a summary of all instances. First, we turn the instance correlation into the similarity between instance embeddings and the predefined global vectors through a cross-attention mechanism. This stems from the fact that similar instance embeddings typically would result in a higher correlation with a certain global vector. Second, we propose two mechanisms to enforce the diversity among the global vectors to be more descriptive of the entire bag: (i) positive instance alignment and (ii) a novel, efficient, and theoretically guaranteed diversification learning paradigm. Specifically, the positive instance alignment module encourages the global vectors to align with the center of positive instances (e.g., instances containing tumors in WSI). To further diversify the global representations, we propose a novel diversification learning paradigm leveraging the determinantal point process. The proposed model outperforms the state-of-the-art MIL aggregation models by a substantial margin on the CAMELYON-16 and the TCGA-lung cancer datasets. The code is available at \\url{https://github.com/ChongQingNoSubway/DGR-MIL}.","url_abs":"https://arxiv.org/abs/2407.03575v1","url_pdf":"https://arxiv.org/pdf/2407.03575v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"dgr-mil-exploring-diverse-global","repo_url":"https://github.com/chongqingnosubway/dgr-mil","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"descriptive","task_name":"Descriptive"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"multiple-instance-learning","task_name":"Multiple Instance Learning"},{"task_slug":"weakly-supervised-learning","task_name":"Weakly-supervised Learning"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"align","method_name":"ALIGN"},{"method_slug":"focus","method_name":"Focus"},{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.03575","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.03575"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/ChongQingNoSubway/DGR-MIL","reach":null}],"summary":{"ran":1,"ran_fixture":1,"ran_draft_wrong":1,"unverified":6},"by_repo_kind":{"official":{"samples":9,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"6ba1ba6900d5b9d3","entry":"NystromAttention","repo":"ChongQingNoSubway/DGR-MIL","repo_kind":"official","path":"models/dgrmil.py","file_url":"https://github.com/ChongQingNoSubway/DGR-MIL/blob/HEAD/models/dgrmil.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ba1ba6900d5b9d3"}},{"code_sha256_prefix":"c42e5fa46bf385ab","entry":"softmax","repo":"ChongQingNoSubway/DGR-MIL","repo_kind":"official","path":"models/dgrmil.py","file_url":"https://github.com/ChongQingNoSubway/DGR-MIL/blob/HEAD/models/dgrmil.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c42e5fa46bf385ab"}},{"code_sha256_prefix":"ca9bdbc3dff7c5f4","entry":"with_incremental_state","repo":"ChongQingNoSubway/DGR-MIL","repo_kind":"official","path":"models/dgrmil.py","file_url":"https://github.com/ChongQingNoSubway/DGR-MIL/blob/HEAD/models/dgrmil.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ca9bdbc3dff7c5f4"}},{"code_sha256_prefix":"a3216ede0c984f31","entry":"CrossLayer","repo":"ChongQingNoSubway/DGR-MIL","repo_kind":"official","path":"models/dgrmil.py","file_url":"https://github.com/ChongQingNoSubway/DGR-MIL/blob/HEAD/models/dgrmil.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a3216ede0c984f31"}},{"code_sha256_prefix":"26592421bd57eaab","entry":"DGRMIL","repo":"ChongQingNoSubway/DGR-MIL","repo_kind":"official","path":"models/dgrmil.py","file_url":"https://github.com/ChongQingNoSubway/DGR-MIL/blob/HEAD/models/dgrmil.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"26592421bd57eaab"}},{"code_sha256_prefix":"6666795f38aecb76","entry":"FairseqIncrementalState","repo":"ChongQingNoSubway/DGR-MIL","repo_kind":"official","path":"models/dgrmil.py","file_url":"https://github.com/ChongQingNoSubway/DGR-MIL/blob/HEAD/models/dgrmil.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6666795f38aecb76"}},{"code_sha256_prefix":"ee7093d64bb6d21e","entry":"MultiheadLinearAttention","repo":"ChongQingNoSubway/DGR-MIL","repo_kind":"official","path":"models/dgrmil.py","file_url":"https://github.com/ChongQingNoSubway/DGR-MIL/blob/HEAD/models/dgrmil.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ee7093d64bb6d21e"}},{"code_sha256_prefix":"ba179bd06c67a0e3","entry":"TransLayer","repo":"ChongQingNoSubway/DGR-MIL","repo_kind":"official","path":"models/dgrmil.py","file_url":"https://github.com/ChongQingNoSubway/DGR-MIL/blob/HEAD/models/dgrmil.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ba179bd06c67a0e3"}},{"code_sha256_prefix":"b14bf7f7c48fbe45","entry":"optimizer_triple","repo":"ChongQingNoSubway/DGR-MIL","repo_kind":"official","path":"models/dgrmil.py","file_url":"https://github.com/ChongQingNoSubway/DGR-MIL/blob/HEAD/models/dgrmil.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b14bf7f7c48fbe45"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}