Diffusion On Syntax Trees For Program Synthesis

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Kapur, Shreyas, Jenner, Erik, Russell, Stuart
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917679771680768
author Kapur, Shreyas
Jenner, Erik
Russell, Stuart
author_facet Kapur, Shreyas
Jenner, Erik
Russell, Stuart
contents Large language models generate code one token at a time. Their autoregressive generation process lacks the feedback of observing the program's output. Training LLMs to suggest edits directly can be challenging due to the scarcity of rich edit data. To address these problems, we propose neural diffusion models that operate on syntax trees of any context-free grammar. Similar to image diffusion models, our method also inverts ``noise'' applied to syntax trees. Rather than generating code sequentially, we iteratively edit it while preserving syntactic validity, which makes it easy to combine this neural model with search. We apply our approach to inverse graphics tasks, where our model learns to convert images into programs that produce those images. Combined with search, our model is able to write graphics programs, see the execution result, and debug them to meet the required specifications. We additionally show how our system can write graphics programs for hand-drawn sketches.
format Preprint
id arxiv_https___arxiv_org_abs_2405_20519
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Diffusion On Syntax Trees For Program Synthesis
Kapur, Shreyas
Jenner, Erik
Russell, Stuart
Artificial Intelligence
Large language models generate code one token at a time. Their autoregressive generation process lacks the feedback of observing the program's output. Training LLMs to suggest edits directly can be challenging due to the scarcity of rich edit data. To address these problems, we propose neural diffusion models that operate on syntax trees of any context-free grammar. Similar to image diffusion models, our method also inverts ``noise'' applied to syntax trees. Rather than generating code sequentially, we iteratively edit it while preserving syntactic validity, which makes it easy to combine this neural model with search. We apply our approach to inverse graphics tasks, where our model learns to convert images into programs that produce those images. Combined with search, our model is able to write graphics programs, see the execution result, and debug them to meet the required specifications. We additionally show how our system can write graphics programs for hand-drawn sketches.
title Diffusion On Syntax Trees For Program Synthesis
topic Artificial Intelligence
url https://arxiv.org/abs/2405.20519