Skip to main content
QUICK REVIEW

[Paper Review] Diformer: Directional Transformer for Neural Machine Translation

Minghan Wang, Jiaxin Guo|arXiv (Cornell University)|Dec 22, 2021
Natural Language Processing TechniquesComputer Science5 citations
TL;DR

Diformer proposes a unified Transformer architecture that jointly models left-to-right, right-to-left, and straight (non-autoregressive) generation directions using a Directional Language Model (DLM) objective, preserving the original dependency assumptions of AR and NAR models. It achieves state-of-the-art performance on WMT benchmarks, outperforming unified models by over 1.5 BLEU points and matching independent SOTA AR and NAR models.

ABSTRACT

Autoregressive (AR) and Non-autoregressive (NAR) models have their own superiority on the performance and latency, combining them into one model may take advantage of both. Current combination frameworks focus more on the integration of multiple decoding paradigms with a unified generative model, e.g. Masked Language Model. However, the generalization can be harmful to the performance due to the gap between training objective and inference. In this paper, we aim to close the gap by preserving the original objective of AR and NAR under a unified framework. Specifically, we propose the Directional Transformer (Diformer) by jointly modelling AR and NAR into three generation directions (left-to-right, right-to-left and straight) with a newly introduced direction variable, which works by controlling the prediction of each token to have specific dependencies under that direction. The unification achieved by direction successfully preserves the original dependency assumption used in AR and NAR, retaining both generalization and performance. Experiments on 4 WMT benchmarks demonstrate that Diformer outperforms current united-modelling works with more than 1.5 BLEU points for both AR and NAR decoding, and is also competitive to the state-of-the-art independent AR and NAR models.

Motivation & Objective

  • Address the performance gap in unified AR-NAR models caused by conflicting training objectives.
  • Preserve the original dependency assumptions of autoregressive (AR) and non-autoregressive (NAR) decoding within a single framework.
  • Enable simultaneous training of multiple decoding directions (L2R, R2L, straight) without separate pretraining or fine-tuning stages.
  • Improve NAR decoding performance through self-reranking, leveraging the model's bidirectional capabilities.
  • Achieve competitive performance across AR and NAR inference modes without sacrificing generalization or increasing training cost.

Proposed method

  • Introduce a direction variable to control the generation direction (L2R, R2L, or straight) for each token during decoding.
  • Formulate the Directional Language Model (DLM) objective, conditioning each token’s prediction on context based on the current direction.
  • Use relative positional embeddings with a maximum relative distance of at least 8 to maintain long-range dependency modeling.
  • Train all three directions (L2R, R2L, straight) jointly in a single forward pass, avoiding multi-stage training and reducing computational cost.
  • Apply self-reranking during inference by re-evaluating beam candidates using the directional model, especially effective for NAR decoding.
  • Utilize distilled monolingual data to improve training stability and performance, particularly for NAR and R2L directions.

Experimental results

Research questions

  • RQ1Can a unified Transformer model preserve the performance of AR and NAR models while supporting multiple decoding directions?
  • RQ2Does jointly training L2R, R2L, and straight generation directions with a shared DLM objective reduce performance degradation compared to generalized conditional modeling?
  • RQ3How does the inclusion of a direction variable affect the model’s ability to maintain original dependency assumptions in AR and NAR settings?
  • RQ4To what extent does self-reranking improve NAR decoding performance without additional inference cost?
  • RQ5Is knowledge distillation effective in balancing model capacity across different generation directions, especially when training on raw monolingual data?

Key findings

  • Diformer outperforms existing unified modeling approaches by more than 1.5 BLEU points on both AR and NAR decoding across four WMT benchmarks.
  • On WMT14 En→De, Diformer achieves 28.58 BLEU with L2R decoding and 28.35 with distilled data, outperforming prior unified models.
  • The model maintains competitive performance against state-of-the-art independent AR and NAR models, especially when using self-reranking for NAR decoding.
  • Self-reranking significantly improves NAR performance, making it positively correlated with beam size and iteration count, particularly under mask-predict and easy-first strategies.
  • Fixing all tokens to R2L direction during training on raw data recovers L2R performance, indicating that raw data increases training difficulty for non-L2R directions.
  • Relative positional encoding with max distance k ≥ 8 is critical, and NAR decoding is more sensitive to positional information due to its bidirectional context dependency.

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.