Knowledge Graphs Effectiveness in Neural Machine Translation Improvement

Benyamin Ahmadnia, Bonnie J. Dorr, Parisa KordjamshidiComput. Sci 2020 · OpenReview

Abstract

Neural Machine Translation (NMT) systems require a massive amount of data. Maintaining semantic relations between words during the translation process yields more accurate target-language output. Although difficult to achieve from training data alone, it is possible to leverage Knowledge Graphs (KGs) to retain source-language semantic relations in the corresponding target-language translation. The core idea is to use KG entity relations as embedding constraints to improve the mapping from source to target. This paper describes two embedding constraints, both of which employ Entity Linking (EL) to associate words in training sentences with those in the KG: (1) a monolingual embedding constraint that supports an enhanced semantic representation of the source words; and (2) a bilingual embedding constraint that forces entity relations in the source-language to be carried over to the target-language. Evaluation on English-Spanish translation using Freebase shows that exploiting KG information decreases unknown words and improves translation quality.

Introduction

Despite the success of Neural Machine Translation (NMT), models often struggle with two persistent issues: the vocabulary problem and the semantic gap. NMT models have finite vocabularies, leading to Out-Of-Vocabulary (OOV) words being replaced by generic <UNK> tokens. Furthermore, standard architectures often fail to leverage explicit, real-world relationships between entities for disambiguation. For instance, knowing the relationship between "Barack Obama" and the "White House" can guide a model toward the correct translation (Casa Blanca) even if the specific term is rare in the training corpus.

This research proposes bridging this gap by integrating external Knowledge Graphs (KGs) like Freebase. By moving beyond simple string matching to robust Entity Linking (EL), the system can associate text with unique identities in a KG, providing the model with "world knowledge" to improve translation accuracy.

Methodology

The proposed framework jointly trains a translation module alongside a KG information extraction module. The architecture integrates several key components to constrain word embeddings based on semantic relations.

Overview of the NMT framework integrating Knowledge Graph information and embedding constraints.

Entity Linking and Representation

Instead of brittle string matching, the system uses Entity Linking (EL) to map words in training sentences to unique identities in a KG. To represent these entities and their relations, the authors employ TransR Embeddings, which project entities and relations into distinct semantic spaces to capture complex, many-to-many relationships.

Embedding Constraints

Two primary constraints are introduced:

  1. Monolingual Embedding Constraint: This forces source-language word embeddings to respect the semantic relations found in the KG. A "head-word replacement" strategy is used to create negative examples, helping the model learn valid entity relationships.
  2. Bilingual Embedding Constraint: This ensures that the relationship between two entities in the source language (e.g., bill and president) is mirrored between their translated counterparts in the target language (e.g., proyecto and presidente).

The final model is optimized using a combined loss function that balances standard translation loss with these knowledge-based constraints.

Experimental Setup and Results

The method was evaluated using the WMT’18 English-Spanish dataset (2.1 million parallel sentences) and Freebase (FB15k) as the external knowledge source. The researchers tested the approach on both RNN-based (LSTM) and Transformer architectures.

Key Results

  • Translation Quality: On the newstest2012 benchmark, the KG-enhanced RNN improved by +0.51 BLEU points, while the KG-enhanced Transformer improved by +0.47 points over their respective baselines.
  • Reduction in Unknown Words: The most significant impact was on OOV words. The Transformer-KG model reduced <UNK> tokens by 29.72% on newstest2012 and 36.52% on newstest2013.
  • Qualitative Improvements: The model successfully translated complex terms like "air force" (fuerza aérea) in contexts where baseline models failed.

Conclusion

Integrating Knowledge Graphs into NMT provides a powerful mechanism for preserving semantic relations and handling low-frequency entities. While the current study focused on English-Spanish using Freebase, future work should explore more diverse language pairs and other KGs like DBpedia or YAGO. Additionally, the computational overhead of joint training remains a consideration for large-scale production systems.

Summary updated

Abstract

Neural Machine Translation (NMT) systems require a massive amount of Maintaining semantic relations between words during the translation process yields more accurate target-language output from Neural Machine Translation (NMT). Although difficult to achieve from training data alone, it is possible to leverage Knowledge Graphs (KGs) to retain source-language semantic relations in the corresponding target-language translation. The core idea is to use KG entity relations as embedding constraints to improve the mapping from source to target. This paper describes two embedding constraints, both of which employ Entity Linking (EL)---assigning a unique identity to entities---to associate words in training sentences with those in the KG: (1) a monolingual embedding constraint that supports an enhanced semantic representation of the source words through access to relations between entities in a KG; and (2) a bilingual embedding constraint that forces entity relations in the source-language to be carried over to the corresponding entities in the target-language translation. The method is evaluated for English-Spanish translation exploiting Freebase as a source of knowledge. Our experimental results show that exploiting KG information not only decreases the number of unknown words in the translation but also improves translation quality.
BibTeX
@inproceedings{ahmadnia2020knowledge,
  author = {Benyamin Ahmadnia and Bonnie J. Dorr and Parisa Kordjamshidi},
  title = {{Knowledge Graphs Effectiveness in Neural Machine Translation Improvement}},
  booktitle = {Comput. Sci},
  year = {2020},
  url = {https://openreview.net/forum?id=aHW2365blxT},
}
Figure