DConstrain: Compiling Context-Parameterized Transitions for Diffusion Language Model Constrained Decoding
On the map: Diffusion models → Discrete and text diffusion
Abstract (arXiv)
Diffusion language models (DLMs) decode multiple tokens in parallel, so individually valid tokens can be incompatible together under a schema. Exact joint inference over a grammar graph enforces compatibility, but it requires token-labeled successors across many hypothetical parser configurations. Encoding stacks and field histories in compiled states can cause exponential growth, which forces prior exact decoders to fix property orders and exclude valid outputs. We present DConstrain, which compiles schemas into context-parameterized transition programs. Cold compilation specializes token consumption to local grammar states while retaining context-dependent stack operations, environment guards, and caller-dependent deferred parsing symbolically. Tracking field histories as runtime values supports arbitrary property order without enumerating field subsets offline. At runtime, warm compilation binds reached configurations to these programs to construct exact successors, overlapping with the model forward pass because graph construction requires no model scores. Furthermore, token-effect grouping merges tokens with identical compiled effects before runtime contexts are bound, so groups are reused across stacks and environments even when concrete successors differ. Objective-specific score aggregation and token restoration provably preserve both the Viterbi optimum and the token-labeled path distribution of ungrouped inference. Across three benchmarks and two DLM families, DConstrain compiles 100% of BFCL schemas under arbitrary property orders, whereas an optimized finite-state baseline compiles only 71.30-85.81%. Under arbitrary property order, it reduces BFCL end-to-end decoding latency by 6.65-46.26 times with 100% schema validity and raises DiffusionGemma's BFCL accuracy from 37.27% under fixed order to 81.56%.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Discrete and text diffusion, one of 14 directions in Diffusion models. Builds on 27 of its 38 references that are in the map. Submitted 22 Oct 2026.
Builds on
27 of 38 references.
Closest ancestors · 7
Same direction, newest first
- 2026Twist, Don't Tilt: Trajectory-Exact Constrained Decoding for Masked Diffusion Models28 Sep
- 2026Constrained Decoding for Diffusion Language Models via Efficient Inference over Finite Automata8 Jul
- 2025Dream 7B: Diffusion Large Language Models21 Aug
- 2025Block Diffusion: Interpolating Between Autoregressive and Diffusion Language Models12 Mar
- 2025Large Language Diffusion Models14 Feb
- 2024Simple and Effective Masked Diffusion Language Models11 Jun
- 2023Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution25 Oct
Other references · 20
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 6,685
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,469
- 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 2,083
- 2021Structured Denoising Diffusion Models in Discrete State-Spacescited by 1,843
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,372
- 2022Diffusion-LM Improves Controllable Text Generationcited by 1,073
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 432
- 2023Efficient Guided Generation for Large Language Modelscited by 244
- 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 229
- 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 164
- 2024Guiding LLMs The Right Way: Fast, Non-Invasive Constrained Generationcited by 112
- 2024XGrammar: Flexible and Efficient Structured Generation Engine for Large Language Modelscited by 98
8 more
- 2025JSONSchemaBench: A Rigorous Benchmark of Structured Outputs for Language Modelscited by 86
- 2024Grammar-Aligned Decodingcited by 63
- 2025ComplexFuncBench: Exploring Multi-Step and Constrained Function Calling under Long-Context Scenariocited by 63
- 2024Automata-based constraints for language model decodingcited by 57
- 2025Constrained Decoding of Diffusion LLMs with Context-Free Grammarscited by 19
- 2025DINGO: Constrained Inference for Diffusion LLMscited by 18
- 2026XGrammar-2: Dynamic and Efficient Structured Generation Engine for Agentic LLMscited by 11
- 2026Lookahead-then-Verify: Reliable Constrained Decoding for Diffusion LLMs under Context-Free Grammarscited by 9
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Constraints Are Graphs, Not Chains: Exact Decoding for Diffusion Language Models
- 2026Window-Diffusion: Accelerating Diffusion Language Model Inference with Windowed Token Pruning and Caching
- 2026AsyncLane: Decoupling Refinement from Advancement in Diffusion Language Model Decoding
- 2026EPIC: Efficient and Parallel Inference under CFG Constraints for Diffusion Language Models
- 2025Beyond Confidence: Adaptive and Coherent Decoding for Diffusion Language Models
- 2026Roll Out and Roll Back: Diffusion LLMs are Their Own Efficiency Teachers
- 2026Deferred Commitment Decoding for Diffusion Language Models
- 2026Learning When to Commit: Schedule Distillation for Fast Diffusion Language Models