Neural Machine Translation with Byte-Level Subwords

Changhan Wang, Kyunghyun Cho, Jiatao Gu
9/7/2019
cs.CL

Official code: facebookresearch/fairseq (32,206 stars, Python, MIT, PyTorch, last commit 2025-09-30).

Abstract

Almost all existing machine translation models are built on top of character-based vocabularies: characters, subwords or words. Rare characters from noisy text or character-rich languages such as Japanese and Chinese however can unnecessarily take up vocabulary slots and limit its compactness.

Show full abstract

Representing text at the level of bytes and using the 256 byte set as vocabulary is a potential solution to this issue. High computational cost has however prevented it from being widely deployed or used in practice. In this paper, we investigate byte-level subwords, specifically byte-level BPE (BBPE), which is compacter than character vocabulary and has no out-of-vocabulary tokens, but is more efficient than using pure bytes only is. We claim that contextualizing BBPE embeddings is necessary, which can be implemented by a convolutional or recurrent layer. Our experiments show that BBPE has comparable performance to BPE while its size is only 1/8 of that for BPE. In the multilingual setting, BBPE maximizes vocabulary sharing across many languages and achieves better translation quality. Moreover, we show that BBPE enables transferring models between languages with non-overlapping character sets.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.

32,2066,661Python, CudaAug 29, 20171 years agoMIT
artificial-intelligencepythonpytorch

Similar Papers

Cite this paper

@article{wang2019neural,
  title  = {Neural Machine Translation with Byte-Level Subwords},
  author = {Changhan Wang and Kyunghyun Cho and Jiatao Gu},
  year   = {2019},
  eprint = {1909.03341},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.03341}
}

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

Discussion