paper-with-me

Papers

Constrained Code Generation with Discrete Diffusion

2026-05-16 · Lize Shao, Michael Cardei, Zichen Xie, Ferdinando Fioretto, Wenxi Wang arxiv

Discrete diffusion models are a powerful, emerging paradigm for code generation. They construct programs through iterative refinement of partially corrupted token sequences and enable parallel token refinement. Importantly, this paradigm exposes a global program state at each denoising step, which provides a natural intervention point for enforcing program-level functionality and security constraints, guiding the generation before the final code is committed. Building on this observation, the paper introduces Constrained Diffusion for Code (CDC), a training-free neurosymbolic inference framework that integrates constraint satisfaction directly into the reverse denoising process. CDC augments the base discrete diffusion sampler with constraint-aware denoising operators that combine mathematical optimization with program analysis to identify constraint-relevant regions of the intermediate program state and locally adjust the denoising trajectory, steering generation toward feasible programs while remaining close to the base model. Across code generation benchmarks, CDC consistently improves constraint satisfaction in functional correctness, security, and even syntax, outperforming discrete diffusion and autoregressive baselines with less corrective computation and more localized edits.

📄 PDF Abstract BibTeX arXiv:2605.16829

Code (0)

등록된 구현이 없습니다.

Tasks

Code Generation

Similar Papers 제목 키워드 기반

Interleaved Gibbs Diffusion for Constrained Generation

2025-02-19 · Gautham Govind Anil, Sachin Yadav, Dheeraj Nagaraj, Karthikeyan Shanmugam 외

We introduce Interleaved Gibbs Diffusion (IGD), a novel generative modeling framework for mixed continuous-discrete data, focusing on constrained generation problems. Prior works on discrete and continuous-discrete diffu…

Denoising

Constrained Language Generation with Discrete Diffusion Models

2025-03-12 · Michael Cardei, Jacob K Christopher, Thomas Hartvigsen, Brian R. Bartoldson 외

Constraints are critical in text generation as LLM outputs are often unreliable when it comes to ensuring generated outputs adhere to user defined instruction or general safety guidelines. To address this gap, we present…

Text Generation

Mirror Diffusion Models

2023-08-11 · Jaesung Tae

Diffusion models have successfully been applied to generative tasks in various continuous domains. However, applying diffusion to discrete categorical data remains a non-trivial task. Moreover, generation in continuous d…

Text Generation

Target-Guided Bayesian Flow Networks for Quantitatively Constrained CAD Generation

2025-10-29 · Wenhao Zheng, Chenwei Sun, Wenbo Zhang, Jiancheng Lv 외 arxiv

Deep generative models, such as diffusion models, have shown promising progress in image generation and audio generation via simplified continuity assumptions. However, the development of generative modeling techniques f…

Audio GenerationImage Generation

TrajDLM: Topology-Aware Block Diffusion Language Model for Trajectory Generation

2026-05-11 · Wilson Wongso, Lihuan Li, Arian Prabowo, Xiachong Lin 외 arxiv

Generating high-fidelity synthetic GPS trajectories is increasingly important for applications in transportation, urban planning, and what-if scenario simulation, especially as privacy concerns limit access to real-world…