Learning Homographic Disambiguation Representation for Neural Machine Translation

Weixuan Wang, Wei Peng, Qun LiuarXiv 2023 · DOI

Abstract

Homographs—words with identical spellings but different meanings—pose a significant challenge for Neural Machine Translation (NMT) systems. This paper presents the HDR-encoder (Homographic Disambiguation Representation), a novel approach that leverages Natural Language Inference (NLI) and WordNet to teach encoders to distinguish between word senses in the latent space. Experimental results on WMT benchmarks show substantial improvements, including a +2.3 BLEU score gain in English-to-Russian translation.

Introduction

In machine translation, ambiguity is a persistent hurdle. A word like "bank" can refer to a financial institution or a riverbank, and "interest" can mean curiosity or a financial rate. While modern Transformer-based NMT models are powerful, they often fail to capture these nuances due to data sparsity and insufficient context. Previous research often focused on word embeddings; however, this work argues that the most effective disambiguation occurs within the encoder's hidden states—the semantics-bearing latent space.

Methodology: The HDR-Encoder

The HDR-encoder is pre-trained in two stages to develop a robust understanding of both sentence-level semantics and word-level disambiguation.

Sentence Representation (SR) Learning

Initially, the encoder is trained on NLI tasks (using SNLI and MultiNLI datasets). This phase enables the model to learn "universal" sentence meanings by identifying relationships like entailment and contradiction between sentence pairs.

Word Disambiguation Representation (WDR) Learning

The second stage uses WordNet to refine the model's understanding of homographs. By identifying "synsets" and their corresponding example sentences, the model is fine-tuned to cluster representations of the same word sense together while separating different senses in the latent space.

The WDR learning process uses WordNet examples to map homographs into distinct regions of the latent space based on their specific meanings.

Integration with NMT

The pre-trained HDR-encoder is integrated into a standard Transformer NMT model using three proposed architectures:

  1. HDR-NMT_add: Sums the outputs of the HDR-encoder and the standard NMT encoder.
  2. HDR-NMT_gate: Employs a gating mechanism to dynamically balance disambiguation knowledge with standard translation features.
  3. HDR-NMT_cascade: Passes the HDR-encoder output sequentially into the NMT encoder.
Three architectural variants for integrating the HDR-encoder into a standard NMT pipeline: (a) add, (b) gate, and (c) cascade.

Results and Discussion

The proposed methods were evaluated on WMT14, WMT17, and WMT19 benchmarks across English to Russian, Chinese, German, and French.

Translation Quality

The HDR-NMT_gate model consistently outperformed the baseline, achieving significant BLEU score improvements: +2.3 points for EN→RU and +1.1 points for EN→ZH. These gains indicate that the model effectively utilizes disambiguation knowledge to produce more accurate translations.

Qualitative Analysis

A notable example involves the word "bug." In a technical context regarding flight paths, a baseline model incorrectly translated "pinpoint bugs" as "eavesdropping." The HDR-NMT model correctly identified the sense as "insects," demonstrating superior contextual awareness. Furthermore, visualizations in the paper confirm that while a standard encoder sees a messy cloud for homographs like "right," the HDR-encoder clearly separates the different senses (e.g., "correct" vs. "direction") in the latent space.

Conclusion

The HDR-encoder framework successfully addresses homographic ambiguity by shifting the focus to the latent space. By leveraging external knowledge from WordNet and NLI data, the model achieves state-of-the-art performance in disambiguation tasks. Future research will explore more dynamic gating mechanisms and the potential of combining this approach with specialized word sense embeddings.

Summary updated

Abstract

Homographs, words with the same spelling but different meanings, remain challenging in Neural Machine Translation (NMT). While recent works leverage various word embedding approaches to differentiate word sense in NMT, they do not focus on the pivotal components in resolving ambiguities of homographs in NMT: the hidden states of an encoder. In this paper, we propose a novel approach to tackle homographic issues of NMT in the latent space. We first train an encoder (aka "HDR-encoder") to learn universal sentence representations in a natural language inference (NLI) task. We further fine-tune the encoder using homograph-based synset sentences from WordNet, enabling it to learn word-level homographic disambiguation representations (HDR). The pre-trained HDR-encoder is subsequently integrated with a transformer-based NMT in various schemes to improve translation accuracy. Experiments on four translation directions demonstrate the effectiveness of the proposed method in enhancing the performance of NMT systems in the BLEU scores (up to +2.3 compared to a solid baseline). The effects can be verified by other metrics (F1, precision, and recall) of translation accuracy in an additional disambiguation task. Visualization methods like heatmaps, T-SNE and translation examples are also utilized to demonstrate the effects of the proposed method.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
WMT17 · newstest17 EN→RUHDR-NMT gateBLEU26.2+2.3 vs baselineMachine Translation · split: test · language-pair=EN-RU
Source quote
L222: 26.2(+2.3)
WMT19 · newstest19 EN→ZHHDR-NMT gateBLEU26.6+1.1 vs baselineMachine Translation · split: test · language-pair=EN-ZH
Source quote
L223: 26.6(+1.1)
WMT14 · newstest14 EN→DEHDR-NMT gateBLEU26.7Machine Translation · split: test · language-pair=EN-DE
Source quote
L224: 26.7(+0.7)
WMT14 · newstest14 EN→FRHDR-NMT gateBLEU38.8Machine Translation · split: test · language-pair=EN-FR
Source quote
L225: 38.8(+0.5)
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
WMT17 · newstest17 EN→RUFairseq baselineBLEU23.9Machine Translation · split: test · language-pair=EN-RU
Source quote
L211: 23.9
WMT19 · newstest19 EN→ZHFairseq baselineBLEU25.5Machine Translation · split: test · language-pair=EN-ZH
Source quote
L212: 25.5
BibTeX
@misc{wang2023learning,
  author = {Weixuan Wang and Wei Peng and Qun Liu},
  title = {{Learning Homographic Disambiguation Representation for Neural Machine Translation}},
  year = {2023},
  eprint = {2304.05860},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.05860},
}
Figure