{"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/dual-alignment-pre-training-for-cross-lingual","title":"Dual-Alignment Pre-training for Cross-lingual Sentence Embedding","arxiv_id":"2305.09148","date":"2023-05-16","proceeding":null,"authors":["Ziheng Li","Shaohan Huang","Zihan Zhang","Zhi-Hong Deng","Qiang Lou","Haizhen Huang","Jian Jiao","Furu Wei","Weiwei Deng","Qi Zhang"],"abstract":"Recent studies have shown that dual encoder models trained with the sentence-level translation ranking task are effective methods for cross-lingual sentence embedding. However, our research indicates that token-level alignment is also crucial in multilingual scenarios, which has not been fully explored previously. Based on our findings, we propose a dual-alignment pre-training (DAP) framework for cross-lingual sentence embedding that incorporates both sentence-level and token-level alignment. To achieve this, we introduce a novel representation translation learning (RTL) task, where the model learns to use one-side contextualized token representation to reconstruct its translation counterpart. This reconstruction objective encourages the model to embed translation information into the token representation. Compared to other token-level alignment methods such as translation language modeling, RTL is more suitable for dual encoder architectures and is computationally efficient. Extensive experiments on three sentence-level cross-lingual benchmarks demonstrate that our approach can significantly improve sentence embedding. Our code is available at https://github.com/ChillingDream/DAP.","url_abs":"https://arxiv.org/abs/2305.09148v1","url_pdf":"https://arxiv.org/pdf/2305.09148v1.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":"dual-alignment-pre-training-for-cross-lingual","repo_url":"https://github.com/chillingdream/dap","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"sentence-embedding","task_name":"Sentence Embedding"},{"task_slug":"sentence-embedding-1","task_name":"Sentence-Embedding"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.09148","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.09148"}},"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":"deterministic:regex_extraction","url":"https://github.com/ChillingDream/DAP","reach":null}],"summary":{"ran":2,"unverified":5},"by_repo_kind":{"official":{"samples":7,"ran":2,"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":"50850d9a18be38b7","entry":"XLMEmbeddings","repo":"ChillingDream/DAP","repo_kind":"official","path":"core/models.py","file_url":"https://github.com/ChillingDream/DAP/blob/HEAD/core/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"50850d9a18be38b7"}},{"code_sha256_prefix":"9c4a22aa68aaf689","entry":"sentemb_forward","repo":"ChillingDream/DAP","repo_kind":"official","path":"core/models.py","file_url":"https://github.com/ChillingDream/DAP/blob/HEAD/core/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":"9c4a22aa68aaf689"}},{"code_sha256_prefix":"3e8006c3e4f18596","entry":"BertForRTL","repo":"ChillingDream/DAP","repo_kind":"official","path":"core/models.py","file_url":"https://github.com/ChillingDream/DAP/blob/HEAD/core/models.py","link_basis":"first_harvest_node","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":"3e8006c3e4f18596"}},{"code_sha256_prefix":"a374bbeb0bab66e1","entry":"SimCSEModel","repo":"ChillingDream/DAP","repo_kind":"official","path":"core/models.py","file_url":"https://github.com/ChillingDream/DAP/blob/HEAD/core/models.py","link_basis":"first_harvest_node","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":"a374bbeb0bab66e1"}},{"code_sha256_prefix":"f7f82b2df9f8a191","entry":"XLMBertModel","repo":"ChillingDream/DAP","repo_kind":"official","path":"core/models.py","file_url":"https://github.com/ChillingDream/DAP/blob/HEAD/core/models.py","link_basis":"first_harvest_node","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":"f7f82b2df9f8a191"}},{"code_sha256_prefix":"6902d67afe6ef0d7","entry":"cl_forward","repo":"ChillingDream/DAP","repo_kind":"official","path":"core/models.py","file_url":"https://github.com/ChillingDream/DAP/blob/HEAD/core/models.py","link_basis":"first_harvest_node","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":"6902d67afe6ef0d7"}},{"code_sha256_prefix":"0e83ce43dc99ea57","entry":"cl_init","repo":"ChillingDream/DAP","repo_kind":"official","path":"core/models.py","file_url":"https://github.com/ChillingDream/DAP/blob/HEAD/core/models.py","link_basis":"first_harvest_node","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":"0e83ce43dc99ea57"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}