mlsanityData to 7 Oct 2026

Exploring Dynamic Selection of Branch Expansion Orders for Code Generation

arXiv 2106.00261 ↗First posted 1 Jun 2021cs.CLcited by 10

Not on the map. Why?

Abstract (arXiv)

Due to the great potential in facilitating software development, code generation has attracted increasing attention recently. Generally, dominant models are Seq2Tree models, which convert the input natural language description into a sequence of tree-construction actions corresponding to the pre-order traversal of an Abstract Syntax Tree (AST). However, such a traversal order may not be suitable for handling all multi-branch nodes. In this paper, we propose to equip the Seq2Tree model with a context-based Branch Selector, which is able to dynamically determine optimal expansion orders of branches for multi-branch nodes. Particularly, since the selection of expansion orders is a non-differentiable multi-step operation, we optimize the selector through reinforcement learning, and formulate the reward function as the difference of model losses obtained through different expansion orders. Experimental results and in-depth analysis on several commonly-used datasets demonstrate the effectiveness and generality of our approach. We have released our code at https://github.com/DeepLearnXMU/CG-RL.

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 23 of its 30 references that are in the map. First posted on arXiv 1 Jun 2021.

Builds on

23 of 30 references.

References · 23

  1. 2017Attention Is All You Needcited by 59,932
  2. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  3. 2016Self-critical Sequence Training for Image Captioningcited by 544
  4. 2017SkipNet: Learning Dynamic Routing in Convolutional Networkscited by 328
  5. 2019Levenshtein Transformercited by 197
  6. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  7. 2016Language to Logical Form with Neural Attentioncited by 158
  8. 2019Insertion Transformer: Flexible Sequence Generation via Insertion Operationscited by 123
  9. 2018Coarse-to-Fine Decoding for Neural Semantic Parsingcited by 110
  10. 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
  11. 2018TRANX: A Transition-based Neural Abstract Syntax Parser for Semantic Parsing and Code Generationcited by 88
  12. 2016Latent Predictor Networks for Code Generationcited by 73
11 more
  1. 2019Code Generation as a Dual Task of Code Summarizationcited by 62
  2. 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
  3. 2019Non-Monotonic Sequential Text Generationcited by 55
  4. 2019Insertion-based Decoding with automatically Inferred Generation Ordercited by 43
  5. 2018Retrieval-Based Neural Code Generationcited by 41
  6. 2020Incorporating External Knowledge through Pre-training for Natural Language to Code Generationcited by 36
  7. 2019Program Synthesis and Semantic Parsing with Learned Code Idiomscited by 34
  8. 2018A Grammar-Based Structural CNN Decoder for Code Generationcited by 29
  9. 2020Dynamic Context Selection for Document-level Neural Machine Translation via Reinforcement Learningcited by 25
  10. 2018Asynchronous Bidirectional Decoding for Neural Machine Translationcited by 21
  11. 2021Improving Tree-Structured Decoder Training for Code Generation via Mutual Learningcited by 10

Built on by

Cited by year

Citing papers per year: 2021: 1; 2022: 4; 2023: 2; 2024: 1; 2025: 2.

10 papers.