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的有效性。