[论文解读] Testing Untestable Neural Machine Translation: An Industrial Case
本文提出了一种新颖的在体神经机器翻译(NMT)测试的测试预言机制,可在无需参考翻译的情况下检测翻译失败。通过分析输入与输出之间自然语言的系统性特征——如词语/短语的一致性与结构连贯性——该方法识别出指示翻译错误的违规行为,在拥有超过十亿用户的微信中实现了真实场景下的高效部署。
Neural Machine Translation (NMT) has been widely adopted recently due to its advantages compared with the traditional Statistical Machine Translation (SMT). However, an NMT system still often produces translation failures due to the complexity of natural language and sophistication in designing neural networks. While in-house black-box system testing based on reference translations (i.e., examples of valid translations) has been a common practice for NMT quality assurance, an increasingly critical industrial practice, named in-vivo testing, exposes unseen types or instances of translation failures when real users are using a deployed industrial NMT system. To fill the gap of lacking test oracle for in-vivo testing of an NMT system, in this paper, we propose a new approach for automatically identifying translation failures, without requiring reference translations for a translation task; our approach can directly serve as a test oracle for in-vivo testing. Our approach focuses on properties of natural language translation that can be checked systematically and uses information from both the test inputs (i.e., the texts to be translated) and the test outputs (i.e., the translations under inspection) of the NMT system. Our evaluation conducted on real-world datasets shows that our approach can effectively detect targeted property violations as translation failures. Our experiences on deploying our approach in both production and development environments of WeChat (a messenger app with over one billion monthly active users) demonstrate high effectiveness of our approach along with high industry impact.
研究动机与目标
- 为解决工业级NMT系统在体测试中缺乏测试预言的问题,其中参考翻译不可用。
- 在不依赖参考翻译或BLEU等质量评分的情况下,检测已部署NMT系统中的翻译失败。
- 识别自然语言翻译系统性违规行为,这些行为可作为模型设计、实现或训练数据中潜在缺陷的信号。
- 实现实时故障检测与诊断,提升生产环境中的翻译质量和系统可靠性。
- 支持内部模型改进以及对竞争性NMT提供商系统的跨系统诊断。
提出的方法
- 该方法利用基于项目的协同过滤技术,对真实用户翻译请求进行分析,构建词语/短语翻译词典,利用源语文本与目标语文本之间的共现模式。
- 通过检测系统性语言学特征的违规行为(如不一致的词语/短语映射或翻译中的结构异常)来识别翻译失败。
- 对输入文本(源句)和输出翻译执行统计分析,比较其语言学模式以检测异常。
- 使用从训练数据中提取的130,000个英文和180,000个中文有意义词语/短语词典,验证翻译的一致性。
- 基于语言规律性和上下文连贯性的启发式规则,标记出与预期模式偏离的翻译,即使没有参考输出。
- 在生产环境和开发环境中均进行部署,以实时监控用户请求并大规模检测问题。
实验结果
研究问题
- RQ1在无法访问参考翻译的情况下,是否能够检测工业级NMT系统中的翻译失败?
- RQ2在缺乏参考输出的情况下,哪些系统性语言学特征可作为翻译缺陷的可靠指标?
- RQ3所提出的方法在检测生产规模NMT系统中的真实世界翻译失败方面效果如何?
- RQ4该方法能否检测到NMT系统中的模型级问题,如设计缺陷或数据质量问题?
- RQ5该方法在不同NMT提供商和翻译系统之间具有多大程度的可泛化性?
主要发现
- 该方法成功检测到多个工业级NMT提供商翻译中的目标属性违规,包括逐字符翻译问题以及连字符或缩写词处理错误。
- 识别出特定缺陷,如对常见食品术语的过度翻译(例如将“Runeberg torte”误译为“蛋糕”)以及缩写处理错误(例如将“p.”误译为“plasmodium”)。
- 该方法从真实用户数据中收集了130,000个英文和180,000个中文有意义词语/短语,用作内部测试用例以改进模型。
- 在微信的部署证明了其高度有效性,成功检测到微信自身NMT系统及其它提供商系统的缺陷。
- 该方法揭示了模型设计缺陷(如对多字短语缺乏上下文感知)和实现问题(如无法处理连字符术语),表明其诊断价值超越了简单的质量评分。
- 该方法在诊断训练数据质量问题方面也表现出有效性,如对罕见或特定术语变体的过拟合。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。