{"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/feature-re-embedding-towards-foundation-model","title":"Feature Re-Embedding: Towards Foundation Model-Level Performance in Computational Pathology","arxiv_id":"2402.17228","date":"2024-02-27","proceeding":"CVPR 2024 1","authors":["Wenhao Tang","Fengtao Zhou","Sheng Huang","Xiang Zhu","Yi Zhang","Bo Liu"],"abstract":"Multiple instance learning (MIL) is the most widely used framework in computational pathology, encompassing sub-typing, diagnosis, prognosis, and more. However, the existing MIL paradigm typically requires an offline instance feature extractor, such as a pre-trained ResNet or a foundation model. This approach lacks the capability for feature fine-tuning within the specific downstream tasks, limiting its adaptability and performance. To address this issue, we propose a Re-embedded Regional Transformer (R$^2$T) for re-embedding the instance features online, which captures fine-grained local features and establishes connections across different regions. Unlike existing works that focus on pre-training powerful feature extractor or designing sophisticated instance aggregator, R$^2$T is tailored to re-embed instance features online. It serves as a portable module that can seamlessly integrate into mainstream MIL models. Extensive experimental results on common computational pathology tasks validate that: 1) feature re-embedding improves the performance of MIL models based on ResNet-50 features to the level of foundation model features, and further enhances the performance of foundation model features; 2) the R$^2$T can introduce more significant performance improvements to various MIL models; 3) R$^2$T-MIL, as an R$^2$T-enhanced AB-MIL, outperforms other latest methods by a large margin.The code is available at: https://github.com/DearCaat/RRT-MIL.","url_abs":"https://arxiv.org/abs/2402.17228v4","url_pdf":"https://arxiv.org/pdf/2402.17228v4.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":"feature-re-embedding-towards-foundation-model","repo_url":"https://github.com/dearcaat/rrt-mil","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"feature-re-embedding-towards-foundation-model","repo_url":"https://github.com/dearcaat/mhim-mil","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"multiple-instance-learning","task_name":"Multiple Instance Learning"},{"task_slug":"prognosis","task_name":"Prognosis"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"focus","method_name":"Focus"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.17228","atlas_url":"https://app.syntology.ai/?focus=2402.17228","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.17228"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/dearcaat/rrt-mil","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dearcaat/mhim-mil","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/DearCaat/RRT-MIL","reach":null}],"summary":{"ran":11,"ran_fixture":1,"ran_draft_wrong":1,"unverified":11},"by_repo_kind":{"official":{"samples":9,"ran":6,"repositories":1},"listed":{"samples":14,"ran":7,"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":24,"samples":[{"code_sha256_prefix":"690f75057fc8497a","entry":"Attention","repo":"DearCaat/RRT-MIL","repo_kind":"official","path":"modules/rrt.py","file_url":"https://github.com/DearCaat/RRT-MIL/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"690f75057fc8497a"}},{"code_sha256_prefix":"ce18178f893178a0","entry":"Attention","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce18178f893178a0"}},{"code_sha256_prefix":"25ab38327f4d943f","entry":"AttentionGated","repo":"DearCaat/RRT-MIL","repo_kind":"official","path":"modules/rrt.py","file_url":"https://github.com/DearCaat/RRT-MIL/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"25ab38327f4d943f"}},{"code_sha256_prefix":"947a0421bf8c4d7a","entry":"AttentionGated","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"947a0421bf8c4d7a"}},{"code_sha256_prefix":"6089cf851928ffc1","entry":"DAttention","repo":"DearCaat/RRT-MIL","repo_kind":"official","path":"modules/rrt.py","file_url":"https://github.com/DearCaat/RRT-MIL/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6089cf851928ffc1"}},{"code_sha256_prefix":"9660efe563e4aa62","entry":"DAttention","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9660efe563e4aa62"}},{"code_sha256_prefix":"b88e546fc7045938","entry":"InnerAttention","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b88e546fc7045938"}},{"code_sha256_prefix":"62fd73bae3c2a68d","entry":"Mlp","repo":"DearCaat/RRT-MIL","repo_kind":"official","path":"modules/rrt.py","file_url":"https://github.com/DearCaat/RRT-MIL/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"62fd73bae3c2a68d"}},{"code_sha256_prefix":"4aef81a4905d6aa4","entry":"NystromAttention","repo":"DearCaat/RRT-MIL","repo_kind":"official","path":"modules/rrt.py","file_url":"https://github.com/DearCaat/RRT-MIL/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4aef81a4905d6aa4"}},{"code_sha256_prefix":"8e3b1e1db87f32ad","entry":"NystromAttention","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8e3b1e1db87f32ad"}},{"code_sha256_prefix":"3466debae668556f","entry":"TransLayer","repo":"DearCaat/RRT-MIL","repo_kind":"official","path":"modules/rrt.py","file_url":"https://github.com/DearCaat/RRT-MIL/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3466debae668556f"}},{"code_sha256_prefix":"186854d7ab0cb571","entry":"region_partition","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"186854d7ab0cb571"}},{"code_sha256_prefix":"3394a2de50908ff7","entry":"region_reverse","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3394a2de50908ff7"}},{"code_sha256_prefix":"29871b4921f22369","entry":"CrossRegionAttntion","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"29871b4921f22369"}},{"code_sha256_prefix":"c27ce154e3a8d985","entry":"RRTEncoder","repo":"DearCaat/RRT-MIL","repo_kind":"official","path":"modules/rrt.py","file_url":"https://github.com/DearCaat/RRT-MIL/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c27ce154e3a8d985"}},{"code_sha256_prefix":"329cf4424f3cffba","entry":"RRTEncoder","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"329cf4424f3cffba"}},{"code_sha256_prefix":"0d6d3f5a8a222713","entry":"RRTMIL","repo":"DearCaat/RRT-MIL","repo_kind":"official","path":"modules/rrt.py","file_url":"https://github.com/DearCaat/RRT-MIL/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0d6d3f5a8a222713"}},{"code_sha256_prefix":"3e126d05185e841e","entry":"RRTMIL","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3e126d05185e841e"}},{"code_sha256_prefix":"5aaa3ef8e249f250","entry":"RegionAttntion","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5aaa3ef8e249f250"}},{"code_sha256_prefix":"d1ab57dc28edeb86","entry":"TransLayer","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d1ab57dc28edeb86"}},{"code_sha256_prefix":"e9fca6a365693e72","entry":"initialize_weights","repo":"DearCaat/RRT-MIL","repo_kind":"official","path":"modules/rrt.py","file_url":"https://github.com/DearCaat/RRT-MIL/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e9fca6a365693e72"}},{"code_sha256_prefix":"d66a829345766cc9","entry":"initialize_weights","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d66a829345766cc9"}},{"code_sha256_prefix":"1aa879b87d59c39f","entry":"moore_penrose_iter_pinv","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"1aa879b87d59c39f"}},{"code_sha256_prefix":"46262157db207436","entry":"moore_penrose_iter_pinv","repo":"dearcaat/mhim-mil","repo_kind":"listed","path":"modules/rrt.py","file_url":"https://github.com/dearcaat/mhim-mil/blob/HEAD/modules/rrt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"46262157db207436"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}