{"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/exploring-the-universal-vulnerability-of-1","title":"Exploring the Universal Vulnerability of Prompt-based Learning Paradigm","arxiv_id":"2204.05239","date":"2022-04-11","proceeding":"Findings (NAACL) 2022 7","authors":["Lei Xu","Yangyi Chen","Ganqu Cui","Hongcheng Gao","Zhiyuan Liu"],"abstract":"Prompt-based learning paradigm bridges the gap between pre-training and fine-tuning, and works effectively under the few-shot setting. However, we find that this learning paradigm inherits the vulnerability from the pre-training stage, where model predictions can be misled by inserting certain triggers into the text. In this paper, we explore this universal vulnerability by either injecting backdoor triggers or searching for adversarial triggers on pre-trained language models using only plain text. In both scenarios, we demonstrate that our triggers can totally control or severely decrease the performance of prompt-based models fine-tuned on arbitrary downstream tasks, reflecting the universal vulnerability of the prompt-based learning paradigm. Further experiments show that adversarial triggers have good transferability among language models. We also find conventional fine-tuning models are not vulnerable to adversarial triggers constructed from pre-trained language models. We conclude by proposing a potential solution to mitigate our attack methods. Code and data are publicly available at https://github.com/leix28/prompt-universal-vulnerability","url_abs":"https://arxiv.org/abs/2204.05239v1","url_pdf":"https://arxiv.org/pdf/2204.05239v1.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":"exploring-the-universal-vulnerability-of-1","repo_url":"https://github.com/leix28/prompt-universal-vulnerability","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2204.05239","atlas_url":"https://app.syntology.ai/?focus=2204.05239","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.05239"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leix28/prompt-universal-vulnerability","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"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":"3ef657d5a40aa965","entry":"sample_plain_text","repo":"leix28/prompt-universal-vulnerability","repo_kind":"official","path":"src/insert_btop.py","file_url":"https://github.com/leix28/prompt-universal-vulnerability/blob/HEAD/src/insert_btop.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":"3ef657d5a40aa965"}},{"code_sha256_prefix":"63fd88ba705418ea","entry":"dataset_mapping_wiki","repo":"leix28/prompt-universal-vulnerability","repo_kind":"official","path":"src/search_atop.py","file_url":"https://github.com/leix28/prompt-universal-vulnerability/blob/HEAD/src/search_atop.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":"63fd88ba705418ea"}},{"code_sha256_prefix":"6f54bb04919c3e16","entry":"search_triggers_on_pretrained_lm","repo":"leix28/prompt-universal-vulnerability","repo_kind":"official","path":"src/search_atop.py","file_url":"https://github.com/leix28/prompt-universal-vulnerability/blob/HEAD/src/search_atop.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":"6f54bb04919c3e16"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}