{"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/prototypical-verbalizer-for-prompt-based-few-1","title":"Prototypical Verbalizer for Prompt-based Few-shot Tuning","arxiv_id":"2203.09770","date":"2022-03-18","proceeding":"ACL 2022 5","authors":["Ganqu Cui","Shengding Hu","Ning Ding","Longtao Huang","Zhiyuan Liu"],"abstract":"Prompt-based tuning for pre-trained language models (PLMs) has shown its effectiveness in few-shot learning. Typically, prompt-based tuning wraps the input text into a cloze question. To make predictions, the model maps the output words to labels via a verbalizer, which is either manually designed or automatically built. However, manual verbalizers heavily depend on domain-specific prior knowledge and human efforts, while finding appropriate label words automatically still remains challenging.In this work, we propose the prototypical verbalizer (ProtoVerb) which is built directly from training data. Specifically, ProtoVerb learns prototype vectors as verbalizers by contrastive learning. In this way, the prototypes summarize training instances and are able to enclose rich class-level semantics. We conduct experiments on both topic classification and entity typing tasks, and the results demonstrate that ProtoVerb significantly outperforms current automatic verbalizers, especially when training data is extremely scarce. More surprisingly, ProtoVerb consistently boosts prompt-based tuning even on untuned PLMs, indicating an elegant non-tuning way to utilize PLMs. Our codes are avaliable at https://github.com/thunlp/OpenPrompt.","url_abs":"https://arxiv.org/abs/2203.09770v1","url_pdf":"https://arxiv.org/pdf/2203.09770v1.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":"prototypical-verbalizer-for-prompt-based-few-1","repo_url":"https://github.com/thunlp/OpenPrompt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"entity-typing","task_name":"Entity Typing"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"topic-classification","task_name":"Topic Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2203.09770","atlas_url":"https://app.syntology.ai/?focus=2203.09770","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.09770"}},"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/thunlp/OpenPrompt","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":3},"by_repo_kind":{"official":{"samples":3,"ran":0,"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":"c4adc1412f1960c8","entry":"get_conditional_config","repo":"thunlp/OpenPrompt","repo_kind":"official","path":"openprompt/config.py","file_url":"https://github.com/thunlp/OpenPrompt/blob/HEAD/openprompt/config.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c4adc1412f1960c8"}},{"code_sha256_prefix":"b50275399496884d","entry":"get_config_from_file","repo":"thunlp/OpenPrompt","repo_kind":"official","path":"openprompt/config.py","file_url":"https://github.com/thunlp/OpenPrompt/blob/HEAD/openprompt/config.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b50275399496884d"}},{"code_sha256_prefix":"9cdefe23f43015ca","entry":"get_user_config","repo":"thunlp/OpenPrompt","repo_kind":"official","path":"openprompt/config.py","file_url":"https://github.com/thunlp/OpenPrompt/blob/HEAD/openprompt/config.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9cdefe23f43015ca"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}