{"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/melo-low-rank-adaptation-is-better-than-fine","title":"MeLo: Low-rank Adaptation is Better than Fine-tuning for Medical Image Diagnosis","arxiv_id":"2311.08236","date":"2023-11-14","proceeding":null,"authors":["Yitao Zhu","Zhenrong Shen","Zihao Zhao","Sheng Wang","Xin Wang","Xiangyu Zhao","Dinggang Shen","Qian Wang"],"abstract":"The common practice in developing computer-aided diagnosis (CAD) models based on transformer architectures usually involves fine-tuning from ImageNet pre-trained weights. However, with recent advances in large-scale pre-training and the practice of scaling laws, Vision Transformers (ViT) have become much larger and less accessible to medical imaging communities. Additionally, in real-world scenarios, the deployments of multiple CAD models can be troublesome due to problems such as limited storage space and time-consuming model switching. To address these challenges, we propose a new method MeLo (Medical image Low-rank adaptation), which enables the development of a single CAD model for multiple clinical tasks in a lightweight manner. It adopts low-rank adaptation instead of resource-demanding fine-tuning. By fixing the weight of ViT models and only adding small low-rank plug-ins, we achieve competitive results on various diagnosis tasks across different imaging modalities using only a few trainable parameters. Specifically, our proposed method achieves comparable performance to fully fine-tuned ViT models on four distinct medical imaging datasets using about 0.17% trainable parameters. Moreover, MeLo adds only about 0.5MB of storage space and allows for extremely fast model switching in deployment and inference. Our source code and pre-trained weights are available on our website (https://absterzhu.github.io/melo.github.io/).","url_abs":"https://arxiv.org/abs/2311.08236v2","url_pdf":"https://arxiv.org/pdf/2311.08236v2.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":"melo-low-rank-adaptation-is-better-than-fine","repo_url":"https://github.com/JamesQFreeman/LoRA-ViT","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2311.08236","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.08236"}},"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/JamesQFreeman/LoRA-ViT","reach":{"status":"ok","spdx":"GPL-3.0"}}],"summary":{"ran_honours":1,"ran":1,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"official":{"samples":7,"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":7,"samples":[{"code_sha256_prefix":"91d26d98a8c2bcac","entry":"as_tuple","repo":"JamesQFreeman/LoRA-ViT","repo_kind":"official","path":"base_vit.py","file_url":"https://github.com/JamesQFreeman/LoRA-ViT/blob/HEAD/base_vit.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"91d26d98a8c2bcac"}},{"code_sha256_prefix":"8b0d2f7acf80cf36","entry":"cxrDataloader","repo":"JamesQFreeman/LoRA-ViT","repo_kind":"official","path":"utils/dataloader_cxr_cn.py","file_url":"https://github.com/JamesQFreeman/LoRA-ViT/blob/HEAD/utils/dataloader_cxr_cn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"8b0d2f7acf80cf36"}},{"code_sha256_prefix":"940661961d8b8781","entry":"drop_head_variant","repo":"JamesQFreeman/LoRA-ViT","repo_kind":"official","path":"base_vit.py","file_url":"https://github.com/JamesQFreeman/LoRA-ViT/blob/HEAD/base_vit.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"940661961d8b8781"}},{"code_sha256_prefix":"f09a9f785e367051","entry":"BloodDataloader","repo":"JamesQFreeman/LoRA-ViT","repo_kind":"official","path":"utils/dataloader_blood_cell.py","file_url":"https://github.com/JamesQFreeman/LoRA-ViT/blob/HEAD/utils/dataloader_blood_cell.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"f09a9f785e367051"}},{"code_sha256_prefix":"fecb0632c5a4f1b6","entry":"cxpDataloader","repo":"JamesQFreeman/LoRA-ViT","repo_kind":"official","path":"utils/dataloader_cxp.py","file_url":"https://github.com/JamesQFreeman/LoRA-ViT/blob/HEAD/utils/dataloader_cxp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"fecb0632c5a4f1b6"}},{"code_sha256_prefix":"bc34fa72d66c51ba","entry":"kneeDataloader","repo":"JamesQFreeman/LoRA-ViT","repo_kind":"official","path":"utils/dataloader_mrnet.py","file_url":"https://github.com/JamesQFreeman/LoRA-ViT/blob/HEAD/utils/dataloader_mrnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"bc34fa72d66c51ba"}},{"code_sha256_prefix":"8c053b1e8b60dcc6","entry":"load_pretrained_weights","repo":"JamesQFreeman/LoRA-ViT","repo_kind":"official","path":"base_vit.py","file_url":"https://github.com/JamesQFreeman/LoRA-ViT/blob/HEAD/base_vit.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"8c053b1e8b60dcc6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}