Dynamic Programming Encoding for Subword Segmentation in Neural Machine Translation

Xuanli He, Gholamreza Haffari, Mohammad Norouzi
5/3/2020
cs.CLcs.LG
transformer-attention

Official code: xlhex/dpe (22 stars, Python, last commit 2020-10-26).

Abstract

This paper introduces Dynamic Programming Encoding (DPE), a new segmentation algorithm for tokenizing sentences into subword units. We view the subword segmentation of output sentences as a latent variable that should be marginalized out for learning and inference.

Show full abstract

A mixed character-subword transformer is proposed, which enables exact log marginal likelihood estimation and exact MAP inference to find target segmentations with maximum posterior probability. DPE uses a lightweight mixed character-subword transformer as a means of pre-processing parallel data to segment output sentences using dynamic programming. Empirical results on machine translation suggest that DPE is effective for segmenting output sentences and can be combined with BPE dropout for stochastic segmentation of source sentences. DPE achieves an average improvement of 0.9 BLEU over BPE (Sennrich et al., 2016) and an average improvement of 0.55 BLEU over BPE dropout (Provilkov et al., 2019) on several WMT datasets including English <=> (German, Romanian, Estonian, Finnish, Hungarian).

View on arXivView PDF

Code Implementations(1)

xlhex/dpeOfficial100%
225Python, ShellApr 17, 20206 years ago

Similar Papers

Cite this paper

@article{he2020dynamic,
  title  = {Dynamic Programming Encoding for Subword Segmentation in Neural Machine Translation},
  author = {Xuanli He and Gholamreza Haffari and Mohammad Norouzi},
  year   = {2020},
  eprint = {2005.06606},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2005.06606}
}

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/2005.06606.svg)](https://codeofpaper.com/paper/2005.06606)

Discussion