{"about":{"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.","site":"https://codewithpapers.app","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","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/learning-domain-invariant-prompt-for-vision","title":"Learning Domain Invariant Prompt for Vision-Language Models","arxiv_id":"2212.04196","date":"2022-12-08","proceeding":null,"authors":["Cairong Zhao","Yubin Wang","Xinyang Jiang","Yifei Shen","Kaitao Song","Dongsheng Li","Duoqian Miao"],"abstract":"Prompt learning is one of the most effective and trending ways to adapt powerful vision-language foundation models like CLIP to downstream datasets by tuning learnable prompt vectors with very few samples. However, although prompt learning achieves excellent performance over in-domain data, it still faces the major challenge of generalizing to unseen classes and domains. Some existing prompt learning methods tackle this issue by adaptively generating different prompts for different tokens or domains but neglecting the ability of learned prompts to generalize to unseen domains. In this paper, we propose a novel prompt learning paradigm that directly generates \\emph{domain invariant} prompt that can be generalized to unseen domains, called MetaPrompt. Specifically, a dual-modality prompt tuning network is proposed to generate prompts for input from both image and text modalities. With a novel asymmetric contrastive loss, the representation from the original pre-trained vision-language model acts as supervision to enhance the generalization ability of the learned prompt. More importantly, we propose a meta-learning-based prompt tuning algorithm that explicitly constrains the task-specific prompt tuned for one domain or class to also achieve good performance in another domain or class. Extensive experiments on 11 datasets for base-to-new generalization and 4 datasets for domain generalization demonstrate that our method consistently and significantly outperforms existing methods.","url_abs":"https://arxiv.org/abs/2212.04196v2","url_pdf":"https://arxiv.org/pdf/2212.04196v2.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":"learning-domain-invariant-prompt-for-vision","repo_url":"https://github.com/Vill-Lab/2024-TIP-MetaPrompt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"meta-learning","task_name":"Meta-Learning"},{"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":"MetaPrompt","rank_in_archive_order":7,"of":14,"metrics":{"Harmonic mean":"96.32"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-dtd","task":"Prompt Engineering","dataset":"DTD","model":"MetaPrompt","rank_in_archive_order":11,"of":14,"metrics":{"Harmonic mean":"68.35"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-eurosat","task":"Prompt Engineering","dataset":"EuroSAT","model":"MetaPrompt","rank_in_archive_order":9,"of":14,"metrics":{"Harmonic mean":"83.38"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-fgvc-aircraft","task":"Prompt Engineering","dataset":"FGVC-Aircraft","model":"MetaPrompt","rank_in_archive_order":10,"of":14,"metrics":{"Harmonic mean":"38.24"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-food-101","task":"Prompt Engineering","dataset":"Food-101","model":"MetaPrompt","rank_in_archive_order":5,"of":13,"metrics":{"Harmonic mean":"91.29"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-imagenet","task":"Prompt Engineering","dataset":"ImageNet","model":"MetaPrompt","rank_in_archive_order":9,"of":15,"metrics":{"Harmonic mean":"74.02"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-oxford-102-flower","task":"Prompt Engineering","dataset":"Oxford 102 Flower","model":"MetaPrompt","rank_in_archive_order":10,"of":14,"metrics":{"Harmonic mean":"84.52"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-oxford-iiit-pet-dataset","task":"Prompt Engineering","dataset":"Oxford-IIIT Pet Dataset","model":"MetaPrompt","rank_in_archive_order":12,"of":14,"metrics":{"Harmonic mean":"96.26"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-sun397","task":"Prompt Engineering","dataset":"SUN397","model":"MetaPrompt","rank_in_archive_order":9,"of":14,"metrics":{"Harmonic mean":"80.62"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-stanford-cars-1","task":"Prompt Engineering","dataset":"Stanford Cars","model":"MetaPrompt","rank_in_archive_order":10,"of":14,"metrics":{"Harmonic mean":"75.48"},"uses_additional_data":false},{"leaderboard":"/sota/prompt-engineering-on-ucf101","task":"Prompt Engineering","dataset":"UCF101","model":"MetaPrompt","rank_in_archive_order":10,"of":14,"metrics":{"Harmonic mean":"81.35"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2212.04196","atlas_url":"https://app.syntology.ai/?focus=2212.04196","mcp":null,"developers":"https://syntology.ai/developers","held":true,"reason":"arxiv_id_in_atlas","checked_against":{"atlas_ids":549449,"atlas_ids_sha256":"afd72399dafd9906e9062927f70655952385a3d75488558e1f0484e950ab09b7","read_at":"2026-10-05T01:46:21Z"},"agent_calls":[{"tool":"get_citation_path","arguments":{"paper_1":"2212.04196"},"arguments_in":{"paper_2":"another paper's arXiv id or title"},"call":"get_citation_path(paper_1=\"2212.04196\", paper_2=\"…\")"},{"tool":"get_concepts_for_paper","arguments":{"arxiv_id":"2212.04196"},"call":"get_concepts_for_paper(arxiv_id=\"2212.04196\")"}],"by_repo":[{"repo":"Vill-Lab/2024-TIP-MetaPrompt","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2109.01134"],"harvested_for_calls":[{"arxiv_id":"2109.01134","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2109.01134"},"call":"get_harvested_code_for_paper(arxiv_id=\"2109.01134\")"}]}],"by_repo_harvested_for_is":"harvested_for: the arXiv ids (as Syntology's graph holds them) of every paper whose samples Syntology's graph links to this repository, in arXiv-id order, complete; the page names the first 3 and says how many more. A link only: it does not say the papers are the same work, that one copied the other, or that the code implements this paper's method; harvested_for_calls gives the get_harvested_code_for_paper call for each arXiv-shaped id among them","by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code"},"code_links_note":null,"arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"1ab7505b438df61c698f213e54cccac98a78aaee89e706dff800d12b1ec5751a","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}