Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translation
Open accessThe DOI matches its Crossref record; 12 of the 12 references it cites were found in a registry or an index.
Abstract
The end-to-end nature of neural machine translation (NMT) removes many ways of manually guiding the translation process that were available in older paradigms.Recent work, however, has introduced a new capability: lexically constrained or guided decoding, a modification to beam search that forces the inclusion of pre-specified words and phrases in the output.However, while theoretically sound, existing approaches have computational complexities that are either linear (Hokamp and Liu, 2017) or exponential (Anderson et al., 2017) in the number of constraints.We present an algorithm for lexically constrained decoding with a complexity of O(1) in the number of constraints.We demonstrate the algorithm's remarkable ability to properly place these constraints, and use it to explore the shaky relationship between model and BLEU scores.Our implementation is available as part of SOCKEYE.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Sequence to Sequence Learning with Neural Networks
Sutskever, I., Vinyals, O., & Le, Q. V. (2014) · arXiv · doi:10.48550/arxiv.1409.3215 · Cited by 17,766 · cited 2×
“In beam search (Lowerre, 1976; Sutskever et al., 2014), the decoder maintains a beam of size k conAlgorithm 1 Beam search.”
BackgroundGoogle's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
Wu, Y., Schuster, M., Chen, Z., Le, Q. V., Norouzi, M., Macherey, W., Krikun, M., Cao, Y., Gao, Q., Macherey, K., et al. (2016) · arXiv · doi:10.48550/arxiv.1609.08144 · Cited by 5,319
Statistical phrase-based translation
Koehn, P., Och, F. J., & Marcu, D. (2003) · Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology - NAACL '03 · doi:10.3115/1073445.1073462 · Cited by 3,197 · cited 3×
“One appeal of the phrase-based statistical approach to machine translation (Koehn et al., 2003) was that it provided control over system output.”
BackgroundMethodInfluentialA Call for Clarity in Reporting BLEU Scores
Post, M. (2018) · Proceedings of the Third Conference on Machine Translation: Research Papers · doi:10.18653/v1/w18-6319 · Cited by 2,112 · cited 1×
“All BLEU scores are computed on detokenized output using SACREBLEU (Post, 2018),1 and are thus directly comparable to scores reported in the WMT evaluations.”
MethodSelf-citationA Call for Clarity in Reporting BLEU Scores
Post, M. (2018) · arXiv · doi:10.48550/arxiv.1804.08771 · Cited by 2,111
Self-citationThe HARPY speech recognition system
Lowerre, B. T. (1976) · Cited by 474
Lexically Constrained Decoding for Sequence Generation Using Grid Beam Search
Hokamp, C., & Liu, Q. (2017) · Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/p17-1141 · Cited by 303 · cited 1×
“However, while theoretically sound, existing approaches have computational complexities that are either linear (Hokamp and Liu, 2017) or exponential (Anderson et al.”
BackgroundIncorporating Discrete Translation Lexicons into Neural Machine Translation
Arthur, P., Neubig, G., & Nakamura, S. (2016) · Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/d16-1162 · Cited by 203 · cited 4×
“One topic that has received attention in the literature is the tendency of NMT systems to do poorly with rare words, and in particular, named entities (e.g., Arthur et al. (2016)).”
BackgroundInfluentialImproving Translation Quality by Discarding Most of the Phrasetable
Johnson, H., Martin, J., Foster, G. F., et al. (2007) · Cited by 194
Guided Open Vocabulary Image Captioning with Constrained Beam Search
Anderson, P., Fernando, B., Johnson, M., & Gould, S. (2017) · Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/d17-1098 · Cited by 193 · cited 3×
“A related approach was that of Anderson et al. (2017), who similarly extended beam search with a finite state machine whose states marked completed subsets of the set of constraints, at an exponential cost in the number of constraints.”
BackgroundMethodInfluential
Cited by
Survey of Hallucination in Natural Language Generation
Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y., Chen, D., Dai, W., et al. (2022) · arXiv · doi:10.48550/arxiv.2202.03629 · Cited by 4,981
Survey of Hallucination in Natural Language Generation
Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y. J., Madotto, A., & Fung, P. (2023) · ACM Computing Surveys · doi:10.1145/3571730 · Cited by 5,025
“[33, 70, 146, 171, 177, 214] and [213] use constrained decoding to incorporate specific terminology into MT, but the above methods can be repurposed to mitigate hallucinations.”
MethodCommonGen: A constrained text generation challenge for generative commonsense reasoning
Lin, B. Y., Zhou, W., Shen, M., Zhou, P., Bhagavatula, C., Choi, Y., & Ren, X. (2020) · Findings of the Association for Computational Linguistics: EMNLP 2020 · doi:10.18653/v1/2020.findings-emnlp.165 · Cited by 239
Accelerating scientific discovery with Co-Scientist
Gottweis, J., Weng, W.-H., Daryin, A., Tu, T., Sirkovic, P., Myaskovsky, A., Glowaty, G., Weissenberger, F., Orlandi, A., Popovici, D., et al. (2025) · arXiv · doi:10.48550/arxiv.2502.18864 · Cited by 158
Constrained Language Models Yield Few-Shot Semantic Parsers
Shin, R., Lin, C., Thomson, S., Chen, C., Roy, S., Platanios, E. A., Pauls, A., Klein, D., Eisner, J., & Van Durme, B. (2021) · Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2021.emnlp-main.608 · Cited by 139
“cient approaches to restricting valid paths in beam search such that they satisfy certain externally provided constraints (e.g., Hokamp and Liu, 2017; Anderson et al., 2017; Post and Vilar, 2018; Hu et al., 2019).”
BackgroundGrammar-Constrained Decoding for Structured NLP Tasks without Finetuning
Geng, S., Josifoski, M., Peyrard, M., & West, R. (2023) · Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2023.emnlp-main.674 · Cited by 74
Constrained Decoding for Neural NLG from Compositional Representations in Task-Oriented Dialogue
Balakrishnan, A., Rao, J., Upasani, K., White, M., & Subba, R. (2019) · Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/p19-1080 · Cited by 70
“Constrained decoding in MT (Post and Vilar, 2018, i.a.) has been used to enforce the use of specific words in the output, rather than constraints on tree structures.”
Erdem, E., Kuyu, M., Yagcioglu, S., Frank, A., Parcalabescu, L., Plank, B., Babii, A., Turuta, O., Erdem, A., Calixto, I., et al. (2022) · Journal of Artificial Intelligence Research · doi:10.1613/jair.1.12918 · Cited by 54
“Prabhumoye et al. (2020) discuss three abstraction levels of language generation to make machine-generated text human-like. They relate to structure, content and style. Different types of source data are considered for controlled text generation, such as tables (Parikh, Wang, Gehrmann, Faruqui, Dhingra, Yang, & Das, 2…”
BackgroundInfoSurgeon: Cross-Media Fine-grained Information Consistency Checking for Fake News Detection
Fung, Y., Thomas, C., Gangi Reddy, R., Polisetty, S., Ji, H., Chang, S.-F., McKeown, K., Bansal, M., & Sil, A. (2021) · Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers) · doi:10.18653/v1/2021.acl-long.133 · Cited by 52
“To better enforce that manipulated entities actually appear in the generated article, we use a copy mechanism which re-purposes entities from the input KG when generating the output article (Post and Vilar, 2018).”
MethodProoFVer: Natural Logic Theorem Proving for Fact Verification
Krishna, A., Riedel, S., & Vlachos, A. (2022) · Transactions of the Association for Computational Linguistics · doi:10.1162/tacl_a_00503 · Cited by 51
Self-Supervised and Controlled Multi-Document Opinion Summarization
Elsahar, H., Coavoux, M., Gallé, M., & Rozen, J. (2020) · arXiv · doi:10.48550/arxiv.2004.14754 · Cited by 40
“Constrained beam search (Anderson et al., 2017; Hokamp & Liu, 2017; Post & Vilar, 2018) is slower, requires in practice very large beam sizes, and does not enable soft constraints.”
BackgroundEvaluating Large Language Models on Controlled Generation Tasks
Sun, J., Tian, Y., Zhou, W., Xu, N., Hu, Q., Gupta, R., Wieting, J., Peng, N., & Ma, X. (2023) · Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2023.emnlp-main.190 · Cited by 29
Escaping the sentence-level paradigm in machine translation
Post, M., & Junczys-Dowmunt, M. (2023) · arXiv · doi:10.48550/arxiv.2304.12959 · Cited by 12
Self-citationDecider: A Dual-System Rule-Controllable Decoding Framework for Language Generation
Xu, C., Lan, T., Ji, Y., Yu, C., Wang, W., Gao, J., Dong, Q., Qian, K., Li, P., Bi, W., et al. (2025) · IEEE Transactions on Knowledge and Data Engineering · doi:10.1109/tkde.2025.3554819 · Cited by 2
“(2) D ECIDER can select the common interest (e.g., read and reading in case 1) or explore new concepts in the common ground (e.g., library → {read, book, school} ← college in case 2).”
Evaluating Large Language Models on Controlled Generation Tasks
Sun, J., Tian, Y., Zhou, W., Xu, N., Hu, Q., Gupta, R., Wieting, J. F., Peng, N., & Ma, X. (2023) · arXiv · doi:10.48550/arxiv.2310.14542 · Cited by 1
Metadata
- Authors
- Post, M., & Vilar, D.
- Venue
- Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers)
- Published
- 2018
- Pages
- 1314-1324
- OpenAlex
- W2797297135
- Cited by
- 239
- References
- 12
- FWCI
- 13.63
- Type
- conference paper
- Language
- en
- Open access
- hybrid
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.