TL;DR
Standard placeholder translation allows users to inject specific terminology into machine translation outputs, but it often produces ungrammatical sentences because it inserts static words into dynamic contexts. This paper introduces a novel architecture that uses a character-level decoder to automatically inflect user-specified lemmas (e.g., turning "control" into "controlled") based on the surrounding generated text. The approach significantly improves grammatical accuracy and constraint satisfaction, especially for technical terms unseen during training.
What Problem Does This Paper Address?
While Neural Machine Translation (NMT) has achieved impressive performance, its end-to-end nature makes it difficult for users to control the output. In practice, users often need to enforce specific translations—such as brand names, technical terms, or legal jargon—to ensure consistency.
Two common techniques address this:
- Code-switching: Replacing words in the source sentence with the desired target-language words before translation.
- Placeholder translation: Replacing source words with a special token (like
[NOUN]or[VERB]), letting the model translate the sentence with the token intact, and swapping the token for the real word in post-processing.
The flaw in standard placeholder translation is that it is context-blind during the swap phase. If the generated English sentence structure requires the past tense "controlled", but the user provided the progressive form "controlling", the final output becomes ungrammatical. Conversely, code-switching allows for natural inflection but frequently suffers from a lack of faithfulness, often ignoring the user's constraint entirely in favor of a fluent synonym.
Methods
The authors propose a hybrid architecture that combines the strict constraint satisfaction of placeholders with the morphological flexibility of code-switching.
Built on top of a standard Transformer sequence-to-sequence model, their approach introduces two main additions:
- Context Encoder: Once the word-level decoder generates the target tokens (including the
[PLACEHOLDER]), a secondary Transformer encoder contextualizes the placeholder token within the newly generated target sentence. - Character Decoder: This character-level Transformer decoder takes the contextualized representation of the placeholder and concatenates it with the character embeddings of the user-specified lemma (e.g.,
c-a-t). It then auto-regressively predicts the correctly inflected form character-by-character (e.g.,c-a-t-s).
To train this system without destabilizing the translation process, the authors use a two-stage optimization strategy. They first train a standard placeholder model, freeze/initialize the weights, and then exclusively tune the additional character-generation modules.
Datasets
The model was evaluated on a Japanese-to-English translation task using the ASPEC (Asian Scientific Paper Excerpt Corpus). This dataset consists of scientific paper abstracts, making it an ideal benchmark because scientific text is dense with rare technical terms that typically benefit from user-defined lexical constraints. The authors trained their models on the initial 1M sentence pairs and evaluated performance using dictionaries split into seen and unseen terms to rigorously test generalization.
Key Insights and Ideas
- The Synonyms Trap: Code-switching models often fail because NMT decoders map synonyms closely in vector space. If you force a target word into the source text, the decoder might still output a close synonym (e.g., generating "conclude" instead of the requested "judge"). Placeholders avoid this because the explicit token forces a slot that must be filled.
- Character-Level Flexibility: Instead of relying on massive, rigid external morphological dictionaries at runtime, a character-level decoder can learn abstract morphological rules (like suffixation patterns) directly from the target language context.
- Decoupling Translation and Inflection: Trying to force a model to learn where to place a word and how to spell its inflected form simultaneously from scratch is highly unstable. Separating these tasks via two-stage training yields much higher translation quality.
Key Results
The proposed model maintained BLEU scores comparable to baseline models while drastically improving the specified term use rate—the metric tracking whether the target term actually appeared in the correct form.
As shown in the evaluation table above, the biggest victory came from handling unseen verbs (words not present in the training dictionary):
- The proposed model achieved a 73.9% correct term use rate.
- The comparable code-switching baseline (
CS lemma) dropped significantly to 42.1%. - A naive placeholder baseline that just inserts the raw lemma (
PH lemma) scored a meager 11.4%.
A manual evaluation of 50 sampled sentences confirmed these findings. For unseen verbs, the proposed model successfully generated the correct inflected form 39 times out of 50, whereas the code-switching model completely failed to output the target term in 24 instances.
Limitations and Future Work
- Single Constraint Limit: As an initial investigation, the authors restricted their experiments to a maximum of one placeholder per sentence. Real-world applications often require constraining multiple terms simultaneously.
- Irregular Inflections: Because the character decoder relies on pattern generalization, it struggles with irregular verbs it hasn't seen before (e.g., erroneously generating "maken" instead of "made").
- Future Directions: The authors plan to test the method on morphologically rich target languages (where inflection is even more complex than in English) and explore leveraging massive monolingual corpora to provide stronger training signals for target-side syntax.
Summary updated