{"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/zero-shot-cross-lingual-transfer-of-prompt","title":"Zero-shot Cross-lingual Transfer of Prompt-based Tuning with a Unified Multilingual Prompt","arxiv_id":"2202.11451","date":"2022-02-23","proceeding":null,"authors":["Lianzhe Huang","Shuming Ma","Dongdong Zhang","Furu Wei","Houfeng Wang"],"abstract":"Prompt-based tuning has been proven effective for pretrained language models (PLMs). While most of the existing work focuses on the monolingual prompts, we study the multilingual prompts for multilingual PLMs, especially in the zero-shot cross-lingual setting. To alleviate the effort of designing different prompts for multiple languages, we propose a novel model that uses a unified prompt for all languages, called UniPrompt. Different from the discrete prompts and soft prompts, the unified prompt is model-based and language-agnostic. Specifically, the unified prompt is initialized by a multilingual PLM to produce language-independent representation, after which is fused with the text input. During inference, the prompts can be pre-computed so that no extra computation cost is needed. To collocate with the unified prompt, we propose a new initialization method for the target label word to further improve the model's transferability across languages. Extensive experiments show that our proposed methods can significantly outperform the strong baselines across different languages. We release data and code to facilitate future research.","url_abs":"https://arxiv.org/abs/2202.11451v2","url_pdf":"https://arxiv.org/pdf/2202.11451v2.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":"zero-shot-cross-lingual-transfer-of-prompt","repo_url":"https://github.com/mojave-pku/uniprompt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"cross-lingual-transfer","task_name":"Cross-Lingual Transfer"},{"task_slug":"zero-shot-cross-lingual-transfer","task_name":"Zero-Shot Cross-Lingual Transfer"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2202.11451","atlas_url":"https://app.syntology.ai/?focus=2202.11451","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2202.11451"}},"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/mojave-pku/uniprompt","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"unverified":1},"by_repo_kind":{"official":{"samples":7,"ran":6,"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":"1bf6d4ba3fc6988e","entry":"default_dev_objective","repo":"mojave-pku/uniprompt","repo_kind":"official","path":"src/trainer.py","file_url":"https://github.com/mojave-pku/uniprompt/blob/HEAD/src/trainer.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":"1bf6d4ba3fc6988e"}},{"code_sha256_prefix":"779c63432e25c60e","entry":"finetune_metrics","repo":"mojave-pku/uniprompt","repo_kind":"official","path":"src/processors.py","file_url":"https://github.com/mojave-pku/uniprompt/blob/HEAD/src/processors.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":"779c63432e25c60e"}},{"code_sha256_prefix":"e768e25ca95f70cd","entry":"input_example_to_string","repo":"mojave-pku/uniprompt","repo_kind":"official","path":"src/dataset.py","file_url":"https://github.com/mojave-pku/uniprompt/blob/HEAD/src/dataset.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":"e768e25ca95f70cd"}},{"code_sha256_prefix":"fbef70dc7c700501","entry":"input_example_to_tuple","repo":"mojave-pku/uniprompt","repo_kind":"official","path":"src/dataset.py","file_url":"https://github.com/mojave-pku/uniprompt/blob/HEAD/src/dataset.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":"fbef70dc7c700501"}},{"code_sha256_prefix":"1766592e2b828d07","entry":"paddings","repo":"mojave-pku/uniprompt","repo_kind":"official","path":"src/dataset.py","file_url":"https://github.com/mojave-pku/uniprompt/blob/HEAD/src/dataset.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":"1766592e2b828d07"}},{"code_sha256_prefix":"cc5d5197b945da2f","entry":"text_classification_metrics","repo":"mojave-pku/uniprompt","repo_kind":"official","path":"src/processors.py","file_url":"https://github.com/mojave-pku/uniprompt/blob/HEAD/src/processors.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":"cc5d5197b945da2f"}},{"code_sha256_prefix":"eefb90eeed0654fe","entry":"update_state_dict_for_two_tower","repo":"mojave-pku/uniprompt","repo_kind":"official","path":"src/state_dict_transfer.py","file_url":"https://github.com/mojave-pku/uniprompt/blob/HEAD/src/state_dict_transfer.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":"eefb90eeed0654fe"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}