Live data from Hacker News

Diffusion on syntax trees for program synthesis

tree-diffusion.github.io

11–20 of 95 posts

Re: Diffusion on syntax trees for program synthesis

#11
post #8

Earlier quoted context omitted.

> We apply our approach to inverse graphics tasks, where our model learns to convert images into programs that produce those images. I would argue that at least on a philosophical level, this is, definitionally, the process of converting raster graphics to vector graphics, as long as you by the premise that the difference between the two is simply that vector gfx is a programmatic/imperative representation of image g…

Or, raster and vector images are philosophically the same thing . The only difference is that vector has more operations than raster. Raster just has "draw unit square at integer coordinates".

Yep, I agree with this - tried to hint at that when I said “vector images require a much more complex interpreter”.

Re: Diffusion on syntax trees for program synthesis

#12
I would love to see them try this with the Processing/P5Js libraries. Thats what the ASTs reminded me of. It could potentially be used to help students trying to figure out how to fix their programs. I used AST-based hints for my ProcessingJS courses on Khan Academy, but I handwrote the AST patterns for those hints.

Re: Diffusion on syntax trees for program synthesis

#13

It's funny, this kind of subtree mutation was looked at pretty deeply by Koza and Adamı in the 90s under the rubric of Genetic Algorithms, but with a slightly different optimization function One ref in the paper to 2000 for GAs for fast generation of program trees, but that's missing the main show Hope they're reading this and dig into those guys work

Are these the references?

- https://web.archive.org/web/20021224053225/http://smi-web.st...

- https://www.genetic-programming.com/jkpdf/tr1314.pdf

Re: Diffusion on syntax trees for program synthesis

#15
I don't understand the "magic" here.

In a traditional approach, you would generate random images, calculate some distance metric, then use some optimization method like simulated annealing to minimize the distance.

I get that the difference between the image representations is being optimzied here, but how is it possible that changing tokens in a program is differentiable?

Re: Diffusion on syntax trees for program synthesis

#17

I don't understand the "magic" here. In a traditional approach, you would generate random images, calculate some distance metric, then use some optimization method like simulated annealing to minimize the distance. I get that the difference between the image representations is being optimzied here, but how is it possible that changing tokens in a program is differentiable?

Changing tokens in a program is not differentiable. For me, the key idea is that you can train a neural model to suggest edits to programs by randomly mutating nodes. And when you run this neural model, you get to make edits that are syntactically correct (i.e., a number will only replace a number etc.) according to a context-free grammar.

Re: Diffusion on syntax trees for program synthesis

#18
post #14

I'm failing to see how this is novel. It looks like they're doing diffusion on a representation system for 2D graphics, which is very different than an actual program (they do address this limitation to be fair)

Yeah, this is true! These are more like expressions rather than programs. We were mostly following the language used by previous work, https://arxiv.org/abs/1906.04604
Post reply on HN