Existing efforts on text synthesis for code-switching mostly require training on code-switched texts in the target language pairs, limiting the deployment of the models to cases lacking code-switched data. In this work, we study the problem of synthesizing code-switched texts for language pairs absent from the training data. We introduce GLOSS, a model built on top of a pre-trained multilingual machine translation model (PMMTM) with an additional code-switching module. This module, either an adapter or extra prefixes, learns code-switching patterns from code-switched data during training, while the primary component of GLOSS, i.e., the PMMTM, is frozen. The design of only adjusting the code-switching module prevents our model from overfitting to the constrained training data for code-switching. Hence, GLOSS exhibits the ability to generalize and synthesize code-switched texts across a broader spectrum of language pairs. Additionally, we develop a self-training algorithm on target language pairs further to enhance the reliability of GLOSS. Automatic evaluations on four language pairs show that GLOSS achieves at least 55% relative BLEU and METEOR scores improvements compared to strong baselines. Human evaluations on two language pairs further validate the success of GLOSS.
翻译:现有语码转换文本合成研究大多需要在目标语言对的语码转换语料上进行训练,这限制了模型在缺乏此类数据的场景中的部署。本文研究训练数据中未出现语言对的语码转换文本合成问题。我们提出GLOSS模型,该模型基于预训练多语言机器翻译模型(PMMTM)构建,并附加了语码转换模块。该模块(适配器或额外前缀)在训练过程中从语码转换数据中学习转换模式,而GLOSS的主要组件(即PMMTM)保持冻结状态。仅调整语码转换模块的设计可防止模型过拟合到有限的语码转换训练数据,从而使GLOSS能够泛化并合成更广泛语言对的语码转换文本。此外,我们开发了一种针对目标语言对的自训练算法,进一步提升了GLOSS的可靠性。在四个语言对上的自动评估表明,与强基线相比,GLOSS的BLEU和METEOR分数相对提升至少55%。两个语言对的人工评估进一步验证了GLOSS的成功。