Abstract
Neural Machine Translation (NMT) systems often struggle with strict terminology constraints required in professional domains. Traditional methods like constrained beam search significantly degrade inference speed. This paper proposes a novel approach using the Levenshtein Transformer (LevT), a non-autoregressive model that generates text through iterative editing. By initializing the decoding process with target constraints and applying specific masking rules, the method achieves nearly 100% terminology adherence with virtually no impact on translation speed.
Introduction
Standard NMT models are typically "black boxes" that generate text autoregressively from left to right. While fluent, they are difficult to control at runtime. In specialized fields like legal or e-commerce, specific terms must be translated according to a provided dictionary. Existing solutions either require inflexible retraining or slow down decoding by a factor of 3x or more through constrained beam search. The authors seek a "best of both worlds" approach: high terminology adherence without the "speed tax."
Methodology
The researchers utilize the Levenshtein Transformer (LevT), which performs translation via iterative refinement using three classifiers: Deletion, Placeholder, and Token.
Constraint Insertion
The core innovation involves populating the initial sequence with the required target-language constraints rather than starting from a blank slate. To ensure these constraints are preserved throughout the editing process, two key modifications are introduced:
- Constraint Masking: The Deletion Classifier is prevented from removing constraint tokens.
- No-Insertion Rule: The model is restricted from inserting new tokens inside multi-word constraints (e.g., preventing "New York" from becoming "New beautiful York").
Because these constraints are integrated into the existing LevT framework, the model naturally learns to "fill in the blanks" around the forced terms using its attention mechanism.
Experimental Setup
The approach was evaluated on several standard benchmarks:
- WMT’14 English-German (En-De) using Wiktionary.
- WMT’17 English-German (En-De) using Wiktionary and the IATE database.
- WMT’16 Romanian-English (Ro-En) to test cross-language applicability.
Results and Discussion
The proposed method demonstrates significant improvements in both adherence and translation quality over previous state-of-the-art (SOTA) methods like POST18 and DINU19.
- Adherence: The system achieved a 100% term usage rate when both no-deletion and no-insertion rules were applied.
- Quality: On the WMT’17 En-De task, the model improved BLEU scores by up to 1.16 points over the baseline.
- Efficiency: Decoding speed remained at approximately 260 sentences per second, which is nearly identical to the unconstrained LevT baseline and significantly faster than traditional constrained search methods.
Conclusion
By leveraging an edit-based model, this work provides a highly efficient solution for lexically constrained NMT. While the method assumes constraints appear in a similar relative order as the source, which holds for most tested cases, future work will address language pairs with vastly different syntactic structures and explore smarter morphological adaptation of inserted terms.
Summary updated