{"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/prompt-learning-with-optimal-transport-for","title":"PLOT: Prompt Learning with Optimal Transport for Vision-Language Models","arxiv_id":"2210.01253","date":"2022-10-03","proceeding":null,"authors":["Guangyi Chen","Weiran Yao","Xiangchen Song","Xinyue Li","Yongming Rao","Kun Zhang"],"abstract":"With the increasing attention to large vision-language models such as CLIP, there has been a significant amount of effort dedicated to building efficient prompts. Unlike conventional methods of only learning one single prompt, we propose to learn multiple comprehensive prompts to describe diverse characteristics of categories such as intrinsic attributes or extrinsic contexts. However, directly matching each prompt to the same visual feature is problematic, as it pushes the prompts to converge to one point. To solve this problem, we propose to apply optimal transport to match the vision and text modalities. Specifically, we first model images and the categories with visual and textual feature sets. Then, we apply a two-stage optimization strategy to learn the prompts. In the inner loop, we optimize the optimal transport distance to align visual features and prompts by the Sinkhorn algorithm, while in the outer loop, we learn the prompts by this distance from the supervised data. Extensive experiments are conducted on the few-shot recognition task and the improvement demonstrates the superiority of our method. The code is available at https://github.com/CHENGY12/PLOT.","url_abs":"https://arxiv.org/abs/2210.01253v2","url_pdf":"https://arxiv.org/pdf/2210.01253v2.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":"prompt-learning-with-optimal-transport-for","repo_url":"https://github.com/CHENGY12/PLOT","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"prompt-learning","task_name":"Prompt Learning"}],"methods":[{"method_slug":"align","method_name":"ALIGN"},{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2210.01253","atlas_url":"https://app.syntology.ai/?focus=2210.01253","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.01253"}},"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":"deterministic:regex_extraction","url":"https://github.com/CHENGY12/PLOT","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":3},"by_repo_kind":{"official":{"samples":4,"ran":1,"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":"9ba2e45e5b1df7f4","entry":"Sinkhorn","repo":"CHENGY12/PLOT","repo_kind":"official","path":"plot-adapter/utils.py","file_url":"https://github.com/CHENGY12/PLOT/blob/HEAD/plot-adapter/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":"9ba2e45e5b1df7f4"}},{"code_sha256_prefix":"3edbe74ea6fa20f4","entry":"build_model","repo":"CHENGY12/PLOT","repo_kind":"official","path":"plot-adapter/clip/model.py","file_url":"https://github.com/CHENGY12/PLOT/blob/HEAD/plot-adapter/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":"3edbe74ea6fa20f4"}},{"code_sha256_prefix":"f2a0a5061e7c204e","entry":"cls_acc","repo":"CHENGY12/PLOT","repo_kind":"official","path":"plot-adapter/utils.py","file_url":"https://github.com/CHENGY12/PLOT/blob/HEAD/plot-adapter/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":"f2a0a5061e7c204e"}},{"code_sha256_prefix":"2e6576048297f5a4","entry":"tip_plot","repo":"CHENGY12/PLOT","repo_kind":"official","path":"plot-adapter/utils.py","file_url":"https://github.com/CHENGY12/PLOT/blob/HEAD/plot-adapter/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":"2e6576048297f5a4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}