Abstract
Machine Translation (MT) systems have achieved high performance but remain susceptible to significant errors from minor input perturbations. Behavioral testing—probing specific linguistic capabilities—is a promising diagnostic tool, but it is limited by the "reference problem," where each modified test case requires a new human-authored reference. This paper presents BTPGBT, a framework that utilizes Large Language Models (LLMs) to automate the generation of high-quality test cases and their corresponding "pseudo-references." By employing a Bilingual Translation Pair Generation (BTPG) method, the framework achieves an error detection precision of 82.61%, significantly outperforming previous state-of-the-art diagnostic methods.
Introduction
Despite the advancements in Machine Translation (MT), these systems are often "brittle." Small modifications to a source sentence can lead to disproportionately large translation errors. Behavioral testing aims to diagnose these vulnerabilities by testing specific capabilities, such as handling tense or named entities. However, the primary bottleneck is the requirement for reference translations for every generated test case. Previous methods either relied on inaccurate reference-free metrics or restricted edits to simple word swaps, limiting the scope of error diagnosis. BTPGBT addresses this by automating the generation of both test cases and references without compromising quality.
Methodology: Bilingual Translation Pair Generation (BTPG)
The core innovation of this work is the Bilingual Translation Pair Generation (BTPG) method. Unlike traditional approaches that modify only the source text, BTPG operates on a source-reference pair $(x, r)$.
The process involves three main steps:
- Alignment & Masking: Aligned segments between the source sentence and the reference are identified and masked.
- Simultaneous Infilling: An LLM (e.g., ChatGPT) fills these masks in both languages simultaneously. By considering the bilingual context, the LLM ensures that the new source $x'$ and reference $r'$ are semantically consistent and fluent.
- Evaluation: The MT system is evaluated based on whether the quality difference (measured by COMET) between the original translation and the test case translation is minimal.
The framework evaluates nine linguistic capabilities, including Parts of Speech (POS), Tense, Named Entity Recognition (NER), and a "General" category for broader modifications.
Experimental Setup
The researchers utilized data from the WMT21/22 English-Chinese and Chinese-English news translation tasks. The evaluation included:
- Targeted Testing: 1,000 sampled sentences for specific linguistic capabilities.
- General Testing: A large-scale dataset of 20,540 test cases to ensure unbiased error diagnosis across a wide range of modifications.
Results and Discussion
The BTPGBT framework demonstrated a significant improvement in diagnostic accuracy. Most notably, it achieved an error detection precision of 82.61%, compared to just 34.67% for the previous "Dep" method, which relies on syntactic structure comparisons.
Key Insights
- Bilingual Context: Simultaneous infilling of bilingual pairs is superior to sequential translation, as it preserves structural integrity.
- Linguistic Vulnerabilities: MT systems are generally robust with nouns but struggle with verbs and adverbs, likely due to complex contextual collocations.
- Collateral Damage: Errors frequently occur in unmodified parts of a sentence because changes in one segment can cause the MT system to lose track of the overall sentence structure.
- System Benchmarking: Commercial systems like DeepL showed high robustness, while even top-tier systems failed on 6% to 17% of targeted test cases.
Conclusion
BTPGBT provides a robust, automated framework for diagnosing MT errors across diverse linguistic capabilities. While it relies on the generation quality of the underlying LLM and currently focuses on high-resource language pairs, it represents a major step toward automated, fine-grained evaluation of translation systems. Future work will focus on extending this framework to low-resource languages and enhancing the safety of automated test generation.
Summary updated