TL;DR
While Neural Machine Translation (NMT) theoretically leverages global sentence context to generate accurate translations, standard models still frequently stumble on homographs—words with identical spellings but different meanings. This paper empirically demonstrates this vulnerability and introduces a lightweight solution: integrating neural Word Sense Disambiguation (WSD) techniques to create context-aware word embeddings before the encoder stage, significantly boosting translation accuracy for ambiguous terms.
What Problem Does This Paper Address?
Homographs like "charges" (which can mean financial fees or legal accusations) or "room" (physical space vs. a bedroom) have historically plagued machine translation systems. In older, phrase-based translation paradigms, engineers had to build explicit, separate WSD modules to handle them.
With the advent of NMT architectures utilizing Recurrent Neural Networks (RNNs), the common assumption was that the network's internal hidden states would naturally resolve these ambiguities by looking at the surrounding sentence. The authors challenge this assumption. They show a clear negative correlation between a word's ambiguity and its translation quality: as the number of dictionary senses for a source word increases, the model's translation performance (F1 score) drops significantly.
The root of the problem is that standard NMT maps each incoming word to a static, context-blind lookup embedding. If a word is predominantly used in one sense during training, the encoder struggles to override that initial representation when an alternative sense appears.
Methods
To fix this, the authors propose generating context-aware word embeddings before passing representations into the standard NMT encoder. Their framework decouples context modeling into two steps:
- Context Networks (Extracting Context): They test three neural architectures to compute a context vector ($c_t$) for a given word:
- Neural Bag-of-Words (NBOW): A simple average of all word embeddings in the sentence. This captures the global topic but yields the exact same context vector for every word in the sentence.
- Bi-directional LSTM (BiLSTM): A separate, single-layer BiLSTM that reads the sequence to produce a unique, position-dependent context vector for each word.
- Held-out LSTM (HoLSTM): A language modeling approach where the target word is masked with a special token (
<$>), and a uni-directional LSTM reads the surrounding sequence to predict the missing context. - Integration Methods (Combining Context): They explore two ways to merge the static lookup embedding with the new context vector:
- Gate: An element-wise sigmoid gating function that filters the embedding based on context.
- Concatenate: Appending the context vector directly to the word embedding and projecting it back to the original dimension via a learned weight matrix.
Crucially, the vocabulary embeddings are shared between the context network and the NMT encoder, meaning this addition introduces very few extra parameters.
Datasets
The models were trained and evaluated on standard benchmark datasets from the Workshop on Machine Translation (WMT):
- English-German (en $\rightarrow$ de): WMT14 and WMT15 test sets.
- English-French (en $\rightarrow$ fr): WMT13 and WMT14 test sets.
- English-Chinese (en $\rightarrow$ zh): WMT17 test set.
To evaluate homographs specifically, the authors curated a targeted evaluation list of ambiguous English words extracted from Wikipedia and used fast-align to track word-level translation accuracy.
Key Insights and Ideas
- NMT Encoders Need a Head Start: Waiting for the standard NMT encoder layers to figure out word senses dynamically is inefficient. Providing context at the very first step (the embedding layer) prevents the model from getting stuck on dominant word meanings.
- Concatenation Beats Gating: Explicitly concatenating the context vector to the embedding yields better performance than gating. While gating suppresses irrelevant features, concatenation preserves both the core identity of the word and its contextual nuances, giving the encoder more raw information to work with.
- Local Context Matters: The BiLSTM context network outperformed both HoLSTM and NBOW. NBOW's failure to outperform baselines highlights that a generic "sentence topic" is not enough; the model needs position-aware local context to disambiguate specific words.
- Redundant Bidirectionality: When using a strong BiLSTM context network, switching the downstream NMT encoder from bi-directional to uni-directional didn't hurt performance. The context network effectively handles the bidirectional processing beforehand.
Key Results
- Overall Translation Gains: The best configuration (BiLSTM context network + Concatenation) achieved an improvement of ~0.7 BLEU points on English-German benchmarks over a strong 2-layer baseline. It also demonstrated consistent improvements of 0.5 to 0.8 BLEU across English-French and English-Chinese tasks.
- Targeted Homograph Improvement: In the targeted word-sense analysis, the proposed model showed a much larger performance jump on homographs than on the general vocabulary. For English-German, the homograph translation F1 score increased by +0.025, compared to a modest +0.006 increase across all words.
Limitations and Future Work
While the proposed methods yield clear improvements, they do not entirely solve the homograph problem; translation accuracy for highly ambiguous words still lags behind unambiguous ones. Additionally, the authors note that their word-level alignment evaluation tool (fast-align) can be less accurate for character-level languages like Chinese, potentially introducing noise into those specific targeted metrics.
The authors suggest that future work should focus on designing even more specialized architectures or exploring the use of explicit sense-embeddings trained on massive external corpora.
Summary updated