Skip to main content
QUICK REVIEW

[Paper Review] Debugging Neural Machine Translations

Matīss Rikters|arXiv (Cornell University)|Aug 8, 2018
Natural Language Processing TechniquesComputer Science3 references3 citations
TL;DR

This paper presents a debugging tool for neural machine translation (NMT) systems that uses attention weights to estimate translation confidence and visualize alignments without requiring reference translations. By combining attention-based scoring metrics—Coverage Deviation Penalty, Absentmindedness Penalties, and Overlap Penalty—the tool identifies low-quality or anomalous translations and enables direct comparison between two NMT systems, improving error detection in test sets.

ABSTRACT

In this paper, we describe a tool for debugging the output and attention weights of neural machine translation (NMT) systems and for improved estimations of confidence about the output based on the attention. The purpose of the tool is to help researchers and developers find weak and faulty example translations that their NMT systems produce without the need for reference translations. Our tool also includes an option to directly compare translation outputs from two different NMT engines or experiments. In addition, we present a demo website of our tool with examples of good and bad translations: http://attention.lielakeda.lv

Motivation & Objective

  • To address the challenge of debugging NMT outputs without relying on reference translations, which are often unavailable in real-world testing.
  • To develop a tool that leverages attention alignments to estimate translation confidence and detect faulty or anomalous translations.
  • To enable direct comparison between two NMT systems by visualizing and scoring their attention patterns side-by-side.
  • To improve the interpretability of NMT outputs by transforming attention weights into meaningful visual and numerical diagnostics.
  • To support researchers and developers in identifying translation errors such as partial translations, copy-paste behavior, or attention misalignment.

Proposed method

  • The tool ingests source sentences, translated hypotheses, and attention alignment matrices from NMT systems as input.
  • It computes four key confidence scores: Coverage Deviation Penalty (CDP), Absentmindedness Penalties (AP_out, AP_in), and Overlap Penalty (OP) using attention weights.
  • The CDP metric penalizes incomplete or excessive attention per source token, ensuring balanced alignment.
  • AP_out and AP_in penalize output and input tokens that attend to too many or too few tokens, respectively, to detect attention scattering or over-concentration.
  • The Overlap Penalty (OP) penalizes translations that copy large portions of the source, with adjustments based on sentence length.
  • The tool visualizes attention alignments in both command-line and web-based interfaces, with support for multiple NMT frameworks including OpenNMT, Sockeye, and Marian.

Experimental results

Research questions

  • RQ1How can attention alignments be used to estimate translation confidence without reference translations?
  • RQ2What types of attention patterns indicate faulty or low-quality NMT outputs?
  • RQ3How can two NMT system outputs be effectively compared in the absence of reference translations?
  • RQ4What scoring metrics based on attention weights can reliably flag problematic translations?
  • RQ5Can attention-based diagnostics improve the identification of translation errors such as copy-paste behavior or misaligned attention?

Key findings

  • The tool successfully identifies low-confidence translations with CDP, AP, or OP scores below 30%, which often indicate serious errors such as incomplete or scrambled outputs.
  • Sentences with high overlap (>90%) in longer translations (10+ words) are frequently partially or fully untranslated, suggesting a need for data filtering.
  • The confidence score system effectively distinguishes reliable from unreliable outputs, even when BLEU scores are low due to reference mismatch rather than poor quality.
  • Comparing two NMT systems using attention alignment visualization and similar confidence scores helps identify synonymic or semantically equivalent translations.
  • The tool’s confidence estimation outperforms simple attention visualization by detecting anomalies that are invisible to standard inspection.
  • The integration of attention-based metrics enables efficient debugging of NMT outputs in real-world settings where reference translations are unavailable.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.