[Paper Review] Training Neural Machine Translation using Word Embedding-based Loss
This paper proposes a word embedding-based loss function for neural machine translation (NMT) that incorporates semantic similarity by penalizing words based on their distance in a pre-trained embedding space. By encouraging the model to generate semantically similar in-vocabulary words when the correct word is out-of-vocabulary, the method improves translation quality, achieving up to +1.72 BLEU and +1.99 METEOR gains on IWSLT17 English-to-French and significant gains even with a 1,000-word vocabulary.
In neural machine translation (NMT), the computational cost at the output layer increases with the size of the target-side vocabulary. Using a limited-size vocabulary instead may cause a significant decrease in translation quality. This trade-off is derived from a softmax-based loss function that handles in-dictionary words independently, in which word similarity is not considered. In this paper, we propose a novel NMT loss function that includes word similarity in forms of distances in a word embedding space. The proposed loss function encourages an NMT decoder to generate words close to their references in the embedding space; this helps the decoder to choose similar acceptable words when the actual best candidates are not included in the vocabulary due to its size limitation. In experiments using ASPEC Japanese-to-English and IWSLT17 English-to-French data sets, the proposed method showed improvements against a standard NMT baseline in both datasets; especially with IWSLT17 En-Fr, it achieved up to +1.72 in BLEU and +1.99 in METEOR. When the target-side vocabulary was very limited to 1,000 words, the proposed method demonstrated a substantial gain, +1.72 in METEOR with ASPEC Ja-En.
Motivation & Objective
- To address the trade-off between computational cost and translation quality in NMT caused by vocabulary size limitations.
- To reduce the negative impact of out-of-vocabulary (OOV) words by incorporating semantic similarity into the training loss function.
- To improve model robustness in low-vocabulary settings by encouraging generation of semantically close in-vocabulary words instead of OOV tokens.
- To develop a loss function that explicitly models word similarity using pre-trained word embeddings, moving beyond standard softmax cross-entropy.
Proposed method
- The proposed loss function computes a weighted average of cosine distances between the reference word's embedding and all other target words' embeddings in a pre-trained word embedding space.
- The weights are derived from the model's softmax output probabilities, so words with high generation probability are penalized more if they are far from the reference word in embedding space.
- The loss function is integrated into the standard NMT training pipeline, replacing or supplementing the standard cross-entropy loss with a hybrid loss combining cross-entropy and embedding-based regularization.
- Pre-trained word embeddings (e.g., word2vec) are used independently of the NMT training data to define semantic similarity, enabling the model to learn to generate similar words when the correct word is missing.
- The method is applied during both pre-training and fine-tuning stages, with ablation studies showing that using the embedding loss after cross-entropy pre-training yields the best results.
Experimental results
Research questions
- RQ1Can incorporating semantic similarity from pre-trained word embeddings into the NMT loss function reduce the negative impact of out-of-vocabulary (OOV) words?
- RQ2Does a loss function that penalizes semantically distant words more heavily improve translation quality, especially under vocabulary size constraints?
- RQ3How does the proposed embedding-based loss compare to standard cross-entropy loss in terms of BLEU and METEOR scores across different language pairs and vocabulary sizes?
- RQ4Can the proposed method improve word choice for rare or OOV words by generating semantically similar in-vocabulary alternatives?
Key findings
- On the IWSLT17 English-to-French dataset, the proposed method achieved a +1.72 BLEU and +1.99 METEOR improvement over the standard NMT baseline.
- With a severely limited target vocabulary of only 1,000 words, the method achieved a +1.72 METEOR gain on the ASPEC Japanese-to-English dataset, demonstrating robustness under extreme OOV conditions.
- The model trained with the embedding-based loss generated semantically plausible in-vocabulary words like 'eye' instead of <unk> for 'eyeball' and 'extrusion form' instead of <unk> for 'moldings', showing improved word choice.
- The method consistently improved translation performance across both ASPEC (Ja-En) and IWSLT17 (En-Fr) datasets, with larger gains observed on the English-to-French pair.
- The ablation study confirmed that using the embedding loss after cross-entropy pre-training yielded the best results, indicating complementary benefits from both loss components.
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.