Continuous Diffusion Models Can Obey Formal Syntax

matt_d1 pts0 comments

[2602.12468] Continuous Diffusion Models Can Obey Formal Syntax

-->

Computer Science > Machine Learning

arXiv:2602.12468 (cs)

[Submitted on 12 Feb 2026 (v1), last revised 27 May 2026 (this version, v2)]

Title:Continuous Diffusion Models Can Obey Formal Syntax

Authors:Jinwoo Kim, Taylor Berg-Kirkpatrick, Loris D'Antoni<br>View a PDF of the paper titled Continuous Diffusion Models Can Obey Formal Syntax, by Jinwoo Kim and 2 other authors

View PDF

Abstract:Diffusion language models offer a promising alternative to autoregressive models due to their global, non-causal generation process, but their continuous latent dynamics make discrete constraints -- e.g., the output should be a JSON file that matches a given schema -- difficult to impose. We introduce a training-free guidance method for steering continuous diffusion language models to satisfy formal syntactic constraints expressed using regular expressions. Our approach constructs an analytic score estimating the probability that a latent state decodes to a valid string accepted by a given regular expression, and uses its gradient to guide sampling, without training auxiliary classifiers. The denoising process targets the base model conditioned on syntactic validity. We implement our method in Diffinity on top of the PLAID diffusion model and evaluate it on 180 regular-expression constraints over JSON and natural-language benchmarks. Diffinity achieves 68-96\% constraint satisfaction while incurring only a small perplexity cost relative to unconstrained sampling, outperforming autoregressive constrained decoding in both constraint satisfaction and output quality. Diffinity is open-sourced at this http URL.

Subjects:

Machine Learning (cs.LG); Formal Languages and Automata Theory (cs.FL)

Cite as:<br>arXiv:2602.12468 [cs.LG]

(or<br>arXiv:2602.12468v2 [cs.LG] for this version)

https://doi.org/10.48550/arXiv.2602.12468

Focus to learn more

arXiv-issued DOI via DataCite

Submission history<br>From: Jinwoo Kim [view email]<br>[v1]<br>Thu, 12 Feb 2026 22:55:05 UTC (71 KB)

[v2]<br>Wed, 27 May 2026 11:13:24 UTC (75 KB)

Full-text links:<br>Access Paper:

View a PDF of the paper titled Continuous Diffusion Models Can Obey Formal Syntax, by Jinwoo Kim and 2 other authors<br>View PDF<br>TeX Source

view license

Current browse context:

cs.LG

next >

new<br>recent<br>| 2026-02

Change to browse by:

cs<br>cs.FL

References & Citations

NASA ADS<br>Google Scholar

Semantic Scholar

export BibTeX citation<br>Loading...

BibTeX formatted citation

&times;

loading...

Data provided by:

Bookmark

Bibliographic Tools

Bibliographic and Citation Tools

Bibliographic Explorer Toggle

Bibliographic Explorer (What is the Explorer?)

Connected Papers Toggle

Connected Papers (What is Connected Papers?)

Litmaps Toggle

Litmaps (What is Litmaps?)

scite.ai Toggle

scite Smart Citations (What are Smart Citations?)

Code, Data, Media

Code, Data and Media Associated with this Article

alphaXiv Toggle

alphaXiv (What is alphaXiv?)

Links to Code Toggle

CatalyzeX Code Finder for Papers (What is CatalyzeX?)

DagsHub Toggle

DagsHub (What is DagsHub?)

GotitPub Toggle

Gotit.pub (What is GotitPub?)

Huggingface Toggle

Hugging Face (What is Huggingface?)

ScienceCast Toggle

ScienceCast (What is ScienceCast?)

Demos

Demos

Replicate Toggle

Replicate (What is Replicate?)

Spaces Toggle

Hugging Face Spaces (What is Spaces?)

Spaces Toggle

TXYZ.AI (What is TXYZ.AI?)

Related Papers

Recommenders and Search Tools

Link to Influence Flower

Influence Flower (What are Influence Flowers?)

Core recommender toggle

CORE Recommender (What is CORE?)

IArxiv recommender toggle

IArxiv Recommender<br>(What is IArxiv?)

Author

Venue

Institution

Topic

About arXivLabs

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs .

Which authors of this paper are endorsers? |<br>Disable MathJax (What is MathJax?)

toggle diffusion models arxiv continuous formal

Related Articles