Diffusion is a code repair operator and generator

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Singh, Mukul, Verbruggen, Gust, Le, Vu, Gulwani, Sumit
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915447400562688
author Singh, Mukul
Verbruggen, Gust
Le, Vu
Gulwani, Sumit
author_facet Singh, Mukul
Verbruggen, Gust
Le, Vu
Gulwani, Sumit
contents Code diffusion models generate code by iteratively removing noise from the latent representation of a code snippet. During later steps of the diffusion process, when the code snippet has almost converged, differences between discrete representations of these snippets look like last-mile repairs applied to broken or incomplete code. We evaluate the extent to which this resemblance can be exploited to leverage pre-trained code diffusion models for the problem of last-mile repair by considering two applications with significant potential. First, we can leverage the diffusion model for last-mile repair by adding noise to a broken code snippet and resuming the diffusion process. Second, we can leverage the diffusion model to generate arbitrary amount of training data for last-mile repair tasks (that are computationally more efficient) by sampling an intermediate program (input) and the final program (output) from the diffusion process. We perform experiments on 3 domains (Python, Excel and PowerShell) to evaluate applications, as well as analyze properties.
format Preprint
id arxiv_https___arxiv_org_abs_2508_11110
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Diffusion is a code repair operator and generator
Singh, Mukul
Verbruggen, Gust
Le, Vu
Gulwani, Sumit
Software Engineering
Artificial Intelligence
Computation and Language
Code diffusion models generate code by iteratively removing noise from the latent representation of a code snippet. During later steps of the diffusion process, when the code snippet has almost converged, differences between discrete representations of these snippets look like last-mile repairs applied to broken or incomplete code. We evaluate the extent to which this resemblance can be exploited to leverage pre-trained code diffusion models for the problem of last-mile repair by considering two applications with significant potential. First, we can leverage the diffusion model for last-mile repair by adding noise to a broken code snippet and resuming the diffusion process. Second, we can leverage the diffusion model to generate arbitrary amount of training data for last-mile repair tasks (that are computationally more efficient) by sampling an intermediate program (input) and the final program (output) from the diffusion process. We perform experiments on 3 domains (Python, Excel and PowerShell) to evaluate applications, as well as analyze properties.
title Diffusion is a code repair operator and generator
topic Software Engineering
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2508.11110