Skip to main content
QUICK REVIEW

[Paper Review] Multi-Granularity Self-Attention for Neural Machine Translation

Jie Hao, Xing Wang|arXiv (Cornell University)|Sep 5, 2019
Natural Language Processing TechniquesComputer Science33 references9 citations
TL;DR

This paper proposes Multi-Granularity Self-Attention (Mg-Sa), a novel attention mechanism that enhances Transformer-based neural machine translation by explicitly modeling phrase-level patterns through dedicated attention heads for n-gram and syntactic phrases. The method improves translation performance across WMT14 En→De and NIST Zh→En benchmarks by capturing multi-level phrase structures while maintaining the flexibility of self-attention.

ABSTRACT

Current state-of-the-art neural machine translation (NMT) uses a deep multi-head self-attention network with no explicit phrase information. However, prior work on statistical machine translation has shown that extending the basic translation unit from words to phrases has produced substantial improvements, suggesting the possibility of improving NMT performance from explicit modeling of phrases. In this work, we present multi-granularity self-attention (Mg-Sa): a neural network that combines multi-head self-attention and phrase modeling. Specifically, we train several attention heads to attend to phrases in either n-gram or syntactic formalism. Moreover, we exploit interactions among phrases to enhance the strength of structure modeling - a commonly-cited weakness of self-attention. Experimental results on WMT14 English-to-German and NIST Chinese-to-English translation tasks show the proposed approach consistently improves performance. Targeted linguistic analysis reveals that Mg-Sa indeed captures useful phrase information at various levels of granularities.

Motivation & Objective

  • To address the limitation of standard multi-head self-attention in capturing phrase-level dependencies, which are known to improve translation in statistical and neural systems.
  • To explore whether underutilized attention heads in Transformers can be repurposed for explicit phrase modeling without sacrificing model efficiency.
  • To integrate both surface-level n-grams and syntactically induced phrases into the attention mechanism to enrich structural modeling.
  • To evaluate whether the model captures and retains phrase-level information across multiple granularities through probing tasks.
  • To demonstrate the generalizability of Mg-Sa beyond translation by testing its performance on monolingual phrase prediction tasks.

Proposed method

  • The model introduces dedicated attention heads that attend over phrase fragments instead of individual tokens, with phrases defined as contiguous n-grams (e.g., 2-grams, 3-grams) or syntactic constituents derived from dependency trees.
  • Phrase representations are generated by partitioning input sequences into overlapping or non-overlapping fragments at varying granularities, and assigning specific attention heads to attend over these fragments.
  • The method incorporates interactions among phrases by allowing attention heads to attend across phrase boundaries, enhancing structural modeling capabilities.
  • The model uses dot-product attention with scaled cosine similarity, maintaining the standard Transformer architecture while modifying only the attention head behavior for phrase-level inputs.
  • The approach is evaluated via both end-to-end translation tasks and probing tasks that test the model's ability to predict phrase-level labels (e.g., POS, Tense, Voice).
  • Syntactic phrase induction is performed using dependency parsing to extract constituent structures, which are then used as input for specialized attention heads.

Experimental results

Research questions

  • RQ1Can dedicated attention heads in Transformers be effectively repurposed to model phrase-level patterns, improving translation performance?
  • RQ2Does combining n-gram and syntactic phrase representations lead to better structural modeling than standard self-attention?
  • RQ3To what extent does Mg-Sa capture and retain multi-granularity phrase information, as measured by probing tasks?
  • RQ4How does the performance of Mg-Sa compare to strong Transformer baselines across diverse language pairs and tasks?
  • RQ5Is the benefit of phrase modeling in Mg-Sa generalizable beyond machine translation, such as in monolingual phrase prediction tasks?

Key findings

  • The proposed Mg-Sa model achieves consistent improvements over the standard Transformer baseline on both WMT14 English-to-German and NIST Chinese-to-English translation tasks.
  • Models incorporating syntactic phrases (e.g., dependency-based constituents) outperform those using only n-grams or no phrase modeling, indicating the value of structural information.
  • On probing tasks, Mg-Sa models significantly outperform baseline NMT encoders in predicting phrase-level labels such as POS, Tense, Voice, and SPC, especially for finer-grained granularities.
  • When trained from scratch, Mg-Sa shows greater gains on larger phrase-level tasks (e.g., TSS, Tense, Voice), suggesting effective long-range phrase representation learning.
  • The model maintains high efficiency, with only a marginal increase in inference speed compared to the standard Transformer, indicating lightweight integration.
  • Linguistic analysis confirms that Mg-Sa successfully captures and stores phrase-level information across multiple granularities, validating its intended design.

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.