Self-Decomposing Diffusion for Code Generation
Abstract
Diffusion language models (DLMs) are emerging as a promising paradigm for code generation, offering the potential for fast, parallel decoding. However, generating complex programs remains challenging, as their interdependent components must maintain consistent interfaces, data flows, and shared assumptions. Aggressive parallel decoding can compromise these dependencies and undermine program correctness, while conservative decoding sacrifices efficiency. To address this trade-off, we propose planning program decomposition before implementation to coordinate interdependent units during parallel generation. We introduce Self-Decomposing Diffusion for Code (SDDC), a novel framework that decomposes complex programs and implements their units in parallel, entirely through diffusion. SDDC first generates a contract specifying the program's decomposition and inter-unit dependencies, then uses it to guide coordinated parallel implementation. Across five benchmarks and two 7B diffusion backbones, SDDC substantially improves the accuracy--latency trade-off, raising pass@1 by up to 31.1 percentage points while decoding 7.5--13.7 faster than the base models, and outperforming a fine-tuning baseline by up to 23.5 points with lower latency.
Create a lesson
Related papers
Ontology-Compiled 2D Clinical State Fields with Bidirectional Diffusion Encoders for Zero-Training Cross-Ontology Medical Coding
Shared title terminologycs.CLZeqiang Wang
A Diagnostic Study of Faithfulness in Diffusion Language Models for Table-to-Text Generation
Shared title terminologycs.CLZaynab Merimi, Noussayba El Marrakchi, Arthur Satouf
Right On Q: Recovering Reasoning under Quantization via Self-Generated Trajectories
Shared title terminologycs.CLBoyuan Zheng, Jing Xiong, Chenwei Wu et al.
Tracing Recurrent and Emergent Hallucination Patterns in Decomposed Text-to-SQL Generation
Shared title terminologycs.CLHayden Moore, Abhinav Verma, Anshuman Dutt
LUCID: Statistically Grounded Self-Correction for LLM Reasoning Evaluation
Shared title terminologycs.CLSatiyabooshan Murugaboopathy, Adel Daoud, Connor T. Jerzak
ToolSmith: An Automatic Tool-Generation Framework for Multimodal Search Agents
Shared title terminologycs.CLRui Sun, Junhua Huang, Luca Zancato et al.