paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Machine translation testing via pathological invariance

通过病态不变性进行机器翻译测试
FSE Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2020匹配度 3/10 · 论文属于机器学习系统测试(机器翻译测试),与用户核心方向中的静态分析、Agentic 程序分析、浮点程序分析及贝叶斯程序分析均无直接关联;仅因涉及 PL+ML 交叉和使用掩码语言模型生成测试输入而有弱关联。引用 43 inbox
Shashij Gupta, Pinjia He, Clara Meister, Zhendong Su
crossref: 2026-09-12

AI 速览

一句话:提出 PatInv,通过生成语义不同但句法相似的句子并检测翻译是否相同,发现机器翻译错误。

神经机器翻译已广泛使用,但常返回错误译文,可能造成经济损失或政治冲突;由于神经模型复杂,测试机器翻译系统面临新挑战。本文提出 PatInv,其核心直觉是含义不同的句子不应得到相同翻译。PatInv 有两种实现:利用掩码语言模型替换句中的一个词,或依据成分结构删除词/短语,从而生成句法相似但语义不同的句子,再检查原句与变体句的翻译是否相同。作者在 Google Translate 和 Bing Microsoft Translator 上用 200 个英语句子测试 En-Hi 与 En-Zh 两种语言设置,分别发现 308 和 223 个错误翻译,其中多数无法被现有最优方法发现。

问题
神经机器翻译软件常返回错误译文,且底层神经模型复杂,传统测试方法难以有效发现其翻译缺陷。
方法
提出 PatInv,基于“不同含义的句子不应有相同翻译”的不变性,通过掩码语言模型替换词或按句法结构删除词/短语,生成句法相似但语义不同的句子,并比较原句与变体句的译文是否相同。
评估
在 Google Translate 和 Bing Microsoft Translator 上,使用 200 个英语句子、En-Hi 与 En-Zh 两种语言设置进行测试,分别发现 308 和 223 个错误翻译,且多数未被现有最优方法发现。
原文摘要(Abstract)

Machine translation software has become heavily integrated into our daily lives due to the recent improvement in the performance of deep neural networks. However, machine translation software has been shown to regularly return erroneous translations, which can lead to harmful consequences such as economic loss and political conflicts. Additionally, due to the complexity of the underlying neural models, testing machine translation systems presents new challenges. To address this problem, we introduce a novel methodology called PatInv. The main intuition behind PatInv is that sentences with different meanings should not have the same translation. Under this general idea, we provide two realizations of PatInv that given an arbitrary sentence, generate syntactically similar but semantically different sentences by: (1) replacing one word in the sentence using a masked language model or (2) removing one word or phrase from the sentence based on its constituency structure. We then test whether the returned translations are the same for the original and modified sentences. We have applied PatInv to test Google Translate and Bing Microsoft Translator using 200 English sentences. Two language settings are considered: English-Hindi (En-Hi) and English-Chinese (En-Zh). The results show that PatInv can accurately find 308 erroneous translations in Google Translate and 223 erroneous translations in Bing Microsoft Translator, most of which cannot be found by the state-of-the-art approaches.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5740,
  title = {Machine translation testing via pathological invariance},
  author = {Shashij Gupta and Pinjia He and Clara Meister and Zhendong Su},
  booktitle = {FSE},
  year = {2020},
  doi = {10.1145/3368089.3409756}
}