Skip to main content
QUICK REVIEW

[Paper Review] Phrase-Based Attentions

Phi Xuan Nguyen, Shafiq Joty|arXiv (Cornell University)|Sep 30, 2018
Topic ModelingComputer Science16 references10 citations
TL;DR

This paper proposes phrase-based attention mechanisms that extend the Transformer model to attend to n-gram phrases instead of just tokens, enabling more robust phrasal alignments. By introducing novel attention structures—ConvKV, QueryK, and interleaved heterogeneous attention—these methods improve translation performance by 1.3 BLEU on English-to-German and 0.5 BLEU on German-to-English WMT'14 benchmarks.

ABSTRACT

Most state-of-the-art neural machine translation systems, despite being different in architectural skeletons (e.g. recurrence, convolutional), share an indispensable feature: the Attention. However, most existing attention methods are token-based and ignore the importance of phrasal alignments, the key ingredient for the success of phrase-based statistical machine translation. In this paper, we propose novel phrase-based attention methods to model n-grams of tokens as attention entities. We incorporate our phrase-based attentions into the recently proposed Transformer network, and demonstrate that our approach yields improvements of 1.3 BLEU for English-to-German and 0.5 BLEU for German-to-English translation tasks on WMT newstest2014 using WMT'16 training data.

Motivation & Objective

  • Address the limitation of token-based attention in neural machine translation, which overlooks phrasal alignments critical in phrase-based SMT.
  • Integrate phrasal alignment into state-of-the-art Transformer models to better capture compositional and non-compositional phrases.
  • Design attention mechanisms that support all four mapping types: token-to-token, token-to-phrase, phrase-to-token, and phrase-to-phrase.
  • Demonstrate that phrase-level attention improves translation quality beyond standard token-based attention in end-to-end NMT.
  • Enable more interpretable and robust attention patterns by modeling phrase-level dependencies across layers.

Proposed method

  • Propose two core phrase-based attention mechanisms: ConvKV, which uses convolutional kernels to generate phrase-level keys and values, and QueryK, which learns phrase-level query representations.
  • Design three attention structures: homogeneous (same n-gram type for queries and keys), heterogeneous (mixed n-gram types), and interleaved heterogeneous (unified framework for all four mapping types).
  • Integrate phrase-based attention into all multi-head attention layers of the Transformer, preserving the original architecture’s self- and cross-attention mechanisms.
  • Use learnable parameters to generate phrase representations from token embeddings, allowing attention to attend to variable-length n-grams.
  • Apply softmax normalization over phrase-level attention scores to maintain compatibility with standard attention computation.
  • Train the model end-to-end using standard NMT objectives with cross-entropy loss on WMT’16 training data.

Experimental results

Research questions

  • RQ1Can phrase-based attention mechanisms improve neural machine translation performance by modeling n-gram alignments explicitly?
  • RQ2How do different attention structures (homogeneous, heterogeneous, interleaved) compare in capturing diverse phrasal alignment patterns?
  • RQ3Does the inclusion of phrase-level attention lead to more interpretable or robust attention distributions compared to token-level attention?
  • RQ4At which layers of the Transformer do phrase-to-phrase and other phrasal attention patterns emerge most strongly?
  • RQ5Can phrase-based attention improve BLEU scores without architectural overhaul, using only attention mechanism modifications?

Key findings

  • The interleaved heterogeneous attention mechanism achieves the highest improvement, yielding +1.33 BLEU on English-to-German and +0.48 BLEU on German-to-English translation tasks.
  • Phrase-to-phrase attention is most active in mid-level layers (e.g., layer 3), accounting for 96.16% of attention activations, indicating that phrase-level alignment is learned early in the network.
  • Token-to-token attention dominates in the top layers (e.g., layer 6), aligning with the autoregressive generation process that produces tokens sequentially.
  • Heterogeneous models outperform homogeneous ones, especially when including trigram components, suggesting flexibility in selecting n-gram types reduces noise from irrelevant alignments.
  • QueryK outperforms ConvKV in interleaved and heterogeneous settings, indicating that learnable phrase queries are more effective than fixed kernel-based key generation.
  • The attention mechanism successfully transitions from phrase-level to token-level attention across layers, reflecting a hierarchical processing pattern in the Transformer.

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.