Skip to main content
QUICK REVIEW

[论文解读] In-context Learning as Maintaining Coherency: A Study of On-the-fly Machine Translation Using Large Language Models

Suzanna Sia, Kevin Duh|arXiv (Cornell University)|May 5, 2023
Topic ModelingComputer Science被引用 3
一句话总结

本文将机器翻译中的上下文学习重新定义为维持上下文连贯性,而非单纯地从示例中学习。通过评估领域一致性和先前翻译的滑动窗口,作者表明连贯性显著提升了翻译性能——在三种模型和三种语言方向上,相比基于相似度的方法,性能最高提升2.6 BLEU分。

ABSTRACT

The phenomena of in-context learning has typically been thought of as "learning from examples". In this work which focuses on Machine Translation, we present a perspective of in-context learning as the desired generation task maintaining coherency with its context, i.e., the prompt examples. We first investigate randomly sampled prompts across 4 domains, and find that translation performance improves when shown in-domain prompts. Next, we investigate coherency for the in-domain setting, which uses prompt examples from a moving window. We study this with respect to other factors that have previously been identified in the literature such as length, surface similarity and sentence embedding similarity. Our results across 3 models (GPTNeo2.7B, Bloom3B, XGLM2.9B), and three translation directions ( exttt{en}$ ightarrow$\{ exttt{pt, de, fr}\}) suggest that the long-term coherency of the prompts and the test sentence is a good indicator of downstream translation performance. In doing so, we demonstrate the efficacy of In-context Machine Translation for on-the-fly adaptation.

研究动机与目标

  • 将机器翻译中的上下文学习重新定义为连贯性维护问题,而非基于示例的学习。
  • 研究领域一致性和局部连贯性在零样本和实时设置下对翻译性能的影响。
  • 将基于连贯性的提示选择方法与BM25、语义相似度和长度控制等现有方法进行比较。
  • 评估提示干扰(正面和负面)相对于零样本提示的影响。
  • 评估连贯性是否比表面相似性或语义相似性更能预测上下文机器翻译性能。

提出的方法

  • 作者使用测试句之前立即的高质量翻译滑动窗口,评估文档级翻译中的局部连贯性。
  • 将基于连贯性的提示选择方法与基线方法(随机采样、BM25、带词覆盖的BM25(BM25-s)、最近邻检索)进行比较。
  • 使用BLEU分数在三个模型(GPTNeo2.7B、Bloom3B、XGLM2.9B)和三个翻译方向(en→{pt, de, fr})上衡量性能。
  • 通过控制句长,隔离连贯性在提示选择中对长度偏差的影响。
  • 通过比较零样本与提示设置下的BLEU分数,分析干扰效应,量化正面和负面干扰。
  • 采用带有'English'和'French'标签的提示格式,测试了其他分隔符但未发现性能提升。
Figure 1: Factors identified and studied in this paper. Selecting from matching Domain increases coherence ( Appendix C ) and each domain has different length distributions ( subsection 5.2 ). Surface similarity and embedding similarity are associated ( Table 4 ). Surface similarity selection also r
Figure 1: Factors identified and studied in this paper. Selecting from matching Domain increases coherence ( Appendix C ) and each domain has different length distributions ( subsection 5.2 ). Surface similarity and embedding similarity are associated ( Table 4 ). Surface similarity selection also r

实验结果

研究问题

  • RQ1维持提示示例与测试句之间的连贯性是否能提升上下文机器翻译性能?
  • RQ2提示示例与测试句之间的领域一致性如何影响翻译质量?
  • RQ3先前高质量翻译的滑动窗口是否可作为比基于相似度检索更优的提示选择策略?
  • RQ4在上下文机器翻译的提示选择中,连贯性在多大程度上优于表面相似性或语义相似性?
  • RQ5当使用提示示例而非零样本提示时,干扰(正面或负面)在多大程度上影响性能?

主要发现

  • 提示示例与测试句之间的连贯性是翻译性能的强预测因子,领域一致性显著提升结果。
  • 滑动窗口方法在所有模型和翻译方向上均优于基于相似度的基线方法,最高提升2.6 BLEU分。
  • 与零样本相比,该窗口方法在BLEU分数变化中实现了最高比例的正面干扰(0.62)和最低比例的负面干扰(0.29)。
  • 当提示示例来自与测试集相同领域时,模型表现更优,表明领域级连贯性至关重要。
  • 长度控制是必要的,因为未被相似度度量解释的性能差异通常源于长度偏差,而连贯性有助于缓解此问题。
  • 尽管具备零样本能力,添加提示示例通常能提升性能,且连贯性是减少负面干扰的关键因素。
Figure 2: Histograms of sentence lengths (word counts) randomly sampled from different domains, which has implications for the total prompt length when sampling from these domains. FLORES sentences tend to be nearly twice as long as MTNT and TED sentences.
Figure 2: Histograms of sentence lengths (word counts) randomly sampled from different domains, which has implications for the total prompt length when sampling from these domains. FLORES sentences tend to be nearly twice as long as MTNT and TED sentences.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。