[Paper Review] Automatic Testing and Improvement of Machine Translation
This paper proposes TransRepair, a fully automatic framework that detects and repairs translation inconsistencies in machine translation systems using context-similar mutation and metamorphic testing. It achieves 99% precision in generating consistent test pairs and fixes 19–30% of inconsistency bugs in Google Translate and Transformer, with manual evaluation showing 87% of repairs improve consistency and 27% improve translation acceptability.
This paper presents TransRepair, a fully automatic approach for testing and repairing the consistency of machine translation systems. TransRepair combines mutation with metamorphic testing to detect inconsistency bugs (without access to human oracles). It then adopts probability-reference or cross-reference to post-process the translations, in a grey-box or black-box manner, to repair the inconsistencies. Our evaluation on two state-of-the-art translators, Google Translate and Transformer, indicates that TransRepair has a high precision (99%) on generating input pairs with consistent translations. With these tests, using automatic consistency metrics and manual assessment, we find that Google Translate and Transformer have approximately 36% and 40% inconsistency bugs. Black-box repair fixes 28% and 19% bugs on average for Google Translate and Transformer. Grey-box repair fixes 30% bugs on average for Transformer. Manual inspection indicates that the translations repaired by our approach improve consistency in 87% of cases (degrading it in 2%), and that our repairs have better translation acceptability in 27% of the cases (worse in 8%).
Motivation & Objective
- To address fairness and consistency bugs in machine translation systems that arise from context-sensitive mistranslations, such as gender-based disparities.
- To develop a fully automatic, black-box testing and repair technique for machine translation systems without requiring source code or human oracles.
- To improve translation consistency by detecting disruptions caused by context-similar mutations and post-processing translations using reference-based repair.
- To evaluate the effectiveness of black-box and grey-box repair strategies in fixing inconsistencies in state-of-the-art translators like Google Translate and Transformer.
- To demonstrate that automated repair can enhance both consistency and acceptability of translations without retraining the model.
Proposed method
- Applies context-similar mutation to generate test inputs by replacing words with semantically and contextually similar alternatives (e.g., gendered pronouns or synonyms) while preserving sentence structure.
- Uses metamorphic testing to compare translations of original and mutated sentences, flagging inconsistencies when the unchanged parts of translations differ significantly.
- Employs similarity metrics (e.g., embedding-based) to quantify disruption in translation subsequences, identifying potential inconsistency bugs above a threshold.
- Implements black-box repair by post-processing translations using reference translations from mutated inputs, without modifying the original model.
- Applies grey-box repair by leveraging internal model behavior (e.g., attention or hidden states) to guide post-processing when available.
- Uses probability-reference or cross-reference techniques to select or refine translations based on consistency across multiple test cases.
Experimental results
Research questions
- RQ1Can context-similar mutation combined with metamorphic testing effectively detect inconsistency bugs in machine translation systems without human oracles?
- RQ2To what extent do state-of-the-art translation systems like Google Translate and Transformer exhibit context-sensitive translation inconsistencies?
- RQ3Can black-box and grey-box post-processing techniques automatically repair detected inconsistency bugs while preserving or improving translation quality?
- RQ4How effective is the repair process in improving translation consistency and acceptability compared to original translations?
- RQ5What is the trade-off between repair precision and translation quality in automated post-processing of machine translation outputs?
Key findings
- TransRepair achieves 99% precision in generating test input pairs that yield consistent translations, indicating high reliability in test case generation.
- Evaluation reveals that Google Translate and Transformer exhibit approximately 36% and 40% inconsistency bugs, respectively, under context-similar mutations.
- Black-box repair fixes 28% of inconsistencies on average for Google Translate and 19% for Transformer, demonstrating effectiveness in real-world deployment.
- Grey-box repair achieves 30% average repair rate for Transformer, showing that access to internal model behavior enhances repair effectiveness.
- Manual inspection confirms that 87% of repaired translations improve consistency, with only 2% degrading it, indicating high reliability of the repair process.
- In terms of acceptability, 27% of repaired translations are rated better than original translations, while only 8% are rated worse, showing net improvement in fluency and naturalness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.