Improving Tree-Structured Decoder Training for Code Generation via Mutual Learning
Not on the map. Why?
Abstract (arXiv)
Code generation aims to automatically generate a piece of code given an input natural language utterance. Currently, among dominant models, it is treated as a sequence-to-tree task, where a decoder outputs a sequence of actions corresponding to the pre-order traversal of an Abstract Syntax Tree. However, such a decoder only exploits the preorder traversal based preceding actions, which are insufficient to ensure correct action predictions. In this paper, we first throughly analyze the context modeling difference between neural code generation models with different traversals based decodings (preorder traversal vs breadth-first traversal), and then propose to introduce a mutual learning framework to jointly train these models. Under this framework, we continuously enhance both two models via mutual distillation, which involves synchronous executions of two one-to-one knowledge transfers at each training step. More specifically, we alternately choose one model as the student and the other as its teacher, and require the student to fit the training data and the action prediction distributions of its teacher. By doing so, both models can fully absorb the knowledge from each other and thus could be improved simultaneously. Experimental results and in-depth analysis on several benchmark datasets demonstrate the effectiveness of our approach. We release our code at https://github.com/DeepLearnXMU/CGML.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 19 of its 30 references that are in the map. First posted on arXiv 31 May 2021.
Builds on
19 of 30 references.
References · 19
- 2014FitNets: Hints for Thin Deep Netscited by 1,619
- 2017Deep Mutual Learningcited by 621
- 2018Born Again Neural Networkscited by 539
- 2018Knowledge Distillation by On-the-Fly Native Ensemblecited by 186
- 2016Language to Logical Form with Neural Attentioncited by 158
- 2018Coarse-to-Fine Decoding for Neural Semantic Parsingcited by 110
- 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
- 2018TRANX: A Transition-based Neural Abstract Syntax Parser for Semantic Parsing and Code Generationcited by 88
- 2019BAM! Born-Again Multi-Task Networks for Natural Language Understandingcited by 85
- 2016Latent Predictor Networks for Code Generationcited by 73
- 2019Code Generation as a Dual Task of Code Summarizationcited by 62
- 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
7 more
- 2020Incorporating External Knowledge through Pre-training for Natural Language to Code Generationcited by 36
- 2019Program Synthesis and Semantic Parsing with Learned Code Idiomscited by 34
- 2018A Grammar-Based Structural CNN Decoder for Code Generationcited by 29
- 2018Asynchronous Bidirectional Decoding for Neural Machine Translationcited by 21
- 2017The University of Edinburgh's Neural MT Systems for WMT17cited by 16
- 2019Iterative Dual Domain Adaptation for Neural Machine Translationcited by 10
- 2020Improving Domain-Adapted Sentiment Classification by Deep Adversarial Mutual Learningcited by 4
Built on by
Citing papers per year: 2021: 2; 2022: 5; 2023: 1; 2024: 0; 2025: 2.
10 papers.
- 2022StructCoder: Structure-Aware Transformer for Code Generationcited by 33
- 2025EpiCoder: Encompassing Diversity and Complexity in Code Generationcited by 21
- 2021Bridging Subword Gaps in Pretrain-Finetune Paradigm for Natural Language Generationcited by 14
- 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generationcited by 11
- 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generationcited by 10
- 2022CodePAD: Sequence-based Code Generation with Pushdown Automatoncited by 7
- 2022A Survey of Deep Learning Models for Structural Code Understandingcited by 4
- 2025UniGenCoder: Merging Seq2Seq and Seq2Tree Paradigms for Unified Code Generationcited by 2
- 2022Antecedent Predictions Are More Important Than You Think: An Effective Method for Tree-Based Code Generationcited by 0
- 2023Guiding AMR Parsing with Reverse Graph Linearizationcited by 0
- 2025UniGenCoder: Merging Seq2Seq and Seq2Tree Paradigms for Unified Code Generation18 Feb 2025
- 2025EpiCoder: Encompassing Diversity and Complexity in Code Generation8 Jan 2025
- 2023Guiding AMR Parsing with Reverse Graph Linearization13 Oct 2023
- 2022CodePAD: Sequence-based Code Generation with Pushdown Automaton2 Nov 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
- 2022StructCoder: Structure-Aware Transformer for Code Generation10 Jun 2022
- 2022A Survey of Deep Learning Models for Structural Code Understanding3 May 2022
- 2021Bridging Subword Gaps in Pretrain-Finetune Paradigm for Natural Language Generation11 Jun 2021
- 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generation1 Jun 2021