{"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/on-the-language-neutrality-of-pre-trained","title":"On the Language Neutrality of Pre-trained Multilingual Representations","arxiv_id":"2004.05160","date":"2020-04-09","proceeding":"Findings of the Association for Computational Linguistics 2020","authors":["Jindřich Libovický","Rudolf Rosa","Alexander Fraser"],"abstract":"Multilingual contextual embeddings, such as multilingual BERT and XLM-RoBERTa, have proved useful for many multi-lingual tasks. Previous work probed the cross-linguality of the representations indirectly using zero-shot transfer learning on morphological and syntactic tasks. We instead investigate the language-neutrality of multilingual contextual embeddings directly and with respect to lexical semantics. Our results show that contextual embeddings are more language-neutral and, in general, more informative than aligned static word-type embeddings, which are explicitly trained for language neutrality. Contextual embeddings are still only moderately language-neutral by default, so we propose two simple methods for achieving stronger language neutrality: first, by unsupervised centering of the representation for each language and second, by fitting an explicit projection on small parallel data. Besides, we show how to reach state-of-the-art accuracy on language identification and match the performance of statistical methods for word alignment of parallel sentences without using parallel data.","url_abs":"https://arxiv.org/abs/2004.05160v4","url_pdf":"https://arxiv.org/pdf/2004.05160v4.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":"on-the-language-neutrality-of-pre-trained","repo_url":"https://github.com/jlibovicky/assess-multilingual-bert","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"language-identification","task_name":"Language Identification"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"},{"task_slug":"word-alignment","task_name":"Word Alignment"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bert","method_name":"BERT"},{"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":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"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":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2004.05160","atlas_url":"https://app.syntology.ai/?focus=2004.05160","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2004.05160"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jlibovicky/assess-multilingual-bert","reach":null}],"summary":{"ran_draft_wrong":3,"ran_honours":1,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":4,"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":"49169613387052ef","entry":"batch_generator","repo":"jlibovicky/assess-multilingual-bert","repo_kind":"official","path":"save_centroids.py","file_url":"https://github.com/jlibovicky/assess-multilingual-bert/blob/HEAD/save_centroids.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"49169613387052ef"}},{"code_sha256_prefix":"e4b951d62725e6fc","entry":"load_bert","repo":"jlibovicky/assess-multilingual-bert","repo_kind":"official","path":"save_centroids.py","file_url":"https://github.com/jlibovicky/assess-multilingual-bert/blob/HEAD/save_centroids.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"e4b951d62725e6fc"}},{"code_sha256_prefix":"58b8bef26d1b590e","entry":"pad_sentences","repo":"jlibovicky/assess-multilingual-bert","repo_kind":"official","path":"save_centroids.py","file_url":"https://github.com/jlibovicky/assess-multilingual-bert/blob/HEAD/save_centroids.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"58b8bef26d1b590e"}},{"code_sha256_prefix":"2974bc2df4e4d420","entry":"text_data_generator","repo":"jlibovicky/assess-multilingual-bert","repo_kind":"official","path":"save_centroids.py","file_url":"https://github.com/jlibovicky/assess-multilingual-bert/blob/HEAD/save_centroids.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"2974bc2df4e4d420"}},{"code_sha256_prefix":"6516b2ef42579edb","entry":"get_repr_from_layer","repo":"jlibovicky/assess-multilingual-bert","repo_kind":"official","path":"save_centroids.py","file_url":"https://github.com/jlibovicky/assess-multilingual-bert/blob/HEAD/save_centroids.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6516b2ef42579edb"}},{"code_sha256_prefix":"f141e5aaf7d9dd5b","entry":"main","repo":"jlibovicky/assess-multilingual-bert","repo_kind":"official","path":"save_centroids.py","file_url":"https://github.com/jlibovicky/assess-multilingual-bert/blob/HEAD/save_centroids.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f141e5aaf7d9dd5b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}