mlsanityData to 14 Oct 2026

Making Grid Beam Search Less Greedy

arXiv 2609.39368 ↗First posted 30 Sep 2026cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

A common formalism for constraining the output of autoregressive text generation models involves lexical constraints, words or phrases which are required to occur in the generated text. DFA-constrained beam search and grid beam search are two widely used paradigms for decoding from autoregressive models while enforcing lexical constraints. As the former approach requires a number of forward passes exponential in the number of constraint tokens, it is often dispreferred to the latter, which requires only linearly many forward calls. However, while grid beam search achieves an exponential speedup, it does so in a manner which does not treat all of the constraints equally. In this paper, we demonstrate that grid beam search is biased to incorporate easier-to-satisfy constraints first, leaving harder constraints to the end of the sequence. This contrasts with DFA-constrained beam search, which exhibits no such bias. To address this shortcoming, we propose fair grid beam search, a modification to grid beam search which avoids this bias while still requiring only linearly many forward passes. Experimentally, we confirm grid beam search's bias on two constrained generation tasks, finding significant differences in how it orders constraint tokens as compared to DFA-constrained beam search and fair grid beam search. Furthermore, we find that fair grid beam search not only fixes grid beam search's bias, but finds higher-probability strings in the process.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 16 of its 25 references that are in the map. First posted on arXiv 30 Sep 2026.

Builds on

16 of 25 references.

References · 16

  1. 2021Multitask Prompted Training Enables Zero-Shot Task Generalizationcited by 1,470
  2. 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 799
  3. 2024TinyLlama: An Open-Source Small Language Modelcited by 618
  4. 2023Sentiment Analysis in the Era of Large Language Models: A Reality Checkcited by 268
  5. 2017Lexically Constrained Decoding for Sequence Generation Using Grid Beam Searchcited by 237
  6. 2018Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translationcited by 182
  7. 2020NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraintscited by 149
  8. 2016Guided Open Vocabulary Image Captioning with Constrained Beam Searchcited by 105
  9. 2022Compositional Semantic Parsing with Large Language Modelscited by 95
  10. 2018CGMH: Constrained Sentence Generation by Metropolis-Hastings Samplingcited by 94
  11. 2021Controlled Text Generation as Continuous Optimization with Multiple Constraintscited by 70
  12. 2024TheoremLlama: Transforming General-Purpose LLMs into Lean4 Expertscited by 59
4 more
  1. 2025CRANE: Reasoning with constrained LLM generationcited by 38
  2. 2023PromptNER: Prompting For Named Entity Recognitioncited by 35
  3. 2025MA-LoT: Model-Collaboration Lean-based Long Chain-of-Thought Reasoning enhances Formal Theorem Provingcited by 24
  4. 2022Automatic Multi-Label Prompting: Simple and Interpretable Few-Shot Classificationcited by 8

Built on by

Not cited yet.