Outline, Then Details: Syntactically Guided Coarse-To-Fine Code Generation
Not on the map. Why?
Abstract (arXiv)
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, which is concatenated in the hierarchy. Finally, a tailored transformer architecture is leveraged to jointly encode the natural language descriptions and syntactically aligned I/O data samples. Extensive evaluations show that ChainCoder outperforms state-of-the-arts, demonstrating that our progressive generation eases the reasoning procedure and guides the language model to generate higher-quality solutions. Our codes are available at: https://github.com/VITA-Group/ChainCoder.
Key facts. Cited by 27 papers in the map (data through 7 Oct 2026). Builds on 40 of its 63 references that are in the map. First posted on arXiv 28 Apr 2023.
Builds on
40 of 63 references.
References · 40
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,359
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2022Automatic Chain of Thought Prompting in Large Language Modelscited by 684
28 more
- 2022Language Models are Multilingual Chain-of-Thought Reasonerscited by 518
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2020DreamCoder: Growing generalizable, interpretable knowledge with wake-sleep Bayesian program learningcited by 159
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
- 2016DeepCoder: Learning to Write Programscited by 145
- 2017RobustFill: Neural Program Learning under Noisy I/Ocited by 124
- 2018Coarse-to-Fine Decoding for Neural Semantic Parsingcited by 110
- 2018Leveraging Grammar and Reinforcement Learning for Neural Program Synthesiscited by 83
- 2020PyMT5: multi-mode translation of natural language and Python code with transformerscited by 80
- 2018Synthesizing Programs for Images using Reinforced Adversarial Learningcited by 72
- 2019Learning to Infer and Execute 3D Shape Programscited by 68
- 2018Generative Code Modeling with Graphscited by 59
- 2023Sparse MoE as the New Dropout: Scaling Dense and Self-Slimmable Transformerscited by 59
- 2019Learning to Infer Program Sketchescited by 44
- 2021In-IDE Code Generation from Natural Language: Promise and Challengescited by 41
- 2022Single Frame Atmospheric Turbulence Mitigation: A Benchmark Study and A New Physics-Inspired Transformer Modelcited by 37
- 2021Latent Execution for Neural Program Synthesiscited by 35
- 2020Latent Programmer: Discrete Latent Codes for Program Synthesiscited by 18
- 2020Learning to Represent Programs with Property Signaturescited by 16
- 2022Symbolic Learning to Optimize: Towards Interpretability and Scalabilitycited by 16
- 2018Studying the Difference Between Natural and Programming Language Corporacited by 13
- 2023CancerGPT: Few-shot Drug Pair Synergy Prediction using Large Pre-trained Language Modelscited by 11
- 2022Symbolic Visual Reinforcement Learning: A Scalable Framework with Object-Level Abstraction and Differentiable Expression Searchcited by 9
- 2023Hierarchical Neural Program Synthesiscited by 7
- 2020A Simple Approach for Handling Out-of-Vocabulary Identifiers in Deep Learning for Source Codecited by 6
Built on by
Citing papers per year: 2023: 6; 2024: 11; 2025: 6; 2026: 4.
27 papers.
Sort:
By area:
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2023ADaPT: As-Needed Decomposition and Planning with Language Modelscited by 172
- 2023Generalized Planning in PDDL Domains with Pretrained Large Language Modelscited by 139
- 2024AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive Reasoningcited by 69
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2025TreeReview: A Dynamic Tree of Questions Framework for Deep and Efficient LLM-based Scientific Peer Reviewcited by 31
- 2024CodeS: Natural Language to Code Repository via Multi-Layer Sketchcited by 28
- 2024Enhancing Foundation Models for Time Series Forecasting via Wavelet-based Tokenizationcited by 26
- 2023Instant Soup: Cheap Pruning Ensembles in A Single Pass Can Draw Lottery Tickets from Large Modelscited by 20
- 2024TimeRefine: Temporal Grounding with Time Refining Video LLMcited by 15
- 2025ChartMaster: Advancing Chart-to-Code Generation with Real-World Charts and Chart Similarity Reinforcement Learningcited by 15
15 more
- 2024LLMs for Coding and Robotics Educationcited by 9
- 2025FairCoder: Probing LLM Bias in High-Stakes Decision Making via Coding Taskscited by 9
- 2024ReTok: Replacing Tokenizer to Enhance Representation Efficiency in Large Language Modelcited by 5
- 2024Explainable Behavior Cloning: Teaching Large Language Model Agents through Learning by Demonstrationcited by 4
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Actioncited by 4
- 2023Self-Infilling Code Generationcited by 3
- 2024All Against Some: Efficient Integration of Large Language Models for Message Passing in Graph Neural Networkscited by 3
- 2023Graph Ladling: Shockingly Simple Parallel GNN Training without Intermediate Communicationcited by 2
- 2025CodeSCM: Causal Analysis for Multi-Modal Code Generationcited by 2
- 2026BEAM: Bi-level Memory-adaptive Algorithmic Evolution for LLM-Powered Heuristic Designcited by 1
- 2024Task-oriented Prompt Enhancement via Script Generationcited by 0
- 2025Automated Code Generation and Validation for Software Components of Microcontrollerscited by 0
- 2026Design-Specification Tiling for ICL-based CAD Code Generationcited by 0
- 2026From Guessing to Placeholding: A Cost-Theoretic Framework for Uncertainty-Aware Code Completioncited by 0
- 2026CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verificationcited by 0
- 2026CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification7 Sep 2026
- 2026BEAM: Bi-level Memory-adaptive Algorithmic Evolution for LLM-Powered Heuristic Design14 Apr 2026
- 2026From Guessing to Placeholding: A Cost-Theoretic Framework for Uncertainty-Aware Code Completion2 Apr 2026
- 2026Design-Specification Tiling for ICL-based CAD Code Generation13 Mar 2026
- 2025ChartMaster: Advancing Chart-to-Code Generation with Real-World Charts and Chart Similarity Reinforcement Learning25 Aug 2025
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Action16 Jun 2025
- 2025TreeReview: A Dynamic Tree of Questions Framework for Deep and Efficient LLM-based Scientific Peer Review9 Jun 2025
- 2025Automated Code Generation and Validation for Software Components of Microcontrollers26 Feb 2025
- 2025CodeSCM: Causal Analysis for Multi-Modal Code Generation7 Feb 2025
- 2025FairCoder: Probing LLM Bias in High-Stakes Decision Making via Coding Tasks9 Jan 2025
- 2024TimeRefine: Temporal Grounding with Time Refining Video LLM12 Dec 2024
- 2024Enhancing Foundation Models for Time Series Forecasting via Wavelet-based Tokenization6 Dec 2024
15 more
- 2024Explainable Behavior Cloning: Teaching Large Language Model Agents through Learning by Demonstration30 Oct 2024
- 2024ReTok: Replacing Tokenizer to Enhance Representation Efficiency in Large Language Model6 Oct 2024
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging2 Oct 2024
- 2024Task-oriented Prompt Enhancement via Script Generation24 Sep 2024
- 2024All Against Some: Efficient Integration of Large Language Models for Message Passing in Graph Neural Networks20 Jul 2024
- 2024AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive Reasoning17 Jun 2024
- 2024A Survey on Large Language Models for Code Generation1 Jun 2024
- 2024CodeS: Natural Language to Code Repository via Multi-Layer Sketch25 Mar 2024
- 2024LLMs for Coding and Robotics Education9 Feb 2024
- 2023Self-Infilling Code Generation29 Nov 2023
- 2023ADaPT: As-Needed Decomposition and Planning with Language Models8 Nov 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023
- 2023Graph Ladling: Shockingly Simple Parallel GNN Training without Intermediate Communication18 Jun 2023
- 2023Instant Soup: Cheap Pruning Ensembles in A Single Pass Can Draw Lottery Tickets from Large Models18 Jun 2023
- 2023Generalized Planning in PDDL Domains with Pretrained Large Language Models18 May 2023
- 2024LLMs for Coding and Robotics Educationcited by 9
- 2024LLMs for Coding and Robotics Education9 Feb 2024
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2023Generalized Planning in PDDL Domains with Pretrained Large Language Modelscited by 139
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2025TreeReview: A Dynamic Tree of Questions Framework for Deep and Efficient LLM-based Scientific Peer Reviewcited by 31
- 2024CodeS: Natural Language to Code Repository via Multi-Layer Sketchcited by 28
- 2024Enhancing Foundation Models for Time Series Forecasting via Wavelet-based Tokenizationcited by 26
- 2023Instant Soup: Cheap Pruning Ensembles in A Single Pass Can Draw Lottery Tickets from Large Modelscited by 20
- 2024TimeRefine: Temporal Grounding with Time Refining Video LLMcited by 15
- 2025ChartMaster: Advancing Chart-to-Code Generation with Real-World Charts and Chart Similarity Reinforcement Learningcited by 15
- 2025FairCoder: Probing LLM Bias in High-Stakes Decision Making via Coding Taskscited by 9
- 2024ReTok: Replacing Tokenizer to Enhance Representation Efficiency in Large Language Modelcited by 5
12 most cited of 22 All 22 (JSON)
- 2026CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification7 Sep 2026
- 2026BEAM: Bi-level Memory-adaptive Algorithmic Evolution for LLM-Powered Heuristic Design14 Apr 2026
- 2026From Guessing to Placeholding: A Cost-Theoretic Framework for Uncertainty-Aware Code Completion2 Apr 2026
- 2026Design-Specification Tiling for ICL-based CAD Code Generation13 Mar 2026
- 2025ChartMaster: Advancing Chart-to-Code Generation with Real-World Charts and Chart Similarity Reinforcement Learning25 Aug 2025
- 2025TreeReview: A Dynamic Tree of Questions Framework for Deep and Efficient LLM-based Scientific Peer Review9 Jun 2025
- 2025Automated Code Generation and Validation for Software Components of Microcontrollers26 Feb 2025
- 2025CodeSCM: Causal Analysis for Multi-Modal Code Generation7 Feb 2025
- 2025FairCoder: Probing LLM Bias in High-Stakes Decision Making via Coding Tasks9 Jan 2025
- 2024TimeRefine: Temporal Grounding with Time Refining Video LLM12 Dec 2024
- 2024Enhancing Foundation Models for Time Series Forecasting via Wavelet-based Tokenization6 Dec 2024
- 2024ReTok: Replacing Tokenizer to Enhance Representation Efficiency in Large Language Model6 Oct 2024
12 newest of 22 All 22 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2025Understanding Chain-of-Thought Effectiveness in Code Generation: An Empirical and Information-Theoretic Analysis
- 2024Assessing Code Generation with Intermediate Languages
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation
- 2026AnCoder: Anchored Code Generation via Discrete Diffusion Models
- 2026Weave of Formal Thought
- 2023Self-planning Code Generation with Large Language Models
- 2025MSCoT: Structured Chain-of-Thought Generation for Multiple Programming Languages
- 2023AI Chain on Large Language Model for Unsupervised Control Flow Graph Generation for Statically-Typed Partial Code