Skip to main content
QUICK REVIEW

[Paper Review] Directed Acyclic Transformer for Non-Autoregressive Machine Translation

Fei Huang, Hao Zhou|arXiv (Cornell University)|May 16, 2022
Natural Language Processing TechniquesComputer Science28 citations
TL;DR

Introduces DA-Transformer, which uses a directed acyclic graph (DAG) as the decoder to capture multiple translation modalities in non-autoregressive MT, enabling competitive results with autoregressive models without knowledge distillation and maintaining fast inference.

ABSTRACT

Non-autoregressive Transformers (NATs) significantly reduce the decoding latency by generating all tokens in parallel. However, such independent predictions prevent NATs from capturing the dependencies between the tokens for generating multiple possible translations. In this paper, we propose Directed Acyclic Transfomer (DA-Transformer), which represents the hidden states in a Directed Acyclic Graph (DAG), where each path of the DAG corresponds to a specific translation. The whole DAG simultaneously captures multiple translations and facilitates fast predictions in a non-autoregressive fashion. Experiments on the raw training data of WMT benchmark show that DA-Transformer substantially outperforms previous NATs by about 3 BLEU on average, which is the first NAT model that achieves competitive results with autoregressive Transformers without relying on knowledge distillation.

Motivation & Objective

  • Address the multi-modality problem in non-autoregressive machine translation (NAT) by representing multiple translations without distillation.
  • Propose a Directed Acyclic Decoder that organizes hidden states in a DAG, where each path corresponds to a possible translation.
  • Train end-to-end without relying on multiple references or knowledge distillation, and enable diverse, fast inference by sampling paths.

Proposed method

  • Replace the vanilla NAT decoder with a directed acyclic decoder that builds a DAG of vertex states and edge transitions.
  • Represent path probabilities with a transition matrix E derived from a self-attention based Q/K projection over vertex states to ensure acyclicity via lower-triangular masking.
  • Predict target token distributions on all vertices in parallel, then sample a path A to generate the final translation.
  • Train by marginalizing over all DAG paths A to maximize P(Y|X) with a single reference, using dynamic programming to compute the path sum efficiently (O(ML^2)).
  • Optionally employ glancing training by adding a masked decoder input Z and reconstructing Y to improve representation learning.
  • Inference includes multiple decoding strategies (Greedy, Lookahead) and optional BeamSearch with a language model to balance quality and latency.

Experimental results

Research questions

  • RQ1Can a directed acyclic decoder effectively capture multiple translation modalities without knowledge distillation in NATs?
  • RQ2How does representing translations on a DAG affect training stability and convergence with a single reference per sample?
  • RQ3What decoding strategies (greedy, lookahead, beam search with LM) provide favorable quality-latency tradeoffs for DA-Transformer?
  • RQ4Does the proposed DAG-based NAT close the performance gap with autoregressive models while maintaining NAT-like speedups?
  • RQ5How does DAG size (λ times source length) influence translation quality and training dynamics?

Key findings

  • DA-Transformer substantially improves NAT translation quality and reduces the gap to autoregressive models without relying on KD.
  • The DAG-based decoder enables diverse translations by storing multiple modalities and avoids inconsistent label problems common in vanilla NAT training.
  • Lookahead decoding consistently outperforms greedy decoding, and beam search with an n-gram LM further improves quality with manageable overhead.
  • The approach achieves 7x to 14x speedups over autoregressive models, with remaining BLEU gaps around 0.32 on average across benchmarks.
  • On WMT17 Zh-En, the DA-Transformer with beam search can surpass autoregressive Transformers without KD in some settings.
  • Training with a single reference per sample is feasible due to the path marginalization and sparse gradient updates across the DAG.

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.