论文标题
在机器翻译中选择的示例
In-context Examples Selection for Machine Translation
论文作者
论文摘要
大规模生成模型显示出了使用内部文化学习执行各种自然语言处理(NLP)任务的令人印象深刻的能力,其中使用了一些示例来描述该模型的任务。对于机器翻译(MT),这些示例通常是从开发数据集随机采样的,其分布与评估集相似。但是,目前尚不清楚这些在上下文中的选择及其排序如何影响输出翻译质量。在这项工作中,我们旨在了解MT内域和室外设置中MT的良好秘密示例的属性。我们表明,翻译质量和中文示例的域很重要,而1-shot嘈杂的无关示例可能会对产出质量产生灾难性的影响。在加入多个随机示例的同时,降低了噪声的效果,但单个良好的提示进行了优化,以最大程度地提高开发数据集的翻译质量,可以从预训练的语言模型中引起学习的信息。基于N-Gram与测试源重叠的添加类似的示例并始终如一地提高了输出的翻译质量,在4个外域数据集中的2个中,超过了强大的KNN-MT基线。
Large-scale generative models show an impressive ability to perform a wide range of Natural Language Processing (NLP) tasks using in-context learning, where a few examples are used to describe a task to the model. For Machine Translation (MT), these examples are typically randomly sampled from the development dataset with a similar distribution as the evaluation set. However, it is unclear how the choice of these in-context examples and their ordering impacts the output translation quality. In this work, we aim to understand the properties of good in-context examples for MT in both in-domain and out-of-domain settings. We show that the translation quality and the domain of the in-context examples matter and that 1-shot noisy unrelated example can have a catastrophic impact on output quality. While concatenating multiple random examples reduces the effect of noise, a single good prompt optimized to maximize translation quality on the development dataset can elicit learned information from the pre-trained language model. Adding similar examples based on an n-gram overlap with the test source significantly and consistently improves the translation quality of the outputs, outperforming a strong kNN-MT baseline in 2 out of 4 out-of-domain datasets.