arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.02437cs.CL
收藏

面向机器翻译的上下文内实例选择

In-context Examples Selection for Machine Translation

University of Maryland(马里兰大学);Meta AI

Sweta Agrawal, Chunting Zhou, Mike Lewis, Luke Zettlemoyer, Marjan Ghazvininejad

摘要:

大规模生成模型显示出令人印象深刻的能力,可以使用上下文学习执行各种自然语言处理(NLP)任务,其中使用一些示例来向模型描述任务。对于机器翻译(MT),这些示例通常是从开发数据集中随机采样的,其分布与评估集相似。然而,目前还不清楚这些语境中的例子的选择和它们的顺序如何影响输出的翻译质量。在这项工作中,我们的目标是了解MT在域内和域外设置的良好的上下文示例的属性。我们表明,翻译质量和域的上下文的例子的事项,1拍噪声无关的例子可以有一个灾难性的影响输出质量。虽然连接多个随机示例减少了噪声的影响,但是优化以最大化开发数据集上的翻译质量的单个良好提示可以从预先训练的语言模型中引出学习信息。基于与测试源的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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑