Lune

ISSTA2026Top-tier venue

Lookahead-Then-Verify: Reliable Constrained Decoding for Diffusion LLMs under Context-Free Grammars

Yitong Zhang, Yongmin Li, Yuetong Liu, Jia Li, Xiaoran Jia, Zherui Li, Ge Li

Abstract

Diffusion Large Language Models (dLLMs) have demonstrated promising capabilities and are increasingly used to produce formal languages defined by context-free grammars, such as source code and chemical expressions. However, as probabilistic models, they still struggle to generate syntactically valid outputs reliably. A natural and promising direction to address this issue is to adapt constrained decoding techniques to enforce grammatical correctness during generation. However, applying these techniques faces two primary obstacles. On the one hand, the non-autoregressive nature of dLLMs renders most existing constrained decoding approaches inapplicable. On the other hand, current approaches specifically designed for dLLMs may allow intermediate outputs that are impossible to complete into valid sentences, which significantly limits their reliability in practice.

To address these challenges, we present LAVE, a constrained decoding approach specifically designed for dLLMs. Our approach leverages a key property of dLLMs, namely their ability to predict token distributions for all positions in parallel during each forward pass. Whenever a new token is proposed by the model, LAVE performs lookahead using these distributions to efficiently and reliably verify the validity of the proposed token. This design enforces reliable constraints by preserving the potential for intermediate outputs to be extended into valid sentences. Extensive experiments across four widely used dLLMs and five representative benchmarks demonstrate that LAVE consistently outperforms existing baselines and achieves improvements in syntactic correctness, while incurring negligible runtime overhead.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • LLaDA 1.5: Variance-Reduced Preference Optimization for Large Language Diffusion Models cites Large Language Diffusion Models
  • LLaDA 1.5: Variance-Reduced Preference Optimization for Large Language Diffusion Models cites The Curious Case of Neural Text Degeneration
  • LLaDA 1.5: Variance-Reduced Preference Optimization for Large Language Diffusion Models cites Simple and Effective Masked Diffusion Language Models
  • Large Language Diffusion Models cites The Curious Case of Neural Text Degeneration
  • Large Language Diffusion Models cites Simple and Effective Masked Diffusion Language Models
  • MMaDA: Multimodal Large Diffusion Language Models cites Large Language Diffusion Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. PackMonitor: Towards Zero Package Hallucinations via Decoding-Time MonitoringXiting Liu, Yuetong Liu, Yitong Zhang, Jia Li et al.ISSTA 2026

Builds on30

  1. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
  2. Large Language Diffusion ModelsShen Nie, Fengqi Zhu, Zebin You, Xiaolu Zhang et al.NeurIPS 2025 · 949 citations
  3. Simple and Effective Masked Diffusion Language ModelsSubham S. Sahoo, Marianne Arriola, Yair Schiff, Aaron Gokaslan et al.NeurIPS 2024 · 929 citations
  4. MMaDA: Multimodal Large Diffusion Language ModelsLing Yang, Ye Tian, Bowen Li, Xinchen Zhang et al.NeurIPS 2025 · 255 citations
  5. LLaDA 1.5: Variance-Reduced Preference Optimization for Large Language Diffusion ModelsFengqi Zhu, Rongzhen Wang, Shen Nie, Xiaolu Zhang et al.ACL 2026 · 229 citations

Related papers

  1. Constrained Decoding of Diffusion LLMs with Context-Free GrammarsNiels Mündler, Jasper Dekoninck, Martin VechevICLR 2026 · 18 citations
  2. DINGO: Constrained Inference for Diffusion LLMsTarun Suresh, Debangshu Banerjee, Shubham Ugare, Sasa Misailovic et al.NeurIPS 2025 · 17 citations
  3. Guiding LLMs The Right Way: Fast, Non-Invasive Constrained GenerationLuca Beurer-Kellner, Marc Fischer, Martin T. VechevICML 2024 · 93 citations
  4. Grammar-Aligned DecodingKanghee Park, Jiayu Wang, Taylor Berg-Kirkpatrick, Nadia Polikarpova et al.NeurIPS 2024 · 73 citations
  5. Earley-Driven Dynamic Pruning for Efficient Structured DecodingXintong Sun, Chi Wei, Minghao Tian, Shiwen NiICML 2025
Dusk over the sea between two cliffs drawn in fine vertical lines