mlsanityData to 7 Oct 2026

Flexible and Efficient Grammar-Constrained Decoding

arXiv 2502.05111 ↗First posted 7 Feb 2025cs.CL cs.AIcited by 42

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) are often asked to generate structured outputs that obey precise syntactic rules, such as code snippets or formatted data. Grammar-constrained decoding (GCD) can guarantee that LLM outputs matches such rules by masking out tokens that will provably lead to outputs that do not belong to a specified context-free grammar (CFG). To guarantee soundness, GCD algorithms have to compute how a given LLM subword tokenizer can align with the tokens used by a given context-free grammar and compute token masks based on this information. Doing so efficiently is challenging and existing GCD algorithms require tens of minutes to preprocess common grammars. We present a new GCD algorithm together with an implementation that offers 17.71x faster offline preprocessing than existing approaches while preserving state-of-the-art efficiency in online mask computation.

Key facts. Cited by 42 papers in the map (data through 7 Oct 2026). Builds on 9 of its 15 references that are in the map. First posted on arXiv 7 Feb 2025.

Builds on

9 of 15 references.

References · 9

  1. 2023Efficient Guided Generation for Large Language Modelscited by 192
  2. 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 186
  3. 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
  4. 2024Guiding LLMs The Right Way: Fast, Non-Invasive Constrained Generationcited by 99
  5. 2024Let Me Speak Freely? A Study on the Impact of Format Restrictions on Performance of Large Language Modelscited by 90
  6. 2025JSONSchemaBench: A Rigorous Benchmark of Structured Outputs for Language Modelscited by 66
  7. 2023Grammar Prompting for Domain-Specific Language Generation with Large Language Modelscited by 58
  8. 2024Grammar-Aligned Decodingcited by 54
  9. 2024Automata-based constraints for language model decodingcited by 49

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 13; 2026: 29.

42 papers.

Sort:

By area:

  1. 2025Grounding Multimodal LLMs to Embodied Agents that Ask for Help with Reinforcement Learningcited by 21
  2. 2025Fast Controlled Generation from Language Models with Adaptive Weighted Rejection Samplingcited by 20
  3. 2025Constrained Sampling for Language Models Should Be Easy: An MCMC Perspectivecited by 14
  4. 2025Pre3: Enabling Deterministic Pushdown Automata for Faster Structured LLM Generationcited by 11
  5. 2026Mitigating Bias in Locally Constrained Decoding via Tractable Proposalscited by 8
  6. 2026The Hidden Cost of Structured Generation in LLMs: Draft-Conditioned Constrained Decodingcited by 7
  7. 2026Lookahead-then-Verify: Reliable Constrained Decoding for Diffusion LLMs under Context-Free Grammarscited by 6
  8. 2025XML Prompting as Grammar-Constrained Interaction: Fixed-Point Semantics, Convergence Guarantees, and Human-AI Protocolscited by 4
  9. 2025Constrained Adaptive Rejection Samplingcited by 3
  10. 2026The Format Taxcited by 3
  11. 2026Constrained Decoding for Diffusion Language Models via Efficient Inference over Finite Automatacited by 3
  12. 2025A DbC Inspired Neurosymbolic Layer for Trustworthy Agent Designcited by 2
30 more
  1. 2025ToolPRM: Fine-Grained Inference Scaling of Structured Outputs for Function Callingcited by 2
  2. 2025Grounded Misunderstandings in Asymmetric Dialogue: A Perspectivist Annotation Scheme for MapTaskcited by 2
  3. 2026Schema-Key Wording as an Instruction Channel in Structured Generation under Constrained Decodingcited by 2
  4. 2025Bootstrapping Fuzzers for Compilers of Low-Resource Language Dialects Using Language Modelscited by 1
  5. 2026Autoregressive, Yet Revisable: In Decoding Revision for Secure Code Generationcited by 1
  6. 2026TruncProof: A Guardrail for LLM-based JSON Generation under Token-Length Constraintscited by 1
  7. 2026EPIC: Efficient and Parallel Inference under CFG Constraints for Diffusion Language Modelscited by 1
  8. 2026MDP-GRPO: Stabilized Group Relative Policy Optimization for Multi-Constraint Instruction Followingcited by 1
  9. 2026The Alignment Problem in Constrained Code Generationcited by 1
  10. 2026Large Databases Need Small, Open-Weight Language Modelscited by 1
  11. 2025Play by the Type Rules: Inferring Constraints for LLM Functions in Declarative Programscited by 0
  12. 2025Position: Vibe Coding Needs Vibe Reasoning: Improving Vibe Coding with Formal Verificationcited by 0
  13. 2025Orthographic Constraint Satisfaction and Human Difficulty Alignment in Large Language Modelscited by 0
  14. 2026LLMs + Security = Troublecited by 0
  15. 2026Continuous Diffusion Models Can Obey Formal Syntaxcited by 0
  16. 2026Precise Robot Command Understanding Using Grammar-Constrained Large Language Modelscited by 0
  17. 2026Syntax Is Easy, Semantics Is Hard: Evaluating LLMs for LTL Translationcited by 0
  18. 2026NCO: A Versatile Plug-in for Handling Negative Constraints in Decodingcited by 0
  19. 2026Learning the Error Patterns of Language Modelscited by 0
  20. 2026Accelerating Constrained Decoding with Token Space Compressioncited by 0
  21. 2026Automated IEP Generation from Traditional Chinese Parent-Teacher Interviews via Corpus-Grounded Feature Diffusioncited by 0
  22. 2026Imprompt: A Language Framework for Prompt Programmingcited by 0
  23. 2026Specification-Guided Synthesis of Deadlock-Free Communication Protocol Refinements with Large Language Modelscited by 0
  24. 2026The Parser Already Knows: Lightweight Bias Correction in Constrained Decodingcited by 0
  25. 2026Neurosymbolic Embodied Agentscited by 0
  26. 2026Information-Guided Frontier Decoding: Contextual Utility-Driven Commitment in dMLLMscited by 0
  27. 2026Stay Within Your Bounds: Distance-Guided Decoding for Guaranteed Context-Free Grammar Compliancecited by 0
  28. 2026Generating Workflow DAGs from Natural Language with Non-Reasoning LLMscited by 0
  29. 2026Semantic Prefix Oracles for LLM Decoding: Contracts and Differential Validationcited by 0
  30. 2026DOGS: Design-Space Sampling for Prompt-Driven Logo Generationcited by 0