Hacker News new | ask | show | jobs
by gastonmorixe 749 days ago
could diffusion work at binary level? I mean, could we train a diffusion model to generate a final binary of a program given a prompt? probably AST may be better but the binary I feel is extremely easy to at least test fast if it works or not. Though there may be a lot of drawbacks, if this is possible I can't wait until we ask "give me an app that does that" and the diffusion model starts generating all te bytes the app to do the job. Just wondering
2 comments

Editing with feedback from program output, like in this work, could be more closely applicable if you first disassemble the binary and have it edit things in the assembly language AST, then reassemble. This would result in a higher likelihood of creating a valid program.
That would be mind blowing. Why go through all the lost intermediary steps, especially through Python and JS, when you can generate machine code directly
If your model is error-prone, having control structures, types and other compile-time checks is very valuable. It's harder to constrain arbitrary machine code to make something sensible.
Intuitively it makes sense, but I am not fully convinced about this. You could give it only a few register and discard invalid operations for certain registers or plain known invalid operations.
But that doesn't stop it from generating code that segfaults.
That is the same problem as generating python that blows up, no? (assuming it is tested in a sandbox)
Interpretability, reasoning about the generated code, portability, etc. Probably also demands a larger model with a higher cost of training (and likely more training data) to target a more unstructured "language" like machine code.