Outline, Then Details: Syntactically Guided Coarse-To-Fine Code Generation
Wenqing Zheng, S P Sharan, Ajay Kumar Jaiswal, Kevin Wang, Yihan Xi,, Dejia Xu, Zhangyang Wang

TL;DR
This paper introduces ChainCoder, a multi-pass, coarse-to-fine code generation approach that mimics human outlining, significantly improving the quality of generated Python code by leveraging hierarchical syntactic representations and progressive refinement.
Contribution
It proposes a novel multi-pass, hierarchical code generation method inspired by human outlining, enhancing large language models' ability to produce structured and accurate code.
Findings
Outperforms state-of-the-art code generation models
Progressive, multi-pass generation improves reasoning and code quality
Hierarchical syntactic representation aids in structured code synthesis
Abstract
For a complicated algorithm, its implementation by a human programmer usually starts with outlining a rough control flow followed by iterative enrichments, eventually yielding carefully generated syntactic structures and variables in a hierarchy. However, state-of-the-art large language models generate codes in a single pass, without intermediate warm-ups to reflect the structured thought process of "outline-then-detail". Inspired by the recent success of chain-of-thought prompting, we propose ChainCoder, a program synthesis language model that generates Python code progressively, i.e. from coarse to fine in multiple passes. We first decompose source code into layout frame components and accessory components via abstract syntax tree parsing to construct a hierarchical representation. We then reform our prediction target into a multi-pass objective, each pass generates a subsequence,…
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
Taxonomy
TopicsSoftware Engineering Research · Parallel Computing and Optimization Techniques · Topic Modeling
