{"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/cross-lingual-language-model-pretraining","title":"Cross-lingual Language Model Pretraining","arxiv_id":"1901.07291","date":"2019-01-22","proceeding":"NeurIPS 2019 12","authors":["Guillaume Lample","Alexis Conneau"],"abstract":"Recent studies have demonstrated the efficiency of generative pretraining for\nEnglish natural language understanding. In this work, we extend this approach\nto multiple languages and show the effectiveness of cross-lingual pretraining.\nWe propose two methods to learn cross-lingual language models (XLMs): one\nunsupervised that only relies on monolingual data, and one supervised that\nleverages parallel data with a new cross-lingual language model objective. We\nobtain state-of-the-art results on cross-lingual classification, unsupervised\nand supervised machine translation. On XNLI, our approach pushes the state of\nthe art by an absolute gain of 4.9% accuracy. On unsupervised machine\ntranslation, we obtain 34.3 BLEU on WMT'16 German-English, improving the\nprevious state of the art by more than 9 BLEU. On supervised machine\ntranslation, we obtain a new state of the art of 38.5 BLEU on WMT'16\nRomanian-English, outperforming the previous best approach by more than 4 BLEU.\nOur code and pretrained models will be made publicly available.","url_abs":"http://arxiv.org/abs/1901.07291v1","url_pdf":"http://arxiv.org/pdf/1901.07291v1.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":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/1-punchMan/CLTS","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/JunnYu/xlm_paddle","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/Somefive/XNLI","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/Tikquuss/meta_XLM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/deterministic-algorithms-lab/Large-XLM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/facebookresearch/MLQA","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/facebookresearch/UnsupervisedMT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/facebookresearch/XLM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/feyzaakyurek/XLM-LwLL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/fshdnc/enfi-XLM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/huggingface/transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/kheeong/XLM_OWN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/samwisegamjeee/pytorch-transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/2023-MindSpore-1/ms-code-169","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":{"status":"ok"}},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/MS-P3/code7/tree/main/xlm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/MS-P3/code7/tree/main/xlm_roberta","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"cross-lingual-language-model-pretraining","repo_url":"https://github.com/MiuGod0126/ConvS2S_Paddle","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"natural-language-understanding","task_name":"Natural Language Understanding"},{"task_slug":"translation","task_name":"Translation"},{"task_slug":"unsupervised-machine-translation","task_name":"Unsupervised Machine Translation"},{"task_slug":"model","task_name":"model"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"xlm","method_name":"XLM"}],"datasets_introduced":[],"methods_introduced":[{"slug":"xlm","name":"XLM","full_name":"XLM"}],"results":[{"leaderboard":"/sota/machine-translation-on-wmt2016-romanian","task":"Machine Translation","dataset":"WMT2016 Romanian-English","model":"MLM pretraining","rank_in_archive_order":4,"of":21,"metrics":{"BLEU score":"35.3"},"uses_additional_data":false},{"leaderboard":"/sota/natural-language-inference-on-xnli-french","task":"Natural Language Inference","dataset":"XNLI French","model":"XLM (MLM+TLM)","rank_in_archive_order":5,"of":6,"metrics":{"Accuracy":"80.2"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-machine-translation-on-wmt2014-2","task":"Unsupervised Machine Translation","dataset":"WMT2014 English-French","model":"MLM pretraining for encoder and decoder","rank_in_archive_order":4,"of":7,"metrics":{"BLEU":"33.4"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-machine-translation-on-wmt2014-1","task":"Unsupervised Machine Translation","dataset":"WMT2014 French-English","model":"MLM pretraining for encoder and decoder","rank_in_archive_order":4,"of":7,"metrics":{"BLEU":"33.3"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-machine-translation-on-wmt2016-5","task":"Unsupervised Machine Translation","dataset":"WMT2016 English--Romanian","model":"MLM pretraining for encoder and decoder","rank_in_archive_order":2,"of":2,"metrics":{"BLEU":"33.3"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-machine-translation-on-wmt2016","task":"Unsupervised Machine Translation","dataset":"WMT2016 English-German","model":"MLM pretraining for encoder and decoder","rank_in_archive_order":4,"of":7,"metrics":{"BLEU":"26.4"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-machine-translation-on-wmt2016-2","task":"Unsupervised Machine Translation","dataset":"WMT2016 English-Romanian","model":"MLM pretraining for encoder and decoder","rank_in_archive_order":2,"of":3,"metrics":{"BLEU":"33.3"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-machine-translation-on-wmt2016-1","task":"Unsupervised Machine Translation","dataset":"WMT2016 German-English","model":"MLM pretraining for encoder and decoder","rank_in_archive_order":4,"of":7,"metrics":{"BLEU":"34.3"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-machine-translation-on-wmt2016-3","task":"Unsupervised Machine Translation","dataset":"WMT2016 Romanian-English","model":"MLM pretraining for encoder and decoder","rank_in_archive_order":3,"of":3,"metrics":{"BLEU":"31.8"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1901.07291","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1901.07291"}},"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/huggingface/transformers","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/1-punchMan/CLTS","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JunnYu/xlm_paddle","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MiuGod0126/ConvS2S_Paddle","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/UnsupervisedMT","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Tikquuss/meta_XLM","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fshdnc/enfi-XLM","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MS-P3/code7/tree/main/xlm_roberta","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/MLQA","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/XLM","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MS-P3/code7/tree/main/xlm","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Somefive/XNLI","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/samwisegamjeee/pytorch-transformers","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/feyzaakyurek/XLM-LwLL","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kheeong/XLM_OWN","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/2023-MindSpore-1/ms-code-169","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/deterministic-algorithms-lab/Large-XLM","reach":null}],"summary":{"ran_violates":1,"unverified":6},"by_repo_kind":{"listed":{"samples":7,"ran":1,"repositories":3}},"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":1,"samples":[{"code_sha256_prefix":"a205cce260e31d6f","entry":"couple","repo":"Tikquuss/meta_XLM","repo_kind":"listed","path":"XLM/meta_train.py","file_url":"https://github.com/Tikquuss/meta_XLM/blob/HEAD/XLM/meta_train.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"a205cce260e31d6f"}},{"code_sha256_prefix":"67fe142c7fcc1801","entry":"check_different","repo":"MiuGod0126/ConvS2S_Paddle","repo_kind":"listed","path":"align.py","file_url":"https://github.com/MiuGod0126/ConvS2S_Paddle/blob/HEAD/align.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"67fe142c7fcc1801"}},{"code_sha256_prefix":"92126365537a14c7","entry":"extend_conv_spec","repo":"MiuGod0126/ConvS2S_Paddle","repo_kind":"listed","path":"models/convs2s.py","file_url":"https://github.com/MiuGod0126/ConvS2S_Paddle/blob/HEAD/models/convs2s.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"92126365537a14c7"}},{"code_sha256_prefix":"9372a18a70742351","entry":"get_pairs","repo":"JunnYu/xlm_paddle","repo_kind":"listed","path":"xlm_paddle/tokenizer.py","file_url":"https://github.com/JunnYu/xlm_paddle/blob/HEAD/xlm_paddle/tokenizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9372a18a70742351"}},{"code_sha256_prefix":"112594e8e25c52c6","entry":"load_embedding","repo":"MiuGod0126/ConvS2S_Paddle","repo_kind":"listed","path":"models/utils.py","file_url":"https://github.com/MiuGod0126/ConvS2S_Paddle/blob/HEAD/models/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"112594e8e25c52c6"}},{"code_sha256_prefix":"9b4a5d4b20c0f99a","entry":"lowercase_and_remove_accent","repo":"JunnYu/xlm_paddle","repo_kind":"listed","path":"xlm_paddle/tokenizer.py","file_url":"https://github.com/JunnYu/xlm_paddle/blob/HEAD/xlm_paddle/tokenizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9b4a5d4b20c0f99a"}},{"code_sha256_prefix":"22db157c2db3501f","entry":"replace_unicode_punct","repo":"JunnYu/xlm_paddle","repo_kind":"listed","path":"xlm_paddle/tokenizer.py","file_url":"https://github.com/JunnYu/xlm_paddle/blob/HEAD/xlm_paddle/tokenizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"22db157c2db3501f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}