{"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-multi-lingual-alignment-through","title":"Improving Multi-lingual Alignment Through Soft Contrastive Learning","arxiv_id":"2405.16155","date":"2024-05-25","proceeding":null,"authors":["Minsu Park","Seyeon Choi","Chanyeol Choi","Jun-Seong Kim","Jy-yong Sohn"],"abstract":"Making decent multi-lingual sentence representations is critical to achieve high performances in cross-lingual downstream tasks. In this work, we propose a novel method to align multi-lingual embeddings based on the similarity of sentences measured by a pre-trained mono-lingual embedding model. Given translation sentence pairs, we train a multi-lingual model in a way that the similarity between cross-lingual embeddings follows the similarity of sentences measured at the mono-lingual teacher model. Our method can be considered as contrastive learning with soft labels defined as the similarity between sentences. Our experimental results on five languages show that our contrastive loss with soft labels far outperforms conventional contrastive loss with hard labels in various benchmarks for bitext mining tasks and STS tasks. In addition, our method outperforms existing multi-lingual embeddings including LaBSE, for Tatoeba dataset. The code is available at https://github.com/YAI12xLinq-B/IMASCL","url_abs":"https://arxiv.org/abs/2405.16155v2","url_pdf":"https://arxiv.org/pdf/2405.16155v2.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-multi-lingual-alignment-through","repo_url":"https://github.com/yai12xlinq-b/imascl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"sts","task_name":"STS"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[{"method_slug":"align","method_name":"ALIGN"},{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.16155","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.16155"}},"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/yai12xlinq-b/imascl","reach":{"status":"ok"}}],"summary":{"ran":9,"unverified":1},"by_repo_kind":{"official":{"samples":10,"ran":9,"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":10,"samples":[{"code_sha256_prefix":"f2eb30d40c460710","entry":"AMEMetric","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"modules/AMEMetric.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/modules/AMEMetric.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f2eb30d40c460710"}},{"code_sha256_prefix":"63718959cc46f0ad","entry":"compute_sim_matrix","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"evaluate/make_sim_matrix.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/evaluate/make_sim_matrix.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"63718959cc46f0ad"}},{"code_sha256_prefix":"619b6842fb1a677c","entry":"encode","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"evaluate/make_sim_matrix.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/evaluate/make_sim_matrix.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"619b6842fb1a677c"}},{"code_sha256_prefix":"ce814733ea98b647","entry":"get_length_in_batch_grouped_indices","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"modules/AMESampler.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/modules/AMESampler.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce814733ea98b647"}},{"code_sha256_prefix":"ce4c548f1e2d2c28","entry":"get_length_in_batch_grouped_indices_idx_dict","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"modules/AMESampler.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/modules/AMESampler.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce4c548f1e2d2c28"}},{"code_sha256_prefix":"fc0516e02c0038d1","entry":"has_length","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"modules/AMETrainer.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/modules/AMETrainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fc0516e02c0038d1"}},{"code_sha256_prefix":"ce93adc6cc1fd151","entry":"load_score","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"utils/result_parse.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/utils/result_parse.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce93adc6cc1fd151"}},{"code_sha256_prefix":"ec34b8cf0146fcf2","entry":"move_to_cuda","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"evaluate/run_mteb.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/evaluate/run_mteb.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ec34b8cf0146fcf2"}},{"code_sha256_prefix":"45fcc53eef1da47d","entry":"torch_AME_data_collator","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"modules/AMEDataCollator.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/modules/AMEDataCollator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"45fcc53eef1da47d"}},{"code_sha256_prefix":"fcb720034daff71a","entry":"tatoeba_filtering","repo":"yai12xlinq-b/imascl","repo_kind":"official","path":"utils/filter_tatoeba.py","file_url":"https://github.com/yai12xlinq-b/imascl/blob/HEAD/utils/filter_tatoeba.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":"fcb720034daff71a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}