Lexically Constrained Decoding for Sequence Generation Using Grid Beam Search

Chris Hokamp, Qun Liu
4/24/2017
515 citations
cs.CL

Official code: chrishokamp/constrained_decoding (95 stars, Jupyter Notebook, MIT, last commit 2018-08-29).

Abstract

We present Grid Beam Search (GBS), an algorithm which extends beam search to allow the inclusion of pre-specified lexical constraints. The algorithm can be used with any model that generates a sequence $ \mathbf{\hat{y}} = \{y_{0}\ldots y_{T}\} $, by maximizing $ p(\mathbf{y} | \mathbf{x}) = \prod\limits_{t}p(y_{t} | \mathbf{x}; \{y_{0} \ldots y_{t-1}\}) $.

Show full abstract

Lexical constraints take the form of phrases or words that must be present in the output sequence. This is a very general way to incorporate additional knowledge into a model's output without requiring any modification of the model parameters or training data. We demonstrate the feasibility and flexibility of Lexically Constrained Decoding by conducting experiments on Neural Interactive-Predictive Translation, as well as Domain Adaptation for Neural Machine Translation. Experiments show that GBS can provide large improvements in translation quality in interactive scenarios, and that, even without any user input, GBS can be used to achieve significant gains in performance in domain adaptation scenarios.

View on arXivView PDF

Code Implementations(1)

MIT

Lexically constrained decoding for sequence generation using Grid Beam Search

9526Jupyter Notebook, PythonApr 21, 20178 years agoMIT

Similar Papers

Cite this paper

@article{hokamp2017lexically,
  title  = {Lexically Constrained Decoding for Sequence Generation Using Grid Beam Search},
  author = {Chris Hokamp and Qun Liu},
  year   = {2017},
  eprint = {1704.07138},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1704.07138}
}

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

Discussion