通过引入语言与文字嵌入,提升多语言模型的跨语言迁移能力。
LangSAMP: Language-Script Aware Multilingual Pretraining
- 在Transformer输出前加入语言与文字嵌入,增强表示学习
- 在500+语言语料上持续预训练,零样本跨语言任务表现更优
- 可辅助选择最优源语言,适合多语言迁移任务研究者
现有多语言预训练模型通常不使用语言嵌入(可学习的语言向量)。这使得词元表示需承载全部语言特异性信息,可能损害语言中立性。为此,我们提出语言-文字感知的多语言预训练方法LangSAMP,将语言与文字嵌入融入Transformer块输出,再输入语言建模头进行预测。我们在覆盖500多种语言的语料上对XLM-R进行持续预训练。结果表明,该模型在多个下游任务中均实现零样本跨语言迁移性能提升。分析显示,语言与文字嵌入能捕捉语言和文字特有的细微差异,有助于生成更具语言中立性的表示,体现为成对余弦相似度提升。案例研究还证明,这些嵌入可用于优选跨语言迁移的源语言。代码与模型已开源。
原文摘要 · Abstract (English)
Recent multilingual pretrained language models (mPLMs) often avoid using language embeddings -- learnable vectors assigned to individual languages. However, this places a significant burden on token representations to encode all language-specific information, which may hinder language neutrality. To address this limitation, we propose Language-Script Aware Multilingual Pretraining (LangSAMP), a method that incorporates both language and script embeddings to enhance representation learning. Specifically, we integrate these embeddings into the output of the Transformer blocks before passing the final representations to the language modeling head for prediction. We apply LangSAMP to the continual pretraining of XLM-R on a highly multilingual corpus covering more than 500 languages. The resulting model consistently outperforms the baseline in zero-shot crosslingual transfer across diverse downstream tasks. Extensive analysis reveals that language and script embeddings capture language- and script-specific nuances, which benefits more language-neutral representations, proven by improved pairwise cosine similarity. In our case study, we also show that language and script embeddings can be used to select better source languages for crosslingual transfer. We make our code and models publicly available at https://github.com/cisnlp/LangSAMP.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。