On the Evaluation of Semantic Phenomena in Neural Machine Translation Using Natural Language Inference

Adam Poliak, Yonatan Belinkov, James R. Glass, Benjamin Van Durme

Abstract

While state-of-the-art Neural Machine Translation (NMT) models demonstrate remarkable fluency, the depth of semantic understanding within their internal representations remains a subject of debate. This paper investigates whether NMT encoders capture fine-grained semantic phenomena by leveraging Natural Language Inference (NLI) as a unified probing framework. By extracting representations from pre-trained Bi-LSTM encoders and training simple classifiers on "recast" semantic datasets, we evaluate performance across tasks such as anaphora resolution, paraphrastic reasoning, and semantic proto-roles. Our findings indicate that NMT models are adept at capturing semantics closely tied to syntax but fail to incorporate the world knowledge necessary for complex reasoning.

Introduction

Neural Machine Translation models are often treated as "black boxes" that produce high-quality outputs without a clear mapping of their internal semantic logic. While it is frequently claimed that these models learn meaningful sentence representations, "meaning" is a multifaceted concept. To move beyond vague characterizations, this research tests NMT encoders on specific, fine-grained semantic tasks. By using NLI—the task of determining if a premise entails a hypothesis—as a probing tool, we can quantify the semantic information "baked into" NMT hidden states.

Methodology and Task Recasting

The core approach treats a pre-trained NMT encoder as a fixed feature extractor. Standard Bi-LSTM models with attention were trained on four language pairs: English to Arabic (ar), Spanish (es), Chinese (zh), and German (de). For any given sentence pair in an NLI task, the final hidden states from the frozen NMT encoder are concatenated to form a vector, which then serves as input for a simple linear probing classifier.

To evaluate specific phenomena, the study utilizes "recasting"—a process where existing semantic annotations are converted into an NLI format. This allows for a unified evaluation across diverse linguistic challenges.

Evaluated Phenomena

  1. DPR (Definite Pronoun Resolution): Tests complex anaphora resolution requiring world knowledge (e.g., identifying the referent of "she").
  2. FN+ (FrameNet Plus): Focuses on paraphrastic inference, identifying if different lexical choices describe the same underlying event.
  3. SPR (Semantic Proto-Roles): Based on Dowty’s theory, this tests understanding of participant roles, such as sentience or volition.
  4. Multi-NLI: A general-purpose dataset used to gauge broad reasoning capabilities.

Experimental Results

The results reveal a significant disparity in how NMT encoders handle different types of semantics. The models performed best on Semantic Proto-Roles (SPR), with the English-Spanish encoder achieving 74.2% accuracy against a 65.4% majority baseline. This success suggests that NMT models effectively track the "syntax-semantics interface," as proto-roles like agent and patient correlate strongly with syntactic positions like subject and object.

Figure 5: Probing results across different NMT target languages and semantic tasks. Bolded values indicate the best performance for a given training set.

Conversely, the models struggled with the "World Knowledge" Gap. In the DPR task, performance hovered around the 50% baseline, indicating that NMT architectures do not naturally acquire the common-sense reasoning needed for ambiguous pronoun resolution. Performance on FN+ was also surprisingly low, potentially due to artifacts in the recasting process, such as part-of-speech mismatches that confused the linear classifier.

The Impact of Target Language

Interestingly, the choice of target language in the original NMT task influenced the quality of the extracted features. As shown in the results table, the English-Spanish (es) encoder consistently provided more robust semantic features for SPR and FN+ compared to other pairs. This suggests that certain target languages may force encoders to attend more closely to specific semantic nuances during the translation process.

Conclusion

This study demonstrates that while NMT encoders provide a decent foundation for general reasoning (as seen in Multi-NLI improvements over baselines), they are far from capturing a complete semantic picture. They excel at "syntax-adjacent" semantics but lack the world knowledge required for deeper linguistic tasks. Future research should explore whether newer architectures, such as Transformers, or multilingual training objectives can bridge this gap and produce more holistically "aware" semantic representations.

Summary updated

BibTeX
@inproceedings{poliak2018evaluation,
  author = {Adam Poliak and Yonatan Belinkov and James R. Glass and Benjamin Van Durme},
  title = {{On the Evaluation of Semantic Phenomena in Neural Machine Translation Using Natural Language Inference}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
  doi = {10.18653/v1/n18-2082},
}
Figure