New Method Enables Constrained Decoding for Diffusion Language Models.

Meihua Dang, Stefano Ermon· July 9, 2026 View original

Summary

A novel algorithm allows diffusion language models to generate outputs strictly adhering to specified structures like JSON schemas. This method ensures constraint satisfaction by viewing finite automata as graphical models, significantly improving accuracy in tasks like function calling and math reasoning.

Constrained decoding is a critical requirement for Large Language Models (LLMs), ensuring that their generated outputs conform to specific formats, such as JSON schema for function calls. While existing systems are designed for autoregressive models that generate text left-to-right, diffusion language models present a challenge because they sample multiple positions simultaneously. Researchers have developed an exact and tractable algorithm to enable constrained decoding for diffusion language models. This approach samples from a constrained mean-field posterior under any constraint expressible as a finite automaton. By treating finite automata as graphical models, the method achieves tractable representations of the constrained distribution, guaranteeing constraint satisfaction. The algorithm supports both greedy and sampling-based decoding, is compatible with parallel and block-wise decoding, and uses depth-reduction techniques to reduce sampling depth. Empirical evaluations on models like Dream-7B and LLaDA-8B show substantial accuracy gains in tasks such as function calling, planning, text-to-SQL, and math reasoning, with minimal inference overhead. For instance, Dream-7B's greedy decoding accuracy on BFCL-Live improved from 63.9% to 71.5%.

Why it matters

This breakthrough allows diffusion models to be used reliably in applications requiring structured outputs, expanding their utility beyond creative generation to more precise, task-oriented functions crucial for enterprise integration.

How to implement this in your domain

  1. 1Evaluate diffusion language models for tasks requiring structured outputs, leveraging this new constrained decoding method.
  2. 2Integrate diffusion models with this technique into systems that need to generate code, API calls, or structured data.
  3. 3Experiment with the algorithm to improve accuracy in existing LLM applications like function calling or text-to-SQL.
  4. 4Consider adopting diffusion models for tasks where autoregressive models struggle with constraint satisfaction.

Who benefits

Software DevelopmentAI/ML PlatformsData ScienceFinanceLegal Tech

Key takeaways

  • A new algorithm enables constrained decoding for diffusion language models.
  • It guarantees outputs adhere to structures like JSON schemas using finite automata.
  • The method significantly improves accuracy in tasks like function calling and text-to-SQL.
  • It expands the practical application of diffusion models for enterprise use cases.

Original post by Meihua Dang, Stefano Ermon

"arXiv:2607.07026v1 Announce Type: new Abstract: Constrained decoding is essential for serving LLMs, ensuring that generated outputs follow specific structures such as JSON schema-formatted function calls. Existing systems are designed for autoregressive models and assume left-to-…"

View on X

Originally posted by Meihua Dang, Stefano Ermon on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses

More in AI Engineering & DevTools

AI ResearchAI Engineering & DevTools

Transformers Learn Non-Invertible Modular Multiplication via Stratified Fourier Mechanisms.

This research investigates how small transformers learn modular integer multiplication over composite moduli, a non-invertible operation. It proposes the "monoid extension" theory, suggesting models partition input space into hierarchical algebraic regions where Fourier mechanisms apply, explaining how embeddings, attention, and local features contribute to the computation.

Zitong Andrew Chen, Junaid Hasan, Akhil Srinivasan, Hemkesh Bandi, Jarod AlperJul 9, 2026
AI Engineering & DevToolsAI Research

New Interpretable Model Handles Feature Interactions in Tabular Data.

This paper introduces Interaction Aware Interpretable Machine Learning (IAIML), a framework for tabular data that addresses the limitation of traditional interpretable models in capturing feature interactions. IAIML uses adaptive discretization, pairwise interaction scoring, and a partitioned explanation budget to achieve high accuracy while maintaining interpretability.

Srikumar KrishnamoorthyJul 9, 2026
AI ResearchAI Engineering & DevTools

Principles of Deep Feedforward ReLU Networks Unveiled.

This paper systematically studies the mechanisms of deep feedforward ReLU networks, generalizing principles from two-layer networks to deeper architectures. It explains how hidden-layer units form piecewise linear manifolds to divide input space and how paths and their relationships are central to understanding the back-propagation training solution.

Changcun HuangJul 9, 2026