Integrating Vectorized Lexical Constraints for Neural Machine Translation

Shuo Wang, Zhixing Tan, Yang Liu
3/23/2022
cs.CL
transformer-attention

Official code: shuo-git/VecConstNMT (26 stars, Python, MIT, last commit 2022-10-22).

Abstract

Lexically constrained neural machine translation (NMT), which controls the generation of NMT models with pre-specified constraints, is important in many practical scenarios. Due to the representation gap between discrete constraints and continuous vectors in NMT models, most existing works choose to construct synthetic data or modify the decoding algorithm to impose lexical constraints, treating the NMT model as a black box.

Show full abstract

In this work, we propose to open this black box by directly integrating the constraints into NMT models. Specifically, we vectorize source and target constraints into continuous keys and values, which can be utilized by the attention modules of NMT models. The proposed integration method is based on the assumption that the correspondence between keys and values in attention modules is naturally suitable for modeling constraint pairs. Experimental results show that our method consistently outperforms several representative baselines on four language pairs, demonstrating the superiority of integrating vectorized lexical constraints.

View on arXivView PDF

Code Implementations(1)

MIT
267Python, Jupyter NotebookMar 2, 20224 years agoMIT

Similar Papers

Cite this paper

@article{wang2022integrating,
  title  = {Integrating Vectorized Lexical Constraints for Neural Machine Translation},
  author = {Shuo Wang and Zhixing Tan and Yang Liu},
  year   = {2022},
  eprint = {2203.12210},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.12210}
}

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

Discussion