{"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/maple-multi-modal-prompt-learning","title":"MaPLe: Multi-modal Prompt Learning","arxiv_id":"2210.03117","date":"2022-10-06","proceeding":"CVPR 2023 1","authors":["Muhammad Uzair Khattak","Hanoona Rasheed","Muhammad Maaz","Salman Khan","Fahad Shahbaz Khan"],"abstract":"Pre-trained vision-language (V-L) models such as CLIP have shown excellent generalization ability to downstream tasks. However, they are sensitive to the choice of input text prompts and require careful selection of prompt templates to perform well. Inspired by the Natural Language Processing (NLP) literature, recent CLIP adaptation approaches learn prompts as the textual inputs to fine-tune CLIP for downstream tasks. We note that using prompting to adapt representations in a single branch of CLIP (language or vision) is sub-optimal since it does not allow the flexibility to dynamically adjust both representation spaces on a downstream task. In this work, we propose Multi-modal Prompt Learning (MaPLe) for both vision and language branches to improve alignment between the vision and language representations. Our design promotes strong coupling between the vision-language prompts to ensure mutual synergy and discourages learning independent uni-modal solutions. Further, we learn separate prompts across different early stages to progressively model the stage-wise feature relationships to allow rich context learning. We evaluate the effectiveness of our approach on three representative tasks of generalization to novel classes, new target datasets and unseen domain shifts. Compared with the state-of-the-art method Co-CoOp, MaPLe exhibits favorable performance and achieves an absolute gain of 3.45% on novel classes and 2.72% on overall harmonic-mean, averaged over 11 diverse image recognition datasets. Our code and pre-trained models are available at https://github.com/muzairkhattak/multimodal-prompt-learning.","url_abs":"https://arxiv.org/abs/2210.03117v3","url_pdf":"https://arxiv.org/pdf/2210.03117v3.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":"maple-multi-modal-prompt-learning","repo_url":"https://github.com/muzairkhattak/multimodal-prompt-learning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"maple-multi-modal-prompt-learning","repo_url":"https://github.com/gyukai/i2vc","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"maple-multi-modal-prompt-learning","repo_url":"https://github.com/htyao89/kgcoop","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"prompt-engineering","task_name":"Prompt Engineering"},{"task_slug":"prompt-learning","task_name":"Prompt Learning"}],"methods":[{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/prompt-engineering-on-caltech-101","task":"Prompt Engineering","dataset":"Caltech-101","model":"MaPLe","rank_in_archive_order":12,"of":14,"metrics":{"Harmonic mean":"96.02"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-dtd","task":"Prompt Engineering","dataset":"DTD","model":"MaPLe","rank_in_archive_order":12,"of":14,"metrics":{"Harmonic mean":"68.16"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-eurosat","task":"Prompt Engineering","dataset":"EuroSAT","model":"MaPLe","rank_in_archive_order":10,"of":14,"metrics":{"Harmonic mean":"82.35"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-fgvc-aircraft","task":"Prompt Engineering","dataset":"FGVC-Aircraft","model":"MaPLe","rank_in_archive_order":11,"of":14,"metrics":{"Harmonic mean":"36.50"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-food-101","task":"Prompt Engineering","dataset":"Food-101","model":"MaPLe","rank_in_archive_order":3,"of":13,"metrics":{"Harmonic mean":"91.38"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-imagenet","task":"Prompt Engineering","dataset":"ImageNet","model":"MaPLe","rank_in_archive_order":13,"of":15,"metrics":{"Harmonic mean":"73.47"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-imagenet-v2","task":"Prompt Engineering","dataset":"ImageNet V2","model":"MaPLe","rank_in_archive_order":5,"of":8,"metrics":{"Top-1 accuracy %":"64.07"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-imagenet-a","task":"Prompt Engineering","dataset":"ImageNet-A","model":"MaPLe","rank_in_archive_order":4,"of":9,"metrics":{"Top-1 accuracy %":"50.90"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-imagenet-r","task":"Prompt Engineering","dataset":"ImageNet-R","model":"MaPLe","rank_in_archive_order":7,"of":9,"metrics":{"Top-1 accuracy %":"76.98"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-imagenet-s","task":"Prompt Engineering","dataset":"ImageNet-S","model":"MaPLe","rank_in_archive_order":7,"of":9,"metrics":{"Top-1 accuracy %":"49.15"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-oxford-102-flower","task":"Prompt Engineering","dataset":"Oxford 102 Flower","model":"MaPLe","rank_in_archive_order":12,"of":14,"metrics":{"Harmonic mean":"82.56"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-oxford-iiit-pet-dataset","task":"Prompt Engineering","dataset":"Oxford-IIIT Pet Dataset","model":"MaPLe","rank_in_archive_order":6,"of":14,"metrics":{"Harmonic mean":"96.58"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-sun397","task":"Prompt Engineering","dataset":"SUN397","model":"MaPLe","rank_in_archive_order":11,"of":14,"metrics":{"Harmonic mean":"79.75"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-stanford-cars-1","task":"Prompt Engineering","dataset":"Stanford Cars","model":"MaPLe","rank_in_archive_order":12,"of":14,"metrics":{"Harmonic mean":"73.47"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-ucf101","task":"Prompt Engineering","dataset":"UCF101","model":"MaPLe","rank_in_archive_order":11,"of":14,"metrics":{"Harmonic mean":"80.82"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.03117","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.03117"}},"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/gyukai/i2vc","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/htyao89/kgcoop","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/muzairkhattak/multimodal-prompt-learning","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":3,"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":4,"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":"98f385d847636a3e","entry":"basic_clean","repo":"muzairkhattak/multimodal-prompt-learning","repo_kind":"official","path":"clip/simple_tokenizer.py","file_url":"https://github.com/muzairkhattak/multimodal-prompt-learning/blob/HEAD/clip/simple_tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"98f385d847636a3e"}},{"code_sha256_prefix":"ba26afd892405335","entry":"compute_ci95","repo":"muzairkhattak/multimodal-prompt-learning","repo_kind":"official","path":"parse_test_res.py","file_url":"https://github.com/muzairkhattak/multimodal-prompt-learning/blob/HEAD/parse_test_res.py","link_basis":"harvester_set","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":"ba26afd892405335"}},{"code_sha256_prefix":"d919ae32e5e4e616","entry":"get_pairs","repo":"muzairkhattak/multimodal-prompt-learning","repo_kind":"official","path":"clip/simple_tokenizer.py","file_url":"https://github.com/muzairkhattak/multimodal-prompt-learning/blob/HEAD/clip/simple_tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d919ae32e5e4e616"}},{"code_sha256_prefix":"9542161e9640b858","entry":"whitespace_clean","repo":"muzairkhattak/multimodal-prompt-learning","repo_kind":"official","path":"clip/simple_tokenizer.py","file_url":"https://github.com/muzairkhattak/multimodal-prompt-learning/blob/HEAD/clip/simple_tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9542161e9640b858"}},{"code_sha256_prefix":"48ac2bd4dcbfb717","entry":"build_model","repo":"muzairkhattak/multimodal-prompt-learning","repo_kind":"official","path":"clip/model.py","file_url":"https://github.com/muzairkhattak/multimodal-prompt-learning/blob/HEAD/clip/model.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":"48ac2bd4dcbfb717"}},{"code_sha256_prefix":"fbf8c0143d9c48e3","entry":"load","repo":"muzairkhattak/multimodal-prompt-learning","repo_kind":"official","path":"clip/clip.py","file_url":"https://github.com/muzairkhattak/multimodal-prompt-learning/blob/HEAD/clip/clip.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":"fbf8c0143d9c48e3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}