Skip to main content
QUICK REVIEW

[Paper Review] What does Attention in Neural Machine Translation Pay Attention to?

Hamidreza Ghader, Christof Monz|UvA-DARE (University of Amsterdam)|Oct 9, 2017
Natural Language Processing TechniquesComputer Science20 references11 citations
TL;DR

This paper analyzes the attention mechanism in neural machine translation (NMT) by comparing it to traditional word alignment, revealing that attention captures more than just translational equivalents. It shows that attention deviates from alignment—especially for verbs—by attending to syntactic context like subjects, objects, and auxiliaries, indicating it learns richer linguistic structure beyond alignment, which explains why forcing attention to align with traditional alignments can hurt performance for certain parts of speech.

ABSTRACT

Attention in neural machine translation provides the possibility to encode relevant parts of the source sentence at each translation step. As a result, attention is considered to be an alignment model as well. However, there is no work that specifically studies attention and provides analysis of what is being learned by attention models. Thus, the question still remains that how attention is similar or different from the traditional alignment. In this paper, we provide detailed analysis of attention and compare it to traditional alignment. We answer the question of whether attention is only capable of modelling translational equivalent or it captures more information. We show that attention is different from alignment in some cases and is capturing useful information other than alignments.

Motivation & Objective

  • To investigate whether attention in NMT models captures only translational equivalents or additional linguistic information beyond alignment.
  • To compare attention behavior with traditional word alignment across different parts of speech (POS tags).
  • To determine whether training attention with explicit alignment labels improves translation quality across all POS types.
  • To analyze how attention distribution varies based on the syntactic role of the target word being generated.
  • To understand why guided attention with alignment labels yields mixed results in prior work.

Proposed method

  • The authors analyze attention distributions from trained NMT models on the RWTH IWSLT 2015 English-German translation dataset.
  • They use the ParZu dependency parser to extract dependency roles (e.g., subject, object, auxiliary) on the source side for each attention distribution.
  • For each target word, they compute attention probability mass assigned to aligned words (based on GIZA++/fast_align) versus non-aligned words.
  • They measure correlation between attention entropy and word prediction loss to assess attention concentration and model confidence.
  • They categorize attention contributions by POS tag and dependency role to identify patterns in attention distribution.
  • They compare attention behavior across different attention mechanisms (e.g., additive, dot-product) and evaluate compliance with traditional alignment.

Experimental results

Research questions

  • RQ1To what extent does the attention mechanism in NMT align with traditional word alignment, and how does this vary by POS tag?
  • RQ2Does attention only model translational equivalents, or does it also encode syntactic and contextual information?
  • RQ3Why do some studies report improved translation quality when training attention with alignment labels, while others do not?
  • RQ4How does attention distribution differ between content words (e.g., nouns) and function words (e.g., verbs, pronouns)?
  • RQ5What role do dependency relations (e.g., subject, object, auxiliary) play in shaping attention beyond word alignment?

Key findings

  • Attention agrees with traditional alignment to a high degree for nouns (68% of attention mass on alignment points), indicating alignment guidance is beneficial for content words.
  • For verbs, only 49% of attention mass is on alignment points, with 51% directed toward syntactic context such as subjects, objects, and auxiliaries, showing attention captures more than just translation equivalents.
  • Pronouns and particles show the most distributed attention (36% and 64% on non-alignment points, respectively), suggesting attention spreads across relevant context rather than being error-prone.
  • The correlation between attention entropy and word prediction loss is low for pronouns and particles, indicating that distributed attention improves prediction confidence, not noise.
  • Training attention with alignment labels harms performance for verbs because it forces the model to ignore useful contextual information captured in non-aligned attention.
  • Attention patterns are highly dependent on the POS tag of the target word, with verbs showing the most complex and context-sensitive attention behavior.

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.