{"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/language-models-are-free-boosters-for","title":"Residual-based Language Models are Free Boosters for Biomedical Imaging","arxiv_id":"2403.17343","date":"2024-03-26","proceeding":null,"authors":["Zhixin Lai","Jing Wu","Suiyao Chen","Yucheng Zhou","Naira Hovakimyan"],"abstract":"In this study, we uncover the unexpected efficacy of residual-based large language models (LLMs) as part of encoders for biomedical imaging tasks, a domain traditionally devoid of language or textual data. The approach diverges from established methodologies by utilizing a frozen transformer block, extracted from pre-trained LLMs, as an innovative encoder layer for the direct processing of visual tokens. This strategy represents a significant departure from the standard multi-modal vision-language frameworks, which typically hinge on language-driven prompts and inputs. We found that these LLMs could boost performance across a spectrum of biomedical imaging applications, including both 2D and 3D visual classification tasks, serving as plug-and-play boosters. More interestingly, as a byproduct, we found that the proposed framework achieved superior performance, setting new state-of-the-art results on extensive, standardized datasets in MedMNIST-2D and 3D. Through this work, we aim to open new avenues for employing LLMs in biomedical imaging and enriching the understanding of their potential in this specialized domain.","url_abs":"https://arxiv.org/abs/2403.17343v3","url_pdf":"https://arxiv.org/pdf/2403.17343v3.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":"language-models-are-free-boosters-for","repo_url":"https://github.com/zhixinlai/llmboostmedical","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2403.17343","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.17343"}},"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/zhixinlai/llmboostmedical","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"ran_fixture":2,"ran_violates":3,"unverified":5},"by_repo_kind":{"official":{"samples":16,"ran":11,"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":"e805e183bad0f027","entry":"add_weight_decay","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/optimizer_utils.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/optimizer_utils.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":"e805e183bad0f027"}},{"code_sha256_prefix":"b47d48e431b34acd","entry":"apply_rotary_emb","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/models/llama.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/models/llama.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b47d48e431b34acd"}},{"code_sha256_prefix":"4b81b3eaa1936271","entry":"build_testset","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/datasets.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/datasets.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":"4b81b3eaa1936271"}},{"code_sha256_prefix":"b9bd1b6234a61b66","entry":"early_stopping","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/main-cam.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/main-cam.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":"b9bd1b6234a61b66"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"3D_classification/models/vivit.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/3D_classification/models/vivit.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"a9e48df75d2e823e","entry":"get_mce_from_accuracy","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/utils.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a9e48df75d2e823e"}},{"code_sha256_prefix":"2cd1e282432041c8","entry":"optimizer_kwargs","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/optimizer_utils.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/optimizer_utils.py","link_basis":"harvester_set","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":"2cd1e282432041c8"}},{"code_sha256_prefix":"6ba8cee9f5daea41","entry":"pair","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"3D_classification/models/vit3d_llama.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/3D_classification/models/vit3d_llama.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ba8cee9f5daea41"}},{"code_sha256_prefix":"14a84c2cbfebc413","entry":"precompute_freqs_cis","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/models/llama.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/models/llama.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"14a84c2cbfebc413"}},{"code_sha256_prefix":"70bf6ebaafd266c4","entry":"reshape_for_broadcast","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/models/llama.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/models/llama.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"70bf6ebaafd266c4"}},{"code_sha256_prefix":"32208d3133397a32","entry":"unnormalize_image","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/utils.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/utils.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":"32208d3133397a32"}},{"code_sha256_prefix":"58ab30e8c22165b6","entry":"PGDAttack","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/engine.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/engine.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":"58ab30e8c22165b6"}},{"code_sha256_prefix":"8b43480472330eaf","entry":"build_dataset","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/datasets.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/datasets.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":"8b43480472330eaf"}},{"code_sha256_prefix":"3bc74137ab36aa79","entry":"build_transform","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/datasets.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/datasets.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":"3bc74137ab36aa79"}},{"code_sha256_prefix":"8a93e041134b597a","entry":"clamp","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/engine.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/engine.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":"8a93e041134b597a"}},{"code_sha256_prefix":"a57f32dae793402d","entry":"patch_level_aug","repo":"zhixinlai/llmboostmedical","repo_kind":"official","path":"2D_classification/engine.py","file_url":"https://github.com/zhixinlai/llmboostmedical/blob/HEAD/2D_classification/engine.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":"a57f32dae793402d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}