Fast Structured Decoding for Sequence Models

Zhiqing Sun, Zhuohan Li, Haoqing Wang, Zi Lin, Di He +1 more
10/25/2019
cs.LGcs.CLstat.ML

Official code: Edward-Sun/structured-nart (15 stars, last commit 2019-12-05).

Abstract

Autoregressive sequence models achieve state-of-the-art performance in domains like machine translation. However, due to the autoregressive factorization nature, these models suffer from heavy latency during inference.

Show full abstract

Recently, non-autoregressive sequence models were proposed to reduce the inference time. However, these models assume that the decoding process of each token is conditionally independent of others. Such a generation process sometimes makes the output sentence inconsistent, and thus the learned non-autoregressive models could only achieve inferior accuracy compared to their autoregressive counterparts. To improve then decoding consistency and reduce the inference cost at the same time, we propose to incorporate a structured inference module into the non-autoregressive models. Specifically, we design an efficient approximation for Conditional Random Fields (CRF) for non-autoregressive sequence models, and further propose a dynamic transition technique to model positional contexts in the CRF. Experiments in machine translation show that while increasing little latency (8~14ms), our model could achieve significantly better translation performance than previous non-autoregressive models on different translation datasets. In particular, for the WMT14 En-De dataset, our model obtains a BLEU score of 26.80, which largely outperforms the previous non-autoregressive baselines and is only 0.61 lower in BLEU than purely autoregressive models.

View on arXivView PDF

Code Implementations(1)

151Oct 20, 20196 years ago

Similar Papers

Cite this paper

@article{sun2019fast,
  title  = {Fast Structured Decoding for Sequence Models},
  author = {Zhiqing Sun and Zhuohan Li and Haoqing Wang and Zi Lin and Di He and Zhi-Hong Deng},
  year   = {2019},
  eprint = {1910.11555},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1910.11555}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1910.11555.svg)](https://codeofpaper.com/paper/1910.11555)

Discussion