{"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/ipo-interpretable-prompt-optimization-for","title":"IPO: Interpretable Prompt Optimization for Vision-Language Models","arxiv_id":"2410.15397","date":"2024-10-20","proceeding":null,"authors":["Yingjun Du","Wenfang Sun","Cees G. M. Snoek"],"abstract":"Pre-trained vision-language models like CLIP have remarkably adapted to various downstream tasks. Nonetheless, their performance heavily depends on the specificity of the input text prompts, which requires skillful prompt template engineering. Instead, current approaches to prompt optimization learn the prompts through gradient descent, where the prompts are treated as adjustable parameters. However, these methods tend to lead to overfitting of the base classes seen during training and produce prompts that are no longer understandable by humans. This paper introduces a simple but interpretable prompt optimizer (IPO), that utilizes large language models (LLMs) to generate textual prompts dynamically. We introduce a Prompt Optimization Prompt that not only guides LLMs in creating effective prompts but also stores past prompts with their performance metrics, providing rich in-context information. Additionally, we incorporate a large multimodal model (LMM) to condition on visual content by generating image descriptions, which enhance the interaction between textual and visual modalities. This allows for thae creation of dataset-specific prompts that improve generalization performance, while maintaining human comprehension. Extensive testing across 11 datasets reveals that IPO not only improves the accuracy of existing gradient-descent-based prompt learning methods but also considerably enhances the interpretability of the generated prompts. By leveraging the strengths of LLMs, our approach ensures that the prompts remain human-understandable, thereby facilitating better transparency and oversight for vision-language models.","url_abs":"https://arxiv.org/abs/2410.15397v1","url_pdf":"https://arxiv.org/pdf/2410.15397v1.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":"ipo-interpretable-prompt-optimization-for","repo_url":"https://github.com/lmsdss/IPO","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"prompt-learning","task_name":"Prompt Learning"},{"task_slug":"specificity","task_name":"Specificity"}],"methods":[{"method_slug":"base","method_name":"BASE"},{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2410.15397","atlas_url":"https://app.syntology.ai/?focus=2410.15397","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.15397"}},"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/lmsdss/IPO","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":6,"ran":1,"unverified":4},"by_repo_kind":{"official":{"samples":11,"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":11,"samples":[{"code_sha256_prefix":"a4cf9d0d1ece601e","entry":"read_jsonl","repo":"lmsdss/ipo","repo_kind":"official","path":"optimization/eval_utils.py","file_url":"https://github.com/lmsdss/ipo/blob/HEAD/optimization/eval_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a4cf9d0d1ece601e"}},{"code_sha256_prefix":"98f385d847636a3e","entry":"basic_clean","repo":"lmsdss/IPO","repo_kind":"official","path":"clip/simple_tokenizer.py","file_url":"https://github.com/lmsdss/IPO/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"98f385d847636a3e"}},{"code_sha256_prefix":"ba26afd892405335","entry":"compute_ci95","repo":"lmsdss/IPO","repo_kind":"official","path":"parse_test_res.py","file_url":"https://github.com/lmsdss/IPO/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ba26afd892405335"}},{"code_sha256_prefix":"d919ae32e5e4e616","entry":"get_pairs","repo":"lmsdss/IPO","repo_kind":"official","path":"clip/simple_tokenizer.py","file_url":"https://github.com/lmsdss/IPO/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d919ae32e5e4e616"}},{"code_sha256_prefix":"b1e17b573bb75a26","entry":"instruction_to_filename","repo":"lmsdss/ipo","repo_kind":"official","path":"optimization/eval_utils.py","file_url":"https://github.com/lmsdss/ipo/blob/HEAD/optimization/eval_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b1e17b573bb75a26"}},{"code_sha256_prefix":"dc0fb1ce4824c2c3","entry":"remove_punctuation_from_string","repo":"lmsdss/ipo","repo_kind":"official","path":"optimization/eval_utils.py","file_url":"https://github.com/lmsdss/ipo/blob/HEAD/optimization/eval_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dc0fb1ce4824c2c3"}},{"code_sha256_prefix":"9542161e9640b858","entry":"whitespace_clean","repo":"lmsdss/IPO","repo_kind":"official","path":"clip/simple_tokenizer.py","file_url":"https://github.com/lmsdss/IPO/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9542161e9640b858"}},{"code_sha256_prefix":"c47aa9e5b049a11d","entry":"build_model","repo":"lmsdss/IPO","repo_kind":"official","path":"clip/model.py","file_url":"https://github.com/lmsdss/IPO/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c47aa9e5b049a11d"}},{"code_sha256_prefix":"310edb478a4009a1","entry":"call_openai_server_func","repo":"lmsdss/IPO","repo_kind":"official","path":"prompt_utils.py","file_url":"https://github.com/lmsdss/IPO/blob/HEAD/prompt_utils.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":"310edb478a4009a1"}},{"code_sha256_prefix":"daa969a73f4f1e26","entry":"call_openai_server_single_prompt","repo":"lmsdss/IPO","repo_kind":"official","path":"prompt_utils.py","file_url":"https://github.com/lmsdss/IPO/blob/HEAD/prompt_utils.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":"daa969a73f4f1e26"}},{"code_sha256_prefix":"1b5c9c827d9060b5","entry":"load","repo":"lmsdss/IPO","repo_kind":"official","path":"clip/clip.py","file_url":"https://github.com/lmsdss/IPO/blob/HEAD/clip/clip.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":"1b5c9c827d9060b5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}