{"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/improving-word-translation-via-two-stage-1","title":"Improving Word Translation via Two-Stage Contrastive Learning","arxiv_id":"2203.08307","date":"2022-03-15","proceeding":"ACL 2022 5","authors":["Yaoyiran Li","Fangyu Liu","Nigel Collier","Anna Korhonen","Ivan Vulić"],"abstract":"Word translation or bilingual lexicon induction (BLI) is a key cross-lingual task, aiming to bridge the lexical gap between different languages. In this work, we propose a robust and effective two-stage contrastive learning framework for the BLI task. At Stage C1, we propose to refine standard cross-lingual linear maps between static word embeddings (WEs) via a contrastive learning objective; we also show how to integrate it into the self-learning procedure for even more refined cross-lingual maps. In Stage C2, we conduct BLI-oriented contrastive fine-tuning of mBERT, unlocking its word translation capability. We also show that static WEs induced from the `C2-tuned' mBERT complement static WEs from Stage C1. Comprehensive experiments on standard BLI datasets for diverse languages and different experimental setups demonstrate substantial gains achieved by our framework. While the BLI method from Stage C1 already yields substantial gains over all state-of-the-art BLI methods in our comparison, even stronger improvements are met with the full two-stage framework: e.g., we report gains for 112/112 BLI setups, spanning 28 language pairs.","url_abs":"https://arxiv.org/abs/2203.08307v5","url_pdf":"https://arxiv.org/pdf/2203.08307v5.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":"improving-word-translation-via-two-stage-1","repo_url":"https://github.com/cambridgeltl/contrastivebli","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"bilingual-lexicon-induction","task_name":"Bilingual Lexicon Induction"},{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"cross-lingual-word-embeddings","task_name":"Cross-Lingual Word Embeddings"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"multilingual-nlp","task_name":"Multilingual NLP"},{"task_slug":"multilingual-word-embeddings","task_name":"Multilingual Word Embeddings"},{"task_slug":"pretrained-multilingual-language-models","task_name":"Pretrained Multilingual Language Models"},{"task_slug":"self-learning","task_name":"Self-Learning"},{"task_slug":"word-alignment","task_name":"Word Alignment"},{"task_slug":"word-embeddings","task_name":"Word Embeddings"},{"task_slug":"word-translation","task_name":"Word Translation"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"},{"method_slug":"gradual-self-training","method_name":"Gradual Self-Training"},{"method_slug":"infonce","method_name":"InfoNCE"},{"method_slug":"procrustes","method_name":"Procrustes"},{"method_slug":"self-learning","method_name":"Self-Learning"},{"method_slug":"fasttext","method_name":"fastText"},{"method_slug":"mbert","method_name":"mBERT"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2203.08307","atlas_url":"https://app.syntology.ai/?focus=2203.08307","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.08307"}},"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/cambridgeltl/ContrastiveBLI","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/vinsachi/FIPPCLE","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/cambridgeltl/panlex-bli","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":2,"ran_fixture":2,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":2,"ran":2,"repositories":1},"found_in_text":{"samples":4,"ran":3,"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":4,"samples":[{"code_sha256_prefix":"a3a7abba781e200d","entry":"Beholder","repo":"cambridgeltl/ContrastiveBLI","repo_kind":"official","path":"C1/src/models.py","file_url":"https://github.com/cambridgeltl/ContrastiveBLI/blob/HEAD/C1/src/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a3a7abba781e200d"}},{"code_sha256_prefix":"1f690157c87b631e","entry":"C1_Model","repo":"cambridgeltl/ContrastiveBLI","repo_kind":"official","path":"C1/src/models.py","file_url":"https://github.com/cambridgeltl/ContrastiveBLI/blob/HEAD/C1/src/models.py","link_basis":"first_harvest_node","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":"1f690157c87b631e"}},{"code_sha256_prefix":"44f62679b81ab137","entry":"build_matrices","repo":"vinsachi/FIPPCLE","repo_kind":"found_in_text","path":"xling-bli/code/projection.py","file_url":"https://github.com/vinsachi/FIPPCLE/blob/HEAD/xling-bli/code/projection.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"44f62679b81ab137"}},{"code_sha256_prefix":"731634f448ca1287","entry":"get_seeds","repo":"vinsachi/FIPPCLE","repo_kind":"found_in_text","path":"xling-bli/code/projection.py","file_url":"https://github.com/vinsachi/FIPPCLE/blob/HEAD/xling-bli/code/projection.py","link_basis":"first_harvest_node","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":"731634f448ca1287"}},{"code_sha256_prefix":"9a3c12dfc8a9399f","entry":"isotrop_preproc","repo":"vinsachi/FIPPCLE","repo_kind":"found_in_text","path":"xling-bli/code/projection.py","file_url":"https://github.com/vinsachi/FIPPCLE/blob/HEAD/xling-bli/code/projection.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9a3c12dfc8a9399f"}},{"code_sha256_prefix":"3472926e2229b9b0","entry":"project_fipp","repo":"vinsachi/FIPPCLE","repo_kind":"found_in_text","path":"xling-bli/code/projection.py","file_url":"https://github.com/vinsachi/FIPPCLE/blob/HEAD/xling-bli/code/projection.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":"3472926e2229b9b0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}