{"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/english-contrastive-learning-can-learn","title":"English Contrastive Learning Can Learn Universal Cross-lingual Sentence Embeddings","arxiv_id":"2211.06127","date":"2022-11-11","proceeding":null,"authors":["Yau-Shian Wang","Ashley Wu","Graham Neubig"],"abstract":"Universal cross-lingual sentence embeddings map semantically similar cross-lingual sentences into a shared embedding space. Aligning cross-lingual sentence embeddings usually requires supervised cross-lingual parallel sentences. In this work, we propose mSimCSE, which extends SimCSE to multilingual settings and reveal that contrastive learning on English data can surprisingly learn high-quality universal cross-lingual sentence embeddings without any parallel data. In unsupervised and weakly supervised settings, mSimCSE significantly improves previous sentence embedding methods on cross-lingual retrieval and multilingual STS tasks. The performance of unsupervised mSimCSE is comparable to fully supervised methods in retrieving low-resource languages and multilingual STS. The performance can be further enhanced when cross-lingual NLI data is available. Our code is publicly available at https://github.com/yaushian/mSimCSE.","url_abs":"https://arxiv.org/abs/2211.06127v1","url_pdf":"https://arxiv.org/pdf/2211.06127v1.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":"english-contrastive-learning-can-learn","repo_url":"https://github.com/yaushian/msimcse","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"sts","task_name":"STS"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"sentence-embedding","task_name":"Sentence Embedding"},{"task_slug":"sentence-embeddings","task_name":"Sentence Embeddings"},{"task_slug":"sentence-embedding-1","task_name":"Sentence-Embedding"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"},{"method_slug":"simcse","method_name":"SimCSE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2211.06127","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.06127"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/yaushian/msimcse","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran_violates":1,"ran":2,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"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":"4e0ff9c4d9a318ff","entry":"cl_forward","repo":"yaushian/msimcse","repo_kind":"official","path":"simcse/models.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/simcse/models.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4e0ff9c4d9a318ff"}},{"code_sha256_prefix":"a2a8999f1b9ffa71","entry":"cosine","repo":"yaushian/msimcse","repo_kind":"official","path":"eval/evaluation_xsts.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/eval/evaluation_xsts.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a2a8999f1b9ffa71"}},{"code_sha256_prefix":"289930036c969424","entry":"knn","repo":"yaushian/msimcse","repo_kind":"official","path":"eval/utils_retrieve.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/eval/utils_retrieve.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":"289930036c969424"}},{"code_sha256_prefix":"eb5ec5cdad6ee5ef","entry":"knnCPU","repo":"yaushian/msimcse","repo_kind":"official","path":"eval/utils_retrieve.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/eval/utils_retrieve.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":"eb5ec5cdad6ee5ef"}},{"code_sha256_prefix":"cb67cd5ac977480d","entry":"sentemb_forward","repo":"yaushian/msimcse","repo_kind":"official","path":"simcse/models.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/simcse/models.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cb67cd5ac977480d"}},{"code_sha256_prefix":"b009e9b0eacbc026","entry":"bucc","repo":"yaushian/msimcse","repo_kind":"official","path":"eval/evaluation_retrieval.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/eval/evaluation_retrieval.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":"b009e9b0eacbc026"}},{"code_sha256_prefix":"1f2890fc24d46b56","entry":"bucc_f1","repo":"yaushian/msimcse","repo_kind":"official","path":"eval/evaluation_retrieval.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/eval/evaluation_retrieval.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":"1f2890fc24d46b56"}},{"code_sha256_prefix":"beb48c917d26c694","entry":"knnGPU","repo":"yaushian/msimcse","repo_kind":"official","path":"eval/utils_retrieve.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/eval/utils_retrieve.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":"beb48c917d26c694"}},{"code_sha256_prefix":"b77d7a9072629db7","entry":"retrieval_eval","repo":"yaushian/msimcse","repo_kind":"official","path":"eval/evaluation_retrieval.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/eval/evaluation_retrieval.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":"b77d7a9072629db7"}},{"code_sha256_prefix":"17db4335e13b31ef","entry":"sts_eval","repo":"yaushian/msimcse","repo_kind":"official","path":"eval/evaluation_xsts.py","file_url":"https://github.com/yaushian/msimcse/blob/HEAD/eval/evaluation_xsts.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":"17db4335e13b31ef"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}