Suffix-Constrained Greedy Search Algorithms for Causal Language Models
cs.CL
Submitted: 2026-03-01
Updated: 2026-09-01
Project page: https://slebok.github.io/zoo/markup/graphical/svg/furubayashi/extracted/index.html
License: http://creativecommons.org/licenses/by-nc-sa/4.0/
The gist: Large language models (LLMs) are powerful tools that have found applications beyond human-machine interfaces and chatbots.
Terminology
Abstract
Large language models (LLMs) are powerful tools that have found applications beyond human-machine interfaces and chatbots. Beside free-form generation, there has been an interest in constrained generation, a setting where LLMs are constrained to generate well-formed outputs with respect to the language defined by a formal grammar. Although appealing, this setting may be over restrictive for downstream applications. For example, many LLM tasks require the model to reason freely before generating its final response in a specific format. In this work, we introduce suffix-constrained generation, a constrained generation setting in which only the end of the response is constrained by a grammar, a scenario that is not supported by existing constrained generation methods. We introduce several suffix-constrained generation algorithms that are based on greedy search. We experiment on several datasets, and show that our approach allows to guarantee suffix constraints without having a negative impact on results, and even improving them in many settings.
Sources
- Formal Aspects of Language Modeling
- Prompt engineering and framework: implementation to increase code reliability based guideline for LLMs
- Gemma 3 Technical Report
- Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge
- AdapTrack: Constrained Decoding without Distorting LLM's Output Intent
- Training Verifiers to Solve Math Word Problems
- Let's Verify Step by Step
- 2 OLMo 2 Furious
- Efficient Guided Generation for Large Language Models
- Qwen3 Technical Report
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering