{"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/multiple-instance-learning-via-iterative-self","title":"Multiple Instance Learning via Iterative Self-Paced Supervised Contrastive Learning","arxiv_id":"2210.09452","date":"2022-10-17","proceeding":"CVPR 2023 1","authors":["Kangning Liu","Weicheng Zhu","Yiqiu Shen","Sheng Liu","Narges Razavian","Krzysztof J. Geras","Carlos Fernandez-Granda"],"abstract":"Learning representations for individual instances when only bag-level labels are available is a fundamental challenge in multiple instance learning (MIL). Recent works have shown promising results using contrastive self-supervised learning (CSSL), which learns to push apart representations corresponding to two different randomly-selected instances. Unfortunately, in real-world applications such as medical image classification, there is often class imbalance, so randomly-selected instances mostly belong to the same majority class, which precludes CSSL from learning inter-class differences. To address this issue, we propose a novel framework, Iterative Self-paced Supervised Contrastive Learning for MIL Representations (ItS2CLR), which improves the learned representation by exploiting instance-level pseudo labels derived from the bag-level labels. The framework employs a novel self-paced sampling strategy to ensure the accuracy of pseudo labels. We evaluate ItS2CLR on three medical datasets, showing that it improves the quality of instance-level pseudo labels and representations, and outperforms existing MIL methods in terms of both bag and instance level accuracy. Code is available at https://github.com/Kangningthu/ItS2CLR","url_abs":"https://arxiv.org/abs/2210.09452v2","url_pdf":"https://arxiv.org/pdf/2210.09452v2.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":"multiple-instance-learning-via-iterative-self","repo_url":"https://github.com/kangningthu/its2clr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"multiple-instance-learning-via-iterative-self","repo_url":"https://github.com/winston52/hnm-wsi","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"medical-image-classification","task_name":"Medical Image Classification"},{"task_slug":"multiple-instance-learning","task_name":"Multiple Instance Learning"},{"task_slug":"self-supervised-learning","task_name":"Self-Supervised Learning"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.09452","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.09452"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kangningthu/its2clr","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/winston52/hnm-wsi","reach":{"status":"ok"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"ran":0,"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":"b506082d98682dbf","entry":"epoch_pseudolabel","repo":"kangningthu/its2clr","repo_kind":"official","path":"train/trainer.py","file_url":"https://github.com/kangningthu/its2clr/blob/HEAD/train/trainer.py","link_basis":"harvester_set","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":"b506082d98682dbf"}},{"code_sha256_prefix":"ea528be9c9974fea","entry":"epoch_test","repo":"kangningthu/its2clr","repo_kind":"official","path":"train/utils.py","file_url":"https://github.com/kangningthu/its2clr/blob/HEAD/train/utils.py","link_basis":"harvester_set","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":"ea528be9c9974fea"}},{"code_sha256_prefix":"6bcba2b66242f604","entry":"epoch_train","repo":"kangningthu/its2clr","repo_kind":"official","path":"train/utils.py","file_url":"https://github.com/kangningthu/its2clr/blob/HEAD/train/utils.py","link_basis":"harvester_set","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":"6bcba2b66242f604"}},{"code_sha256_prefix":"2e0af36e605bcb2e","entry":"get_features","repo":"kangningthu/its2clr","repo_kind":"official","path":"train/trainer.py","file_url":"https://github.com/kangningthu/its2clr/blob/HEAD/train/trainer.py","link_basis":"harvester_set","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":"2e0af36e605bcb2e"}},{"code_sha256_prefix":"9d981e3e55250397","entry":"optimal_thresh","repo":"kangningthu/its2clr","repo_kind":"official","path":"train/utils.py","file_url":"https://github.com/kangningthu/its2clr/blob/HEAD/train/utils.py","link_basis":"harvester_set","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":"9d981e3e55250397"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}