Generative Code Modeling with Graphs
Marc Brockschmidt, Miltiadis Allamanis, Alexander L. Gaunt, Oleksandr, Polozov

TL;DR
This paper introduces a novel graph-based generative model for source code that integrates grammar-driven expansion with neural message passing, effectively capturing syntax and semantics to produce meaningful programs.
Contribution
The paper presents a new graph-based generative approach that combines grammar rules with neural message passing for source code generation, improving semantic correctness.
Findings
Outperforms strong baseline models in code generation tasks
Generates semantically meaningful expressions
Effectively captures syntax and semantics in code generation
Abstract
Generative models for source code are an interesting structured prediction problem, requiring to reason about both hard syntactic and semantic constraints as well as about natural, likely programs. We present a novel model for this problem that uses a graph to represent the intermediate state of the generated output. The generative procedure interleaves grammar-driven expansion steps with graph augmentation and neural message passing steps. An experimental evaluation shows that our new model can generate semantically meaningful expressions, outperforming a range of strong baselines.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Natural Language Processing Techniques
