A Grammar-Based Structural CNN Decoder for Code Generation
Not on the map. Why?
Abstract (arXiv)
Code generation maps a program description to executable source code in a programming language. Existing approaches mainly rely on a recurrent neural network (RNN) as the decoder. However, we find that a program contains significantly more tokens than a natural language sentence, and thus it may be inappropriate for RNN to capture such a long sequence. In this paper, we propose a grammar-based structural convolutional neural network (CNN) for code generation. Our model generates a program by predicting the grammar rules of the programming language; we design several CNN modules, including the tree-based convolution and pre-order convolution, whose information is further aggregated by dedicated attentive pooling layers. Experimental results on the HearthStone benchmark dataset show that our CNN code generator significantly outperforms the previous state-of-the-art method by 5 percentage points; additional experiments on several semantic parsing tasks demonstrate the robustness of our model. We also conduct in-depth ablation test to better understand each component of our model.
Key facts. Cited by 29 papers in the map (data through 7 Oct 2026). First posted on arXiv 14 Nov 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 8; 2022: 11; 2023: 6; 2024: 2; 2025: 2.
29 papers.
Sort:
By area:
- 2022Large Language Models Meet NL2Code: A Surveycited by 135
- 2022CERT: Continual Pre-Training on Sketches for Library-Oriented Code Generationcited by 87
- 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
- 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023Benchmarking and Explaining Large Language Model-based Code Generation: A Causality-Centric Approachcited by 15
- 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generationcited by 11
- 2021Improving Tree-Structured Decoder Training for Code Generation via Mutual Learningcited by 10
- 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generationcited by 10
- 2022Learning to Parallelize in a Shared-Memory Environment with Transformerscited by 10
- 2021Automatic Code Generation using Pre-Trained Language Modelscited by 8
- 2022T5QL: Taming language models for SQL generationcited by 8
17 more
- 2022CodePAD: Sequence-based Code Generation with Pushdown Automatoncited by 7
- 2024On the Limitations of Embedding Based Methods for Measuring Functional Correctness for Code Generationcited by 6
- 2021Embedding API Dependency Graph for Neural Code Generationcited by 5
- 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?cited by 5
- 2023Multi-Granularity Detector for Vulnerability Fixescited by 4
- 2022SapientML: Synthesizing Machine Learning Pipelines by Learning from Human-Written Solutionscited by 3
- 2022Transformer with Tree-order Encoding for Neural Program Generationcited by 3
- 2022NeuDep: Neural Binary Memory Dependence Analysiscited by 3
- 2023Neural Machine Translation for Code Generationcited by 3
- 2023Modularizing while Training: A New Paradigm for Modularizing DNN Modelscited by 3
- 2024Structured Code Representations Enable Data-Efficient Adaptation of Code Language Modelscited by 3
- 2021A Globally Normalized Neural Model for Semantic Parsingcited by 2
- 2025Speculative Decoding for Verilog: Speed and Quality, All in Onecited by 2
- 2021Auto-COP: Adaptation Generation in Context-Oriented Programming using Reinforcement Learning Optionscited by 0
- 2021Combining Improvements for Exploiting Dependency Trees in Neural Semantic Parsingcited by 0
- 2022Antecedent Predictions Are More Important Than You Think: An Effective Method for Tree-Based Code Generationcited by 0
- 2023Judging Adam: Studying the Performance of Optimization Methods on ML4SE Taskscited by 0
- 2025Speculative Decoding for Verilog: Speed and Quality, All in One18 Mar 2025
- 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?7 Mar 2025
- 2024On the Limitations of Embedding Based Methods for Measuring Functional Correctness for Code Generation26 Apr 2024
- 2024Structured Code Representations Enable Data-Efficient Adaptation of Code Language Models19 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Benchmarking and Explaining Large Language Model-based Code Generation: A Causality-Centric Approach10 Oct 2023
- 2023Modularizing while Training: A New Paradigm for Modularizing DNN Models15 Jun 2023
- 2023Multi-Granularity Detector for Vulnerability Fixes23 May 2023
- 2023Neural Machine Translation for Code Generation22 May 2023
- 2023Judging Adam: Studying the Performance of Optimization Methods on ML4SE Tasks6 Mar 2023
- 2022Large Language Models Meet NL2Code: A Survey19 Dec 2022
- 2022CodePAD: Sequence-based Code Generation with Pushdown Automaton2 Nov 2022
17 more
- 2022NeuDep: Neural Binary Memory Dependence Analysis4 Oct 2022
- 2022T5QL: Taming language models for SQL generation21 Sep 2022
- 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generation22 Aug 2022
- 2022Antecedent Predictions Are More Important Than You Think: An Effective Method for Tree-Based Code Generation22 Aug 2022
- 2022Out of the BLEU: how should we assess quality of the Code Generation models?5 Aug 2022
- 2022CERT: Continual Pre-Training on Sketches for Library-Oriented Code Generation14 Jun 2022
- 2022Transformer with Tree-order Encoding for Neural Program Generation30 May 2022
- 2022Learning to Parallelize in a Shared-Memory Environment with Transformers27 Apr 2022
- 2022SapientML: Synthesizing Machine Learning Pipelines by Learning from Human-Written Solutions18 Feb 2022
- 2021Combining Improvements for Exploiting Dependency Trees in Neural Semantic Parsing25 Dec 2021
- 2021A Syntax-Guided Edit Decoder for Neural Program Repair15 Jun 2021
- 2021A Globally Normalized Neural Model for Semantic Parsing7 Jun 2021
- 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generation1 Jun 2021
- 2021Improving Tree-Structured Decoder Training for Code Generation via Mutual Learning31 May 2021
- 2021Embedding API Dependency Graph for Neural Code Generation29 Mar 2021
- 2021Auto-COP: Adaptation Generation in Context-Oriented Programming using Reinforcement Learning Options11 Mar 2021
- 2021Automatic Code Generation using Pre-Trained Language Models21 Feb 2021
- 2022Large Language Models Meet NL2Code: A Surveycited by 135
- 2022CERT: Continual Pre-Training on Sketches for Library-Oriented Code Generationcited by 87
- 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
- 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023Benchmarking and Explaining Large Language Model-based Code Generation: A Causality-Centric Approachcited by 15
- 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generationcited by 11
- 2021Improving Tree-Structured Decoder Training for Code Generation via Mutual Learningcited by 10
- 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generationcited by 10
- 2022Learning to Parallelize in a Shared-Memory Environment with Transformerscited by 10
- 2021Automatic Code Generation using Pre-Trained Language Modelscited by 8
- 2022T5QL: Taming language models for SQL generationcited by 8
12 most cited of 28 All 28 (JSON)
- 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?7 Mar 2025
- 2024On the Limitations of Embedding Based Methods for Measuring Functional Correctness for Code Generation26 Apr 2024
- 2024Structured Code Representations Enable Data-Efficient Adaptation of Code Language Models19 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Benchmarking and Explaining Large Language Model-based Code Generation: A Causality-Centric Approach10 Oct 2023
- 2023Modularizing while Training: A New Paradigm for Modularizing DNN Models15 Jun 2023
- 2023Multi-Granularity Detector for Vulnerability Fixes23 May 2023
- 2023Neural Machine Translation for Code Generation22 May 2023
- 2023Judging Adam: Studying the Performance of Optimization Methods on ML4SE Tasks6 Mar 2023
- 2022Large Language Models Meet NL2Code: A Survey19 Dec 2022
- 2022CodePAD: Sequence-based Code Generation with Pushdown Automaton2 Nov 2022
- 2022NeuDep: Neural Binary Memory Dependence Analysis4 Oct 2022
12 newest of 28 All 28 (JSON)